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. <BR><BR>History: <LI>10-05-2004 : First version of this class.</LI>
|
ModelFactory has no properties.
PHP | object getDbModel(unknown $dbStore, string $baseURI) |
---|
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.
Arguments
Return
DbModel
PHP | object getDbStore(string $dbDriver, string $host, string $dbName, string $user, string $password) |
---|
Returns a database connection with the given parameters. Paramters, which are not defined are taken from the constants.php
Arguments
Return
DbStore
PHP | object getDefaultDbModel(string $baseURI) |
---|
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.
Arguments
Return
DbModel
PHP | object getDefaultModel(string $baseURI) |
---|
Returns a MemModel. You can supply a base URI
Arguments
Return
MemModel
PHP | object getInfModelB(string $baseURI) |
---|
Returns a InfModelB. (MemModel with backward chaining inference engine) Configurations can be done in constants.php You can supply a base URI
Arguments
Return
MemModel
PHP | object getInfModelF(string $baseURI) |
---|
Returns a InfModelF. (MemModel with forward chaining inference engine) Configurations can be done in constants.php You can supply a base URI
Arguments
Return
MemModel
PHP | object getMemModel(string $baseURI) |
---|
Returns a MemModel. You can supply a base URI
Arguments
Return
MemModel
PHP | object getOntModel(constant $modelType, unknown $vocabulary, string $baseURI) |
---|
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.
Arguments
Return
MemModel
PHP | object getResModel(constant $modelType, string $baseURI) |
---|
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
Arguments
Return
MemModel