edu.utdallas.paged.db
Class PagedModelRDB

java.lang.Object
  extended by com.hp.hpl.jena.enhanced.EnhGraph
      extended by com.hp.hpl.jena.rdf.model.impl.ModelCom
          extended by edu.utdallas.paged.db.PagedModelRDB
All Implemented Interfaces:
com.hp.hpl.jena.rdf.model.Model, com.hp.hpl.jena.rdf.model.ModelCon, com.hp.hpl.jena.rdf.model.ModelGraphInterface, com.hp.hpl.jena.rdf.model.RDFReaderF, com.hp.hpl.jena.rdf.model.RDFWriterF, com.hp.hpl.jena.shared.Lock, com.hp.hpl.jena.shared.PrefixMapping

public class PagedModelRDB
extends com.hp.hpl.jena.rdf.model.impl.ModelCom
implements com.hp.hpl.jena.rdf.model.Model

The RDB Model implementation for this extension

Author:
vaibhav

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hp.hpl.jena.shared.PrefixMapping
com.hp.hpl.jena.shared.PrefixMapping.Factory, com.hp.hpl.jena.shared.PrefixMapping.IllegalPrefixException, com.hp.hpl.jena.shared.PrefixMapping.JenaLockedException
 
Field Summary
 
Fields inherited from interface com.hp.hpl.jena.shared.PrefixMapping
Extended, Standard
 
Fields inherited from interface com.hp.hpl.jena.shared.Lock
READ, WRITE
 
Constructor Summary
PagedModelRDB(com.hp.hpl.jena.graph.Graph base)
          Constructor
PagedModelRDB(com.hp.hpl.jena.graph.Graph base, com.hp.hpl.jena.enhanced.Personality personality)
          Constructor
PagedModelRDB(com.hp.hpl.jena.enhanced.GraphPersonality model, PagedGraphRDB graph)
          Constructor
PagedModelRDB(com.hp.hpl.jena.db.IDBConnection dbcon)
          Constructor
PagedModelRDB(com.hp.hpl.jena.db.IDBConnection dbcon, java.lang.String modelID)
          Constructor
PagedModelRDB(PagedGraphRDB graph)
          Constructor
 
Method Summary
 void clear()
          Method that clears the current extended RDB model
 void close()
          Method that closes the extended RDB model
static PagedModelRDB create(com.hp.hpl.jena.db.IDBConnection dbcon, java.lang.String databaseType)
          Method that creates an extended RDB model based on a connection and database type
static PagedModelRDB create(com.hp.hpl.jena.db.IDBConnection dbcon, java.lang.String layoutType, java.lang.String databaseType)
          Method that creates an extended RDB model based on a connection, layout type and database type
static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon)
          Method that creates a new default extended RDB model
static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon, com.hp.hpl.jena.rdf.model.Model modelProperties)
          Method that creates a new extended RDB model based on a connection and properties
static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon, java.lang.String name)
          Method that returns an extended RDB model given a connection and model name
static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon, java.lang.String name, com.hp.hpl.jena.rdf.model.Model modelProperties)
          Method that creates an extended RDB model based on a connection, model name and properties
static void deleteModel(com.hp.hpl.jena.db.IDBConnection dbcon, java.lang.String name)
          Method that deletes a model based on a connection and model name
 com.hp.hpl.jena.db.IDBConnection getConnection()
          Method that returns the database connection object
static com.hp.hpl.jena.rdf.model.Model getDefaultModelProperties(com.hp.hpl.jena.db.IDBConnection dbcon)
          Method that returns a model containing default properties based on the database connection
 boolean getDoDuplicateCheck()
          Getter method for checking duplicate triples
 boolean getDoFastpath()
          Getter method for checking fast path queries
 com.hp.hpl.jena.rdf.model.Model getModelProperties()
          Method that returns the properties for an extended RDB model
 boolean getQueryFullReified()
          Getter method for querying full reified triples
 boolean getQueryOnlyAsserted()
          Getter method for querying only asserted triples
 boolean getQueryOnlyReified()
          Getter method for querying only reified triples
