org.semanticdesktop.aperture.rdf
Interface ValueFactory

All Known Implementing Classes:
ValueFactoryImpl

public interface ValueFactory

Creates RDF2Go Literals, Uris, Blank nodes and Statements.


Method Summary
 BlankNode createBlankNode()
          Creates a new blank node.
 Literal createLiteral(boolean value)
          Creates a new xsd:boolean-typed literal representing the specified value.
 Literal createLiteral(byte value)
          Creates a new xsd:byte-typed literal representing the specified value.
 Literal createLiteral(double value)
          Creates a new xsd:double-typed literal representing the specified value.
 Literal createLiteral(float value)
          Creates a new xsd:float-typed literal representing the specified value.
 Literal createLiteral(int value)
          Creates a new xsd:int-typed literal representing the specified value.
 Literal createLiteral(long value)
          Creates a new xsd:long-typed literal representing the specified value.
 Literal createLiteral(short value)
          Creates a new xsd:short-typed literal representing the specified value.
 Literal createLiteral(String label)
          Creates a new literal with the supplied label.
 Literal createLiteral(String label, URI datatype)
          Creates a new literal with the supplied label and datatype.
 Statement createStatement(Resource subject, URI predicate, Node object)
          Creates a new statement with the supplied subject, predicate and object.
 URI createURI(String uri)
          Creates a new URI from the supplied string-representation.
 URI createURI(String namespaceUri, String localName)
          Creates a new URI from the namespace uri and local name;
 

Method Detail

createURI

URI createURI(String uri)
              throws ModelException
Creates a new URI from the supplied string-representation.

Parameters:
uri - A string-representation of a URI.
Returns:
An object representing the URI.
Throws:
ModelException

createURI

URI createURI(String namespaceUri,
              String localName)
              throws ModelException
Creates a new URI from the namespace uri and local name;

Parameters:
namespaceUri - A string-representation of a namespace URI.
localName - A string representation of the local name
Returns:
An object representing the URI.
Throws:
ModelException

createBlankNode

BlankNode createBlankNode()
Creates a new blank node.

Returns:
An object representing the blank node.

createLiteral

Literal createLiteral(String label)
                      throws ModelException
Creates a new literal with the supplied label.

Parameters:
label - The literal's label.
Throws:
ModelException

createLiteral

Literal createLiteral(String label,
                      URI datatype)
                      throws ModelException
Creates a new literal with the supplied label and datatype.

Parameters:
label - The literal's label.
datatype - The literal's datatype, or null if the literal doesn't have a datatype.
Throws:
ModelException

createLiteral

Literal createLiteral(boolean value)
                      throws ModelException
Creates a new xsd:boolean-typed literal representing the specified value.

Parameters:
value - The value for the literal
Returns:
An xsd:boolean-typed literal for the specified value.
Throws:
ModelException

createLiteral

Literal createLiteral(long value)
                      throws ModelException
Creates a new xsd:long-typed literal representing the specified value.

Parameters:
value - The value for the literal
Returns:
An xsd:long-typed literal for the specified value.
Throws:
ModelException

createLiteral

Literal createLiteral(int value)
                      throws ModelException
Creates a new xsd:int-typed literal representing the specified value.

Parameters:
value - The value for the literal
Returns:
An xsd:int-typed literal for the specified value.
Throws:
ModelException

createLiteral

Literal createLiteral(short value)
                      throws ModelException
Creates a new xsd:short-typed literal representing the specified value.

Parameters:
value - The value for the literal
Returns:
An xsd:short-typed literal for the specified value.
Throws:
ModelException

createLiteral

Literal createLiteral(byte value)
                      throws ModelException
Creates a new xsd:byte-typed literal representing the specified value.

Parameters:
value - The value for the literal
Returns:
An xsd:byte-typed literal for the specified value.
Throws:
ModelException

createLiteral

Literal createLiteral(double value)
                      throws ModelException
Creates a new xsd:double-typed literal representing the specified value.

Parameters:
value - The value for the literal
Returns:
An xsd:double-typed literal for the specified value.
Throws:
ModelException

createLiteral

Literal createLiteral(float value)
                      throws ModelException
Creates a new xsd:float-typed literal representing the specified value.

Parameters:
value - The value for the literal
Returns:
An xsd:float-typed literal for the specified value.
Throws:
ModelException

createStatement

Statement createStatement(Resource subject,
                          URI predicate,
                          Node object)
Creates a new statement with the supplied subject, predicate and object.

Parameters:
subject - The statement's subject.
predicate - The statement's predicate.
object - The statement's object.
Returns:
The created statement.


Copyright © 2010 Aperture Development Team. All Rights Reserved.