Examples of addSuperProperty()


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

    String ns = "urn:test:";

    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    DatatypeProperty prop = model.createDatatypeProperty( ns + "prop" );
    DatatypeProperty sub = model.createDatatypeProperty( ns + "sub" );
    sub.addSuperProperty( prop );

    OntClass C = model.createClass( ns + "C" );
    C.addSuperClass( model.createCardinalityRestriction( null, prop, 2 ) );
    Individual x = model.createIndividual( ns + "x", C );
View Full Code Here

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

    String ns = "urn:test:";

    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    DatatypeProperty prop = model.createDatatypeProperty( ns + "prop" );
    DatatypeProperty sub = model.createDatatypeProperty( ns + "sub" );
    sub.addSuperProperty( prop );

    OntClass C = model.createClass( ns + "C" );
    C.addSuperClass( model.createCardinalityRestriction( null, prop, 2 ) );
    Individual x = model.createIndividual( ns + "x", C );
View Full Code Here

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

    ObjectProperty knows = model.createObjectProperty( ns + "knows" );

    ObjectProperty hasRelative = model.createObjectProperty( ns + "hasRelative" );
    // a person knows all his/her relatives
    hasRelative.addSuperProperty( knows );
    // being a relative is transitive (but knowing someone is not
    // transitive)
    hasRelative.addRDFType( OWL.TransitiveProperty );

    ObjectProperty hasParent = model.createObjectProperty( ns + "hasParent" );
View Full Code Here

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

    // transitive)
    hasRelative.addRDFType( OWL.TransitiveProperty );

    ObjectProperty hasParent = model.createObjectProperty( ns + "hasParent" );
    // a parent is also a relative
    hasParent.addSuperProperty( hasRelative );

    OntClass cls = model.createClass( ns + "cls" );
    Individual a = cls.createIndividual( ns + "a" );
    Individual b = cls.createIndividual( ns + "b" );
    Individual c = cls.createIndividual( ns + "c" );
View Full Code Here

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

    ObjectProperty knows = model.createObjectProperty( ns + "knows" );

    ObjectProperty hasRelative = model.createObjectProperty( ns + "hasRelative" );
    // a person knows all his/her relatives
    hasRelative.addSuperProperty( knows );
    // being a relative is transitive (but knowing someone is not
    // transitive)
    hasRelative.addRDFType( OWL.TransitiveProperty );

    ObjectProperty hasParent = model.createObjectProperty( ns + "hasParent" );
View Full Code Here

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

    // transitive)
    hasRelative.addRDFType( OWL.TransitiveProperty );

    ObjectProperty hasParent = model.createObjectProperty( ns + "hasParent" );
    // a parent is also a relative
    hasParent.addSuperProperty( hasRelative );

    OntClass cls = model.createClass( ns + "cls" );
    Individual a = cls.createIndividual( ns + "a" );
    Individual b = cls.createIndividual( ns + "b" );
    Individual c = cls.createIndividual( ns + "c" );
View Full Code Here

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

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

    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

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

    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

Examples of edu.pitt.dbmi.nlp.noble.ontology.IProperty.addSuperProperty()

          }
        }
        IProperty [] sup = sp.getSuperProperties();
        if(sup != null && sup.length > 0){
          for(IProperty p: (IProperty []) convertResources(target,sup,IProperty.class)){
            tp.addSuperProperty(p);
          }
        }
       
      }
    }
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.