Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntModel.createList()


    OntClass A = model.createClass( ns + "A" );
    OntClass B = model.createClass( ns + "B" );
    OntClass notA = model.createComplementClass( null, A );
    OntClass notB = model.createComplementClass( null, B );
    OntClass AorB = model.createUnionClass( null, model.createList( new OntClass[] { A, B } ) );
    OntClass AorNotB = model.createUnionClass( null, model
        .createList( new OntClass[] { A, notB } ) );
    OntClass notAorB = model.createUnionClass( null, model
        .createList( new OntClass[] { notA, B } ) );
View Full Code Here


    OntClass A = model.createClass( ns + "A" );
    OntClass B = model.createClass( ns + "B" );
    OntClass notA = model.createComplementClass( null, A );
    OntClass notB = model.createComplementClass( null, B );
    OntClass AorB = model.createUnionClass( null, model.createList( new OntClass[] { A, B } ) );
    OntClass AorNotB = model.createUnionClass( null, model
        .createList( new OntClass[] { A, notB } ) );
    OntClass notAorB = model.createUnionClass( null, model
        .createList( new OntClass[] { notA, B } ) );

    Individual x = model.createIndividual( ns + "x", OWL.Thing );
View Full Code Here

    OntClass notA = model.createComplementClass( null, A );
    OntClass notB = model.createComplementClass( null, B );
    OntClass AorB = model.createUnionClass( null, model.createList( new OntClass[] { A, B } ) );
    OntClass AorNotB = model.createUnionClass( null, model
        .createList( new OntClass[] { A, notB } ) );
    OntClass notAorB = model.createUnionClass( null, model
        .createList( new OntClass[] { notA, B } ) );

    Individual x = model.createIndividual( ns + "x", OWL.Thing );
    x.addRDFType( AorB );
    x.addRDFType( AorNotB );
View Full Code Here

    Resource C = model.createClass( ns + "C" );
    Resource i = model.createResource( ns + "i" );
    Resource j = model.createResource( ns + "j" );
    Resource k = model.createResource( ns + "k" );
    Property p = model.createObjectProperty( ns + "p" );
    RDFList list = model.createList( new RDFNode[] { p } );

    model.add( C, OWL2.hasKey, list );
    model.add( i, RDF.type, C );
    model.add( i, p, k );
    model.add( j, RDF.type, C );
View Full Code Here

    OntModelSpec ontModelSpec = new OntModelSpec( OntModelSpec.OWL_DL_MEM_RULE_INF );
    ontModelSpec.setReasoner( new PelletReasoner() );
    OntModel model = ModelFactory.createOntologyModel( ontModelSpec );
    Individual i1 = model.createIndividual( "http://test#i1", OWL.Thing );
    Individual i2 = model.createIndividual( "http://test#i2", OWL.Thing );
    OntClass c = model.createEnumeratedClass( "http://test#C", model.createList( new RDFNode[] {
        i1, i2 } ) );
    Individual i3 = model.createIndividual( "http://test#i3", c );

    assertTrue( !i1.isSameAs( i2 ) );
    assertTrue( !i1.isSameAs( i3 ) );
View Full Code Here

    assertTrue( prevCount < graph.getKB().timers.getTimer( "isIncConsistent" ).getCount() );

    graph.getKB().timers.getTimer( "isIncConsistent" ).reset();

    RDFList list = ontmodel.createList( new RDFNode[] { class1, class2 } );

    IntersectionClass class3 = ontmodel.createIntersectionClass( null, list );

    UnionClass class4 = ontmodel.createUnionClass( null, list );
View Full Code Here

    Resource i = model.createResource( ns + "i" );
    Resource j = model.createResource( ns + "j" );
    Resource k = model.createResource( ns + "k" );
    Property p = model.createObjectProperty( ns + "p" );
    Property q = model.createObjectProperty( ns + "q" );
    RDFList list = model.createList( new RDFNode[] { p } );

    model.add( C, OWL2.hasKey, list );
    model.add( i, RDF.type, C );
    model.add( i, p, k );
    model.add( j, RDF.type, C );
View Full Code Here

    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );

    OntClass D = model.createClass( ns + "D" );
    OntClass E = model.createClass( ns + "E" );
    OntClass C = model
        .createIntersectionClass( null, model.createList( new RDFNode[] { D, E } ) );
    Resource i = model.createResource( ns + "i" );
    Resource j = model.createResource( ns + "j" );
    Resource k = model.createResource( ns + "k" );
    Property p = model.createObjectProperty( ns + "p" );
    RDFList list = model.createList( new RDFNode[] { p } );
View Full Code Here

        .createIntersectionClass( null, model.createList( new RDFNode[] { D, E } ) );
    Resource i = model.createResource( ns + "i" );
    Resource j = model.createResource( ns + "j" );
    Resource k = model.createResource( ns + "k" );
    Property p = model.createObjectProperty( ns + "p" );
    RDFList list = model.createList( new RDFNode[] { p } );

    model.add( C, OWL2.hasKey, list );
    model.add( i, RDF.type, C );
    model.add( i, p, k );
    model.add( j, RDF.type, C );
View Full Code Here

    Resource i = model.createResource( ns + "i" );
    Resource j = model.createResource( ns + "j" );
    Resource k = model.createResource( ns + "k" );
    Property p = model.createObjectProperty( ns + "p" );
    RDFList list = model.createList( new RDFNode[] { p } );

    model.add( OWL.Thing, OWL2.hasKey, list );
    model.add( i, RDF.type, OWL.Thing );
    model.add( i, p, k );
    model.add( j, RDF.type, OWL.Thing );
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.