static com.hp.hpl.jena.util.iterator.ExtendedIterator listModels(com.hp.hpl.jena.db.IDBConnection dbcon)
          Method that returns an iterator of all the model names in the database
 com.hp.hpl.jena.rdf.model.Model loadAll()
          Method that returns all statements in the current extended RDB model as a memory model
static PagedModelRDB open(com.hp.hpl.jena.db.IDBConnection dbcon)
          Method that opens the default extended RDB model
static PagedModelRDB open(com.hp.hpl.jena.db.IDBConnection dbcon, java.lang.String name)
          Method that opens an extended RDB model given its name
 void remove()
          Method that removes the extended RDB model
 void setDoDuplicateCheck(boolean bool)
          Setter method for checking duplicate triples
 void setDoFastpath(boolean val)
          Setter method for checking fast path queries
 void setDoImplicitJoin(boolean val)
          Setter method for implicitly doing joins
 void setQueryFullReified(boolean opt)
          Setter method for querying full reified triples
 void setQueryOnlyAsserted(boolean opt)
          Setter method for querying only asserted triples
 void setQueryOnlyReified(boolean opt)
          Setter method for querying only reified triples
 
Methods inherited from class com.hp.hpl.jena.rdf.model.impl.ModelCom
abort, adapt, add, add, add, add, add, add, add, add, add, add, add, add, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addNamespaces, asFilter, asModel, asNode, asRDFNode, asStatement, asStatements, asStatements, asStatements, begin, commit, contains, contains, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsResource, createAlt, createAlt, createBag, createBag, createList, createList, createList, createLiteral, createLiteral, createLiteral, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createProperty, createReifiedStatement, createReifiedStatement, createResource, createResource, createResource, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, enterCriticalSection, executeInTransaction, expandPrefix, findTriplesFrom, getAlt, getAlt, getAnyReifiedStatement, getBag, getBag, getDefaultModelPrefixes, getGraph, getHiddenStatements, getLock, getModelLock, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, getProperty, getProperty, getProperty, getRDFNode, getReader, getReader, getReificationStyle, getRequiredProperty, getResource, getResource, getSeq, getSeq, getWriter, getWriter, independent, intersect, intersection, isClosed, isEmpty, isIsomorphicWith, isReified, leaveCriticalSection, listBySubject, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listReifiedStatements, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, lock, notifyEvent, qnameFor, query, queryHandler, read, read, read, read, read, read, read, register, reifiedToString, remove, remove, remove, remove, remove, remove, remove, removeAll, removeAll, removeAllReifications, removeNsPrefix, removeReification, samePrefixMappingAs, setDefaultModelPrefixes, setNsPrefix, setNsPrefixes, setNsPrefixes, setReaderClassName, setWriterClassName, shortForm, size, supportsSetOperations, supportsTransactions, toString, union, unregister, withDefaultMappings, write, write, write, write, write, write
 
Methods inherited from class com.hp.hpl.jena.enhanced.EnhGraph
asGraph, equals, getNodeAs, getNodeCacheControl, hashCode, isIsomorphicWith, setNodeCache
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.Model
abort, add, add, add, add, add, add, begin, commit, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsResource, createList, createList, createList, createLiteral, createLiteral, createProperty, createReifiedStatement, createReifiedStatement, createResource, createResource, createResource, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, equals, executeInTransaction, getAnyReifiedStatement, getLock, getProperty, getProperty, getReificationStyle, getRequiredProperty, getResource, independent, intersection, isClosed, isEmpty, isIsomorphicWith, isReified, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listReifiedStatements, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, notifyEvent, query, read, read, read, read, read, read, read, register, remove, remove, remove, removeAll, removeAll, removeAllReifications, removeReification, size, supportsSetOperations, supportsTransactions, union, unregister, write, write, write, write, write, write
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelCon
add, add, add, add, add, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, contains, contains, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, createAlt, createAlt, createBag, createBag, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, getAlt, getAlt, getBag, getBag, getProperty, getRDFNode, getResource, getSeq, getSeq, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listSubjectsWithProperty, listSubjectsWithProperty, remove, remove, remove, remove
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelGraphInterface
asRDFNode, asStatement, getGraph, queryHandler
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFReaderF
getReader, getReader, setReaderClassName
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFWriterF
getWriter, getWriter, setWriterClassName
 
