com.hp.hpl.jena.sdb
Class SDBFactory

java.lang.Object
  extended by com.hp.hpl.jena.sdb.SDBFactory

public class SDBFactory
extends Object

Various operations to create or connect objects to do with SDB: SDBConnections, Stores, Models, Graphs. Convenience calls.


Constructor Summary
SDBFactory()
           
 
Method Summary
static Dataset connectDataset(Connection jdbcConnection, StoreDesc desc)
          Connect to the RDF dataset in a store, using existing JDBC connection and a store description.
static Dataset connectDataset(SDBConnection sdbConnection, StoreDesc desc)
          Connect to the RDF dataset in a store, using existing SDBConnection and a store description.
static Dataset connectDataset(Store store)
          Connect to the RDF dataset in a store.
static Dataset connectDataset(StoreDesc desc)
          Connect to the RDF dataset in a store.
static Dataset connectDataset(String configFile)
          Connect to the RDF dataset in a store, based on a Store assembler file.
static Graph connectDefaultGraph(Store store)
          Connect to the default graph in a store, based on a Store description.
static Graph connectDefaultGraph(StoreDesc desc)
          Connect to the default graph in a store, based on a Store description.
static Graph connectDefaultGraph(String configFile)
          Connect to the default graph in a store, based on a Store assembler file.
static Model connectDefaultModel(Store store)
          Connect to the default model in a store
static Model connectDefaultModel(StoreDesc desc)
          Connect to the default model in a store
static Model connectDefaultModel(String configFile)
          Connect to the default model in a store, using the store description in a file.
static GraphStore connectGraphStore(Connection jdbcConnection, StoreDesc desc)
          Connect to the store as a GraphStore, using existing JDBC connection and a store description.
static GraphStore connectGraphStore(SDBConnection sdbConnection, StoreDesc desc)
          Connect to the store as a GraphStore, using existing SDBConnection and a store description.
static GraphStore connectGraphStore(Store store)
          Connect to the store as a GraphStore
static GraphStore connectGraphStore(StoreDesc desc)
          Connect to the store as a GraphStore.
static GraphStore connectGraphStore(String configFile)
          Connect to the store as a GraphStore, based on a Store assembler file.
static Graph connectNamedGraph(StoreDesc desc, Node node)
          Connect to a named graph in a store, based on a store description.
static Graph connectNamedGraph(StoreDesc desc, String iri)
          Connect to a named graph in a store, based on a store description.
static Graph connectNamedGraph(Store store, Node node)
          Connect to a named graph in a store.
static Graph connectNamedGraph(Store store, String iri)
          Connect to a named graph in a store.
static Graph connectNamedGraph(String configFile, Node node)
          Connect to a named graph in a store, based on a store description file.
static Graph connectNamedGraph(String configFile, String iri)
          Connect to a named graph in a store, based on a store description file.
static Model connectNamedModel(StoreDesc desc, Resource resource)
          Connect to the named model in a store
static Model connectNamedModel(StoreDesc desc, String iri)
          Connect to the named model in a store
static Model connectNamedModel(Store store, Resource resource)
          Connect to the named model in a store
static Model connectNamedModel(Store store, String iri)
          Connect to the named model in a store
static Model connectNamedModel(String configFile, Resource resource)
          Connect to the named model in a store
static Model connectNamedModel(String configFile, String iri)
          Connect to the named model in a store
static Store connectStore(Connection sqlConnection, StoreDesc desc)
          Connect to a store, based on an existing JDBC connection and a store description.
static Store connectStore(SDBConnection sdbConnection, StoreDesc desc)
          Connect to a store, based on an existing SDB connection and a store description.
static Store connectStore(StoreDesc desc)
          Connect to a store, based on a store description.
static Store connectStore(String configFile)
          Connect to a store, based on store and connection descriptions in a file.
static SDBConnection createConnection(Connection conn)
          Create a connection to a database from a JDBC connection.
static SDBConnection createConnection(SDBConnectionDesc desc)
          Create a connection to a database from connection description.
static SDBConnection createConnection(String configFile)
          Create a connection to a database from connection description in a file.
