org.dftproject.genesis.core.data.nodes
Interface IResourceNode

All Superinterfaces:
INode
All Known Implementing Classes:
DataResourceNode, ResourceNode

public interface IResourceNode
extends INode

A resource node.

This interface is due for a major refactoring.


Method Summary
 void addObject(IResourceNode predicate, INode object, IResourceNode graph)
          Adds a statement wherein this node is the subject.
 INode getFirstObject(IResourceNode predicate)
          Returns the first object related to this node (as a subject) by the given predicate.
 Statement getFirstQuadAsSubject(IResourceNode predicate)
          Returns the first statement with the given predicate wherein this node is the subject.
 java.util.Map<IResourceNode,java.util.Set<Statement>> getQuadsAsSubject()
          Returns the mapping of predicate to statements wherein this node serves as the subject.
 java.util.Set<Statement> getQuadsAsSubject(IResourceNode predicate)
          Returns the statements with the given predicate wherein this node is the subject.
 org.apache.commons.collections.MultiMap getSubjects()
          Returns the subjects.
 java.lang.String getURI()
          Returns the name of this node.
 void removeObject(IResourceNode predicate, INode object, IResourceNode graph)
          Removes a statement wherein this node is the subject.
 

Method Detail

getURI

java.lang.String getURI()
Returns the name of this node.

Returns:
the name of this node

getSubjects

org.apache.commons.collections.MultiMap getSubjects()
Returns the subjects.

Returns:
the subjects

getQuadsAsSubject

java.util.Map<IResourceNode,java.util.Set<Statement>> getQuadsAsSubject()
Returns the mapping of predicate to statements wherein this node serves as the subject.

Returns:
the mapping

addObject

void addObject(IResourceNode predicate,
               INode object,
               IResourceNode graph)
Adds a statement wherein this node is the subject.

Parameters:
predicate - the predicate
object - the object
graph - the graph

removeObject

void removeObject(IResourceNode predicate,
                  INode object,
                  IResourceNode graph)
Removes a statement wherein this node is the subject.

Parameters:
predicate - the predicate
object - the object
graph - the graph

getQuadsAsSubject

java.util.Set<Statement> getQuadsAsSubject(IResourceNode predicate)
Returns the statements with the given predicate wherein this node is the subject.

Parameters:
predicate - the predicate
Returns:
the statements

getFirstQuadAsSubject

Statement getFirstQuadAsSubject(IResourceNode predicate)
Returns the first statement with the given predicate wherein this node is the subject.

Returns:
the statement

getFirstObject

INode getFirstObject(IResourceNode predicate)
Returns the first object related to this node (as a subject) by the given predicate.

Parameters:
predicate - the predicate
Returns:
the object