Interface ObjectQuery

All Known Implementing Classes:
ObjectQueryBase, ObjectQueryFromQuery, ObjectQueryImpl

public interface ObjectQuery
An object (graph) query is an extension of a SPARQL construct query: Blank nodes in the query template can additionally be mapped to sequences of SPARQL expressions. This way blank nodes can be assigned a client-side mapping that allocate specific ID thus enabling deterministic template instantiation without the need of having the ID generation part of the SPARQL query. Yet, if desired, the use of SPARQL expressions enables query rewriting that pushes the ID generation into a conventional SPARQL query as illustrated below:
 CONSTRUCT {
   ?bnode a FacetValueCount ; facet ?f ; value ?v ; count ?c
 } WHERE {
   SELECT { ?f ?v ?c { ... } }
   BIND(sequence(?f, ?v) AS ?bnode)
 
Author:
raven
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<org.apache.jena.graph.Node,org.apache.jena.sparql.expr.ExprList>
    The mapping of blank nodes in the template to expression lists.
    Relation is a uniform representation for something that is or can be evaluated to a set of Bindings.
    org.apache.jena.sparql.syntax.Template
    The template is the same as for SPARQL contstruct queries
  • Method Details

    • getTemplate

      org.apache.jena.sparql.syntax.Template getTemplate()
      The template is the same as for SPARQL contstruct queries
      Returns:
      The template
    • getIdMapping

      Map<org.apache.jena.graph.Node,org.apache.jena.sparql.expr.ExprList> getIdMapping()
      The mapping of blank nodes in the template to expression lists. Only blank nodes should be mapped. Any expression in the ExprList should only make use of variables that are distinguished variables of the relation
      Returns:
      The mapping. May be empty but never null.
    • getRelation

      Fragment getRelation()
      Relation is a uniform representation for something that is or can be evaluated to a set of Bindings. Concretely, a relation can be (SELECT) Query, Element or Table.
      Returns:
      The relation that acts as the source of bindings for this object query