本文整理了Java中openllet.owlapi.OWL.equivalentClasses()
方法的一些代码示例,展示了OWL.equivalentClasses()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OWL.equivalentClasses()
方法的具体详情如下:
包路径:openllet.owlapi.OWL
类名称:OWL
方法名:equivalentClasses
暂无
代码示例来源:origin: Galigator/openllet
@Test
public void testNone2() throws OWLException
{
addAxiom(OWL.subClassOf(_cls[0], _P0AllC0));
addAxiom(OWL.equivalentClasses(_cls[0], _cls[1]));
addAxiom(OWL.equivalentClasses(_cls[0], OWL.Thing));
final List<Lint> lints = _pattern.match(_ontology);
assertEquals(0, lints.size());
}
代码示例来源:origin: Galigator/openllet
/**
* Test that entities appearing in declarations only can still be used in clashExplanation requests.
*/
@Test
public void declarationOnlyEntity() throws Exception
{
final OWLAxiom[] axioms = { OWL.equivalentClasses(_A, OWL.Thing), OWL.declaration(_B) };
setupGenerators(Stream.of(axioms));
testExplanations(OWL.subClassOf(_B, _A), 0, new OWLAxiom[] { axioms[0] });
}
代码示例来源:origin: Galigator/openllet
@Test
public void testNone()
{
assertFalse(_pattern.isFixable());
OWLAxiom axiom = OWL.equivalentClasses(_cls[0], _cls[1]);
assertNull(_pattern.match(_ontology, axiom));
axiom = OWL.equivalentClasses(CollectionUtil.<OWLClassExpression> asSet(_cls[0], _cls[1], _cls[2]));
assertNull(_pattern.match(_ontology, axiom));
axiom = OWL.equivalentClasses(CollectionUtil.<OWLClassExpression> asSet(_cls[0], _P0AllC0, _cls[2]));
assertNull(_pattern.match(_ontology, axiom));
}
代码示例来源:origin: Galigator/openllet
@Test
public void testNone1() throws OWLException
{
addAxiom(OWL.subClassOf(_cls[0], _P0AllC0));
addAxiom(OWL.subClassOf(_cls[0], _cls[1]));
addAxiom(OWL.equivalentClasses(_cls[1], _cls[2]));
addAxiom(OWL.equivalentClasses(_cls[1], _cls[3]));
assertTrue(_pattern.isFixable());
final List<Lint> lints = _pattern.match(_ontology);
assertEquals(0, lints.size());
}
代码示例来源:origin: Galigator/openllet
@Test
public void nestedUnionTest()
{
final OWLAxiom[] axioms = { equivalentClasses(_A, and(_B, or(_C, _D))), equivalentClasses(_E, and(_B, _C)) };
extractModules(axioms);
testModule(_A, _A, _B, _C, _D, _E);
testModule(_B, _B);
testModule(_C, _C);
testModule(_D, _D);
testModule(_E, _A, _B, _C, _D, _E);
}
代码示例来源:origin: Galigator/openllet
@Test
public void indirectSubClassTest()
{
final OWLAxiom[] axioms = { subClassOf(_A, Thing), equivalentClasses(_A, some(_p, _C)), equivalentClasses(_B, some(_p, _D)), subClassOf(_C, Thing), subClassOf(_D, _C), subClassOf(_E, Thing), subClassOf(_F, _E) };
final OWLAxiom[] additions = {};
final OWLAxiom[] deletions = { subClassOf(_D, _C) };
updateTest(axioms, additions, deletions);
}
代码示例来源:origin: Galigator/openllet
@Test
public void basicDisjointnessTest()
{
final OWLAxiom[] axioms = { disjointClasses(_A, _B), subClassOf(_C, _A), subClassOf(_D, _B), equivalentClasses(_E, _A) };
disjointnessTest(axioms);
}
代码示例来源:origin: Galigator/openllet
@Test
public void allValuesTest()
{
final OWLAxiom[] axioms = { equivalentClasses(_A, all(_p, _B)) };
extractModules(axioms);
testModule(_A, _A, _p, _B);
testModule(_B, _A, _p, _B);
}
}
代码示例来源:origin: Galigator/openllet
@Test
public void testOneOf()
{
final OWLClassExpression oneOf = OWL.oneOf(_ind);
final OWLAxiom axiom = OWL.equivalentClasses(CollectionUtil.<OWLClassExpression> asSet(_P0AllC0, oneOf));
assertNull(_pattern.match(_ontology, axiom));
}
代码示例来源:origin: Galigator/openllet
/**
* Test for #447
*/
@Test
public void testGetUnsatClasses()
{
createReasoner(OWL.disjointClasses(_A, _B), OWL.equivalentClasses(_C, OWL.and(_A, _B)));
assertStreamAsSetEquals(Stream.of(_C, OWL.Nothing), _reasoner.getUnsatisfiableClasses().entities());
assertStreamAsSetEquals(Stream.of(_C, OWL.Nothing), _reasoner.getEquivalentClasses(_C).entities());
}
代码示例来源:origin: Galigator/openllet
@Test
public void propertyChain2() throws Exception
{
final OWLAxiom[] axioms = { OWL.subPropertyOf(new OWLObjectProperty[] { _p, _q }, _r), OWL.propertyAssertion(_a, _p, _b), OWL.propertyAssertion(_b, _q, _c), OWL.equivalentClasses(_A, OWL.some(_r, OWL.Thing)) };
setupGenerators(Stream.of(axioms));
testExplanations(OWL.classAssertion(_a, _A), 0, axioms);
}
代码示例来源:origin: Galigator/openllet
@Test
public void intersectionTest()
{
final OWLAxiom[] axioms = { equivalentClasses(_A, and(_B, _C)) };
extractModules(axioms);
testModule(_A, _A, _B, _C);
testModule(_B, _B);
testModule(_C, _C);
}
代码示例来源:origin: Galigator/openllet
@Test
public void testComplexEquivalence()
{
final OWLAxiom axiom = OWL.equivalentClasses(CollectionUtil.<OWLClassExpression> asSet(_cls[0], _P0AllC0, _P0SomeC1));
final Lint lint = _pattern.match(_ontology, axiom);
assertNotNull(lint);
assertTrue(lint.getParticipatingClasses().isEmpty());
assertTrue(lint.getParticipatingAxioms().contains(axiom));
assertNull(lint.getSeverity());
assertSame(_ontology, lint.getParticipatingOntology());
}
代码示例来源:origin: Galigator/openllet
@Test
public void transitiveProperty() throws Exception
{
final OWLAxiom[] axioms = { OWL.transitive(_p), OWL.propertyAssertion(_a, _p, _b), OWL.propertyAssertion(_b, _p, _c), OWL.equivalentClasses(_A, OWL.value(_p, _c)) };
setupGenerators(Stream.of(axioms));
testExplanations(OWL.classAssertion(_b, _A), 0, new OWLAxiom[] { axioms[2], axioms[3] });
testExplanations(OWL.classAssertion(_a, _A), 0, axioms);
}
代码示例来源:origin: Galigator/openllet
@Test
public void basicDisjointnessUpdateTest()
{
final OWLAxiom[] axioms = { disjointClasses(_A, _B), subClassOf(_C, _A), subClassOf(_D, _B), equivalentClasses(_E, _A) };
final OWLAxiom[] additions = { disjointClasses(_D, _C) };
final OWLAxiom[] deletions = { disjointClasses(_A, _B) };
disjointnessUpdateTest(axioms, additions, deletions);
}
代码示例来源:origin: Galigator/openllet
@Test
public void testNested1()
{
_pattern.setMaxAllowed(2);
final OWLClassExpression union = OWL.or(_cls[1], _cls[2], _cls[3]);
final OWLClassExpression all = OWL.all(_pro[0], union);
final OWLClassExpression and = OWL.and(all, _cls[4]);
final OWLAxiom axiom = OWL.equivalentClasses(and, _cls[0]);
assertNotNull(_pattern.match(_ontology, axiom));
}
代码示例来源:origin: Galigator/openllet
@Test
public void userDefinedDatatype3() throws Exception
{
final OWLAxiom[] axioms = { OWL.classAssertion(_a, _A), OWL.propertyAssertion(_a, dp, OWL.constant(9)), OWL.equivalentClasses(_B, OWL.and(_A, OWL.some(dp, _dt))), OWL.datatypeDefinition(_dt, OWL.restrict(XSD.INTEGER, OWL.maxExclusive(10))) };
setupGenerators(Stream.of(axioms));
testExplanations(OWL.classAssertion(_a, _B), 0, axioms);
}
代码示例来源:origin: Galigator/openllet
@Test
public void testNone()
{
assertTrue(_pattern.isFixable());
OWLAxiom axiom = OWL.equivalentClasses(CollectionUtil.<OWLClassExpression> asSet(OWL.Nothing, _cls[2], _cls[3]));
assertNull(_pattern.match(_ontology, axiom));
axiom = OWL.subClassOf(OWL.Thing, _cls[1]);
assertNull(_pattern.match(_ontology, axiom));
}
代码示例来源:origin: Galigator/openllet
@Test
public void testObjectRangeWithEquivalents()
{
createReasoner(OWL.equivalentClasses(_C, some(inverse(_p), OWL.Thing)), OWL.range(_p, _D), OWL.subClassOf(_C, _E));
_reasoner.getKB().printClassTree();
assertTrue(_reasoner.isEntailed(OWL.range(_p, _C)));
assertStreamAsSetEquals(Stream.of(_C), _reasoner.getEquivalentClasses(some(inverse(_p), OWL.Thing)).entities());
assertStreamAsSetEquals(Stream.of(_C), _reasoner.getObjectPropertyRanges(_p, true).entities());
assertStreamAsSetEquals(Stream.of(_C, _D, _E, OWL.Thing), _reasoner.getObjectPropertyRanges(_p, false).entities());
}
代码示例来源:origin: Galigator/openllet
@Test
public void deleteNonLocal()
{
final OWLAxiom[] axioms = { equivalentClasses(_A, all(_p, _B)), subClassOf(_C, all(_p, _B)), subClassOf(_D, all(_p, _B)), subClassOf(_D, _C) };
final OWLAxiom[] additions = {};
final OWLAxiom[] deletions = { subClassOf(_C, all(_p, _B)) };
updateTest(axioms, additions, deletions);
}
内容来源于网络,如有侵权,请联系作者删除!