Package com.hp.hpl.jena.ontology

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


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

    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

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

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.