|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TripleFactory
A Triple Factory is a class which defines the creation of triples and certain sets of triples. This includes generating triples for reification, containers and collections.
Method Summary | |
---|---|
void |
addAlternative(SubjectNode subjectNode,
Alternative alternative)
Inserts a alternative using the given subject. |
void |
addBag(SubjectNode subjectNode,
Bag bag)
Inserts a bag using the given subject. |
void |
addCollection(SubjectNode firstNode,
Collection collection)
Inserts a collection using the given subject. |
void |
addSequence(SubjectNode subjectNode,
Sequence sequence)
Inserts a sequence using the given subject. |
Triple |
addTriple(URI subject,
URI predicate,
Object object)
Creates and adds a new triple to the graph. |
Triple |
addTriple(URI subject,
URI predicate,
String object)
Creates and adds a new triple to the graph. |
Triple |
addTriple(URI subject,
URI predicate,
String object,
String language)
Creates and adds new triple to the graph. |
Triple |
addTriple(URI subject,
URI predicate,
String object,
URI dataType)
Creates and adds new triple to graph. |
Triple |
addTriple(URI subject,
URI predicate,
URI object)
Creates and adds a new triple to the graph. |
Triple |
createTriple(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Creates a new triple to be used in the graph. |
void |
reifyTriple(SubjectNode subjectNode,
PredicateNode predicateNode,
ObjectNode objectNode,
SubjectNode reificationNode)
Reifies a triple. 4 statements are added with the given subject, predicate and object. |
void |
reifyTriple(Triple triple,
SubjectNode reificationNode)
Reifies a triple. 4 statements are added with the triple's subject, predicate and object. |
Method Detail |
---|
Triple addTriple(URI subject, URI predicate, URI object) throws GraphElementFactoryException
subject
- The subject of the statement.predicate
- The predicate of the statement.object
- The object of the statement.
GraphElementFactoryException
- if it fails to create the given subject, predicate object.Triple addTriple(URI subject, URI predicate, String object) throws GraphElementFactoryException
subject
- The subject of the statement.predicate
- The predicate of the statement.object
- The object of the statement. Creates a literal without a language or datatype with the given
lexical value.
GraphElementFactoryException
- if it fails to create the given subject, predicate and object.Triple addTriple(URI subject, URI predicate, Object object) throws GraphElementFactoryException
subject
- The subject of the statement.predicate
- The predicate of the statement.object
- The native value of the object of the statement.
GraphElementFactoryException
- if it fails to create the given subject, predicate and object. The object
must have a type registered in the DatatypeFactory.Triple addTriple(URI subject, URI predicate, String object, String language) throws GraphElementFactoryException
subject
- The subject of the statement.predicate
- The predicate of the statement.object
- The lexical value of the literal.language
- The language of the object.
GraphElementFactoryException
- if it fails to create the given subject, predicate and object.Triple addTriple(URI subject, URI predicate, String object, URI dataType) throws GraphElementFactoryException
subject
- The subject of the statement.predicate
- The predicate of the statement.object
- The lexical value of the literal.dataType
- The datatype of the object.
GraphElementFactoryException
- if it fails to create the given subject, predicate and object.Triple createTriple(SubjectNode subject, PredicateNode predicate, ObjectNode object)
subject
- The subject of the statement.predicate
- The predicate of the statement.object
- The object of the statement.
void reifyTriple(SubjectNode subjectNode, PredicateNode predicateNode, ObjectNode objectNode, SubjectNode reificationNode) throws TripleFactoryException
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 added.
AlreadyReifiedException
- If there was already a triple URI for the given triple.void reifyTriple(Triple triple, SubjectNode reificationNode) throws TripleFactoryException
triple
- the triple to be reified.reificationNode
- a node denoting the reified triple.
TripleFactoryException
- If the resource failed to be added, for example already reified.void addAlternative(SubjectNode subjectNode, Alternative alternative) throws TripleFactoryException
subjectNode
- the subject node of the triple.alternative
- the alternative to add.
TripleFactoryException
- If the resources were failed to be added.void addBag(SubjectNode subjectNode, Bag bag) throws TripleFactoryException
subjectNode
- the subject node of the triple.bag
- the bag to add.
TripleFactoryException
- If the resources were failed to be added.void addSequence(SubjectNode subjectNode, Sequence sequence) throws TripleFactoryException
subjectNode
- the subject node of the triple.sequence
- the sequence to add.
TripleFactoryException
- If the resources were failed to be added.void addCollection(SubjectNode firstNode, Collection collection) throws TripleFactoryException
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 |