edu.utdallas.paged.rdf.model
Class ExtendedModelFactory

java.lang.Object
  extended by com.hp.hpl.jena.rdf.model.ModelFactoryBase
      extended by edu.utdallas.paged.rdf.model.ExtendedModelFactory

public class ExtendedModelFactory
extends com.hp.hpl.jena.rdf.model.ModelFactoryBase

Factory class that allows to create the various models in this extension

Author:
vaibhav

Field Summary
static com.hp.hpl.jena.shared.ReificationStyle Convenient
          The convenient reification style; quadlets contribute to reified statements, but are invisible to listStatements().
static com.hp.hpl.jena.shared.ReificationStyle Minimal
          The minimal reification style; quadlets do not contribute to reified statements, and are visible to listStatements().
static com.hp.hpl.jena.shared.ReificationStyle Standard
          The standard reification style; quadlets contribute to reified statements, and are visible to listStatements().
 
Constructor Summary
ExtendedModelFactory()
           
 
Method Summary
static com.hp.hpl.jena.ontology.OntModel createOntologyModel(com.hp.hpl.jena.ontology.OntModelSpec spec, com.hp.hpl.jena.rdf.model.Model base)
          Answer an ontology model
static com.hp.hpl.jena.rdf.model.Model createOntVirtMemModel()
          Answer a new memory and file based model for reading a knowledge base
static com.hp.hpl.jena.rdf.model.Model createOntVirtMemModel(com.hp.hpl.jena.shared.ReificationStyle style)
          Answer a new memory and file based model using the given reification style for reading a knowledge base
static com.hp.hpl.jena.rdf.model.ModelMaker createPagedModelRDBMaker(com.hp.hpl.jena.db.IDBConnection c)
          Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the usual Standard reification style.
static com.hp.hpl.jena.rdf.model.ModelMaker createPagedModelRDBMaker(com.hp.hpl.jena.db.IDBConnection c, com.hp.hpl.jena.shared.ReificationStyle style)
          Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the given reification style.
static com.hp.hpl.jena.db.IDBConnection createSimpleRDBConnection()
          Answer a plain IDBConnection to a database, with the arguments implicitly supplied by system properties:
static com.hp.hpl.jena.db.IDBConnection createSimpleRDBConnection(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String dbType)
          Answer a plain IDBConnection to a database with the given URL, with the given user having the given password.
static com.hp.hpl.jena.rdf.model.Model createVirtMemModel()
          Answer a new memory and file based model
static com.hp.hpl.jena.rdf.model.Model createVirtMemModel(com.hp.hpl.jena.shared.ReificationStyle style)
          Answer a new memory and file based model using the given reification style
 
Methods inherited from class com.hp.hpl.jena.rdf.model.ModelFactoryBase
extractType, guessDBConcurrent, guessDBDriver, guessDBPassword, guessDBType, guessDBURL, guessDBUser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Standard

public static final com.hp.hpl.jena.shared.ReificationStyle Standard
The standard reification style; quadlets contribute to reified statements, and are visible to listStatements().


Convenient

public static final com.hp.hpl.jena.shared.ReificationStyle Convenient
The convenient reification style; quadlets contribute to reified statements, but are invisible to listStatements().


Minimal

public static final com.hp.hpl.jena.shared.ReificationStyle Minimal
The minimal reification style; quadlets do not contribute to reified statements, and are visible to listStatements().

Constructor Detail

ExtendedModelFactory

public ExtendedModelFactory()
Method Detail

createVirtMemModel

public static com.hp.hpl.jena.rdf.model.Model createVirtMemModel()
Answer a new memory and file based model

Returns:
a model

createVirtMemModel

public static com.hp.hpl.jena.rdf.model.Model createVirtMemModel(com.hp.hpl.jena.shared.ReificationStyle style)
Answer a new memory and file based model using the given reification style

Parameters:
style - - the reification style to use
Returns:
a model

createOntVirtMemModel

public static com.hp.hpl.jena.rdf.model.Model createOntVirtMemModel()
Answer a new memory and file based model for reading a knowledge base

Returns:
a model

createOntVirtMemModel

public static com.hp.hpl.jena.rdf.model.Model createOntVirtMemModel(com.hp.hpl.jena.shared.ReificationStyle style)
Answer a new memory and file based model using the given reification style for reading a knowledge base

Parameters:
style - - the reificiation style to use
Returns:
a model

createPagedModelRDBMaker

public static com.hp.hpl.jena.rdf.model.ModelMaker createPagedModelRDBMaker(com.hp.hpl.jena.db.IDBConnection c)
Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the usual Standard reification style.

Parameters:
c - a connection to the database holding the models
Returns:
a ModelMaker whose Models are held in the database at c

createPagedModelRDBMaker

public static com.hp.hpl.jena.rdf.model.ModelMaker createPagedModelRDBMaker(com.hp.hpl.jena.db.IDBConnection c,
                                                                            com.hp.hpl.jena.shared.ReificationStyle style)
Answer a ModelMaker that accesses database-backed Models on the database at the other end of the connection c with the given reification style.

Parameters:
c - a connection to the database holding the models
style - the desired reification style
Returns:
a ModelMaker whose Models are held in the database at c

createSimpleRDBConnection

public static com.hp.hpl.jena.db.IDBConnection createSimpleRDBConnection(java.lang.String url,
                                                                         java.lang.String user,
                                                                         java.lang.String password,
                                                                         java.lang.String dbType)
Answer a plain IDBConnection to a database with the given URL, with the given user having the given password. For more complex ways of forming a connection, see the DBConnection documentation.

Parameters:
url - the URL of the database
user - the user name to use to access the database
password - the password to use. WARNING: open text.
dbType - the databate type: currently, "Oracle" or "MySQL".
Returns:
the connection
Throws:
quite - possibly

createSimpleRDBConnection

public static com.hp.hpl.jena.db.IDBConnection createSimpleRDBConnection()
Answer a plain IDBConnection to a database, with the arguments implicitly supplied by system properties:

The database URL - jena.db.url
The user - jena.db.user, or fails back to "test"
The password - jena.db.password, or fails back to ""
The db type - jena.db.type, or guessed from the URL


createOntologyModel

public static com.hp.hpl.jena.ontology.OntModel createOntologyModel(com.hp.hpl.jena.ontology.OntModelSpec spec,
                                                                    com.hp.hpl.jena.rdf.model.Model base)
Answer an ontology model

Parameters:
spec - - the specification we want to use
base - - the base model in which we've read the knowledge base
Returns:
an ontology model