edu.utdallas.paged.db
Class PagedDBConnection

java.lang.Object
  extended by com.hp.hpl.jena.db.DBConnection
      extended by edu.utdallas.paged.db.PagedDBConnection
All Implemented Interfaces:
com.hp.hpl.jena.db.IDBConnection

public class PagedDBConnection
extends com.hp.hpl.jena.db.DBConnection
implements com.hp.hpl.jena.db.IDBConnection

A class that implements the database connection for this extension

Author:
vaibhav

Constructor Summary
PagedDBConnection(java.sql.Connection connection, java.lang.String databaseType)
          Constructor
PagedDBConnection(java.lang.String url, java.lang.String user, java.lang.String password)
          Constructor
PagedDBConnection(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String databaseType)
          Constructor
 
Method Summary
 boolean containsDefaultModel()
          Method that determines if the database has a default model
 com.hp.hpl.jena.rdf.model.Model getDefaultModelProperties()
          Method that returns the properties of the default model
 com.hp.hpl.jena.db.impl.IRDBDriver getDriver()
          Method that returns a database driver based on the type of the database
 
Methods inherited from class com.hp.hpl.jena.db.DBConnection
cleanDB, close, containsModel, getAllModelNames, getConnection, getDatabaseProperties, getDatabaseType, isFormatOK, setDatabaseProperties, setDatabaseType, setDriver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.db.IDBConnection
cleanDB, close, containsModel, getAllModelNames, getConnection, getDatabaseProperties, getDatabaseType, isFormatOK, setDatabaseProperties, setDatabaseType, setDriver
 

Constructor Detail

PagedDBConnection

public PagedDBConnection(java.lang.String url,
                         java.lang.String user,
                         java.lang.String password)
Constructor

Parameters:
url - - the database url
user - - the database user
password - - the database password

PagedDBConnection

public PagedDBConnection(java.lang.String url,
                         java.lang.String user,
                         java.lang.String password,
                         java.lang.String databaseType)
Constructor

Parameters:
url - - the database url
user - - the database user
password - - the database password
databaseType - - the database type

PagedDBConnection

public PagedDBConnection(java.sql.Connection connection,
                         java.lang.String databaseType)
Constructor

Parameters:
connection - - the database connection
databaseType - - the database type
Method Detail

containsDefaultModel

public boolean containsDefaultModel()
                             throws com.hp.hpl.jena.db.RDFRDBException
Method that determines if the database has a default model

Specified by:
containsDefaultModel in interface com.hp.hpl.jena.db.IDBConnection
Overrides:
containsDefaultModel in class com.hp.hpl.jena.db.DBConnection
Returns:
true, if the database contains a default model, false otherwise
Throws:
com.hp.hpl.jena.db.RDFRDBException

getDriver

public com.hp.hpl.jena.db.impl.IRDBDriver getDriver()
                                             throws com.hp.hpl.jena.db.RDFRDBException
Method that returns a database driver based on the type of the database

Specified by:
getDriver in interface com.hp.hpl.jena.db.IDBConnection
Overrides:
getDriver in class com.hp.hpl.jena.db.DBConnection
Returns:
a driver instance
Throws:
com.hp.hpl.jena.db.RDFRDBException

getDefaultModelProperties

public com.hp.hpl.jena.rdf.model.Model getDefaultModelProperties()
                                                          throws com.hp.hpl.jena.db.RDFRDBException
Method that returns the properties of the default model

Specified by:
getDefaultModelProperties in interface com.hp.hpl.jena.db.IDBConnection
Overrides:
getDefaultModelProperties in class com.hp.hpl.jena.db.DBConnection
Returns:
a model containing the properties
Throws:
com.hp.hpl.jena.db.RDFRDBException