Examples of PelletReasoner


Examples of com.clarkparsia.pellet.owlapiv3.PelletReasoner

    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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasoner

        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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasoner

    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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasoner

    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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasoner

        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

Examples of com.clarkparsia.pellet.owlapiv3.PelletReasoner

   
    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

Examples of org.mindswap.pellet.jena.PelletReasoner

  @Test
  public void testPropertyRestrictionsInSuperclasses() {
    String ns = "urn:test:";
    OntModelSpec spec = new OntModelSpec( OntModelSpec.OWL_DL_MEM );
    spec.setReasoner( new PelletReasoner() );

    OntModel model = ModelFactory.createOntologyModel( spec, null );

    OntClass X = model.createClass( ns + "X" );
    ObjectProperty hasX = model.createObjectProperty( ns + "hasX" );
View Full Code Here

Examples of org.mindswap.pellet.jena.PelletReasoner

  }

  @Test
  public void testSameAs2() {
    OntModelSpec ontModelSpec = new OntModelSpec( OntModelSpec.OWL_DL_MEM_RULE_INF );
    ontModelSpec.setReasoner( new PelletReasoner() );
    OntModel model = ModelFactory.createOntologyModel( ontModelSpec );
    Individual i1 = model.createIndividual( "http://test#i1", OWL.Thing );
    Individual i2 = model.createIndividual( "http://test#i2", OWL.Thing );
    Property prop = model.createProperty( "http://test#prop" );
    i1.addProperty( prop, "test" );
View Full Code Here

Examples of org.mindswap.pellet.jena.PelletReasoner

  }

  @Test
  public void testSameAs3() {
    OntModelSpec ontModelSpec = new OntModelSpec( OntModelSpec.OWL_DL_MEM_RULE_INF );
    ontModelSpec.setReasoner( new PelletReasoner() );
    OntModel model = ModelFactory.createOntologyModel( ontModelSpec );
    Individual i1 = model.createIndividual( "http://test#i1", OWL.Thing );
    Individual i2 = model.createIndividual( "http://test#i2", OWL.Thing );
    OntClass c = model.createEnumeratedClass( "http://test#C", model.createList( new RDFNode[] {
        i1, i2 } ) );
View Full Code Here

Examples of org.mindswap.pellet.jena.PelletReasoner

  @Test
  public void testHasValueReasoning() {
    String ns = "urn:test:";
    OntModelSpec spec = new OntModelSpec( OntModelSpec.OWL_DL_MEM );
    spec.setReasoner( new PelletReasoner() );
    OntModel model = ModelFactory.createOntologyModel( spec, null );
    OntClass HomeOwner = model.createClass( ns + "HomeOwner" );
    Individual bob = model.createIndividual( ns + "bob", HomeOwner );
    ObjectProperty hasNeighbor = model.createObjectProperty( ns + "hasNeighbor" );
    OntClass NeighborOfBob = model.createClass( ns + "NeighborOfBob" );
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.