Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntProperty.addSuperProperty()


    if (annotation!=null) annotation.toOWL(property,ctx);
   
    // substitution groups map to subProperty relationships
    if (substitutionGroup!=null) {
      String sub = createURI(getModel(),getSubstitutionGroup(),ctx);
      property.addSuperProperty(getModel().createProperty(sub));
    }
   
  }

  private OntModel getModel() {
View Full Code Here


    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    OntClass Person = model.createClass( ns + "Person" );
    OntProperty hasFather = model.createObjectProperty( ns + "hasFather" );
    OntProperty hasBioFather = model.createObjectProperty( ns + "hasBioFather", true );
    hasBioFather.addSuperProperty( hasFather );
    Person.addSuperClass( model.createMinCardinalityRestriction( null, hasBioFather, 1 ) );

    Individual Bob = model.createIndividual( ns + "Bob", Person );
    Individual Dad = model.createIndividual( ns + "Dad", Person );
    Bob.addProperty( hasBioFather, Dad );
View Full Code Here

    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    OntClass Person = model.createClass( ns + "Person" );
    OntProperty hasFather = model.createObjectProperty( ns + "hasFather" );
    OntProperty hasBioFather = model.createObjectProperty( ns + "hasBioFather", true );
    hasBioFather.addSuperProperty( hasFather );
    Person.addSuperClass( model.createMinCardinalityRestriction( null, hasBioFather, 1 ) );

    Individual Bob = model.createIndividual( ns + "Bob", Person );
    Individual Dad = model.createIndividual( ns + "Dad", Person );
    Bob.addProperty( hasBioFather, Dad );
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.