|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Graph Element Factory is a class which creates the various components of a graph including: resources, literals and triples. It is generally tied to a specific graph.
Method Summary | |
Literal |
createLiteral(String lexicalValue)
Creates a new literal with the given lexical value, with no language or datatype. |
Literal |
createLiteral(String lexicalValue,
String languageType)
Creates a new literal with the given lexical value, with a given language but no datatype. |
Literal |
createLiteral(String lexicalValue,
URI datatypeURI)
Creates a new literal with the given lexical value and given datatype. |
BlankNode |
createResource()
Create a blank nodes that is associated with a specific graph. |
URIReference |
createResource(URI uri)
Create a URI reference. |
URIReference |
createResource(URI uri,
boolean validate)
Create a URI reference without checking if the URI given is a valid RDF URI, currently if the URI is absolute. |
Triple |
createTriple(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Creates a new triple to be used in the graph. |
Method Detail |
public BlankNode createResource() throws GraphElementFactoryException
GraphElementFactoryException
- if adding a blank node fails.public URIReference createResource(URI uri) throws GraphElementFactoryException
uri
- The URI of the resource.
GraphElementFactoryException
- If the resource failed to be created.public URIReference createResource(URI uri, boolean validate) throws GraphElementFactoryException
uri
- The URI of the resource.validate
- true if we disbale checking to see if the URI is valid.
GraphElementFactoryException
public Literal createLiteral(String lexicalValue) throws GraphElementFactoryException
lexicalValue
- The lexical value for the literal.
GraphElementFactoryException
- If the resource failed to be created.public Literal createLiteral(String lexicalValue, String languageType) throws GraphElementFactoryException
lexicalValue
- The lexical value for the literal. Cannot be null.languageType
- The language of the literal or null if not required.
GraphElementFactoryException
- If the resource failed to be created.public Literal createLiteral(String lexicalValue, URI datatypeURI) throws GraphElementFactoryException
lexicalValue
- The lexical value for the literal. Cannot be null.datatypeURI
- The URI of the datatype of the literal or null if not
required.
GraphElementFactoryException
- If the resource failed to be created.public Triple createTriple(SubjectNode subject, PredicateNode predicate, ObjectNode object) throws GraphElementFactoryException
subject
- The subject of the statement.predicate
- The predicate of the statement.object
- The object of the statement.
GraphElementFactoryException
- If the resource failed to be created.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |