Class ModelFactory

Description

ModelFactory is a static class which provides methods for creating different types of RAP models. RAP models have to be created trough a ModelFactory instead of creating them directly with the 'new' operator because of RAP's dynamic code inclusion mechanism.



History: <LI>10-05-2004 : First version of this class.</LI>

Located in /model/ModelFactory.php (line 27)


	
			
Method Summary
void &getDatasetMem ([string $graphSetId = null], string $uri)
object DbModel &getDbModel (object DbStore $dbStore, [string $baseURI = null])
object DbStore &getDbStore ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD])
object DbModel &getDefaultDbModel ([string $baseURI = null])
object MemModel &getDefaultModel ([string $baseURI = null])
object MemModel &getInfModelB ([string $baseURI = null])
object MemModel &getInfModelF ([string $baseURI = null])
object MemModel &getMemModel ([string $baseURI = null])
object MemModel &getOntModel (constant $modelType, mixed $vocabulary, [string $baseURI = null])
object MemModel &getResModel (constant $modelType, [string $baseURI = null])
Methods
getDatasetMem (line 50)

Returns a NamedGraphSetMem.

You can supply a GraphSet name.

  • access: public
void &getDatasetMem ([string $graphSetId = null], string $uri)
  • string $graphSetId
  • string $uri
getDbModel (line 98)

Returns a new DbModel using the database connection supplied by $dbStore.

You can supply a base URI. If a model with the given base URI exists in the DbStore, it'll be opened. If not, a new model will be created.

  • access: public
object DbModel &getDbModel (object DbStore $dbStore, [string $baseURI = null])
getDbStore (line 118)

Returns a database connection with the given parameters.

Paramters, which are not defined are taken from the constants.php

  • access: public
object DbStore &getDbStore ([string $dbDriver = ADODB_DB_DRIVER], [string $host = ADODB_DB_HOST], [string $dbName = ADODB_DB_NAME], [string $user = ADODB_DB_USER], [string $password = ADODB_DB_PASSWORD])
  • string $dbDriver
  • string $host
  • string $dbName
  • string $user
  • string $password
getDefaultDbModel (line 80)

Returns a DbModel with the database connection defined in constants.php.

You can supply a base URI. If a model with the given base URI exists in the DbStore, it'll be opened. If not, a new model will be created.

  • access: public
object DbModel &getDefaultDbModel ([string $baseURI = null])
  • string $baseURI
getDefaultModel (line 37)

Returns a MemModel.

You can supply a base URI

  • access: public
object MemModel &getDefaultModel ([string $baseURI = null])
  • string $baseURI
getInfModelB (line 150)

Returns a InfModelB.

(MemModel with backward chaining inference engine) Configurations can be done in constants.php You can supply a base URI

  • access: public
object MemModel &getInfModelB ([string $baseURI = null])
  • string $baseURI
getInfModelF (line 134)

Returns a InfModelF.

(MemModel with forward chaining inference engine) Configurations can be done in constants.php You can supply a base URI

  • access: public
object MemModel &getInfModelF ([string $baseURI = null])
  • string $baseURI
getMemModel (line 64)

Returns a MemModel.

You can supply a base URI

  • access: public
object MemModel &getMemModel ([string $baseURI = null])
  • string $baseURI
getOntModel (line 206)

Returns an OntModel.

$modelType has to be one of the following constants: MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel with a new model from defined type. $vocabulary defines the ontology language. Currently only RDFS_VOCABULARY is supported. You can supply a model base URI.

  • access: public
object MemModel &getOntModel (constant $modelType, mixed $vocabulary, [string $baseURI = null])
  • constant $modelType
  • string $baseURI
getResModel (line 168)

Returns a ResModel.

$modelType has to be one of the following constants: MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new model from defined type. You can supply a base URI

  • access: public
object MemModel &getResModel (constant $modelType, [string $baseURI = null])
  • constant $modelType
  • string $baseURI

Documentation generated on Thu, 7 Jul 2005 13:42:06 +0200 by phpDocumentor 1.3.0RC3