OWL.propertyAssertion( a, p, b ),
OWL.classAssertion( c, C ),
OWL.propertyAssertion( a, dp, lit )
};
Reasoner pellet = new Reasoner( OWL.manager );
OWLOntology ont = OntologyUtils.getOntologyFromAxioms( axioms );
pellet.setOntology( ont );
assertTrue( pellet.isSubPropertyOf( p, OWL.topObjectProperty ) );
assertTrue( pellet.isSubPropertyOf( OWL.bottomObjectProperty, p ) );
assertTrue( pellet.isSubPropertyOf( dp, OWL.topDataProperty ) );
assertTrue( pellet.isSubPropertyOf( OWL.bottomDataProperty, dp ) );
assertEquals( Collections.singleton( Collections.singleton( p ) ), pellet.getSubProperties( OWL.topObjectProperty ) );
assertEquals( Collections.singleton( Collections.singleton( OWL.bottomObjectProperty ) ), pellet.getSubProperties( p ) );
assertEquals( Collections.singleton( Collections.singleton( dp ) ), pellet.getSubProperties( OWL.topDataProperty ) );
assertEquals( Collections.singleton( Collections.singleton( OWL.bottomDataProperty ) ), pellet.getSubProperties( dp ) );
assertTrue( pellet.hasObjectPropertyRelationship( a, p, b ) );
assertFalse( pellet.hasObjectPropertyRelationship( b, p, a ) );
assertTrue( pellet.hasObjectPropertyRelationship( a, OWL.topObjectProperty, b ) );
assertTrue( pellet.hasObjectPropertyRelationship( b, OWL.topObjectProperty, a ) );
assertTrue( pellet.hasDataPropertyRelationship( a, dp, lit ) );
assertFalse( pellet.hasDataPropertyRelationship( b, dp, lit ) );
assertTrue( pellet.hasDataPropertyRelationship( a, OWL.topDataProperty, lit ) );
assertTrue( pellet.hasDataPropertyRelationship( b, OWL.topDataProperty, lit ) );
assertEquals( SetUtils.create( b ), pellet.getObjectPropertyRelationships( a ).get( p ) );
assertFalse( pellet.getObjectPropertyRelationships( b ).containsKey( p ) );
assertEquals( SetUtils.create( a, b, c ), pellet.getObjectPropertyRelationships( a ).get( OWL.topObjectProperty ) );
assertEquals( SetUtils.create( a, b, c ), pellet.getObjectPropertyRelationships( b ).get( OWL.topObjectProperty ) );
assertEquals( SetUtils.create( lit ), pellet.getDataPropertyRelationships( a ).get( OWL.topDataProperty ) );
assertEquals( SetUtils.create( lit ), pellet.getDataPropertyRelationships( b ).get( OWL.topDataProperty ) );
assertFalse( pellet.getDataPropertyRelationships( a ).containsKey( OWL.bottomObjectProperty ) );
assertFalse( pellet.getDataPropertyRelationships( a ).containsKey( OWL.bottomDataProperty ) );
assertEquals( SetUtils.create( a, b, c ), pellet.getObjectPropertyAssertions( OWL.topObjectProperty ).get( a ) );
assertTrue( pellet.getObjectPropertyAssertions( OWL.bottomObjectProperty ).isEmpty() );
assertEquals( SetUtils.create( lit ), pellet.getDataPropertyAssertions( OWL.topDataProperty ).get( c ) );
assertTrue( pellet.getDataPropertyAssertions( OWL.bottomDataProperty ).isEmpty() );
}
finally {
PelletOptions.HIDE_TOP_PROPERTY_VALUES = prevValue;
}