Methods inherited from interface com.hp.hpl.jena.shared.PrefixMapping
expandPrefix, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, lock, qnameFor, removeNsPrefix, samePrefixMappingAs, setNsPrefix, setNsPrefixes, setNsPrefixes, shortForm, withDefaultMappings
 
Methods inherited from interface com.hp.hpl.jena.shared.Lock
enterCriticalSection, leaveCriticalSection
 

Constructor Detail

PagedModelRDB

public PagedModelRDB(com.hp.hpl.jena.graph.Graph base)
Constructor

Parameters:
base - - the underlying graph

PagedModelRDB

public PagedModelRDB(com.hp.hpl.jena.graph.Graph base,
                     com.hp.hpl.jena.enhanced.Personality personality)
Constructor

Parameters:
base - - the underlying graph
personality - - the personality of this model

PagedModelRDB

public PagedModelRDB(com.hp.hpl.jena.enhanced.GraphPersonality model,
                     PagedGraphRDB graph)
Constructor

Parameters:
model - - the personality for a graph
graph - - the underlying graph

PagedModelRDB

public PagedModelRDB(PagedGraphRDB graph)
Constructor

Parameters:
graph - - the underlying graph

PagedModelRDB

public PagedModelRDB(com.hp.hpl.jena.db.IDBConnection dbcon)
              throws com.hp.hpl.jena.db.RDFRDBException
Constructor

Parameters:
dbcon - - the database connection
Throws:
com.hp.hpl.jena.db.RDFRDBException

PagedModelRDB

public PagedModelRDB(com.hp.hpl.jena.db.IDBConnection dbcon,
                     java.lang.String modelID)
              throws com.hp.hpl.jena.db.RDFRDBException
Constructor

Parameters:
dbcon - - the database connection
modelID - - the identifier for the model
Throws:
com.hp.hpl.jena.db.RDFRDBException
Method Detail

open

public static PagedModelRDB open(com.hp.hpl.jena.db.IDBConnection dbcon)
                          throws com.hp.hpl.jena.db.RDFRDBException
Method that opens the default extended RDB model

Parameters:
dbcon - - the database connection
Returns:
an extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

open

public static PagedModelRDB open(com.hp.hpl.jena.db.IDBConnection dbcon,
                                 java.lang.String name)
                          throws com.hp.hpl.jena.db.RDFRDBException
Method that opens an extended RDB model given its name

Parameters:
dbcon - - the database connection
name - - the model name
Returns:
an extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

createModel

public static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon)
                                 throws com.hp.hpl.jena.db.RDFRDBException
Method that creates a new default extended RDB model

Parameters:
dbcon - - the database connection
Returns:
an extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

createModel

public static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon,
                                        com.hp.hpl.jena.rdf.model.Model modelProperties)
                                 throws com.hp.hpl.jena.db.RDFRDBException
Method that creates a new extended RDB model based on a connection and properties

Parameters:
dbcon - - the database connection
modelProperties - - the properties for the new model supplied as a model
Returns:
a new extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

createModel

public static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon,
                                        java.lang.String name)
                                 throws com.hp.hpl.jena.db.RDFRDBException
Method that returns an extended RDB model given a connection and model name

Parameters:
dbcon - - the database connection
name - - the name for the model
Returns:
an extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

getDefaultModelProperties

public static com.hp.hpl.jena.rdf.model.Model getDefaultModelProperties(com.hp.hpl.jena.db.IDBConnection dbcon)
Method that returns a model containing default properties based on the database connection

Parameters:
dbcon - - the database connection
Returns:
a model containing default properties

createModel

public static PagedModelRDB createModel(com.hp.hpl.jena.db.IDBConnection dbcon,
                                        java.lang.String name,
                                        com.hp.hpl.jena.rdf.model.Model modelProperties)
                                 throws com.hp.hpl.jena.db.RDFRDBException
