Package org.mindswap.pellet.owlapi

Examples of org.mindswap.pellet.owlapi.Reasoner.loadOntology()


    axioms.add( classAssertion( i3, c ) );

    OWLOntology ont = getOntologyFromAxioms( axioms, ontURI );

    Reasoner reasoner = new Reasoner( OWL.manager );
    reasoner.loadOntology( ont );

    assertTrue( !reasoner.isSameAs( i1, i2 ) );
    assertTrue( !reasoner.isSameAs( i1, i3 ) );
    assertEquals( reasoner.getSameAsIndividuals( i1 ), Collections.emptySet() );
View Full Code Here


    Reasoner pellet = new Reasoner( OWL.manager );
    KnowledgeBase kb = pellet.getKB();

    OWLOntology ont = loadOntology( base + "food.owl" );
    pellet.loadOntology( ont );

    kb.classify();

    kb.getTaxonomyBuilder().setProgressMonitor( monitor );
View Full Code Here

    Timer timer = kb.timers.createTimer( "classify" );
    timer.setTimeout( 1 );

    OWLOntology ont = loadOntology( base + "food.owl" );
    pellet.loadOntology( ont );

    try {
      kb.classify();
    } catch( TimeoutException e ) {
      timeout = true;
View Full Code Here

    Timer timer = kb.timers.createTimer( "realize" );
    timer.setTimeout( 1 );

    OWLOntology ont = loadOntology( base + "food.owl" );
    pellet.loadOntology( ont );

    try {
      kb.classify();
    } catch( TimeoutException e ) {
      timeout = true;
View Full Code Here

        + "ex:C rdfs:subClassOf ex:D .\r\n" + "[] a ex:C .";

    Reasoner pellet = new Reasoner( OWL.manager );

    OWLOntology ont = OWL.manager.loadOntology( new StringInputSource( src ) );
    pellet.loadOntology( ont );

    OWLClass D = OWL.Class( ns + "D" );

    assertTrue( pellet.getIndividuals( D, true ).size() == 0 );
View Full Code Here

    OWLOntology ont = getOntologyFromAxioms( axioms, ontURI );

    Reasoner reasoner = new Reasoner( OWL.manager );

    reasoner.loadOntology( ont );

    assertEquals( reasoner.getSameAsIndividuals( a ), Collections.emptySet() );
    assertEquals( reasoner.getSameAsIndividuals( b ), Collections.singleton( c ) );
    assertEquals( reasoner.getSameAsIndividuals( c ), Collections.singleton( b ) );
View Full Code Here

      manager.applyChange( new AddAxiom( ont, axiom ) );

      Reasoner reasoner = new Reasoner( manager );
      reasoner.getKB().setDoExplanation( true );
      reasoner.loadOntology( ont );

      assertTrue( "Entailment failed", reasoner.isEntailed( axiom ) );

      Set<OWLAxiom> explanation = reasoner.getExplanation();
      assertEquals( "Unexpected explanation", SetUtils.create( axiom ), explanation );
View Full Code Here

    try {
      OWLOntology premise = manager.loadOntology(URI.create(premiseURI));
      OWLOntology conclusion = manager.loadOntology(URI
          .create(conclusionURI));

      reasoner.loadOntology(premise);
     
      assertTrue(reasoner.isEntailed(conclusion));
    } catch (OWLOntologyCreationException e) {
      throw new RuntimeException( e );
    }
View Full Code Here

    manager.addAxiom(ontology, sc);
   
    Reasoner reasoner = new Reasoner(manager);

    reasoner.loadOntology(ontology);
    assertTrue(reasoner.isConsistent());
   
    KnowledgeBase kb = reasoner.getKB();
    assertTrue(kb.isClass(term("http://example#c")));
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.