Package com.hp.hpl.jena.ontology

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


  }

  public QuerySubsumptionExample() {
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    model.read( ont );
    model.prepare();
   
    kb = ((PelletInfGraph) model.getGraph()).getKB();
    parser = QueryEngine.getParser();
  }
View Full Code Here


    Individual daughter = model.getIndividual( ns + "daughter" );
    Individual personX = model.getIndividual( ns + "personX" );
    Individual personY = model.getIndividual( ns + "personY" );
    Individual personZ = model.getIndividual( ns + "personZ" );

    model.prepare();

    KnowledgeBase kb = ((PelletInfGraph) model.getGraph()).getKB();

    for( int test = 0; test < 2; test++ ) {
      if( test != 0 ) {
View Full Code Here

    Individual Cain = model.getIndividual( ns + "Cain" );
    Individual Oedipus = model.getIndividual( ns + "Oedipus" );
    Individual Remus = model.getIndividual( ns + "Remus" );
    Individual Romulus = model.getIndividual( ns + "Romulus" );

    model.prepare();

    KnowledgeBase kb = ((PelletInfGraph) model.getGraph()).getKB();

    for( int test = 0; test < 1; test++ ) {
      if( test != 0 ) {
View Full Code Here

    Individual Alice = model.getIndividual( ns + "Alice" );
    Individual Bob = model.getIndividual( ns + "Bob" );
    Individual Charlie = model.getIndividual( ns + "Charlie" );

    model.prepare();

    KnowledgeBase kb = ((PelletInfGraph) model.getGraph()).getKB();

    for( int test = 0; test < 1; test++ ) {
      if( test != 0 ) {
View Full Code Here

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

    model.read( new StringReader( src ), null, "Turtle" );

    model.prepare();

    String ns = "foo:bla#";
    Property left = model.getProperty( ns + "left" );
    Property right = model.getProperty( ns + "right" );
    Resource[] r = new Resource[6];
View Full Code Here

    // read the ontology with its imports
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    model.read( mindswappers );

    // load the model to the reasoner
    model.prepare();

    // Get the KnolwedgeBase object
    KnowledgeBase kb = ((PelletInfGraph) model.getGraph()).getKB();

    // perform initial consistency check
View Full Code Here

    model.setStrictMode( false );
    model.read( mindswappers );
       
    // perform initial consistency check
    long s = System.currentTimeMillis();
    model.prepare();
    long e = System.currentTimeMillis();
   
    //print time and validation report
    System.out.println( "Total time " + (e - s) + " ms)" );
    JenaReasoner.printIterator( model.validate().getReports(), "Validation Results" );
View Full Code Here

    Resource concept = model.getResource( mindswap + "GraduateStudent" );
    Individual individual = model.createIndividual( mindswappers + "JohnDoe", concept );

    // perform incremental consistency check
    s = System.currentTimeMillis();
    model.prepare();
    e = System.currentTimeMillis();

    //print time and validation report
    System.out.println( "Total time " + (e - s) + " ms)" );
    JenaReasoner.printIterator( model.validate().getReports(), "Validation Results" );
View Full Code Here

    RDFNode mbox = model.getIndividual( "mailto:kolovski@cs.umd.edu" );
    individual.addProperty( role, mbox );

    // perform incremental consistency check
    s = System.currentTimeMillis();
    model.prepare();
    e = System.currentTimeMillis();

    //print time and validation report
    System.out.println( "Total time " + (e - s) + " ms)" );
    JenaReasoner.printIterator( model.validate().getReports(), "Validation Results" );
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

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.