| java.lang.Object com.hp.hpl.jena.db.DBConnection
DBConnection | public class DBConnection implements IDBConnection(Code) | | Encapsulate the specification of a jdbc connection.
This is mostly used to simplify the calling pattern for ModelRDB factory methods.
author: csayers (based in part on the jena 1 implementation by der). version: $Revision: 1.19 $ |
Constructor Summary | |
public | DBConnection(String url, String user, String password) Create a connection specification based on jdbc address and
appropriate authentication information. | public | DBConnection(String url, String user, String password, String databaseType) Create a connection specification based on jdbc address and
appropriate authentication information. | public | DBConnection(Connection connection) Create a connection specification that just wraps up an existing database
connection. | public | DBConnection(Connection connection, String databaseType) Create a connection specification that just wraps up an existing database
connection. |
m_connection | protected Connection m_connection(Code) | | The jdbc connection being wrapped up
|
m_databaseType | protected String m_databaseType(Code) | | The database type: "Oracle", "mySQL, etc...
This is new in Jena2 - for compatability with older code we allow this to
be left unspecified at the loss of some jena2 functionality.
|
m_password | protected String m_password(Code) | | The password for the connection, may be null if the connection was passed in pre-opened
|
m_url | protected String m_url(Code) | | The url for the connection, may be null if the connection was passed in pre-opened
|
m_user | protected String m_user(Code) | | The user name for the connection, may be null if the connection was passed in pre-opened
|
DBConnection | public DBConnection(String url, String user, String password)(Code) | | Create a connection specification based on jdbc address and
appropriate authentication information.
Parameters: url - the jdbc url for the database, note that the format of thisis database dependent and that the appropriate jdbc driver will need tobe specified via the standard patternClass.forName("my.sql.driver"); Parameters: user - the user name to log on with Parameters: password - the password corresponding to this user |
DBConnection | public DBConnection(String url, String user, String password, String databaseType)(Code) | | Create a connection specification based on jdbc address and
appropriate authentication information.
Parameters: url - the jdbc url for the database, note that the format of thisis database dependent and that the appropriate jdbc driver will need tobe specified via the standard patternClass.forName("my.sql.driver"); Parameters: user - the user name to log on with Parameters: password - the password corresponding to this user Parameters: databaseType - the type of database to which we are connecting. since: Jena 2.0 |
DBConnection | public DBConnection(Connection connection)(Code) | | Create a connection specification that just wraps up an existing database
connection.
Parameters: connection - the open jdbc connection to use |
DBConnection | public DBConnection(Connection connection, String databaseType)(Code) | | Create a connection specification that just wraps up an existing database
connection.
Parameters: connection - the open jdbc connection to use Parameters: databaseType - the type of database to which we are connecting. since: Jena 2.0 |
copySpecializedGraphToModel | static void copySpecializedGraphToModel(SpecializedGraph fromGraph, Model toModel, TripleMatch filter) throws RDFRDBException(Code) | | Copy the contents of a specialized graph to a new Model.
This has package scope - for internal use only.
since: Jena 2.0 |
getDriver | public IRDBDriver getDriver(String layout, String database) throws RDFRDBException(Code) | | Helper function to locate and instantiate the driver class corresponding
to a given layout and database name
Throws an RDFRDBexception if the driver can't be instantiated
|
isFormatOK | public boolean isFormatOK()(Code) | | |
setDatabaseType | public void setDatabaseType(String databaseType)(Code) | | |
|
|