|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jrdf.graph.AbstractTripleFactory
public abstract class AbstractTripleFactory
The base implementation of the Triple Factory which adds to a given graph reified statements, containers and collections.
Field Summary | |
---|---|
protected GraphElementFactory |
elementFactory
The graph element factory. |
protected Graph |
graph
The graph that this factory constructs nodes for. |
Constructor Summary | |
---|---|
AbstractTripleFactory()
|
Method Summary | |
---|---|
void |
addAlternative(SubjectNode subjectNode,
Alternative<ObjectNode> alternative)
Inserts a alternative using the given subject. |
void |
addBag(SubjectNode subjectNode,
Bag<ObjectNode> bag)
Inserts a bag using the given subject. |
void |
addCollection(SubjectNode firstNode,
Collection<ObjectNode> collection)
Inserts a collection using the given subject. |
void |
addSequence(SubjectNode subjectNode,
Sequence<ObjectNode> sequence)
Inserts a sequence using the given subject. |
void |
reifyTriple(SubjectNode subjectNode,
PredicateNode predicateNode,
ObjectNode objectNode,
SubjectNode reificationNode)
Reifies a triple. |
void |
reifyTriple(Triple triple,
SubjectNode reificationNode)
Creates a reification of a triple. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jrdf.graph.TripleFactory |
---|
createTriple |
Field Detail |
---|
protected Graph graph
protected GraphElementFactory elementFactory
Constructor Detail |
---|
public AbstractTripleFactory()
Method Detail |
---|
public void reifyTriple(SubjectNode subjectNode, PredicateNode predicateNode, ObjectNode objectNode, SubjectNode reificationNode) throws TripleFactoryException, AlreadyReifiedException
reifyTriple
in interface TripleFactory
subjectNode
- the subject of the triple.predicateNode
- the predicate of the triple.objectNode
- the object of the triple.reificationNode
- a node denoting the reified triple.
TripleFactoryException
- If the resource failed to be created.
AlreadyReifiedException
- If there was already a triple URI for
the given triple.public void reifyTriple(Triple triple, SubjectNode reificationNode) throws TripleFactoryException, AlreadyReifiedException
reifyTriple
in interface TripleFactory
triple
- the triple to be reified.reificationNode
- a node denoting the reified triple.
TripleFactoryException
- If the resource failed to be created.
AlreadyReifiedException
- If there was already a triple URI for
the given triple.public void addAlternative(SubjectNode subjectNode, Alternative<ObjectNode> alternative) throws TripleFactoryException
TripleFactory
addAlternative
in interface TripleFactory
subjectNode
- the subject node of the triple.alternative
- the alternative to add.
TripleFactoryException
- If the resources were failed to be added.public void addBag(SubjectNode subjectNode, Bag<ObjectNode> bag) throws TripleFactoryException
TripleFactory
addBag
in interface TripleFactory
subjectNode
- the subject node of the triple.bag
- the bag to add.
TripleFactoryException
- If the resources were failed to be added.public void addSequence(SubjectNode subjectNode, Sequence<ObjectNode> sequence) throws TripleFactoryException
TripleFactory
addSequence
in interface TripleFactory
subjectNode
- the subject node of the triple.sequence
- the sequence to add.
TripleFactoryException
- If the resources were failed to be added.public void addCollection(SubjectNode firstNode, Collection<ObjectNode> collection) throws TripleFactoryException
TripleFactory
addCollection
in interface TripleFactory
firstNode
- the subject node of the triple.collection
- the collection to add.
TripleFactoryException
- If the resources were failed to be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |