org.openanzo.common.rdb.query
Class BlankNode

java.lang.Object
  extended by org.openanzo.common.rdb.query.BlankNode
All Implemented Interfaces:
java.lang.Comparable<TriplePatternComponent>, IRdbTerm, IBlankTerm, RDFTerm, TriplePatternComponent

public class BlankNode
extends java.lang.Object
implements IRdbTerm, IBlankTerm, java.lang.Comparable<TriplePatternComponent>

BlankNode Term for Anzo Glitter mapping

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
BlankNode(org.openrdf.model.BNode value)
          Create a new BlankNode for the given Anzo BNode
BlankNode(CompositeNodeLayout nodeLayout, long id)
          Create a new BlankNode for the given ID
 
Method Summary
 int compareTo(TriplePatternComponent o)
          Compares to TriplePatternComponents for ordering.
 boolean equals(java.lang.Object other)
           
 long getId()
          Get the ID of this node in the database
 org.openrdf.model.Value getValue()
          Get the Value representation of this term
 void populateData()
          Lookup the BNodes ID in the database
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlankNode

public BlankNode(org.openrdf.model.BNode value)
Create a new BlankNode for the given Anzo BNode

Parameters:
value - Anzo BNode value

BlankNode

public BlankNode(CompositeNodeLayout nodeLayout,
                 long id)
Create a new BlankNode for the given ID

Parameters:
nodeLayout - layout where value is stored
id - ID of value in DB
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface TriplePatternComponent
Overrides:
equals in class java.lang.Object

getId

public long getId()
Description copied from interface: IRdbTerm
Get the ID of this node in the database

Specified by:
getId in interface IRdbTerm
Returns:
the ID of this node in the database

populateData

public void populateData()
Lookup the BNodes ID in the database


getValue

public org.openrdf.model.Value getValue()
Description copied from interface: IRdbTerm
Get the Value representation of this term

Specified by:
getValue in interface IRdbTerm
Returns:
the Value representation of this term

compareTo

public int compareTo(TriplePatternComponent o)
Description copied from interface: TriplePatternComponent
Compares to TriplePatternComponents for ordering.

Specified by:
compareTo in interface java.lang.Comparable<TriplePatternComponent>
Specified by:
compareTo in interface TriplePatternComponent
Returns:
-1 if this comes before other; 0 if TriplePatternComponent.equals(Object) is true, and 1 otherwise.


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.