Class NodeQueryImpl
java.lang.Object
org.aksw.jenax.facete.treequery2.impl.NodeQueryBase
org.aksw.jenax.facete.treequery2.impl.NodeQueryImpl
- All Implemented Interfaces:
FacetTraversable<NodeQuery>,HasSlice,NodeQuery,Selection,Sortable<NodeQuery>,org.aksw.jenax.path.core.HasFacetPath
A root node corresponds to a variable of a graph pattern.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<org.aksw.jenax.path.core.FacetStep,RelationQuery> Facet steps with type TUPLE point to relationsprotected ConstraintNode<NodeQuery>protected org.aksw.jenax.sparql.fragment.api.Fragment1Upon query generation, inject the given graph patternprotected List<org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node>>Extra sparql fragments injected at this node FIXME Each relation must carry a mapping for how its variables map to facet pathsprotected org.aksw.jenax.path.core.FacetStepprotected RelationQueryFacet steps with a specific target nodeprotected org.apache.jena.sparql.core.Var -
Constructor Summary
ConstructorsConstructorDescriptionNodeQueryImpl(RelationQueryImpl relationQuery, org.apache.jena.sparql.core.Var var, org.aksw.jenax.path.core.FacetStep reachingStep) -
Method Summary
Modifier and TypeMethodDescriptionaddInjectFragment(org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node> relation) Inject a relation to this node.Map<org.aksw.jenax.path.core.FacetStep,RelationQuery> children()A collection of sub-paths of this nodeorg.aksw.jenax.sparql.fragment.api.Fragment1List<org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node>>getOrCreateChild(org.aksw.jenax.path.core.FacetStep step) Returns null if there is no child reachable with the given step.intReturns the direction of the first sort condition that matches this query node's variablestatic NodeQuerynewRoot()Create a node query rooted in variables ?s of a relation based on an empty graph pattern.org.aksw.jenax.path.core.FacetStepReturn the RelationQuery of which this NodeQuery is a view of.resolve(org.aksw.jenax.path.core.FacetPath facetPath) The empty path resolves to this nodesetFilterFragment(org.aksw.jenax.sparql.fragment.api.Fragment1 filterRelation) Sets a graph pattern which is used to 'filter' the values of this node.sort(int sortDirection) Updates or adds the first sort condition of this query node's variable in the list of sort conditionstoString()org.apache.jena.sparql.core.Varvar()Get the variable of the underlying RelationQuery of which this NodeQuery is a view of.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aksw.jenax.facete.treequery2.api.FacetTraversable
bwd, bwd, bwd, fwd, fwd, fwd, getRootNodeMethods inherited from interface org.aksw.jenax.facete.treequery2.api.NodeQuery
asJenaNode, asNodeQuery, getFacetPath, getRoot, getScopedFacetPath, isNodeQuery, limit, limit, offset, offset, orderByMethods inherited from interface org.aksw.jenax.facete.treequery2.api.Selection
asInlineFragment, isInlineFragmentMethods inherited from interface org.aksw.jenax.facete.treequery2.api.Sortable
sortAsc, sortDefault, sortDesc, sortNone
-
Field Details
-
relationQuery
-
var
protected org.apache.jena.sparql.core.Var var -
reachingStep
protected org.aksw.jenax.path.core.FacetStep reachingStep -
children
Facet steps with type TUPLE point to relations -
subPaths
Facet steps with a specific target node -
constraintRoot
-
filterRelation
protected org.aksw.jenax.sparql.fragment.api.Fragment1 filterRelationUpon query generation, inject the given graph pattern -
injectRelations
protected List<org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node>> injectRelationsExtra sparql fragments injected at this node FIXME Each relation must carry a mapping for how its variables map to facet paths
-
-
Constructor Details
-
NodeQueryImpl
public NodeQueryImpl(RelationQueryImpl relationQuery, org.apache.jena.sparql.core.Var var, org.aksw.jenax.path.core.FacetStep reachingStep)
-
-
Method Details
-
addFragment
- Specified by:
addFragmentin interfaceNodeQuery
-
addInjectFragment
public NodeQuery addInjectFragment(org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node> relation) Description copied from interface:NodeQueryInject a relation to this node. TODO Consolidate with GraphQlToSparqlConverter; currently the variable mapping is done there- Specified by:
addInjectFragmentin interfaceNodeQuery- Returns:
-
getInjectFragments
public List<org.aksw.jenax.sparql.fragment.api.MappedFragment<org.apache.jena.graph.Node>> getInjectFragments()- Specified by:
getInjectFragmentsin interfaceNodeQuery
-
getParent
- Specified by:
getParentin interfaceFacetTraversable<NodeQuery>- Specified by:
getParentin interfaceSelection
-
setFilterFragment
Description copied from interface:NodeQuerySets 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.- Specified by:
setFilterFragmentin interfaceNodeQuery
-
getFilterFragment
public org.aksw.jenax.sparql.fragment.api.Fragment1 getFilterFragment()- Specified by:
getFilterFragmentin interfaceNodeQuery
-
constraints
- Specified by:
constraintsin interfaceNodeQuery
-
sort
Description copied from interface:SortableUpdates or adds the first sort condition of this query node's variable in the list of sort conditions -
getSortDirection
public int getSortDirection()Description copied from interface:SortableReturns the direction of the first sort condition that matches this query node's variable- Specified by:
getSortDirectionin interfaceSortable<NodeQuery>
-
children
-
getChildren
Description copied from interface:NodeQueryA collection of sub-paths of this node- Specified by:
getChildrenin interfaceNodeQuery
-
reachingStep
public org.aksw.jenax.path.core.FacetStep reachingStep()- Specified by:
reachingStepin interfaceNodeQuery
-
resolve
The empty path resolves to this node- Specified by:
resolvein interfaceFacetTraversable<NodeQuery>- Specified by:
resolvein interfaceNodeQuery
-
getOrCreateChild
Description copied from interface:FacetTraversableReturns null if there is no child reachable with the given step.- Specified by:
getOrCreateChildin interfaceFacetTraversable<NodeQuery>
-
relationQuery
Description copied from interface:NodeQueryReturn the RelationQuery of which this NodeQuery is a view of.- Specified by:
relationQueryin interfaceNodeQuery
-
var
public org.apache.jena.sparql.core.Var var()Description copied from interface:NodeQueryGet the variable of the underlying RelationQuery of which this NodeQuery is a view of. -
toString
-
newRoot
Create a node query rooted in variables ?s of a relation based on an empty graph pattern. The underlying relationQuery is non-null so that projections can be created.- Returns:
-