org.openrdf.sail.rdbms
Class RdbmsStore

java.lang.Object
  extended by org.openrdf.sail.helpers.SailBase
      extended by org.openrdf.sail.rdbms.RdbmsStore
All Implemented Interfaces:
Sail
Direct Known Subclasses:
MySqlStore, PgSqlStore

public class RdbmsStore
extends SailBase

The RDBMS SAIL for relational database storage in Sesame. This class acts both as a base class for database specific stores as well as a generic store that can infer the type of database through the JDBC connection.

Author:
James Leigh

Field Summary
 
Fields inherited from class org.openrdf.sail.helpers.SailBase
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, logger
 
Constructor Summary
RdbmsStore()
           
RdbmsStore(String url)
          Creates a new RDBMS RDF Store using the provided database connection.
RdbmsStore(String jdbcDriver, String jdbcUrl)
          Creates a new RDBMS RDF Store using the provided database connection.
RdbmsStore(String url, String user, String password)
          Creates a new RDBMS RDF Store using the provided database connection.
RdbmsStore(String jdbcDriver, String jdbcUrl, String user, String password)
          Creates a new RDBMS RDF Store using the provided database connection.
 
Method Summary
protected  SailConnection getConnectionInternal()
          returns a store-specific SailConnection object.
 int getMaxNumberOfTripleTables()
           
 RdbmsValueFactory getValueFactory()
          Gets a ValueFactory object that can be used to create URI-, blank node-, literal- and statement objects.
 void initialize()
          Initializes the Sail.
 boolean isIndexed()
           
 boolean isSequenced()
           
 boolean isWritable()
          Checks whether this Sail object is writable, i.e.
protected  void setBasicDataSource(org.apache.commons.dbcp.BasicDataSource ds)
           
protected  void setConnectionFactory(RdbmsConnectionFactory factory)
           
 void setIndexed(boolean indexed)
           
 void setMaxNumberOfTripleTables(int max)
           
 void setSequenced(boolean useSequence)
           
protected  void shutDownInternal()
          Do store-specific operations to ensure proper shutdown of the store.
 
Methods inherited from class org.openrdf.sail.helpers.SailBase
connectionClosed, debugEnabled, getConnection, getDataDir, setDataDir, shutDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RdbmsStore

public RdbmsStore()

RdbmsStore

public RdbmsStore(String url)
Creates a new RDBMS RDF Store using the provided database connection.

Parameters:
url - JDNI url of a DataSource

RdbmsStore

public RdbmsStore(String url,
                  String user,
                  String password)
Creates a new RDBMS RDF Store using the provided database connection.

Parameters:
url - JDNI url of a DataSource
user -
password -

RdbmsStore

public RdbmsStore(String jdbcDriver,
                  String jdbcUrl)
Creates a new RDBMS RDF Store using the provided database connection.

Parameters:
jdbcDriver -
jdbcUrl -

RdbmsStore

public RdbmsStore(String jdbcDriver,
                  String jdbcUrl,
                  String user,
                  String password)
Creates a new RDBMS RDF Store using the provided database connection.

Parameters:
jdbcDriver -
jdbcUrl -
user -
password -
Method Detail

getMaxNumberOfTripleTables

public int getMaxNumberOfTripleTables()

setMaxNumberOfTripleTables

public void setMaxNumberOfTripleTables(int max)

isIndexed

public boolean isIndexed()

setIndexed

public void setIndexed(boolean indexed)
                throws SailException
Throws:
SailException

isSequenced

public boolean isSequenced()

setSequenced

public void setSequenced(boolean useSequence)

initialize

public void initialize()
                throws SailException
Description copied from interface: Sail
Initializes the Sail. Care should be taken that required initialization parameters have been set before this method is called. Please consult the specific Sail implementation for information about the relevant parameters.

Throws:
SailException - If the Sail could not be initialized.

isWritable

public boolean isWritable()
                   throws SailException
Description copied from interface: Sail
Checks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.

Throws:
SailException

getValueFactory

public RdbmsValueFactory getValueFactory()
Description copied from interface: Sail
Gets a ValueFactory object that can be used to create URI-, blank node-, literal- and statement objects.

Returns:
a ValueFactory object for this Sail object.

getConnectionInternal

protected SailConnection getConnectionInternal()
                                        throws SailException
Description copied from class: SailBase
returns a store-specific SailConnection object.

Specified by:
getConnectionInternal in class SailBase
Returns:
a SailConnection
Throws:
SailException

shutDownInternal

protected void shutDownInternal()
                         throws SailException
Description copied from class: SailBase
Do store-specific operations to ensure proper shutdown of the store.

Specified by:
shutDownInternal in class SailBase
Throws:
SailException

setConnectionFactory

protected void setConnectionFactory(RdbmsConnectionFactory factory)

setBasicDataSource

protected void setBasicDataSource(org.apache.commons.dbcp.BasicDataSource ds)


Copyright © 2001-2008 Aduna. All Rights Reserved.