Examples of OWLAPILoader


Examples of com.clarkparsia.pellet.owlapiv3.OWLAPILoader

  protected KBLoader getLoader(String loaderName) {
    if( loaderName.equalsIgnoreCase( "Jena" ) )
      loader = new JenaLoader();
    else if( loaderName.equalsIgnoreCase( "OWLAPIv3" )
        || loaderName.equalsIgnoreCase( "OWLAPI" ) )
      loader = new OWLAPILoader();
    else if( loaderName.equalsIgnoreCase( "KRSS" ) )
      loader = new KRSSLoader();
    else
      throw new PelletCmdException( "Unknown loader: " + loaderName );
View Full Code Here

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

Examples of org.mindswap.pellet.owlapi.OWLAPILoader

         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

Examples of org.mindswap.pellet.owlapi.OWLAPILoader

    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

Examples of org.mindswap.pellet.owlapi.OWLAPILoader

    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
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.