Class ElementNode
java.lang.Object
org.aksw.jenax.graphql.sparql.v2.model.ElementNode
- All Implemented Interfaces:
ConnectiveNode,RdfTraversable<ElementNode>,Selection,SparqlPathTraversable<ElementNode>
The attributes of the node are static, but the children are mutable.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class add child nodes.static final recordWhich variables of the parent join with which variables of the child Could extend to List>Expr< or ExprListstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.jena.sparql.core.VarExprListBind expressions, can reference variables in any ancestor.protected ConnectiveConnective: graph pattern with default source and target vars.protected StringAn RDF term that identifies this node.protected StringA label that serves as a basis for allocating names when a node becomes a child of another.protected Longprotected List<org.apache.jena.sparql.core.Var>protected List<ElementTransform>protected Map<String,ElementNode.JoinLink> protected Longprotected ElementNode.ParentLinkprotected List<ElementTransform>List of transformations that apply to the whole subtree of the assembled query. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ConnectiveVisitor<T> visitor) static StringadaptName(ElementNode parent, String label) addChild(List<org.apache.jena.sparql.core.Var> thisVars, ElementNode child) addChild(List<org.apache.jena.sparql.core.Var> thisVars, ElementNode child, List<org.apache.jena.sparql.core.Var> childVars) Add a child with the given join condition.addChild(ElementNode child) protected voidaddChildInternal(String finalName, List<org.apache.jena.sparql.core.Var> thisVars, ElementNode child, List<org.apache.jena.sparql.core.Var> childVars) addLocalTransform(ElementTransform elementTransform) addTreeTransform(ElementTransform elementTransform) clone()Adjusts the name in the builderfindVarInAncestors(org.apache.jena.sparql.core.Var var) Starting from this node and moving up its ancestors, find the first node which declares var.Get the name by which this node is referenced by the parent.org.apache.jena.sparql.core.VarExprListgetBinds()List<org.apache.jena.sparql.core.Var>Get link by which this node's variables joins to those of the parent.getLabel()getLimit()List<org.apache.jena.sparql.core.Var>getName()Deprecated.booleanisRoot()static ElementNodeof(String label, Connective connective) static ElementNodeof(Connective connective) setIdentifier(String identifier) The identifier is a string to that it can be used both as a prefix for variables as well as string literals in a result set.setLocalTargetVars(List<org.apache.jena.sparql.core.Var> localTargetVars) step(org.apache.jena.sparql.path.Path path) Convenience function to produce a new ElementNode that is immediately attached to this node.toString()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aksw.jenax.graphql.sparql.v2.api2.RdfTraversable
bwd, bwd, bwd, fwd, fwd, fwdMethods inherited from interface org.aksw.jenax.graphql.sparql.v2.api2.SparqlPathTraversable
step
-
Field Details
-
parentLink
-
nameToChildLink
-
label
A label that serves as a basis for allocating names when a node becomes a child of another. May be null. -
connective
Connective: graph pattern with default source and target vars. The defaults can be overridden. -
offset
-
limit
-
identifier
An RDF term that identifies this node. Should be suitable for use as a discriminator value when generating queries. -
localTransforms
-
treeTransforms
List of transformations that apply to the whole subtree of the assembled query. For example, wrapping them in a GRAPH or SERVICE block. Transformers should declare any variables they introduce and they must not invalidate existing ones. -
binds
protected org.apache.jena.sparql.core.VarExprList bindsBind expressions, can reference variables in any ancestor. -
localTargetVars
-
-
Constructor Details
-
ElementNode
-
-
Method Details
-
getLocalTargetVars
-
setLocalTargetVars
-
getEffectiveTargetVars
-
getParentLink
-
findVarInAncestors
Starting from this node and moving up its ancestors, find the first node which declares var. Returns null if there is no match. -
getSelections
Deprecated. -
getLabel
-
isRoot
public boolean isRoot() -
setLabel
-
getAssignedName
Get the name by which this node is referenced by the parent. null for the root node. -
getName
-
getConnective
-
getJoinLink
Get link by which this node's variables joins to those of the parent. null if there is no parent. -
getIdentifier
-
setIdentifier
The identifier is a string to that it can be used both as a prefix for variables as well as string literals in a result set. -
getBinds
public org.apache.jena.sparql.core.VarExprList getBinds() -
accept
- Specified by:
acceptin interfaceConnectiveNode
-
toString
-
getChildrenByName
-
step
Convenience function to produce a new ElementNode that is immediately attached to this node.- Specified by:
stepin interfaceSparqlPathTraversable<ElementNode>
-
addChild
-
prepareChild
-
addChild
- Parameters:
child-thisVars- The variables of this to which the child's default source variables should join.
-
setLimit
-
getLimit
-
setOffset
-
getOffset
-
addChild
public ElementNode addChild(List<org.apache.jena.sparql.core.Var> thisVars, ElementNode child, List<org.apache.jena.sparql.core.Var> childVars) Add a child with the given join condition. Returns this (not the child) -
addChildInternal
protected void addChildInternal(String finalName, List<org.apache.jena.sparql.core.Var> thisVars, ElementNode child, List<org.apache.jena.sparql.core.Var> childVars) -
getLocalTransforms
-
getTreeTransforms
-
addLocalTransform
-
addTreeTransform
-
adaptName
-
of
-
of
-
clone
Adjusts the name in the builder
-