OntClass Child = model.getOntClass( ns + "Child" );
// OntClass GoodChild = model.getOntClass( ns + "GoodChild" );
OntClass Grandchild = model.getOntClass( ns + "Grandchild" );
OntClass Person = model.getOntClass( ns + "Person" );
Individual Abel = model.getIndividual( ns + "Abel" );
Individual Cain = model.getIndividual( ns + "Cain" );
Individual Oedipus = model.getIndividual( ns + "Oedipus" );
Individual Remus = model.getIndividual( ns + "Remus" );
Individual Romulus = model.getIndividual( ns + "Romulus" );
model.prepare();
KnowledgeBase kb = ((PelletInfGraph) model.getGraph()).getKB();
for( int test = 0; test < 1; test++ ) {
if( test != 0 ) {
kb.realize();
}
assertTrue( Abel.hasProperty( sibling, Cain ) );
assertIteratorValues( Abel.listPropertyValues( sibling ), new Resource[] { Cain } );
assertTrue( Cain.hasProperty( sibling, Abel ) );
assertIteratorValues( Cain.listPropertyValues( sibling ), new Resource[] { Abel } );
assertTrue( Cain.hasProperty( hates, Abel ) );
assertTrue( Cain.hasRDFType( Grandchild ) );
assertTrue( Cain.hasRDFType( BadChild ) );
assertFalse( Romulus.hasProperty( sibling, Remus ) );
assertTrue( Romulus.hasProperty( hates, Remus ) );
assertTrue( Romulus.hasRDFType( Grandchild ) );
assertFalse( Romulus.hasRDFType( BadChild ) );
assertTrue( Oedipus.hasRDFType( Child ) );
}
assertIteratorValues( Cain.listRDFTypes( true ), new Object[] { BadChild, Child, Person } );