org.ontoware.rdf2go.model
Interface ModelValueFactory

All Known Subinterfaces:
Model, ModelSet

public interface ModelValueFactory

Factory-like parts of an RDF2Go-Model

Author:
voelkel

Method Summary
 BlankNode createBlankNode()
          Create (but do not add) a new blank node
 BlankNode createBlankNode(java.lang.String internalID)
          Create a new blank node with the given internal ID.
 DatatypeLiteral createDatatypeLiteral(java.lang.String literal, URI datatypeURI)
           
 LanguageTagLiteral createLanguageTagLiteral(java.lang.String literal, java.lang.String langugeTag)
           
 PlainLiteral createPlainLiteral(java.lang.String literal)
          Create a new plain literal
 Statement createStatement(Resource subject, URI predicate, Node object)
          Create a new statement - but DOES NOT add it to the model
 URI createURI(java.lang.String uriString)
          The model must create URIs it would accept itself.
 boolean isValidURI(java.lang.String uriString)
          CHecks URI for syntax errors.
 URI newRandomUniqueURI()
          Implementations are free to choose if their semantics are unique within the this model, the ModelSet, or unique in the universe
 

Method Detail

createBlankNode

BlankNode createBlankNode()
Create (but do not add) a new blank node

Returns:
a new blank node

createBlankNode

BlankNode createBlankNode(java.lang.String internalID)
Create a new blank node with the given internal ID. The id should be one returned from BlankNode.getInternalID().

Parameters:
internalID -
Returns:
a BlankNode with the given internal ID.
Throws:
java.lang.UnsupportedOperationException - if the underlying store cannot create BlankNodes from IDs.
java.lang.IllegalArgumentException - if the internalID could not be used

createURI

URI createURI(java.lang.String uriString)
              throws java.lang.IllegalArgumentException
The model must create URIs it would accept itself.

Returns:
a new URI from the given String
Throws:
IllegalArgumentException, - e.g. if URI is invalid
java.lang.IllegalArgumentException

isValidURI

boolean isValidURI(java.lang.String uriString)
CHecks URI for syntax errors.

Parameters:
uriString -
Returns:
true if the URI is valid for the given implementation

createPlainLiteral

PlainLiteral createPlainLiteral(java.lang.String literal)
Create a new plain literal

Parameters:
literal -
Returns:
a PlainLiteral

createLanguageTagLiteral

LanguageTagLiteral createLanguageTagLiteral(java.lang.String literal,
                                            java.lang.String langugeTag)
                                            throws ModelRuntimeException
Parameters:
literal -
langugeTag -
Returns:
a LanguageTagLiteral
Throws:
ModelRuntimeException - e.g. if the language tag is malformed

createDatatypeLiteral

DatatypeLiteral createDatatypeLiteral(java.lang.String literal,
                                      URI datatypeURI)
                                      throws ModelRuntimeException
Parameters:
literal -
datatypeURI -
Returns:
a DatatypeLiteral
Throws:
ModelRuntimeException - e.g. if the datatype URI causes problems

createStatement

Statement createStatement(Resource subject,
                          URI predicate,
                          Node object)
Create a new statement - but DOES NOT add it to the model

Parameters:
subject -
predicate -
object -
Returns:
a Statement

newRandomUniqueURI

URI newRandomUniqueURI()
Implementations are free to choose if their semantics are unique within the this model, the ModelSet, or unique in the universe

Returns:
a new, unique URI


Copyright © 2005-2008 FZI - Forschungszentrum Informatik | Karlsruhe | Germany. All Rights Reserved.