當前位置: 首頁>>代碼示例>>Java>>正文


Java OWLDataFactory.getOWLDataPropertyAssertionAxiom方法代碼示例

本文整理匯總了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;
	}
}
 
開發者ID:robertoyus,項目名稱:HermiT-android,代碼行數:43,代碼來源:Reasoner.java


注:本文中的org.semanticweb.owlapi.model.OWLDataFactory.getOWLDataPropertyAssertionAxiom方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。