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 Summary
Modifier and TypeMethodDescriptionaddInjectFragment(org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node> relation) Inject a relation to this node.default org.apache.jena.graph.NodeWrap this node as a Jena node so that it can be used as a 'pseudo-variable' in expressions.default NodeQueryMap<org.aksw.jenax.path.core.FacetStep,RelationQuery> children()static VarScopecomputeVarScope(NodeQuery nodeQuery) Compute the VarScope for this nodeQuery.A collection of sub-paths of this nodedefault org.aksw.jenax.path.core.FacetPathorg.aksw.jenax.sparql.fragment.api.Fragment1List<org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node>>default NodeQuerygetRoot()default ScopedFacetPathdefault booleandefault Longlimit()default NodeQuerydefault Longoffset()Convenience delegates which set limit/offset on the underlying relationdefault NodeQueryorderBy()org.aksw.jenax.path.core.FacetStepReturn the RelationQuery of which this NodeQuery is a view of.resolve(org.aksw.jenax.path.core.FacetPath facetPath) setFilterFragment(org.aksw.jenax.sparql.fragment.api.Fragment1 relation) Sets a graph pattern which is used to 'filter' the values of this node.static ScopedFacetPathtoScopedFacetPath(NodeQuery nodeQuery, org.aksw.jenax.path.core.FacetPath constraintPath) Return the ScopedFacetPath that is rooted in this nodeQuery and points to constraintPathorg.apache.jena.sparql.core.Varvar()Get the variable of the underlying RelationQuery of which this NodeQuery is a view of.Methods inherited from interface org.aksw.jenax.facete.treequery2.api.FacetTraversable
bwd, bwd, bwd, fwd, fwd, fwd, getOrCreateChild, getParent, getRootNodeMethods inherited from interface org.aksw.jenax.facete.treequery2.api.Selection
asInlineFragment, getParent, isInlineFragmentMethods inherited from interface org.aksw.jenax.facete.treequery2.api.Sortable
getSortDirection, sort, sortAsc, sortDefault, sortDesc, sortNone
-
Method Details
-
isNodeQuery
default boolean isNodeQuery()- Specified by:
isNodeQueryin interfaceSelection
-
asNodeQuery
- Specified by:
asNodeQueryin interfaceSelection
-
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
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:
getFacetPathin interfaceorg.aksw.jenax.path.core.HasFacetPath
-
getScopedFacetPath
-
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
- Specified by:
resolvein interfaceFacetTraversable<NodeQuery>
-
children
Map<org.aksw.jenax.path.core.FacetStep,RelationQuery> children() -
offset
Convenience delegates which set limit/offset on the underlying relation -
offset
-
limit
-
limit
-
orderBy
-
computeVarScope
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
-