Package com.hp.hpl.jena.ontology

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


    // 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

        // load the ontology with its imports and no reasoning
    OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
    model.read( ont );

    // load the model to the reasoner
    model.prepare();
   
    // create property and resources to query the reasoner
    OntClass Person = model.getOntClass("http://xmlns.com/foaf/0.1/Person");
    Property workHomepage = model.getProperty("http://xmlns.com/foaf/0.1/workInfoHomepage");
    Property foafName = model.getProperty("http://xmlns.com/foaf/0.1/name");
View Full Code Here

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

    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, 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, C );
    model.add( i, p, k );
    model.add( j, RDF.type, D );
    model.add( j, p, 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, 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

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.