Пример #1
0
 /** 
  * 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.
  *
  * @param   	constant  	$modelType
  * @param   	constant  	$vocabulary
  * @param   	string  	$baseURI
  * @return	object		OntModel
  * @access	public
  */
 function &getOntModel($modelType, $vocabulary, $baseURI = null)
 {
     switch ($modelType) {
         case DBMODEL:
             $baseModel = ModelFactory::getDefaultDbModel($baseURI);
             break;
         case INFMODELF:
             $baseModel = ModelFactory::getInfModelF($baseURI);
             break;
         case INFMODELB:
             $baseModel = ModelFactory::getInfModelB($baseURI);
             break;
         default:
             $baseModel = ModelFactory::getMemModel($baseURI);
     }
     return ModelFactory::getOntModelForBaseModel($baseModel, $vocabulary);
 }