Package org.mindswap.pellet.owlapi

Examples of org.mindswap.pellet.owlapi.OWLAPILoader


  public void testDiscoveryOntology() {
    testProperty( "test/data/trans-tree-tests/discovery.owl", "http://purl.org/vocab/relationship/ancestorOf" );
  }
   
  private void testProperty( String ontologyURI, String propertyURI ) {
    OWLAPILoader loader = new OWLAPILoader();
    KnowledgeBase kb = loader.createKB( new String[] { ontologyURI } );
   
    OWLEntity entity = OntologyUtils.findEntity( propertyURI, loader.getOntologies() );

    if( entity == null )
      throw new IllegalArgumentException( "Property not found: " + propertyURI );

    if( !(entity instanceof OWLObjectProperty) )
      throw new IllegalArgumentException( "Not an object property: " + propertyURI );

    if( !((OWLObjectProperty) entity).isTransitive( loader.getOntologies() ) )
      throw new IllegalArgumentException( "Not a transitive property: " + propertyURI );
   
    ATermAppl p = ATermUtils.makeTermAppl( entity.getURI().toString() );

    POTaxonomyBuilder builder = null;
View Full Code Here


         all( inv( r ), some( inv( f ), D ) ) ) ) );
  }
 
  @Test
  public void complexInconsistent() {
    kb = new OWLAPILoader().createKB( MiscTests.base + "one+one-inconsistent.owl" );
   
    assertFalse( kb.isConsistent() );
  }
View Full Code Here

    assertFalse( kb.isConsistent() );
  }
 
  @Test
  public void complexAllUnsat() {
    kb = new OWLAPILoader().createKB( MiscTests.base + "one+one-consistent-but-all-unsat.owl" );
   
    assertTrue( kb.isConsistent() );
   
    assertEquals( kb.getClasses(), kb.getUnsatisfiableClasses() );
  }
View Full Code Here

    assertEquals( kb.getClasses(), kb.getUnsatisfiableClasses() );
  }
 
  @Test
  public void complexAllInfSat() {
    kb = new OWLAPILoader().createKB( MiscTests.base + "one+one-consistent-and-all-inf-sat.owl" );
   
    assertTrue( kb.isConsistent() );
   
    assertTrue( kb.getUnsatisfiableClasses().isEmpty() );
  }
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.owlapi.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.