Class RelationQueryImpl
java.lang.Object
org.aksw.jenax.facete.treequery2.impl.RelationQueryImpl
- All Implemented Interfaces:
HasSlice,RelationQuery
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FacetConstraints<ConstraintNode<NodeQuery>>protected Longprotected Longprotected NodeQueryprotected QueryContextprotected org.aksw.jenax.path.core.FacetStepA mapping of which variable corresponds to which component of a facet stepSupplier for the underlying relation.protected StringA name given to this relationprotected List<org.apache.jena.query.SortCondition>protected Map<org.apache.jena.sparql.core.Var,org.apache.jena.graph.Node> Variables can be declared as having special meaning: SOURCE, TARGET, PREDICATE and GRAPH -
Constructor Summary
ConstructorsConstructorDescriptionRelationQueryImpl(String scopeBaseName, NodeQuery parent, Supplier<Fragment> relationSupplier, org.aksw.jenax.path.core.FacetStep reachingStep, QueryContext queryContext, Map<org.apache.jena.sparql.core.Var, org.apache.jena.graph.Node> varToComponent) Fields: for each row of this relation, a field may join in additional information. -
Method Summary
Modifier and TypeMethodDescriptionasNode()If the relation only defines a single root then return it.The context of this query which for example holds the PropertyResolver for mapping properties to graph patterns.Get the constraints that were placed on this relationReturns the parent relation and a variable of it to which this relation connects.org.aksw.jenax.path.core.FacetPathgetPath()The path to this relation (a facet path with the last segment having component type TUPLE)org.aksw.jenax.path.core.FacetStepThe step by which this relation was reached from the parent node (null if there is no parent)Returns the relation on which this RelationQuery is based.A name to use for prefixing variables of this node's relationList<org.apache.jena.query.SortCondition>limit()protected NodeQuerynewRoot(org.apache.jena.sparql.core.Var var) nodeFor(org.apache.jena.sparql.core.Var var) Obtain aNodeQueryfor one of the variables of the relation returned byRelationQuery.getRelation().offset()Return this relation's partitioning, null if not partitioned.voidpartitionBy(NodeQueryOld... paths) Declare this relation to be partitioned by the given paths.protected NodeQueryresolveComponent(org.apache.jena.graph.Node component) roots()Return each of the relation's columns as a QueryNode.source()target()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.jenax.facete.treequery2.api.RelationQuery
root
-
Field Details
-
scopeBaseName
A name given to this relation -
relationSupplier
Supplier for the underlying relation. May by a constant supplier or a dynamic one which e.g. resolves an IRI against aPropertyResolverImpl. -
queryContext
-
parent
-
offset
-
limit
-
reachingStep
protected org.aksw.jenax.path.core.FacetStep reachingStepA mapping of which variable corresponds to which component of a facet step -
varToComponent
Variables can be declared as having special meaning: SOURCE, TARGET, PREDICATE and GRAPH -
facetConstraints
-
sortConditions
-
roots
-
-
Constructor Details
-
RelationQueryImpl
public RelationQueryImpl(String scopeBaseName, NodeQuery parent, Supplier<Fragment> relationSupplier, org.aksw.jenax.path.core.FacetStep reachingStep, QueryContext queryContext, Map<org.apache.jena.sparql.core.Var, org.apache.jena.graph.Node> varToComponent) Fields: for each row of this relation, a field may join in additional information.{ thisRelation(v1, ..., vX) LATERAL { { field0 exposes the tuple of the relation itself. further fields connect custom relations. } UNION { field1(r1, ..., rX) with subList of size X (ri) that joins on this relation. } UNION ... UNION { fieldN } } }A connective is (element, joinVars, visibleVarsForFurtherJoining) - the set of variables of the fragment that join). This is different from Fragment, which only declares the visible vars. Perhaps, connective could be defined as (fragment, joinVars).
-
-
Method Details
-
getScopeBaseName
Description copied from interface:RelationQueryA name to use for prefixing variables of this node's relation- Specified by:
getScopeBaseNamein interfaceRelationQuery
-
getParentNode
Description copied from interface:RelationQueryReturns the parent relation and a variable of it to which this relation connects. Returns null if there is no parent- Specified by:
getParentNodein interfaceRelationQuery
-
getRelation
Description copied from interface:RelationQueryReturns the relation on which this RelationQuery is based.- Specified by:
getRelationin interfaceRelationQuery
-
getSortConditions
- Specified by:
getSortConditionsin interfaceRelationQuery
-
getFacetConstraints
Description copied from interface:RelationQueryGet the constraints that were placed on this relation- Specified by:
getFacetConstraintsin interfaceRelationQuery
-
offset
-
offset
-
limit
-
limit
-
asNode
If the relation only defines a single root then return it.- Specified by:
asNodein interfaceRelationQuery
-
getPath
public org.aksw.jenax.path.core.FacetPath getPath()The path to this relation (a facet path with the last segment having component type TUPLE)- Specified by:
getPathin interfaceRelationQuery
-
newRoot
-
roots
Description copied from interface:RelationQueryReturn each of the relation's columns as a QueryNode.- Specified by:
rootsin interfaceRelationQuery
-
nodeFor
Description copied from interface:RelationQueryObtain aNodeQueryfor one of the variables of the relation returned byRelationQuery.getRelation().- Specified by:
nodeForin interfaceRelationQuery
-
getContext
Description copied from interface:RelationQueryThe context of this query which for example holds the PropertyResolver for mapping properties to graph patterns.- Specified by:
getContextin interfaceRelationQuery
-
partition
Description copied from interface:RelationQueryReturn this relation's partitioning, null if not partitioned.- Specified by:
partitionin interfaceRelationQuery
-
partitionBy
Description copied from interface:RelationQueryDeclare this relation to be partitioned by the given paths.- Specified by:
partitionByin interfaceRelationQuery
-
resolveComponent
-
getReachingStep
public org.aksw.jenax.path.core.FacetStep getReachingStep()Description copied from interface:RelationQueryThe step by which this relation was reached from the parent node (null if there is no parent)- Specified by:
getReachingStepin interfaceRelationQuery
-
source
- Specified by:
sourcein interfaceRelationQuery
-
target
- Specified by:
targetin interfaceRelationQuery
-
predicate
- Specified by:
predicatein interfaceRelationQuery
-