Package org.semanticweb.owl.model

Examples of org.semanticweb.owl.model.OWLEntity


          }

        } else
        {
          boolean found = false;
          OWLEntity c = null;
          while (!found && i<s)
          {
            if (auxiliarySelection == null)
              break;
            if (auxiliarySelection.isEmpty())
View Full Code Here


   
  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;

    // Parts for individuals
    //builder = new POTaxonomyBuilder( kb, new PartIndividualsComparator( kb, p ) );
View Full Code Here

   * @param ontologies
   *            ontologies we are searching
   * @return an entity referenced in the given ontology that has the given URI
   *         or local name   */
  public static OWLEntity findEntity(String name, Set<OWLOntology> ontologies) {
    OWLEntity entity = null;
    for( OWLOntology ontology : ontologies ) {
      if( (entity = findEntity( name, ontology )) != null )
        break;
    }
    return entity;
View Full Code Here

   *            ontology we are searching
   * @return an entity referenced in the given ontology that has the given URI
   *         or local name
   */
  public static OWLEntity findEntity(String name, OWLOntology ontology) {
    OWLEntity entity = null;

    if( name.equals( "owl:Thing" ) )
      entity = OWL.Thing;
    else if( name.equals( "owl:Nothing" ) )
      entity = OWL.Nothing;
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.model.OWLEntity

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.