Franz Inc, AllegroGraph

com.franz.agraph.repository
Class AGValueFactory

java.lang.Object
  extended by org.openrdf.model.impl.ValueFactoryBase
      extended by org.openrdf.model.impl.ValueFactoryImpl
          extended by com.franz.agraph.repository.AGValueFactory
All Implemented Interfaces:
ValueFactory

public class AGValueFactory
extends ValueFactoryImpl

Implements the Sesame ValueFactory interface for AllegroGraph.


Constructor Summary
AGValueFactory(AGRepository repository)
           
AGValueFactory(AGRepository repository, AGRepositoryConnection conn)
           
 
Method Summary
 Resource asResource(Node node)
           
 URI asURI(Node node)
           
 Value asValue(Node node)
          Creates an OpenRDF Value from a concrete Jena Node.
 BNode createBNode()
           
 BNode createBNode(String nodeID)
           
 URI generateURI(String registeredEncodableNamespace)
          Returns a unique URI within the specified encodable namespace.
 URI[] generateURIs(String namespace, int amount)
          Returns unique URIs within the specified encodable namespace.
 com.franz.agraph.http.AGHTTPClient getHTTPClient()
           
 AGRepository getRepository()
           
 
Methods inherited from class org.openrdf.model.impl.ValueFactoryImpl
createLiteral, createLiteral, createLiteral, createStatement, createStatement, createURI, createURI, getInstance
 
Methods inherited from class org.openrdf.model.impl.ValueFactoryBase
createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AGValueFactory

public AGValueFactory(AGRepository repository)

AGValueFactory

public AGValueFactory(AGRepository repository,
                      AGRepositoryConnection conn)
Method Detail

getRepository

public AGRepository getRepository()

getHTTPClient

public com.franz.agraph.http.AGHTTPClient getHTTPClient()

createBNode

public BNode createBNode(String nodeID)
Specified by:
createBNode in interface ValueFactory
Overrides:
createBNode in class ValueFactoryImpl

createBNode

public BNode createBNode()
Specified by:
createBNode in interface ValueFactory
Overrides:
createBNode in class ValueFactoryBase

asValue

public Value asValue(Node node)
Creates an OpenRDF Value from a concrete Jena Node.

Parameters:
node - a concrete Jena node.
Returns:
the corresponding Value.

asResource

public Resource asResource(Node node)

asURI

public URI asURI(Node node)

generateURIs

public URI[] generateURIs(String namespace,
                          int amount)
                   throws RepositoryException
Returns unique URIs within the specified encodable namespace.

The generated URIs will conform to the format that was specified when the encodable namespace was registered, and are guaranteed to be unique for this namespace generator. Note that this does not prevent other parties from independently using URIs that involve this namespace, however.

If amount cannot be generated, up to amount URIs will be returned, or an exception will be thrown if none are available.

Returns:
a unique URI within the specified namespace.
Throws:
RepositoryException
See Also:
AGRepositoryConnection.registerEncodableNamespace(String, String), generateURI(String)

generateURI

public URI generateURI(String registeredEncodableNamespace)
                throws RepositoryException
Returns a unique URI within the specified encodable namespace.

The generated URI will conform to the format that was specified when the encodable namespace was registered, and is guaranteed to be unique for this namespace generator. Note that this does not prevent other parties from independently using URIs that involve this namespace, however.

Returns:
a unique URI within the specified namespace.
Throws:
RepositoryException
See Also:
AGRepositoryConnection.registerEncodableNamespace(String, String), generateURIs(String, int)

Copyright © 2008-2011 Franz Inc.