|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrdf.graph.local.GraphElementFactoryImpl
public final class GraphElementFactoryImpl
A GraphElementFactory is a class which create the various components of a graph. It is tied to a specific instance of GraphImpl.
| Constructor Summary | |
|---|---|
GraphElementFactoryImpl(ResourceFactory newResourceFactory,
Localizer newLocalizer,
GraphValueFactory newValueFactory)
Package scope constructor. |
|
| Method Summary | |
|---|---|
BlankNode |
createBlankNode()
Create a blank node that is associated with a specific graph. |
Literal |
createLiteral(Object object)
Converts a known Java class (such as Integer) into an RDF literal (XSD:int). |
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. |
Resource |
createResource()
Create a resource, wrapping a blank node that is associated with a specific graph. |
Resource |
createResource(BlankNode node)
Wrap a blank node in a resource. |
Resource |
createResource(Node node)
|
Resource |
createResource(URI uri)
Create a URI reference wrapped in a Resource. |
Resource |
createResource(URI uri,
boolean validate)
Create a URI reference wrapped in a Resource without checking if the URI given is a valid RDF URI, currently if the URI is absolute. |
Resource |
createResource(URIReference node)
Wrap a URIReference in a resource. |
URIReference |
createURIReference(URI uri)
Create a URI reference. |
URIReference |
createURIReference(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphElementFactoryImpl(ResourceFactory newResourceFactory,
Localizer newLocalizer,
GraphValueFactory newValueFactory)
| Method Detail |
|---|
public Resource createResource()
throws GraphElementFactoryException
GraphElementFactory
createResource in interface GraphElementFactoryGraphElementFactoryException - if adding a blank node fails.
public Resource createResource(BlankNode node)
throws GraphElementFactoryException
GraphElementFactory
createResource in interface GraphElementFactorynode - the node to wrap.
GraphElementFactoryException - if the blank node does not exist.
public Resource createResource(URIReference node)
throws GraphElementFactoryException
GraphElementFactory
createResource in interface GraphElementFactorynode - the node to wrap.
GraphElementFactoryException - if the URIReference does not exist.
public Resource createResource(URI uri)
throws GraphElementFactoryException
GraphElementFactory
createResource in interface GraphElementFactoryuri - The URI of the resource.
GraphElementFactoryException - If the resource failed to be created.
public Resource createResource(URI uri,
boolean validate)
throws GraphElementFactoryException
GraphElementFactory
createResource in interface GraphElementFactoryuri - The URI of the resource.validate - true if we disbale checking to see if the URI is valid.
GraphElementFactoryException - If the resource failed to be created.
public Resource createResource(Node node)
throws GraphElementFactoryException
createResource in interface GraphElementFactoryGraphElementFactoryException
public BlankNode createBlankNode()
throws GraphElementFactoryException
GraphElementFactory
createBlankNode in interface GraphElementFactoryGraphElementFactoryException - if adding a blank node fails.
public URIReference createURIReference(URI uri)
throws GraphElementFactoryException
GraphValueFactory
createURIReference in interface GraphValueFactoryuri - The URI of the resource.
GraphElementFactoryException - If the resource failed to be created.
public URIReference createURIReference(URI uri,
boolean validate)
throws GraphElementFactoryException
GraphValueFactory
createURIReference in interface GraphValueFactoryuri - The URI of the resource.validate - true if we disbale checking to see if the URI is valid.
GraphElementFactoryException - If the resource failed to be created.
public Literal createLiteral(Object object)
throws GraphElementFactoryException
GraphValueFactory
createLiteral in interface GraphValueFactoryobject - the value object (a Java class) to create the literal from.
GraphElementFactoryException - If the literal failed to be created.
public Literal createLiteral(String lexicalValue)
throws GraphElementFactoryException
GraphValueFactory
createLiteral in interface GraphValueFactorylexicalValue - The lexical value for the literal.
GraphElementFactoryException - If the literal failed to be created.
public Literal createLiteral(String lexicalValue,
String languageType)
throws GraphElementFactoryException
GraphValueFactory
createLiteral in interface GraphValueFactorylexicalValue - The lexical value for the literal. Cannot be null.languageType - The language of the literal or null if not required.
GraphElementFactoryException - If the literal failed to be created.
public Literal createLiteral(String lexicalValue,
URI datatypeURI)
throws GraphElementFactoryException
GraphValueFactory
createLiteral in interface GraphValueFactorylexicalValue - 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 literal failed to be created.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||