本文整理匯總了Java中org.semanticweb.owlapi.model.OWLDataFactory.getOWLAnonymousIndividual方法的典型用法代碼示例。如果您正苦於以下問題:Java OWLDataFactory.getOWLAnonymousIndividual方法的具體用法?Java OWLDataFactory.getOWLAnonymousIndividual怎麽用?Java OWLDataFactory.getOWLAnonymousIndividual使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.semanticweb.owlapi.model.OWLDataFactory
的用法示例。
在下文中一共展示了OWLDataFactory.getOWLAnonymousIndividual方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isSatisfiable
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
public boolean isSatisfiable(OWLClassExpression classExpression) {
checkPreConditions(classExpression);
if (!isConsistent())
return false;
if (classExpression instanceof OWLClass
&& m_atomicConceptHierarchy != null) {
AtomicConcept concept = H((OWLClass) classExpression);
HierarchyNode<AtomicConcept> node = m_atomicConceptHierarchy
.getNodeForElement(concept);
return node != m_atomicConceptHierarchy.getBottomNode();
} else {
OWLDataFactory factory = getDataFactory();
OWLIndividual freshIndividual = factory
.getOWLAnonymousIndividual("fresh-individual");
OWLClassAssertionAxiom assertClassExpression = factory
.getOWLClassAssertionAxiom(classExpression, freshIndividual);
Tableau tableau = getTableau(assertClassExpression);
return tableau.isSatisfiable(true, null, null, null, null, null,
ReasoningTaskDescription
.isConceptSatisfiable(classExpression));
}
}
示例2: isReflexive
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
protected boolean isReflexive(OWLObjectPropertyExpression propertyExpression) {
checkPreConditions(propertyExpression);
if (!m_isConsistent)
return true;
OWLDataFactory factory = getDataFactory();
OWLClass pseudoNominal = factory.getOWLClass(IRI
.create("internal:pseudo-nominal"));
OWLClassExpression allNotPseudoNominal = factory
.getOWLObjectAllValuesFrom(propertyExpression,
pseudoNominal.getObjectComplementOf());
OWLIndividual freshIndividual = factory
.getOWLAnonymousIndividual("fresh-individual");
OWLAxiom pseudoNominalAssertion = factory.getOWLClassAssertionAxiom(
pseudoNominal, freshIndividual);
OWLAxiom allNotPseudoNominalAssertion = factory
.getOWLClassAssertionAxiom(allNotPseudoNominal, freshIndividual);
Tableau tableau = getTableau(pseudoNominalAssertion,
allNotPseudoNominalAssertion);
boolean result = tableau.isSatisfiable(true, null, null, null, null,
null, new ReasoningTaskDescription(true, "symmetry of {0}",
H(propertyExpression)));
tableau.clearAdditionalDLOntology();
return !result;
}
示例3: isAsymmetric
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
protected boolean isAsymmetric(
OWLObjectPropertyExpression propertyExpression) {
checkPreConditions(propertyExpression);
if (!m_isConsistent)
return true;
OWLDataFactory factory = getDataFactory();
OWLIndividual freshIndividualA = factory
.getOWLAnonymousIndividual("fresh-individual-A");
OWLIndividual freshIndividualB = factory
.getOWLAnonymousIndividual("fresh-individual-B");
OWLAxiom assertion1 = factory.getOWLObjectPropertyAssertionAxiom(
propertyExpression, freshIndividualA, freshIndividualB);
OWLAxiom assertion2 = factory.getOWLObjectPropertyAssertionAxiom(
propertyExpression.getInverseProperty(), freshIndividualA,
freshIndividualB);
Tableau tableau = getTableau(assertion1, assertion2);
boolean result = tableau.isSatisfiable(true, null, null, null, null,
null, new ReasoningTaskDescription(true, "asymmetry of {0}",
H(propertyExpression)));
tableau.clearAdditionalDLOntology();
return !result;
}
示例4: visit
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
public Boolean visit(OWLDatatypeDefinitionAxiom axiom) {
reasoner.throwInconsistentOntologyExceptionIfNecessary();
if (!reasoner.isConsistent())
return true;
if (reasoner.m_dlOntology.hasDatatypes()) {
OWLDataFactory factory=reasoner.getDataFactory();
OWLIndividual freshIndividual=factory.getOWLAnonymousIndividual("fresh-individual");
OWLDataProperty freshDataProperty=factory.getOWLDataProperty(IRI.create("fresh-data-property"));
OWLDataRange dataRange=axiom.getDataRange();
OWLDatatype dt=axiom.getDatatype();
OWLDataIntersectionOf dr1=factory.getOWLDataIntersectionOf(factory.getOWLDataComplementOf(dataRange),dt);
OWLDataIntersectionOf dr2=factory.getOWLDataIntersectionOf(factory.getOWLDataComplementOf(dt),dataRange);
OWLDataUnionOf union=factory.getOWLDataUnionOf(dr1,dr2);
OWLClassExpression c=factory.getOWLDataSomeValuesFrom(freshDataProperty,union);
OWLClassAssertionAxiom ax=factory.getOWLClassAssertionAxiom(c,freshIndividual);
Tableau tableau=reasoner.getTableau(ax);
return !tableau.isSatisfiable(true,true,null,null,null,null,null,ReasoningTaskDescription.isAxiomEntailed(axiom));
}
else
return false;
}
示例5: isSymmetric
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
protected boolean isSymmetric(OWLObjectPropertyExpression propertyExpression) {
checkPreConditions(propertyExpression);
if (!m_isConsistent
|| propertyExpression.getNamedProperty()
.isOWLTopObjectProperty())
return true;
OWLDataFactory factory = getDataFactory();
OWLClass pseudoNominal = factory.getOWLClass(IRI
.create("internal:pseudo-nominal"));
OWLClassExpression allNotPseudoNominal = factory
.getOWLObjectAllValuesFrom(propertyExpression,
pseudoNominal.getObjectComplementOf());
OWLIndividual freshIndividualA = factory
.getOWLAnonymousIndividual("fresh-individual-A");
OWLIndividual freshIndividualB = factory
.getOWLAnonymousIndividual("fresh-individual-B");
OWLAxiom assertion1 = factory.getOWLObjectPropertyAssertionAxiom(
propertyExpression, freshIndividualA, freshIndividualB);
OWLAxiom assertion2 = factory.getOWLClassAssertionAxiom(
allNotPseudoNominal, freshIndividualB);
OWLAxiom assertion3 = factory.getOWLClassAssertionAxiom(pseudoNominal,
freshIndividualA);
Tableau tableau = getTableau(assertion1, assertion2, assertion3);
boolean result = tableau.isSatisfiable(true, null, null, null, null,
null, new ReasoningTaskDescription(true, "symmetry of {0}",
propertyExpression));
tableau.clearAdditionalDLOntology();
return !result;
}
示例6: isTransitive
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
protected boolean isTransitive(
OWLObjectPropertyExpression propertyExpression) {
checkPreConditions(propertyExpression);
if (!m_isConsistent)
return true;
OWLDataFactory factory = getDataFactory();
OWLClass pseudoNominal = factory.getOWLClass(IRI
.create("internal:pseudo-nominal"));
OWLClassExpression allNotPseudoNominal = factory
.getOWLObjectAllValuesFrom(propertyExpression,
pseudoNominal.getObjectComplementOf());
OWLIndividual freshIndividualA = factory
.getOWLAnonymousIndividual("fresh-individual-A");
OWLIndividual freshIndividualB = factory
.getOWLAnonymousIndividual("fresh-individual-B");
OWLIndividual freshIndividualC = factory
.getOWLAnonymousIndividual("fresh-individual-C");
OWLAxiom assertion1 = factory.getOWLObjectPropertyAssertionAxiom(
propertyExpression, freshIndividualA, freshIndividualB);
OWLAxiom assertion2 = factory.getOWLObjectPropertyAssertionAxiom(
propertyExpression, freshIndividualB, freshIndividualC);
OWLAxiom assertion3 = factory.getOWLClassAssertionAxiom(
allNotPseudoNominal, freshIndividualA);
OWLAxiom assertion4 = factory.getOWLClassAssertionAxiom(pseudoNominal,
freshIndividualC);
Tableau tableau = getTableau(assertion1, assertion2, assertion3,
assertion4);
boolean result = tableau.isSatisfiable(true, null, null, null, null,
null, new ReasoningTaskDescription(true, "transitivity of {0}",
H(propertyExpression)));
tableau.clearAdditionalDLOntology();
return !result;
}
示例7: isSubObjectPropertyExpressionOf
import org.semanticweb.owlapi.model.OWLDataFactory; //導入方法依賴的package包/類
protected boolean isSubObjectPropertyExpressionOf(
OWLObjectPropertyExpression subObjectPropertyExpression,
OWLObjectPropertyExpression superObjectPropertyExpression) {
checkPreConditions(subObjectPropertyExpression,
superObjectPropertyExpression);
if (!m_isConsistent
|| subObjectPropertyExpression.getNamedProperty()
.isOWLBottomObjectProperty()
|| superObjectPropertyExpression.getNamedProperty()
.isOWLTopObjectProperty())
return true;
Role subrole = H(subObjectPropertyExpression);
Role superrole = H(superObjectPropertyExpression);
if (m_objectRoleHierarchy != null
&& !containsFreshEntities(subObjectPropertyExpression,
superObjectPropertyExpression)) {
HierarchyNode<Role> subroleNode = m_objectRoleHierarchy
.getNodeForElement(subrole);
return subroleNode.isEquivalentElement(superrole)
|| subroleNode.isAncestorElement(superrole);
} else {
OWLDataFactory factory = getDataFactory();
OWLClass pseudoNominal = factory.getOWLClass(IRI
.create("internal:pseudo-nominal"));
OWLClassExpression allSuperNotPseudoNominal = factory
.getOWLObjectAllValuesFrom(superObjectPropertyExpression,
pseudoNominal.getObjectComplementOf());
OWLIndividual freshIndividualA = factory
.getOWLAnonymousIndividual("fresh-individual-A");
OWLIndividual freshIndividualB = factory
.getOWLAnonymousIndividual("fresh-individual-B");
OWLAxiom subObjectPropertyAssertion = factory
.getOWLObjectPropertyAssertionAxiom(
subObjectPropertyExpression, freshIndividualA,
freshIndividualB);
OWLAxiom pseudoNominalAssertion = factory
.getOWLClassAssertionAxiom(pseudoNominal, freshIndividualB);
OWLAxiom allSuperNotPseudoNominalAssertion = factory
.getOWLClassAssertionAxiom(allSuperNotPseudoNominal,
freshIndividualA);
Tableau tableau = getTableau(subObjectPropertyAssertion,
pseudoNominalAssertion, allSuperNotPseudoNominalAssertion);
boolean result = tableau.isSatisfiable(true, null, null, null,
null, null, ReasoningTaskDescription.isRoleSubsumedBy(
subrole, superrole, true));
tableau.clearAdditionalDLOntology();
return !result;
}
}
示例8: 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;
}
}