Package org.apache.clerezza.rdf.core.sparql

Examples of org.apache.clerezza.rdf.core.sparql.QueryEngine


   *            the default graph against which to execute the query if not
   *            FROM clause is present
   * @return the resulting ResultSet, Graph or Boolean value
   */
  public Object executeSparqlQuery(Query query, TripleCollection defaultGraph) {
    final QueryEngine queryEngine = this.queryEngine;
    if (queryEngine != null) {
      return queryEngine.execute(this, defaultGraph, query);
    } else {
      throw new NoQueryEngineException();
    }
  }
View Full Code Here


   *            FROM clause is present
   * @return the resulting ResultSet
   */
  public ResultSet executeSparqlQuery(SelectQuery query,
      TripleCollection defaultGraph) {
    final QueryEngine queryEngine = this.queryEngine;
    if (queryEngine != null) {
      return (ResultSet) queryEngine.execute(this, defaultGraph, query);
    } else {
      throw new NoQueryEngineException();
    }
  }
View Full Code Here

   *            FROM clause is present
   * @return the boolean value this query evaluates to
   */
  public boolean executeSparqlQuery(AskQuery query,
      TripleCollection defaultGraph) {
    final QueryEngine queryEngine = this.queryEngine;
    if (queryEngine != null) {
      return (Boolean) queryEngine.execute(this, defaultGraph, query);
    } else {
      throw new NoQueryEngineException();
    }
  }
View Full Code Here

   *            FROM clause is present
   * @return the resulting Graph
   */
  public Graph executeSparqlQuery(DescribeQuery query,
      TripleCollection defaultGraph) {
    final QueryEngine queryEngine = this.queryEngine;
    if (queryEngine != null) {
      return (Graph) queryEngine.execute(this, defaultGraph, query);
    } else {
      throw new NoQueryEngineException();
    }
  }
View Full Code Here

   *            FROM clause is present
   * @return the resulting Graph
   */
  public Graph executeSparqlQuery(ConstructQuery query,
      TripleCollection defaultGraph) {
    final QueryEngine queryEngine = this.queryEngine;
    if (queryEngine != null) {
      return (Graph) queryEngine.execute(this, defaultGraph, query);
    } else {
      throw new NoQueryEngineException();
    }
  }
View Full Code Here

                bindQueryEngine(qe);
                bindWeightedTcProvider(wtcp);
            }
        }

        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        tcm = new SpecialTcManager(qe, wtcp);

        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
        store = new ClerezzaRuleStore(configuration, tcm);
View Full Code Here

                bindQueryEngine(qe);
                bindWeightedTcProvider(wtcp);
            }
        }
       
        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        TcManager tcm = new SpecialTcManager(qe, wtcp);

        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
        RuleAdaptersFactory ruleAdaptersFactory = new RuleAdaptersFactoryImpl();
View Full Code Here

                bindQueryEngine(qe);
                bindWeightedTcProvider(wtcp);
            }
        }

        QueryEngine qe = new JenaSparqlEngine();
        WeightedTcProvider wtcp = new SimpleTcProvider();
        TcManager tcm = new SpecialTcManager(qe, wtcp);

        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
        store = new ClerezzaRuleStore(configuration, tcm);
View Full Code Here

            singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs);
        }
        if ((singleTargetTcProvider != null) && (singleTargetTcProvider instanceof QueryableTcProvider)) {
            return ((QueryableTcProvider)singleTargetTcProvider).executeSparqlQuery(query, null);
        }
        final QueryEngine queryEngine = this.queryEngine;
        if (queryEngine != null) {
            return queryEngine.execute(this, defaultGraph, query);
        } else {
            throw new NoQueryEngineException();
        }
    }
View Full Code Here

            singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs);
        }
        if ((singleTargetTcProvider != null) && (singleTargetTcProvider instanceof QueryableTcProvider)) {
            return ((QueryableTcProvider)singleTargetTcProvider).executeSparqlQuery(query, defaultGraphName);
        }
        final QueryEngine queryEngine = this.queryEngine;
        if (queryEngine != null) {
            return queryEngine.execute(this, this.getTriples(defaultGraphName), query);
        } else {
            throw new NoQueryEngineException();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.sparql.QueryEngine

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.