本文整理汇总了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');
}
}