public void testDiscoveryOntology() {
testProperty( "test/data/trans-tree-tests/discovery.owl", "http://purl.org/vocab/relationship/ancestorOf" );
}
private void testProperty( String ontologyURI, String propertyURI ) {
OWLAPILoader loader = new OWLAPILoader();
KnowledgeBase kb = loader.createKB( new String[] { ontologyURI } );
OWLEntity entity = OntologyUtils.findEntity( propertyURI, loader.getOntologies() );
if( entity == null )
throw new IllegalArgumentException( "Property not found: " + propertyURI );
if( !(entity instanceof OWLObjectProperty) )
throw new IllegalArgumentException( "Not an object property: " + propertyURI );
if( !((OWLObjectProperty) entity).isTransitive( loader.getOntologies() ) )
throw new IllegalArgumentException( "Not a transitive property: " + propertyURI );
ATermAppl p = ATermUtils.makeTermAppl( entity.getURI().toString() );
POTaxonomyBuilder builder = null;