Package com.clarkparsia.pellet.owlapiv3

Examples of com.clarkparsia.pellet.owlapiv3.OWLAPILoader


  public void testRealizationTimeout() throws Exception {
    boolean timeout = false;

    OWLOntology ont = loadOntology( "file:" + PelletTestSuite.base + "modularity/SWEET.owl" );

    PelletReasoner pellet = PelletReasonerFactory.getInstance().createReasoner( ont );
    KnowledgeBase kb = pellet.getKB();

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

    try {
View Full Code Here


    OWLAxiom[] axioms = {
        OWL.subClassOf( C, D ),
        OWL.classAssertion( anon, C ) };
   
    OWLOntology ont = OWL.Ontology( axioms );
    PelletReasoner pellet = PelletReasonerFactory.getInstance().createReasoner( ont );

    assertTrue( pellet.getInstances( D, true ).getNodes().size() == 0 );

    assertTrue( pellet.getInstances( D, false ).getNodes().size() == 1 );
  }
View Full Code Here

    OWLAxiom[] axioms = {
        OWL.subClassOf( E, D ),
        OWL.subClassOf( D, C ) };
   
    OWLOntology ont = OWL.Ontology( axioms );
    PelletReasoner pellet = PelletReasonerFactory.getInstance().createReasoner( ont );

    assertTrue( pellet.getSubClasses( C, true ).getNodes().size() == 1 );   
    assertTrue( pellet.getSubClasses( C, false ).getNodes().size() == 3 ); // includes owl:Nothing
  }
View Full Code Here

        OWL.differentFrom( a, c )
    };
   
    OWLOntology ont = OWL.Ontology( axioms );
    OWLReasonerConfiguration config = new SimpleConfiguration( new NullReasonerProgressMonitor(), FreshEntityPolicy.ALLOW, Long.MAX_VALUE, p );
    PelletReasoner pellet = PelletReasonerFactory.getInstance().createReasoner( ont, config );
   
    return pellet;
  }
View Full Code Here

    return pellet;
  }
 
  @Test
  public void testIndividualNodeSetPolicyBySameAs() {
    PelletReasoner pellet = setupReasonerIndividualNodeSetPolicy(IndividualNodeSetPolicy.BY_SAME_AS);
   
    assertTrue( pellet.getInstances( C, true ).getNodes().size() == 2 );   
    assertTrue( pellet.getDifferentIndividuals( c ).getNodes().size() == 1 );
  }
View Full Code Here

    assertTrue( pellet.getDifferentIndividuals( c ).getNodes().size() == 1 );
  }
 
  @Test
  public void testIndividualNodeSetPolicyByName() {
    PelletReasoner pellet = setupReasonerIndividualNodeSetPolicy(IndividualNodeSetPolicy.BY_NAME);
   
    assertTrue( pellet.getInstances( C, true ).getNodes().size() == 3 );   
    assertTrue( pellet.getDifferentIndividuals( c ).getNodes().size() == 2 );
  }
View Full Code Here

        OWL.propertyAssertion( a, OWL.bottomObjectProperty, b ),
        OWL.propertyAssertion( a, OWL.bottomDataProperty, lit ) };
   
    for( int i = 0; i < axioms.length; i++ ) {
      OWLOntology ont = OWL.Ontology( axioms[i] );
      PelletReasoner pellet = PelletReasonerFactory.getInstance().createReasoner( ont );

      assertEquals( i < 2, pellet.isConsistent() );
    }
  }
View Full Code Here

   
    String ns = "http://www.integratedmodelling.org/ks/tarassandbox/set-theory.owl#";

    OWLOntology ont = loadOntology( base + "set-theory.owl" );

    PelletReasoner reasoner = PelletReasonerFactory.getInstance().createReasoner( ont );

    reasoner.getKB().classify();
   
    assertEquals( SetUtils.create( OWL.Class( ns + "SetOfXSets" ), OWL.Class( ns + "XSet" ),
        OWL.Class( ns + "XThing" ) ), reasoner.getSubClasses(
        OWL.Class( ns + "XSetTheoryClass" ), true ).getFlattened() );
  }
View Full Code Here

 
  @Test
  public void test454() {   
    OWLOntology ont = loadOntology( base + "ticket-454-test-case.owl" );

    PelletReasoner reasoner = PelletReasonerFactory.getInstance().createReasoner( ont );
   
    assertFalse(reasoner.isConsistent());
  }
View Full Code Here

 
  @Test
  public void test456() {   
    OWLOntology ont = loadOntology( base + "ticket-456-test-case.owl" );

    PelletReasoner reasoner = PelletReasonerFactory.getInstance().createReasoner( ont );
   
    assertTrue(reasoner.isConsistent());
  }
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellet.owlapiv3.OWLAPILoader

Copyright © 2018 www.massapicom. 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.