static SDBConnection createConnection(String jdbcURL, String user, String password)
          Create a connection to a database.
static Connection createSqlConnection(Model model)
          Create JDBC connection associated with the SDB connection description in a model.
static Connection createSqlConnection(SDBConnectionDesc desc)
          Create JDBC connection associated with the SDB connection description.
static Connection createSqlConnection(String configFile)
          Create JDBC connection associated with the SDB connection description in a file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDBFactory

public SDBFactory()
Method Detail

createConnection

public static SDBConnection createConnection(String jdbcURL,
                                             String user,
                                             String password)
Create a connection to a database.

Parameters:
jdbcURL -
user -
password -
Returns:
SDBConnection

createConnection

public static SDBConnection createConnection(SDBConnectionDesc desc)
Create a connection to a database from connection description.

Parameters:
desc - SDB connection description
Returns:
SDBConnection

createConnection

public static SDBConnection createConnection(Connection conn)
Create a connection to a database from a JDBC connection.

Parameters:
conn - JDBC connection
Returns:
SDBConnection

createConnection

public static SDBConnection createConnection(String configFile)
Create a connection to a database from connection description in a file.

Parameters:
configFile - Filename to be read and parsed (Jena assembler)
Returns:
SDBConnection

createSqlConnection

public static Connection createSqlConnection(SDBConnectionDesc desc)
Create JDBC connection associated with the SDB connection description.

Parameters:
desc - SDB connection description
Returns:
Connection

createSqlConnection

public static Connection createSqlConnection(String configFile)
Create JDBC connection associated with the SDB connection description in a file.

Parameters:
configFile - Filename
Returns:
Connection

createSqlConnection

public static Connection createSqlConnection(Model model)
Create JDBC connection associated with the SDB connection description in a model.

Parameters:
model - Model
Returns:
Connection

connectStore

public static Store connectStore(String configFile)
Connect to a store, based on store and connection descriptions in a file.

Parameters:
configFile - Filename for assembler for Store and SDBConenction
Returns:
Store

connectStore

public static Store connectStore(StoreDesc desc)
Connect to a store, based on a store description.

Parameters:
desc - Store description object
Returns:
Store

connectStore

public static Store connectStore(SDBConnection sdbConnection,
                                 StoreDesc desc)
Connect to a store, based on an existing SDB connection and a store description.

Parameters:
sdbConnection - SDBConnection object
desc - Store description object
Returns:
Store

connectStore

public static Store connectStore(Connection sqlConnection,
                                 StoreDesc desc)
Connect to a store, based on an existing JDBC connection and a store description.

Parameters:
sqlConnection - JDBC connection
desc - Store description object
Returns:
Store

connectDataset

public static Dataset connectDataset(Store store)
Connect to the RDF dataset in a store.

Parameters:
store -
Returns:
Dataset

connectDataset

public static Dataset connectDataset(StoreDesc desc)
Connect to the RDF dataset in a store.

Parameters:
desc - Store description
Returns:
Dataset

connectDataset

public static Dataset connectDataset(SDBConnection sdbConnection,
                                     StoreDesc desc)
Connect to the RDF dataset in a store, using existing SDBConnection and a store description.

Parameters:
sdbConnection - SDB connection
desc - Store description object
Returns:
Dataset

connectDataset

public static Dataset connectDataset(Connection jdbcConnection,
                                     StoreDesc desc)
Connect to the RDF dataset in a store, using existing JDBC connection and a store description.

Parameters:
jdbcConnection - JDBC connection
desc - Store description object
Returns:
Dataset

connectDataset

public static Dataset connectDataset(String configFile)
Connect to the RDF dataset in a store, based on a Store assembler file.

Parameters:
configFile -
Returns:
Dataset

connectGraphStore

public static GraphStore connectGraphStore(Store store)
Connect to the store as a GraphStore

Parameters:
store -
Returns:
GraphStore

connectGraphStore

public static GraphStore connectGraphStore(StoreDesc desc)
Connect to the store as a GraphStore.

Parameters:
desc - Store description
Returns:
GraphStore

connectGraphStore

