本文整理匯總了Java中org.semanticweb.owlapi.model.OWLDataFactory.getOWLDataPropertyAssertionAxiom方法的典型用法代碼示例。如果您正苦於以下問題:Java OWLDataFactory.getOWLDataPropertyAssertionAxiom方法的具體用法?Java OWLDataFactory.getOWLDataPropertyAssertionAxiom怎麽用?Java OWLDataFactory.getOWLDataPropertyAssertionAxiom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.semanticweb.owlapi.model.OWLDataFactory
的用法示例。
在下文中一共展示了OWLDataFactory.getOWLDataPropertyAssertionAxiom方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isSubDataPropertyOf
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
protected boolean isSubDataPropertyOf(OWLDataProperty subDataProperty,
OWLDataProperty superDataProperty) {
checkPreConditions(subDataProperty, superDataProperty);
if (!m_isConsistent || subDataProperty.isOWLBottomDataProperty()
|| superDataProperty.isOWLTopDataProperty())
return true;
AtomicRole subrole = H(subDataProperty);
AtomicRole superrole = H(superDataProperty);
if (m_dataRoleHierarchy != null
&& !containsFreshEntities(subDataProperty, superDataProperty)) {
HierarchyNode<AtomicRole> subroleNode = m_dataRoleHierarchy
.getNodeForElement(subrole);
return subroleNode.isEquivalentElement(superrole)
|| subroleNode.isAncestorElement(superrole);
} else {
OWLDataFactory factory = getDataFactory();
OWLIndividual individual = factory
.getOWLAnonymousIndividual("fresh-individual");
OWLLiteral freshConstant = factory.getOWLLiteral(
"internal:fresh-constant", factory.getOWLDatatype(IRI
.create("internal:anonymous-constants")));
OWLDataProperty negatedSuperDataProperty = factory
.getOWLDataProperty(IRI
.create("internal:negated-superproperty"));
OWLAxiom subpropertyAssertion = factory
.getOWLDataPropertyAssertionAxiom(subDataProperty,
individual, freshConstant);
OWLAxiom negatedSuperpropertyAssertion = factory
.getOWLDataPropertyAssertionAxiom(negatedSuperDataProperty,
individual, freshConstant);
OWLAxiom superpropertyAxiomatization = factory
.getOWLDisjointDataPropertiesAxiom(superDataProperty,
negatedSuperDataProperty);
Tableau tableau = getTableau(subpropertyAssertion,
negatedSuperpropertyAssertion, superpropertyAxiomatization);
boolean result = tableau.isSatisfiable(true, null, null, null,
null, null, ReasoningTaskDescription.isRoleSubsumedBy(
subrole, superrole, false));
tableau.clearAdditionalDLOntology();
return !result;
}
}