Package com.clarkparsia.pellet.sparqldl.parser

Examples of com.clarkparsia.pellet.sparqldl.parser.ARQParser


      pelletInfGraph.prepare();

      QueryParameters queryParameters = new QueryParameters( initialBinding );

      ARQParser parser = new ARQParser( handleVariableSPO );
      // The parser uses the query parameterization to resolve parameters
      // (i.e. variables) in the query
      parser.setInitialBinding( initialBinding );

      com.clarkparsia.pellet.sparqldl.model.Query q = parser.parse( query, kb );
      // The query uses the query parameterization to resolve bindings
      // (i.e. for instance if the parameter variable is in query
      // projection, we need to add the initial binding to the resulting
      // bindings manually)
      q.setQueryParameters( queryParameters );
View Full Code Here


  }
   
  @Before
  public void before() {
    kb = new JenaLoader().createKB(base + kbFile);
    parser = new ARQParser();
  }
View Full Code Here

  public static void beforeClass() {
    ARQTerpParser.registerFactory();
   
    JenaLoader loader = new JenaLoader();
    kb = loader.createKB(base+"parent.ttl");
     parser = new ARQParser();
  }
View Full Code Here

  public static QueryExec getQueryExec() {
    return new CombinedQueryEngine();
  }

  public static QueryParser getParser() {
    return new ARQParser();
  }
View Full Code Here

 
  @Test
  public void classQuery() {   
    classes( A, B, C );
   
    Query query1 = new ARQParser().parse(
      "PREFIX rdf: <" + Namespaces.RDF + "> " +
      "PREFIX owl: <" + Namespaces.OWL + "> " +
      "SELECT ?c WHERE { ?c rdf:type owl:Class }", kb );
   
    testQuery( query1, new ATermAppl[][] { { A }, { B }, { C }, { TOP }, { BOTTOM } } )
View Full Code Here

      pelletInfGraph.prepare();

      QueryParameters queryParameters = new QueryParameters(initialBinding);

      ARQParser parser = new ARQParser(handleVariableSPO);
      // The parser uses the query parameterization to resolve parameters
      // (i.e. variables) in the query
      parser.setInitialBinding(initialBinding);

      com.clarkparsia.pellet.sparqldl.model.Query q = parser.parse(query, kb);
      // The query uses the query parameterization to resolve bindings
      // (i.e. for instance if the parameter variable is in query
      // projection, we need to add the initial binding to the resulting
      // bindings manually)
      q.setQueryParameters(queryParameters);
View Full Code Here

    this( pattern, true );
  }

  public SparqlDLStage(BasicPattern pattern, boolean handleVariableSPO) {
    this.pattern = pattern;
    this.parser = new ARQParser(handleVariableSPO);

    initVars();
  }
View Full Code Here

        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
        parser.setInitialBinding( initialBinding );

        try {
          parser.parse( query, kb );
          // parsing successful so we can use Pellet engine
          engineType = QueryEngineType.PELLET;
        } catch( UnsupportedQueryException e ) {
          // parsing failed so we will use the mixed engine
          engineType = QueryEngineType.MIXED;
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellet.sparqldl.parser.ARQParser

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.