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.

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


	
			
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 OntModel &getOntModel (constant $modelType, constant $vocabulary, [string $baseURI = null])
object OntModel &getOntModelForBaseModel ( &$baseModel, constant $vocabulary, object Model $baseModel)
object ResModel &getResModel (constant $modelType, [string $baseURI = null])
object ResModel &getResModelForBaseModel ( &$baseModel, object Model $baseModel)
SparqlClient &getSparqlClient (String $server)
Methods
getDatasetMem (line 46)

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 119)

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 79)

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 33)

Returns a MemModel.

You can supply a base URI

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

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 136)

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 61)

Returns a MemModel.

You can supply a base URI

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

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 OntModel &getOntModel (constant $modelType, constant $vocabulary, [string $baseURI = null])
  • constant $modelType
  • constant $vocabulary
  • string $baseURI
getOntModelForBaseModel (line 255)

Creates an OntModel that wraps an existing base model.

$vocabulary defines the ontology language. Currently only RDFS_VOCABULARY is supported.

  • access: public
object OntModel &getOntModelForBaseModel ( &$baseModel, constant $vocabulary, object Model $baseModel)
getResModel (line 172)

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 ResModel &getResModel (constant $modelType, [string $baseURI = null])
  • constant $modelType
  • string $baseURI
getResModelForBaseModel (line 201)

Creates a ResModel that wraps an existing base model.

  • access: public
object ResModel &getResModelForBaseModel ( &$baseModel, object Model $baseModel)
getSparqlClient (line 283)

Creates a SparqlClient.

  • return: the SparqlClient object.
  • access: public
SparqlClient &getSparqlClient (String $server)
  • String $server: Link to a SPARQL endpoint.

Documentation generated on Fri, 1 Jun 2007 16:49:54 +0200 by phpDocumentor 1.3.2