public static GraphStore connectGraphStore(SDBConnection sdbConnection,
                                           StoreDesc desc)
Connect to the store as a GraphStore, using existing SDBConnection and a store description.

Parameters:
sdbConnection - SDB connection
desc - Store description object
Returns:
GraphStore

connectGraphStore

public static GraphStore connectGraphStore(Connection jdbcConnection,
                                           StoreDesc desc)
Connect to the store as a GraphStore, using existing JDBC connection and a store description.

Parameters:
jdbcConnection - JDBC connection
desc - Store description object
Returns:
GraphStore

connectGraphStore

public static GraphStore connectGraphStore(String configFile)
Connect to the store as a GraphStore, based on a Store assembler file.

Parameters:
configFile -
Returns:
GraphStore

connectDefaultGraph

public static Graph connectDefaultGraph(String configFile)
Connect to the default graph in a store, based on a Store assembler file.

Parameters:
configFile -
Returns:
Graph

connectDefaultGraph

public static Graph connectDefaultGraph(StoreDesc desc)
Connect to the default graph in a store, based on a Store description.

Parameters:
desc - Store description object
Returns:
Graph

connectDefaultGraph

public static Graph connectDefaultGraph(Store store)
Connect to the default graph in a store, based on a Store description.

Parameters:
store - The store containing the dataset for the default graph
Returns:
Graph

connectNamedGraph

public static Graph connectNamedGraph(String configFile,
                                      String iri)
Connect to a named graph in a store, based on a store description file.

Parameters:
configFile -
iri -
Returns:
Graph

connectNamedGraph

public static Graph connectNamedGraph(StoreDesc desc,
                                      String iri)
Connect to a named graph in a store, based on a store description.

Parameters:
desc -
iri -
Returns:
Graph

connectNamedGraph

public static Graph connectNamedGraph(Store store,
                                      String iri)
Connect to a named graph in a store.

Parameters:
store -
iri -
Returns:
Graph

connectNamedGraph

public static Graph connectNamedGraph(String configFile,
                                      Node node)
Connect to a named graph in a store, based on a store description file.

Parameters:
configFile -
node -
Returns:
Graph

connectNamedGraph

public static Graph connectNamedGraph(StoreDesc desc,
                                      Node node)
Connect to a named graph in a store, based on a store description.

Parameters:
desc -
node -
Returns:
Graph

connectNamedGraph

public static Graph connectNamedGraph(Store store,
                                      Node node)
Connect to a named graph in a store.

Parameters:
store -
node -
Returns:
Graph

connectDefaultModel

public static Model connectDefaultModel(String configFile)
Connect to the default model in a store, using the store description in a file.

Parameters:
configFile - Filename
Returns:
Model

connectDefaultModel

public static Model connectDefaultModel(StoreDesc desc)
Connect to the default model in a store

Parameters:
desc -
Returns:
Model

connectDefaultModel

public static Model connectDefaultModel(Store store)
Connect to the default model in a store

Parameters:
store -
Returns:
Model

connectNamedModel

public static Model connectNamedModel(StoreDesc desc,
                                      String iri)
Connect to the named model in a store

Parameters:
desc -
iri -
Returns:
Model

connectNamedModel

public static Model connectNamedModel(Store store,
                                      String iri)
Connect to the named model in a store

Parameters:
store -
iri -
Returns:
Model

connectNamedModel

public static Model connectNamedModel(String configFile,
                                      String iri)
Connect to the named model in a store

Parameters:
configFile -
iri -
Returns:
Model

connectNamedModel

public static Model connectNamedModel(StoreDesc desc,
                                      Resource resource)
Connect to the named model in a store

Parameters:
desc -
resource -
Returns:
Model

connectNamedModel

public static Model connectNamedModel(Store store,
                                      Resource resource)
Connect to the named model in a store

Parameters:
store -
resource -
Returns:
Model

connectNamedModel

public static Model connectNamedModel(String configFile,
                                      Resource resource)
Connect to the named model in a store

Parameters:
configFile -
resource -
Returns:
Model


Licenced under the Apache License, Version 2.0