Package org.mindswap.pellet.jena

Examples of org.mindswap.pellet.jena.PelletInfGraph.prepare()


        throw new UnsupportedQueryException( "Named graphs is not supported by Pellet" );

      PelletInfGraph pelletInfGraph = (PelletInfGraph) source.getDefaultModel().getGraph();
      KnowledgeBase kb = pelletInfGraph.getKB();

      pelletInfGraph.prepare();

      QueryParameters queryParameters = new QueryParameters( initialBinding );

      ARQParser parser = new ARQParser( handleVariableSPO );
      // The parser uses the query parameterization to resolve parameters
View Full Code Here


    OntModel reasoner = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
    reasoner.addSubModel(m1);
    reasoner.addSubModel(m2);
   
    PelletInfGraph pellet = (PelletInfGraph) reasoner.getGraph();
    pellet.prepare();
   
    assertEquals(Collections.emptySet(), pellet.getLoader().getUnpportedFeatures());
  }
 
  @Test
View Full Code Here

        throw new UnsupportedQueryException("Named graphs is not supported by Pellet");

      PelletInfGraph pelletInfGraph = (PelletInfGraph) source.getDefaultModel().getGraph();
      KnowledgeBase kb = pelletInfGraph.getKB();

      pelletInfGraph.prepare();

      QueryParameters queryParameters = new QueryParameters(initialBinding);

      ARQParser parser = new ARQParser(handleVariableSPO);
      // The parser uses the query parameterization to resolve parameters
View Full Code Here

    if( !(graph instanceof PelletInfGraph) )
      throw new UnsupportedOperationException( "A Pellet-backed model is required" );

    PelletInfGraph pellet = (PelletInfGraph) graph;

    pellet.prepare();

    Query query = parsePattern( pellet );

    if( query != null ) {
      return new PelletQueryIterator( pellet, query, input, execCxt );
View Full Code Here

    OntModel reasoner = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
    reasoner.addSubModel(m1);
    reasoner.addSubModel(m2);
   
    PelletInfGraph pellet = (PelletInfGraph) reasoner.getGraph();
    pellet.prepare();
   
    assertEquals(Collections.emptySet(), pellet.getLoader().getUnpportedFeatures());
  }
 
  @Test
View Full Code Here

    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());

    model.add(a, RDF.type, A);
   
    graph.prepare();
    assertTrue(graph.isClassified());
    assertTrue(model.contains(a, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());
View Full Code Here

    Model subModel = ModelFactory.createDefaultModel();
    subModel.add(b, RDF.type, B);
    model.addSubModel(subModel);

    graph.prepare();
    assertTrue(graph.isClassified());
    assertTrue(model.contains(a, RDF.type, C));
    assertTrue(model.contains(b, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());
View Full Code Here

    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());

    model.remove(a, RDF.type, A);

    graph.prepare();
    assertTrue(graph.isClassified());
    assertFalse(model.contains(a, RDF.type, C));
    assertTrue(model.contains(b, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());
View Full Code Here

    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());

    model.removeSubModel(subModel);

    graph.prepare();
    assertTrue(graph.isClassified());
    assertFalse(model.contains(a, RDF.type, C));
    assertFalse(model.contains(b, RDF.type, C));
    assertIteratorValues(model.listObjectsOfProperty(A, RDFS.subClassOf), B, C, OWL.Thing);   
    assertTrue(graph.isClassified());
View Full Code Here

      else {
        // try parsing the query and see if there are any problems
        PelletInfGraph pelletInfGraph = (PelletInfGraph) graph;

        KnowledgeBase kb = pelletInfGraph.getKB();
        pelletInfGraph.prepare();

        ARQParser parser = new ARQParser();
        // The parser uses the query parameterization to resolve
        // parameters
        // (i.e. variables) in the query
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.