Package com.hp.hpl.jena.ontology

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


    assertEquals( 0, graph.getKB().timers.getTimer( "isIncConsistent" ).getCount() );

    Individual newind = ontmodel.createIndividual( nc + "Ind7", class4 );

    ontmodel.prepare();

    assertIteratorValues( class4.listInstances(), new Resource[] {
        inds[0], inds[1], inds[2], inds[3], inds[4], inds[5], newind } );

  }
View Full Code Here


   */
  @Test
  public void testListStatementsWithNullPredicate() {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
   
    model.prepare();
   
    String ns = "urn:test:"

    Resource c = model.createResource(ns+"C")
    Property p1 = model.createProperty(ns+"P1");
View Full Code Here

      model.add(i1, RDF.type, C);
      model.add(i1, p, i2);

      // check consistency
      model.prepare();

      model.remove(i1, p, i2);

      assertTrue(model.contains(i1, RDF.type, OWL.Thing));
      assertFalse(model.contains(i2, RDF.type, OWL.Thing));
View Full Code Here

  public void test549() {
    String ns = "urn:test:";

    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    model.read( base + "/float_intervals.ttl" , "TTL");
    model.prepare();

    Resource C1 = model.getResource( ns + "46-60" );
    Resource C2 = model.getResource( ns + "76-80" );
   
    Resource i1 = model.getResource( ns + "mark1" );
View Full Code Here

    model.add( i, RDF.type, C );
    model.add( i, p, k );
    model.add( j, RDF.type, C );
    model.add( j, p, l );

    model.prepare();

    assertFalse( model.contains( i, OWL.sameAs, j ) );
    assertFalse( model.contains( j, OWL.sameAs, i ) );
  }
View Full Code Here

    model.add( i, RDF.type, C );
    model.add( i, p, k );
    model.add( j, RDF.type, C );
    model.add( j, q, k );

    model.prepare();

    assertFalse( model.contains( i, OWL.sameAs, j ) );
    assertFalse( model.contains( j, OWL.sameAs, i ) );
  }
View Full Code Here

    model.add( i, RDF.type, C );
    model.add( i, p, k );
    model.add( j, RDF.type, C );
    model.add( j, p, k );

    model.prepare();

    assertTrue( model.contains( i, OWL.sameAs, j ) );
    assertTrue( model.contains( j, OWL.sameAs, i ) );
  }
View Full Code Here

    model.add( i, RDF.type, OWL.Thing );
    model.add( i, p, k );
    model.add( j, RDF.type, OWL.Thing );
    model.add( j, p, k );

    model.prepare();

    assertTrue( model.contains( i, OWL.sameAs, j ) );
    assertTrue( model.contains( j, OWL.sameAs, i ) );
  }
View Full Code Here

  @Test
  public void testCardinalityParsing() {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    model.read( base + "cardinality_parsing.owl" );
    model.prepare();
   
    assertTrue( ((PelletInfGraph) model.getGraph()).getLoader().getUnpportedFeatures().isEmpty() );
  }
 
View Full Code Here

  public void testAnnotationPropertyQuery() {
    String ns = "http://www.example.org#";
   
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    Property p = model.createAnnotationProperty( ns + "p" );
    model.prepare();

    assertTrue(model.contains(p, RDF.type, OWL.AnnotationProperty));
    assertIteratorContains( model.listObjectsOfProperty( p, RDF.type ), OWL.AnnotationProperty );
    assertIteratorContains( model.listObjectsOfProperty( p, null ), OWL.AnnotationProperty );
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.