Package com.hp.hpl.jena.reasoner

Examples of com.hp.hpl.jena.reasoner.Reasoner


  @Test
  public void testDeclaredProperties() {
    String ns = "urn:test:";

    Reasoner r = PelletReasonerFactory.theInstance().create();
    // ReasonerRegistry.getOWLMicroReasoner();

    OntModelSpec spec = new OntModelSpec( OntModelSpec.OWL_DL_MEM );
    spec.setReasoner( r );
    OntModel model = ModelFactory.createOntologyModel( spec, null );
View Full Code Here


  public void setupGenerators(Collection<OWLAxiom> ontologyAxioms) throws Exception {
    OWLOntology ontology = com.clarkparsia.owlapiv3.OWL.Ontology( ontologyAxioms );     
    
    Graph data = convertOntology( ontology, false );

    Reasoner reasoner = PelletReasonerFactory.theInstance().create();
    pellet = (PelletInfGraph) reasoner.bind( data );
   
    KnowledgeBase kb = pellet.getKB();
   
    if( classify ) {
      kb.setDoExplanation( true );
View Full Code Here

 
  protected MultiValueMap<ATermAppl, ATermAppl> run(Collection<ATermAppl> classes) {
    addClasses( classes );
    addClasses( m_Names.getAllAnons() );
   
    Reasoner reasoner = new GenericRuleReasoner(new ArrayList<Rule>(m_Rules));
   
    InfGraph inf = reasoner.bind( m_Facts );
    inf.prepare();
   
    MultiValueMap<ATermAppl, ATermAppl> subsumers = getSubsumptions(inf);
    for( ATermAppl c : classes ) {
      subsumers.add( ATermUtils.BOTTOM, c );     
View Full Code Here

  public void setupGenerators(Collection<OWLAxiom> ontologyAxioms) throws Exception {
    OWLOntology ontology = com.clarkparsia.owlapiv3.OWL.Ontology( ontologyAxioms );     
    
    Graph data = convertOntology( ontology, false );

    Reasoner reasoner = PelletReasonerFactory.theInstance().create();
    pellet = (PelletInfGraph) reasoner.bind( data );
   
    KnowledgeBase kb = pellet.getKB();
   
    if( classify ) {
      kb.setDoExplanation( true );
View Full Code Here

   */
  private void sameAs() {
    Resource resource;
    Model model = getModel();

    Reasoner owlReasoner = ReasonerRegistry.getOWLReasoner();
    InfModel infModel = ModelFactory.createInfModel(owlReasoner, model);

    resource = infModel.getResource(johnPrimeURI);
    printStatements("OWLReasoned", infModel, resource, null, null);

View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.reasoner.Reasoner

Copyright © 2018 www.massapicom. 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.