public void testOWL2() throws OWLException {
String ns = "http://www.example.org/test#";
OWLOntology ont = loadOntology( base + "owl2_owlapi2.owl" );
Reasoner reasoner = new Reasoner( OWL.manager );
reasoner.setOntology( ont );
OWLClass C = Class( ns + "C" );
OWLClass D = Class( ns + "D" );
OWLClass D1 = Class( ns + "D1" );
OWLClass D2 = Class( ns + "D2" );
OWLClass D3 = Class( ns + "D3" );
OWLClass test1 = Class( ns + "test1" );
OWLClass test2 = Class( ns + "test2" );
OWLClass test3 = Class( ns + "test3" );
OWLClass OlderThan10 = Class( ns + "OlderThan10" );
OWLClass YoungerThan20 = Class( ns + "YoungerThan20" );
OWLClass Teenager = Class( ns + "Teenager" );
OWLClass Teen = Class( ns + "Teen" );
OWLIndividual ind1 = Individual( ns + "ind1" );
OWLIndividual ind3 = Individual( ns + "ind3" );
OWLIndividual ind4 = Individual( ns + "ind4" );
OWLIndividual ind5 = Individual( ns + "ind5" );
OWLIndividual ind6 = Individual( ns + "ind6" );
OWLObjectProperty p = ObjectProperty( ns + "p" );
OWLObjectProperty r = ObjectProperty( ns + "r" );
OWLObjectProperty invR = ObjectProperty( ns + "invR" );
OWLObjectProperty ir = ObjectProperty( ns + "ir" );
OWLObjectProperty as = ObjectProperty( ns + "as" );
OWLObjectProperty d1 = ObjectProperty( ns + "d1" );
OWLObjectProperty d2 = ObjectProperty( ns + "d2" );
assertTrue( reasoner.isConsistent() );
assertTrue( reasoner.isReflexive( r ) );
assertTrue( reasoner.isReflexive( invR ) );
assertTrue( reasoner.isIrreflexive( ir ) );
assertTrue( reasoner.isAntiSymmetric( as ) );
assertTrue( reasoner.isEquivalentClass( D, or( D1, D2, D3 ) ) );
assertTrue( reasoner.isEquivalentClass( D, test1 ) );
assertTrue( reasoner.isDisjointWith( D1, D2 ) );
assertTrue( reasoner.isDisjointWith( D1, D3 ) );
assertTrue( reasoner.isDisjointWith( D2, D3 ) );
assertTrue( reasoner.isDisjointWith( d1, d2 ) );
assertTrue( reasoner.isDisjointWith( d2, d1 ) );
assertFalse( reasoner.isDisjointWith( p, r ) );
assertTrue( reasoner.hasObjectPropertyRelationship( ind1, r, ind1 ) );
assertTrue( reasoner.hasObjectPropertyRelationship( ind1, invR, ind1 ) );
assertTrue( reasoner.isDifferentFrom( ind1, ind3 ) );
assertTrue( reasoner.isDifferentFrom( ind1, ind4 ) );
assertTrue( reasoner.isDifferentFrom( ind5, ind6 ) );
assertTrue( reasoner.hasObjectPropertyRelationship( ind1, p, ind1 ) );
assertTrue( reasoner.hasType( ind1, test2 ) );
assertTrue( reasoner.hasType( ind1, test3 ) );
assertIteratorValues( SetUtils.union( reasoner.getTypes( ind1, false ) ).iterator(),
new Object[] { OWL.Thing, C, test2, test3 } );
assertTrue( reasoner.isSubClassOf( Teenager, OlderThan10 ) );
assertTrue( reasoner.isSubClassOf( Teenager, YoungerThan20 ) );
assertTrue( reasoner.isEquivalentClass( Teenager, Teen ) );
System.out.println( reasoner.getDataProperties() );
assertTrue( reasoner.getDataProperties().contains( DataProperty( Namespaces.OWL + "topDataProperty") ) );
assertTrue( reasoner.getDataProperties().contains( DataProperty( Namespaces.OWL + "bottomDataProperty") ) );
assertTrue( reasoner.getObjectProperties().contains( ObjectProperty( Namespaces.OWL + "topObjectProperty") ) );
assertTrue( reasoner.getObjectProperties().contains( ObjectProperty( Namespaces.OWL + "bottomObjectProperty") ) );
}