977978979980981982983984985986987
OWLOntology ont = loadOntology( base + "food.owl" ); pellet.loadOntology( ont ); try { kb.classify(); } catch( TimeoutException e ) { timeout = true; } assertTrue( timeout );
10021003100410051006100710081009101010111012
OWLOntology ont = loadOntology( base + "food.owl" ); pellet.loadOntology( ont ); try { kb.classify(); } catch( TimeoutException e ) { timeout = true; } assertFalse( timeout );
16481649165016511652165316541655165616571658
kb.addEquivalentClass( D, and( some( p, A ), min( p, 1, value(b) ), min( p, 1, value(c) ), max( p, 1, TOP ) ) ); assertTrue( kb.isConsistent() ); kb.classify(); assertTrue( kb.isSubClassOf( D, B ) ); assertTrue( kb.isSubClassOf( D, C ) ); }
18761877187818791880188118821883188418851886
kb.addClass( A ); kb.addObjectProperty( p ); kb.addDisjointClasses( Arrays.asList( A, self(p) ) ); kb.classify(); assertTrue( kb.isSatisfiable( A ) ); } @Test
19471948194919501951195219531954195519561957
// A is not primitive because of the domain axiom kb.addDomain( p, A ); // C should be inferred to be a subclass of A and B kb.addSubClass( C, some(p, TOP_LIT ) ); kb.classify(); assertSubClass( kb, C, A ); assertSubClass( kb, C, B ); }
13831384138513861387138813891390139113921393
assertSubClass( kb, A, B ); assertSubClass( kb, B, C ); kb.classify(); } @Test public void testNominalCache() { // this case tests isMergable check and specifically the correctness of
14361437143814391440144114421443144414451446
kb.addIndividual( c ); kb.addType( a, C ); // kb will be in classified state kb.classify(); assertTrue( kb.isType( a, D ) ); assertFalse( kb.isType( b, D ) ); assertFalse( kb.isType( c, D ) );
10131014101510161017101810191020102110221023
OWLOntology ont = loadOntology( base + "food.owl" ); PelletReasoner pellet = PelletReasonerFactory.getInstance().createReasoner( ont ); KnowledgeBase kb = pellet.getKB(); kb.classify(); kb.getTaxonomyBuilder().setProgressMonitor( monitor ); kb.realize();
10431044104510461047104810491050105110521053
Timer timer = kb.timers.createTimer( "classify" ); timer.setTimeout( 1 ); try { kb.classify(); } catch( TimeoutException e ) { timeout = true; } assertTrue( timeout );
10681069107010711072107310741075107610771078
Timer timer = kb.timers.createTimer( "realize" ); timer.setTimeout( 1 ); try { kb.classify(); } catch( TimeoutException e ) { timeout = true; } assertFalse( timeout );