Package com.hp.hpl.jena.ontology

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


    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" );
    // a parent is also a relative
    hasParent.addSuperProperty( hasRelative );
View Full Code Here


    OntModel ont = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );

    OntClass C = ont.createClass( "C" );

    ObjectProperty p1 = ont.createObjectProperty( "p1" );
    p1.addRDFType( OWL.TransitiveProperty );

    ObjectProperty p2 = ont.createObjectProperty( "p2" );

    Individual x = ont.createIndividual( OWL.Thing );
    Individual y = ont.createIndividual( OWL.Thing );
View Full Code Here

    OntModel ont = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );

    OntClass C = ont.createClass( "C" );

    ObjectProperty p1 = ont.createObjectProperty( "p1" );
    p1.addRDFType( OWL.TransitiveProperty );

    ObjectProperty p2 = ont.createObjectProperty( "p2" );

    Individual x = ont.createIndividual( OWL.Thing );
    Individual y = ont.createIndividual( OWL.Thing );
View Full Code Here

    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" );
    // a parent is also a relative
    hasParent.addSuperProperty( hasRelative );
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.