public class ConstructionNodeImpl extends ExtendedProjectionNodeImpl implements ConstructionNode
| Modifier and Type | Class and Description |
|---|---|
static class |
ConstructionNodeImpl.PropagationResults<T extends VariableOrGroundTerm> |
ExtendedProjectionNodeImpl.DescendingSubstitutionChildUpdateFunction, ExtendedProjectionNodeImpl.EmptyTreeException| Modifier and Type | Method and Description |
|---|---|
ConstructionNode |
acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer)
"Accept" method for the "Visitor" pattern.
|
IQTree |
acceptTransformer(IQTree tree,
IQTreeVisitingTransformer transformer,
IQTree child) |
<T> T |
acceptVisitor(IQVisitor<T> visitor,
IQTree child) |
void |
acceptVisitor(QueryNodeVisitor visitor)
"Accept" method for the "Visitor" pattern.
|
IQTree |
applyFreshRenaming(InjectiveVar2VarSubstitution renamingSubstitution,
IQTree child,
IQTreeCache treeCache) |
ConstructionNode |
clone()
Immutable fields, can be shared.
|
protected Optional<ExtendedProjectionNode> |
computeNewProjectionNode(com.google.common.collect.ImmutableSet<Variable> newProjectedVariables,
ImmutableSubstitution<ImmutableTerm> theta,
IQTree newChild) |
com.google.common.collect.ImmutableSet<Variable> |
getChildVariables()
Variables that have to be provided by the child
|
com.google.common.collect.ImmutableSet<Variable> |
getLocallyDefinedVariables()
Locally defined variables must not appear in the sub-tree
|
com.google.common.collect.ImmutableSet<Variable> |
getLocallyRequiredVariables()
Set of variables that this node, INDEPENDENTLY OF THE REQUIREMENTS OF ITS ANCESTORS,
requires to be defined in the sub-tree.
|
com.google.common.collect.ImmutableSet<Variable> |
getLocalVariables()
Set of variables MENTIONED in the node, INDEPENDENTLY of its sub-tree.
|
com.google.common.collect.ImmutableSet<ImmutableSubstitution<NonVariableTerm>> |
getPossibleVariableDefinitions(IQTree child) |
com.google.common.collect.ImmutableSet<Variable> |
getRequiredVariables(IntermediateQuery query)
Set of variables which, individually, must be provided by at least one child,
INDEPENDENTLY OF THE REQUIREMENTS OF THIS NODE'S ANCESTORS.
|
ImmutableSubstitution<ImmutableTerm> |
getSubstitution()
(Some) projected variable --> transformed variable
|
com.google.common.collect.ImmutableSet<Variable> |
getVariables()
Set of variables returned by any sub-tree where this node is the root.
|
com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> |
inferUniqueConstraints(IQTree child) |
boolean |
isDistinct(IQTree child) |
boolean |
isEquivalentTo(QueryNode queryNode)
Is syntactically equivalent
|
boolean |
isSyntacticallyEquivalentTo(QueryNode node)
TODO: explain
|
boolean |
isVariableNullable(IntermediateQuery query,
Variable variable)
Returns true if it cannot guarantee the projected variable to be non-null
Throws an IllegalArgumentException if the variable is not projected by the node
|
IQTree |
liftIncompatibleDefinitions(Variable variable,
IQTree child,
VariableGenerator variableGenerator) |
IQTree |
normalizeForOptimization(IQTree child,
VariableGenerator variableGenerator,
IQProperties currentIQProperties)
- Merges with a child construction
- Removes itself if useless
|
IQTree |
removeDistincts(IQTree child,
IQProperties iqProperties) |
String |
toString() |
void |
validateNode(IQTree child)
Only validates the node, not its child
|
applyDescendingSubstitution, applyDescendingSubstitutionWithoutOptimizing, getVariableNullability, isConstructed, propagateDownConstraintequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyDescendingSubstitution, applyDescendingSubstitutionWithoutOptimizing, getVariableNullability, isConstructed, propagateDownConstraintpublic com.google.common.collect.ImmutableSet<Variable> getVariables()
ExplicitVariableProjectionNodegetVariables in interface ExplicitVariableProjectionNodepublic ImmutableSubstitution<ImmutableTerm> getSubstitution()
ExtendedProjectionNodegetSubstitution in interface ConstructionNodegetSubstitution in interface ExtendedProjectionNodepublic ConstructionNode clone()
clone in interface ConstructionNodeclone in interface QueryNodeclone in class QueryNodeImplpublic ConstructionNode acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer) throws QueryNodeTransformationException
QueryNodeacceptNodeTransformer in interface ConstructionNodeacceptNodeTransformer in interface QueryNodeacceptNodeTransformer in interface UnaryOperatorNodeQueryNodeTransformationExceptionpublic com.google.common.collect.ImmutableSet<Variable> getChildVariables()
ExtendedProjectionNodegetChildVariables in interface ExtendedProjectionNodepublic com.google.common.collect.ImmutableSet<Variable> getLocalVariables()
QueryNodegetLocalVariables in interface QueryNodepublic boolean isVariableNullable(IntermediateQuery query, Variable variable)
QueryNodeisVariableNullable in interface QueryNodepublic boolean isDistinct(IQTree child)
isDistinct in interface UnaryOperatorNodepublic IQTree liftIncompatibleDefinitions(Variable variable, IQTree child, VariableGenerator variableGenerator)
liftIncompatibleDefinitions in interface UnaryOperatorNodepublic IQTree acceptTransformer(IQTree tree, IQTreeVisitingTransformer transformer, IQTree child)
acceptTransformer in interface UnaryOperatorNodepublic <T> T acceptVisitor(IQVisitor<T> visitor, IQTree child)
acceptVisitor in interface UnaryOperatorNodepublic void validateNode(IQTree child) throws InvalidQueryNodeException, InvalidIntermediateQueryException
UnaryOperatorNodevalidateNode in interface UnaryOperatorNodeInvalidQueryNodeExceptionInvalidIntermediateQueryExceptionpublic com.google.common.collect.ImmutableSet<ImmutableSubstitution<NonVariableTerm>> getPossibleVariableDefinitions(IQTree child)
getPossibleVariableDefinitions in interface UnaryOperatorNodepublic IQTree removeDistincts(IQTree child, IQProperties iqProperties)
removeDistincts in interface UnaryOperatorNodepublic com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> inferUniqueConstraints(IQTree child)
inferUniqueConstraints in interface UnaryOperatorNodepublic boolean isSyntacticallyEquivalentTo(QueryNode node)
QueryNodeisSyntacticallyEquivalentTo in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getLocallyRequiredVariables()
QueryNodegetLocallyRequiredVariables in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getRequiredVariables(IntermediateQuery query)
QueryNodegetRequiredVariables in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getLocallyDefinedVariables()
QueryNodegetLocallyDefinedVariables in interface QueryNodepublic boolean isEquivalentTo(QueryNode queryNode)
QueryNodeisEquivalentTo in interface QueryNodepublic void acceptVisitor(QueryNodeVisitor visitor)
QueryNodeacceptVisitor in interface QueryNodepublic IQTree normalizeForOptimization(IQTree child, VariableGenerator variableGenerator, IQProperties currentIQProperties)
normalizeForOptimization in interface UnaryOperatorNodepublic IQTree applyFreshRenaming(InjectiveVar2VarSubstitution renamingSubstitution, IQTree child, IQTreeCache treeCache)
applyFreshRenaming in interface UnaryOperatorNodeprotected Optional<ExtendedProjectionNode> computeNewProjectionNode(com.google.common.collect.ImmutableSet<Variable> newProjectedVariables, ImmutableSubstitution<ImmutableTerm> theta, IQTree newChild)
computeNewProjectionNode in class ExtendedProjectionNodeImplCopyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.