当前位置: 首页>>代码示例>>PHP>>正文


PHP MemModel::MemModel方法代码示例

本文整理汇总了PHP中MemModel::MemModel方法的典型用法代码示例。如果您正苦于以下问题:PHP MemModel::MemModel方法的具体用法?PHP MemModel::MemModel怎么用?PHP MemModel::MemModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MemModel的用法示例。


在下文中一共展示了MemModel::MemModel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: InfModel

 /**
  * Constructor
  * You can supply a base_uri
  *
  * @param string $baseURI 
  * @access	public
  */
 function InfModel($baseURI = NULL)
 {
     //call the memmodel constructor method
     parent::MemModel($baseURI);
     //initialise vars
     $this->infRulesTriggerIndex['s'] = array();
     $this->infRulesTriggerIndex['p'] = array();
     $this->infRulesTriggerIndex['o'] = array();
     $this->infRulesEntailIndex['s'] = array();
     $this->infRulesEntailIndex['p'] = array();
     $this->infRulesEntailIndex['o'] = array();
     $this->infRules = array();
     $this->statementRuleIndex = array();
     //arraylist of predicate labels that shall add inference rules
     //to the model
     //The constants, wich statements will create rules can be configured in constants.php
     if (INF_RES_SUBCLASSOF) {
         $this->supportedInference[] = RDF_SCHEMA_URI . RDFS_SUBCLASSOF;
     }
     if (INF_RES_SUBPROPERTYOF) {
         $this->supportedInference[] = RDF_SCHEMA_URI . RDFS_SUBPROPERTYOF;
     }
     if (INF_RES_RANGE) {
         $this->supportedInference[] = RDF_SCHEMA_URI . RDFS_RANGE;
     }
     if (INF_RES_DOMAIN) {
         $this->supportedInference[] = RDF_SCHEMA_URI . RDFS_DOMAIN;
     }
     if (INF_RES_OWL_SAMEAS) {
         $this->supportedInference[] = OWL_URI . OWL_SAME_AS;
     }
     if (INF_RES_OWL_INVERSEOF) {
         $this->supportedInference[] = OWL_URI . OWL_INVERSE_OF;
     }
     //Rule: rdfs12
     if (INF_RES_RULE_RDFS12) {
         $infRule = new InfRule();
         $infRule->setTrigger(null, new Resource(RDF_NAMESPACE_URI . RDF_TYPE), new Resource(RDF_SCHEMA_URI . 'ContainerMembershipProperty'));
         $infRule->setEntailment('<s>', new Resource(RDF_SCHEMA_URI . RDFS_SUBPROPERTYOF), new Resource(RDF_SCHEMA_URI . 'member'));
         $this->_addInfRule($infRule, 'base');
     }
     //Rule: rdfs6
     if (INF_RES_RULE_RDFS6) {
         $infRule = new InfRule();
         $infRule->setTrigger(null, new Resource(RDF_NAMESPACE_URI . RDF_TYPE), new Resource(RDF_NAMESPACE_URI . RDF_PROPERTY));
         $infRule->setEntailment('<s>', new Resource(RDF_SCHEMA_URI . RDFS_SUBPROPERTYOF), '<s>');
         $this->_addInfRule($infRule, 'base');
     }
     //Rule: rdfs8
     if (INF_RES_RULE_RDFS8) {
         $infRule = new InfRule();
         $infRule->setTrigger(null, new Resource(RDF_NAMESPACE_URI . RDF_TYPE), new Resource(RDF_SCHEMA_URI . RDFS_CLASS));
         $infRule->setEntailment('<s>', new Resource(RDF_SCHEMA_URI . RDFS_SUBCLASSOF), new Resource(RDF_SCHEMA_URI . RDFS_RESOURCE));
         $this->_addInfRule($infRule, 'base');
     }
     //Rule: rdfs10
     if (INF_RES_RULE_RDFS10) {
         $infRule = new InfRule();
         $infRule->setTrigger(null, new Resource(RDF_NAMESPACE_URI . RDF_TYPE), new Resource(RDF_SCHEMA_URI . RDFS_CLASS));
         $infRule->setEntailment('<s>', new Resource(RDF_SCHEMA_URI . RDFS_SUBCLASSOF), '<s>');
         $this->_addInfRule($infRule, 'base');
     }
     //Rule: rdfs13
     if (INF_RES_RULE_RDFS13) {
         $infRule = new InfRule();
         $infRule->setTrigger(null, new Resource(RDF_NAMESPACE_URI . RDF_TYPE), new Resource(RDF_SCHEMA_URI . RDFS_DATATYPE));
         $infRule->setEntailment('<s>', new Resource(RDF_SCHEMA_URI . RDFS_SUBCLASSOF), new Resource(RDF_SCHEMA_URI . RDFS_LITERAL));
         $this->_addInfRule($infRule, 'base');
     }
 }
开发者ID:helenadeus,项目名称:s3db.map,代码行数:77,代码来源:InfModel.php


注:本文中的MemModel::MemModel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。