Package com.hp.hpl.jena.ontology

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


    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 } );

    model.add( C, OWL2.hasKey, list );
View Full Code Here


    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 } );

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

  @Test
  public void testHasKey8() {
    String ns = "http://www.example.org#";
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );

    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

  public void testHasKey8() {
    String ns = "http://www.example.org#";
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );

    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 );
View Full Code Here

    String ns = "http://www.example.org#";
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );

    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 );
View Full Code Here

 
  @Test
  public void testTopBottomPropertyAssertion() throws MalformedURLException {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );

    Resource a = model.createResource( "a", OWL.Thing );
    Resource b = model.createResource( "b", OWL.Thing );
    Literal lit = model.createLiteral( "l" );

    Statement[] stats = new Statement[] {
      model.createStatement( a, OWL2.topObjectProperty, b ),
View Full Code Here

  @Test
  public void testTopBottomPropertyAssertion() throws MalformedURLException {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );

    Resource a = model.createResource( "a", OWL.Thing );
    Resource b = model.createResource( "b", OWL.Thing );
    Literal lit = model.createLiteral( "l" );

    Statement[] stats = new Statement[] {
      model.createStatement( a, OWL2.topObjectProperty, b ),
      model.createStatement( a, OWL2.topDataProperty, lit ),
View Full Code Here

 
  @Test
  public void testTopBottomPropertyInferences() throws MalformedURLException {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );

    Resource a = model.createResource( "a", OWL.Thing );
    Resource b = model.createResource( "b", OWL.Thing );
    Literal lit = model.createLiteral( "l" );

    Property p = model.createProperty( "p" );
    Property dp = model.createProperty( "dp" );
View Full Code Here

  @Test
  public void testTopBottomPropertyInferences() throws MalformedURLException {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC, null );

    Resource a = model.createResource( "a", OWL.Thing );
    Resource b = model.createResource( "b", OWL.Thing );
    Literal lit = model.createLiteral( "l" );

    Property p = model.createProperty( "p" );
    Property dp = model.createProperty( "dp" );
   
View Full Code Here

    OntClass c1 = model.createClass( ns + "c1" );
    c1.addEquivalentClass( model.createSomeValuesFromRestriction( null, s, pi ) );
    assertFalse( model.contains( c1, RDFS.subClassOf, OWL2.Nothing ) );
   
    OntClass c2 = model.createClass( ns + "c2" );
    Resource b2 = model.createResource();
    model.add(b2, RDF.type, OWL2.DataRange);
    model.add(b2, OWL2.datatypeComplementOf, pi);
    c2.addEquivalentClass( model.createSomeValuesFromRestriction( null, s, b2 ) );
    assertFalse( model.contains( c2, RDFS.subClassOf, OWL2.Nothing ) );
   
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.