本文整理了Java中openllet.owlapi.OWL.not()
方法的一些代码示例,展示了OWL.not()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OWL.not()
方法的具体详情如下:
包路径:openllet.owlapi.OWL
类名称:OWL
方法名:not
暂无
代码示例来源:origin: com.github.galigator.openllet/openllet-examples
r.getInstances(OWL.not(e)).entities().forEach(System.out::println);
代码示例来源:origin: Galigator/openllet
r.getInstances(OWL.not(e)).entities().forEach(System.out::println);
代码示例来源:origin: Galigator/openllet
@Test
public void indirectModuleTest()
{
final OWLAxiom[] axioms = { subClassOf(_A, and(_B, _C, some(_p, _C))), subClassOf(_B, or(all(_p, not(_C)), _D)), subClassOf(_D, _E) };
final OWLAxiom[] additions = { subClassOf(_A, not(_E)) };
final OWLAxiom[] deletions = {};
updateTest(axioms, additions, deletions);
}
代码示例来源:origin: Galigator/openllet
/**
* Test that complemented super descriptions in subclass axioms are handled correctly. (Known to fail in r100 and earlier)
*/
@Test
public void objectComplementSuperCls()
{
assertLocal(subClassOf(Class("A"), not(Nothing)), Class("A"));
assertLocal(subClassOf(Class("A"), not(Class("B"))), Class("A"));
assertNonLocal(subClassOf(Class("A"), not(Class("B"))), Class("A"), Class("B"));
}
代码示例来源:origin: Galigator/openllet
/**
* Test that complemented sub class descriptions are handled correctly.
*/
@Test
public void objectComplementSubCls()
{
assertLocal(subClassOf(not(Thing), Class("A")), Class("A"));
assertNonLocal(subClassOf(not(Class("B")), Class("A")), Class("A"));
assertNonLocal(subClassOf(not(Class("B")), Class("A")), Class("A"), Class("B"));
}
代码示例来源:origin: Galigator/openllet
/**
* Test that complemented sub class descriptions are handled correctly.
*/
@Test
public void objectComplementSubCls()
{
assertLocal(subClassOf(not(Thing), Class("A")), Class("A"));
assertLocal(subClassOf(not(Class("B")), Class("A")), Class("A"));
assertNonLocal(subClassOf(not(Class("B")), Class("A")), Class("A"), Class("B"));
}
代码示例来源:origin: Galigator/openllet
@Test
public void unsatisfiableTest2()
{
final OWLAxiom[] axioms = { subClassOf(_C, _B), subClassOf(_B, _A), subClassOf(_D, Thing) };
final OWLAxiom[] additions = { subClassOf(_B, not(_A)) };
final OWLAxiom[] deletions = {};
updateTest(axioms, additions, deletions);
}
代码示例来源:origin: Galigator/openllet
@Test
public void testComplementOfOthers()
{
final OWLClassExpression comp = OWL.not(OWL.or(_cls[1], _cls[2]));
final OWLAxiom axiom = OWL.equivalentClasses(_cls[0], comp);
final Lint lint = _pattern.match(_ontology, axiom);
assertNotNull(lint);
assertTrue(lint.getParticipatingClasses().contains(_cls[0]));
final LintFixer fixer = lint.getLintFixer();
assertTrue(fixer.getAxiomsToRemove().contains(axiom));
final OWLAxiom expectedAxiom = OWL.subClassOf(_cls[0], comp);
assertTrue(fixer.getAxiomsToAdd().contains(expectedAxiom));
}
}
代码示例来源:origin: Galigator/openllet
@Test
public void testComplementOfItself()
{
final OWLClassExpression comp = OWL.not(_cls[0]);
final OWLAxiom axiom = OWL.equivalentClasses(_cls[0], comp);
final Lint lint = _pattern.match(_ontology, axiom);
assertNotNull(lint);
assertTrue(lint.getParticipatingClasses().contains(_cls[0]));
final LintFixer fixer = lint.getLintFixer();
assertTrue(fixer.getAxiomsToRemove().contains(axiom));
final OWLAxiom expectedAxiom = OWL.subClassOf(_cls[0], comp);
assertTrue(fixer.getAxiomsToAdd().contains(expectedAxiom));
assertNull(lint.getSeverity());
assertSame(_ontology, lint.getParticipatingOntology());
}
代码示例来源:origin: Galigator/openllet
OWL.subClassOf(UplandArea, OWL.not(Volcano)),//
代码示例来源:origin: com.github.galigator.openllet/openllet-owlapi
owl.addClass(Ind1, OWL.not(ClsF)); // Mark the negation to enforce the open world assertion.
SWRL.antecedent(SWRL.classAtom(OWL.and(ClsD, OWL.not(ClsF)), varA)), //
代码示例来源:origin: Galigator/openllet
owl.addClass(Ind1, OWL.not(ClsF)); // Mark the negation to enforce the open world assertion.
SWRL.antecedent(SWRL.classAtom(OWL.and(ClsD, OWL.not(ClsF)), varA)), //
代码示例来源:origin: Galigator/openllet
@Test
public void testNone()
{
assertTrue(_pattern.isFixable());
final OWLClassExpression comp = OWL.not(_cls[0]);
OWLAxiom axiom = OWL.subClassOf(_cls[0], comp);
assertNull(_pattern.match(_ontology, axiom));
axiom = OWL.equivalentClasses(_P0AllC0, comp);
assertNull(_pattern.match(_ontology, axiom));
axiom = OWL.equivalentClasses(CollectionUtil.asSet(_cls[0], _cls[1], comp));
assertNull(_pattern.match(_ontology, axiom));
axiom = OWL.equivalentClasses(OWL.Nothing, OWL.Thing);
assertNull(_pattern.match(_ontology, axiom));
}
代码示例来源:origin: Galigator/openllet
@Test
public void testComplementRemoval()
{
final String ns = "http://test#";
final OWLOntology ont = loadOntology(OWLManager.createOWLOntologyManager(), MiscTests._base + "ticket539.ofn");
final OpenlletReasoner reasoner = OpenlletReasonerFactory.getInstance().createNonBufferingReasoner(ont);
assertFalse(reasoner.isConsistent());
ont.removeAxiom(OWL.subClassOf(OWL.Class(ns + "a_GROUP"), OWL.Class(ns + "a_TEMPORALTHING")));
assertFalse(reasoner.isConsistent());
ont.removeAxiom(OWL.subClassOf(OWL.Class(ns + "a_INDIVIDUAL"), OWL.not(OWL.Class(ns + "a_SETORCOLLECTION"))));
assertFalse(reasoner.isConsistent());
}
}
内容来源于网络,如有侵权,请联系作者删除!