Method that creates an extended RDB model based on a connection, model name and properties

Parameters:
dbcon - - the database connection
name - - the model name
modelProperties - - the properties for the model
Returns:
an extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

create

public static PagedModelRDB create(com.hp.hpl.jena.db.IDBConnection dbcon,
                                   java.lang.String layoutType,
                                   java.lang.String databaseType)
                            throws com.hp.hpl.jena.db.RDFRDBException
Method that creates an extended RDB model based on a connection, layout type and database type

Parameters:
dbcon - - the database connection
layoutType - - the layout of the database
databaseType - - the database type
Returns:
an extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

create

public static PagedModelRDB create(com.hp.hpl.jena.db.IDBConnection dbcon,
                                   java.lang.String databaseType)
                            throws com.hp.hpl.jena.db.RDFRDBException
Method that creates an extended RDB model based on a connection and database type

Parameters:
dbcon - - the database connection
databaseType - - the database type
Returns:
an extended RDB model
Throws:
com.hp.hpl.jena.db.RDFRDBException

getModelProperties

public com.hp.hpl.jena.rdf.model.Model getModelProperties()
Method that returns the properties for an extended RDB model

Returns:
a model that contains properties of the extended RDB model

listModels

public static com.hp.hpl.jena.util.iterator.ExtendedIterator listModels(com.hp.hpl.jena.db.IDBConnection dbcon)
                                                                 throws com.hp.hpl.jena.db.RDFRDBException
Method that returns an iterator of all the model names in the database

Parameters:
dbcon - - the database connection
Returns:
an iterator with all the models in the database
Throws:
com.hp.hpl.jena.db.RDFRDBException

close

public void close()
Method that closes the extended RDB model

Specified by:
close in interface com.hp.hpl.jena.rdf.model.Model
Overrides:
close in class com.hp.hpl.jena.rdf.model.impl.ModelCom

remove

public void remove()
            throws com.hp.hpl.jena.db.RDFRDBException
Method that removes the extended RDB model

Throws:
com.hp.hpl.jena.db.RDFRDBException

getConnection

public com.hp.hpl.jena.db.IDBConnection getConnection()
Method that returns the database connection object

Returns:
- the database connection object

clear

public void clear()
           throws com.hp.hpl.jena.db.RDFRDBException
Method that clears the current extended RDB model

Throws:
com.hp.hpl.jena.db.RDFRDBException

deleteModel

public static void deleteModel(com.hp.hpl.jena.db.IDBConnection dbcon,
                               java.lang.String name)
                        throws com.hp.hpl.jena.db.RDFRDBException
Method that deletes a model based on a connection and model name

Parameters:
dbcon - - the database connection
name - - the model name
Throws:
com.hp.hpl.jena.db.RDFRDBException

loadAll

public com.hp.hpl.jena.rdf.model.Model loadAll()
Method that returns all statements in the current extended RDB model as a memory model

Returns:
a model with statements from the current extended RDB model

getDoDuplicateCheck

public boolean getDoDuplicateCheck()
Getter method for checking duplicate triples


setDoDuplicateCheck

public void setDoDuplicateCheck(boolean bool)
Setter method for checking duplicate triples


setDoFastpath

public void setDoFastpath(boolean val)
Setter method for checking fast path queries


getDoFastpath

public boolean getDoFastpath()
Getter method for checking fast path queries


setQueryOnlyAsserted

public void setQueryOnlyAsserted(boolean opt)
Setter method for querying only asserted triples


getQueryOnlyAsserted

public boolean getQueryOnlyAsserted()
Getter method for querying only asserted triples


setQueryOnlyReified

public void setQueryOnlyReified(boolean opt)
Setter method for querying only reified triples


getQueryOnlyReified

public boolean getQueryOnlyReified()
Getter method for querying only reified triples


setQueryFullReified

public void setQueryFullReified(boolean opt)
Setter method for querying full reified triples


getQueryFullReified

public boolean getQueryFullReified()
Getter method for querying full reified triples


setDoImplicitJoin

public void setDoImplicitJoin(boolean val)
Setter method for implicitly doing joins