Interface NodeQuery

All Superinterfaces:
FacetTraversable<NodeQuery>, org.aksw.jenax.path.core.HasFacetPath, HasSlice, Selection, Sortable<NodeQuery>
All Known Implementing Classes:
NodeQueryImpl

public interface NodeQuery extends FacetTraversable<NodeQuery>, HasSlice, Sortable<NodeQuery>, Selection
A view over a single column of a RelationQuery. Can have multiple "fragments" i.e. conditional joins. Can be seen as a special form of a relation query where there is just a single variable.
  • Method Details

    • isNodeQuery

      default boolean isNodeQuery()
      Specified by:
      isNodeQuery in interface Selection
    • asNodeQuery

      default NodeQuery asNodeQuery()
      Specified by:
      asNodeQuery in interface Selection
    • asJenaNode

      default org.apache.jena.graph.Node asJenaNode()
      Wrap this node as a Jena node so that it can be used as a 'pseudo-variable' in expressions. To substitute NodeQuery references in expressions, apply a node transform using NodeCustom.createNodeTransform(pathTransform).
    • addFragment

      NodeQuery addFragment()
    • setFilterFragment

      NodeQuery setFilterFragment(org.aksw.jenax.sparql.fragment.api.Fragment1 relation)
      Sets a graph pattern which is used to 'filter' the values of this node. If the filter pattern can be evaluated to a result set then it results in a set intersection between that result set's column and this node's result set column. If the filter pattern is a filter, then this node's result set is filtered by it.
    • getFilterFragment

      org.aksw.jenax.sparql.fragment.api.Fragment1 getFilterFragment()
    • addInjectFragment

      NodeQuery addInjectFragment(org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node> relation)
      Inject a relation to this node. TODO Consolidate with GraphQlToSparqlConverter; currently the variable mapping is done there
      Parameters:
      relation -
      Returns:
    • getInjectFragments

      List<org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node>> getInjectFragments()
    • getFacetPath

      default org.aksw.jenax.path.core.FacetPath getFacetPath()
      Specified by:
      getFacetPath in interface org.aksw.jenax.path.core.HasFacetPath
    • getScopedFacetPath

      default ScopedFacetPath getScopedFacetPath()
    • getRoot

      default NodeQuery getRoot()
    • getChildren

      Collection<NodeQuery> getChildren()
      A collection of sub-paths of this node
    • constraints

      ConstraintNode<NodeQuery> constraints()
    • relationQuery

      RelationQuery relationQuery()
      Return the RelationQuery of which this NodeQuery is a view of.
    • var

      org.apache.jena.sparql.core.Var var()
      Get the variable of the underlying RelationQuery of which this NodeQuery is a view of.
    • reachingStep

      org.aksw.jenax.path.core.FacetStep reachingStep()
    • resolve

      NodeQuery resolve(org.aksw.jenax.path.core.FacetPath facetPath)
      Specified by:
      resolve in interface FacetTraversable<NodeQuery>
    • children

      Map<org.aksw.jenax.path.core.FacetStep,RelationQuery> children()
    • offset

      default Long offset()
      Convenience delegates which set limit/offset on the underlying relation
      Specified by:
      offset in interface HasSlice
    • offset

      default NodeQuery offset(Long offset)
      Specified by:
      offset in interface HasSlice
    • limit

      default Long limit()
      Specified by:
      limit in interface HasSlice
    • limit

      default NodeQuery limit(Long limit)
      Specified by:
      limit in interface HasSlice
    • orderBy

      default OrderNode<NodeQuery> orderBy()
    • computeVarScope

      static VarScope computeVarScope(NodeQuery nodeQuery)
      Compute the VarScope for this nodeQuery. This is essentially the base name when using the NodeQuery as a root for further paths. This is based on the VarScope of this NodeQuery's root, and the facet path between the root and this nodeQuery.
    • toScopedFacetPath

      static ScopedFacetPath toScopedFacetPath(NodeQuery nodeQuery, org.aksw.jenax.path.core.FacetPath constraintPath)
      Return the ScopedFacetPath that is rooted in this nodeQuery and points to constraintPath