org.openrdf.sesame.sailimpl.memory
Class BNodeNode

java.lang.Object
  extended byorg.openrdf.model.impl.BNodeImpl
      extended byorg.openrdf.sesame.sailimpl.memory.BNodeNode
All Implemented Interfaces:
BNode, Comparable, Resource, ResourceNode, Serializable, Value, ValueNode

public class BNodeNode
extends BNodeImpl
implements ResourceNode

An extension of BNode giving it node properties.

Version:
$Revision: 1.12.4.2 $
Author:
Arjohn Kampman
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.openrdf.sesame.sailimpl.memory.ResourceNode
EMPTY_LIST
 
Method Summary
 void addObjectStatement(Statement st)
          Adds a statement to this BNodeNode's list of statements for which it is the object.
 void addProperty(URI property, Value value)
          Adds a property to this Resource in the RDF graph.
 void addSubjectStatement(Statement st)
          Adds a statement to this BNodeNode's list of statements for which it is the subject.
 void clearCache()
          clears all caches for direct type, subclass and subproperty relations.
 StatementIterator getDirectSubClassStatements()
           
 StatementIterator getDirectSubPropertyStatements()
           
 StatementIterator getDirectTypeStatements()
           
 int getObjectStatementCount()
          Gets the amount of Statements for which this BNodeNode is the object.
 StatementList getObjectStatementList()
           
 StatementIterator getObjectStatements()
          Gets the list of Statements for which this BNodeNode is the object.
 RdfSource getRdfSource()
          Returns the RdfSource that contains this ValueNode.
 int getSubjectStatementCount()
          Gets the amount of Statements for which this BNodeNode is the subject.
 StatementList getSubjectStatementList()
           
 StatementIterator getSubjectStatements()
          Gets the list of Statements for which this BNodeNode is the subject.
 boolean isDirectSubClass(Resource aClass)
           
 boolean isDirectSubProperty(Resource aProperty)
           
 boolean isDirectType(Resource aClass)
           
 void removeObjectStatement(Statement st)
          Removes a statement from this BNodeNode's list of statements for which it is the object.
 void removeSubjectStatement(Statement st)
          Removes a statement from this BNodeNode's list of statements for which it is the subject.
 
Methods inherited from class org.openrdf.model.impl.BNodeImpl
compareTo, equals, getID, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getSubjectStatementList

public StatementList getSubjectStatementList()
Specified by:
getSubjectStatementList in interface ResourceNode

getSubjectStatements

public StatementIterator getSubjectStatements()
Gets the list of Statements for which this BNodeNode is the subject.

Specified by:
getSubjectStatements in interface Resource
Overrides:
getSubjectStatements in class BNodeImpl
Returns:
A List of Statements.

getSubjectStatementCount

public int getSubjectStatementCount()
Gets the amount of Statements for which this BNodeNode is the subject.

Specified by:
getSubjectStatementCount in interface ResourceNode
Returns:
An integer larger than or equal to 0.

addSubjectStatement

public void addSubjectStatement(Statement st)
Adds a statement to this BNodeNode's list of statements for which it is the subject.

Specified by:
addSubjectStatement in interface ResourceNode

removeSubjectStatement

public void removeSubjectStatement(Statement st)
Removes a statement from this BNodeNode's list of statements for which it is the subject.

Specified by:
removeSubjectStatement in interface ResourceNode

getObjectStatementList

public StatementList getObjectStatementList()
Specified by:
getObjectStatementList in interface ValueNode

getObjectStatements

public StatementIterator getObjectStatements()
Gets the list of Statements for which this BNodeNode is the object.

Specified by:
getObjectStatements in interface Value
Overrides:
getObjectStatements in class BNodeImpl
Returns:
A List of Statements, or null if no such statement exists.

getObjectStatementCount

public int getObjectStatementCount()
Gets the amount of Statements for which this BNodeNode is the object.

Specified by:
getObjectStatementCount in interface ValueNode
Returns:
An integer larger than or equal to 0.

addObjectStatement

public void addObjectStatement(Statement st)
Adds a statement to this BNodeNode's list of statements for which it is the object.

Specified by:
addObjectStatement in interface ValueNode

removeObjectStatement

public void removeObjectStatement(Statement st)
Removes a statement from this BNodeNode's list of statements for which it is the object.

Specified by:
removeObjectStatement in interface ValueNode

getRdfSource

public RdfSource getRdfSource()
Description copied from interface: ValueNode
Returns the RdfSource that contains this ValueNode. ValueNodes are only unique within a single repository, but an application could use several repository at the same time, passing ValueNodes generated by one Sail to another Sail. In such situations, the ValueNode of the first Sail cannot be used by the second Sail.

Specified by:
getRdfSource in interface ValueNode

addProperty

public void addProperty(URI property,
                        Value value)
                 throws GraphException
Description copied from interface: Resource
Adds a property to this Resource in the RDF graph. The result is that a statement of the form (this, property, value) is added.

Specified by:
addProperty in interface Resource
Overrides:
addProperty in class BNodeImpl
Throws:
GraphException

getDirectSubClassStatements

public StatementIterator getDirectSubClassStatements()
Specified by:
getDirectSubClassStatements in interface ResourceNode

isDirectSubClass

public boolean isDirectSubClass(Resource aClass)
Specified by:
isDirectSubClass in interface ResourceNode

getDirectTypeStatements

public StatementIterator getDirectTypeStatements()
Specified by:
getDirectTypeStatements in interface ResourceNode

isDirectType

public boolean isDirectType(Resource aClass)
Specified by:
isDirectType in interface ResourceNode

getDirectSubPropertyStatements

public StatementIterator getDirectSubPropertyStatements()
Specified by:
getDirectSubPropertyStatements in interface ResourceNode

isDirectSubProperty

public boolean isDirectSubProperty(Resource aProperty)
Specified by:
isDirectSubProperty in interface ResourceNode

clearCache

public void clearCache()
Description copied from interface: ResourceNode
clears all caches for direct type, subclass and subproperty relations.

Specified by:
clearCache in interface ResourceNode


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.