de.fuberlin.wiwiss.ng4j.swp.c14n
Class C14NTriple

java.lang.Object
  extended by de.fuberlin.wiwiss.ng4j.swp.c14n.C14NTriple
All Implemented Interfaces:
Comparable

public class C14NTriple
extends Object
implements Comparable

Canonical triple representation. This implementation is based on the DBin code by Giovanni Tummarello.


Field Summary
 boolean flag
           
 Node object
           
 Node objectID
           
 Node predicate
           
 DecimalFormat sixDigitsFormat
           
 Node subject
           
 Node subjectID
           
static Node TILDE
           
 
Constructor Summary
C14NTriple(C14NTriple st, Hashtable ht, int symCount)
           
C14NTriple(Node s, Node p, Node o)
           
 
Method Summary
 int compareTo(Object arg)
           
 String createTripleString(C14NTriple t)
          Create a string of triples in the form: subject, predicate object.
 boolean setTildeObject(Hashtable ht)
          Replace the values of object with value found in hashtable
 boolean setTildeSubject(Hashtable ht)
          Replace the values of object with value found in hashtable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subject

public Node subject

predicate

public Node predicate

object

public Node object

subjectID

public Node subjectID

objectID

public Node objectID

TILDE

public static final Node TILDE

sixDigitsFormat

public final DecimalFormat sixDigitsFormat

flag

public boolean flag
Constructor Detail

C14NTriple

public C14NTriple(Node s,
                  Node p,
                  Node o)

C14NTriple

public C14NTriple(C14NTriple st,
                  Hashtable ht,
                  int symCount)
Method Detail

setTildeObject

public boolean setTildeObject(Hashtable ht)
Replace the values of object with value found in hashtable

Parameters:
ht - hashtable of Node object
Returns:
true if the value is set with the value in the hashtable

setTildeSubject

public boolean setTildeSubject(Hashtable ht)
Replace the values of object with value found in hashtable

Parameters:
ht - hashtable of Node object
Returns:
true if the value is set with the value in the hashtable

compareTo

public int compareTo(Object arg)
              throws ClassCastException
Specified by:
compareTo in interface Comparable
Throws:
ClassCastException

createTripleString

public String createTripleString(C14NTriple t)
Create a string of triples in the form: subject, predicate object.

Parameters:
t - C14NTtriple object
Returns:
triple string