public class UnionNodeImpl extends CompositeQueryNodeImpl implements UnionNode
| Modifier and Type | Method and Description |
|---|---|
UnionNode |
acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer)
"Accept" method for the "Visitor" pattern.
|
IQTree |
acceptTransformer(IQTree tree,
IQTreeVisitingTransformer transformer,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
<T> T |
acceptVisitor(IQVisitor<T> visitor,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
void |
acceptVisitor(QueryNodeVisitor visitor)
"Accept" method for the "Visitor" pattern.
|
IQTree |
applyDescendingSubstitution(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution,
Optional<ImmutableExpression> constraint,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
IQTree |
applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
IQTree |
applyFreshRenaming(InjectiveVar2VarSubstitution renamingSubstitution,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children,
IQTreeCache treeCache) |
UnionNode |
clone()
See https://stackoverflow.com/questions/6837362/
|
it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> |
computeNotInternallyRequiredVariables(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
All the variables of an union could be projected out
|
it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> |
getLocallyDefinedVariables()
Locally defined variables must not appear in the sub-tree
|
it.unibz.inf.ontop.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.
|
it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> |
getLocalVariables()
Set of variables MENTIONED in the node, INDEPENDENTLY of its sub-tree.
|
it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<ImmutableSubstitution<NonVariableTerm>> |
getPossibleVariableDefinitions(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
it.unibz.inf.ontop.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.
|
VariableNullability |
getVariableNullability(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> |
getVariables()
Set of variables returned by any sub-tree where this node is the root.
|
boolean |
hasAChildWithLiftableDefinition(Variable variable,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
Returns true if its has, as a child, a construction node defining the variable.
|
it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable>> |
inferUniqueConstraints(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
TODO: implement it seriously
|
boolean |
isConstructed(Variable variable,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
boolean |
isDistinct(IQTree tree,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
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,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children,
VariableGenerator variableGenerator)
TODO: make it compatible definitions together (requires a VariableGenerator so as to lift bindings)
|
IQTree |
makeDistinct(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
Makes the tree be distinct
|
IQTree |
normalizeForOptimization(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children,
VariableGenerator variableGenerator,
IQProperties currentIQProperties)
TODO: refactor
|
IQTree |
propagateDownConstraint(ImmutableExpression constraint,
it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) |
IQTree |
removeDistincts(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children,
IQProperties properties) |
String |
toString() |
void |
validateNode(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
Only validates the node, not its children
|
public void acceptVisitor(QueryNodeVisitor visitor)
QueryNodeacceptVisitor in interface QueryNodepublic UnionNode clone()
QueryNodeImplpublic UnionNode acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer) throws QueryNodeTransformationException
QueryNodeacceptNodeTransformer in interface NaryOperatorNodeacceptNodeTransformer in interface QueryNodeacceptNodeTransformer in interface UnionNodeQueryNodeTransformationExceptionpublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<ImmutableSubstitution<NonVariableTerm>> getPossibleVariableDefinitions(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
getPossibleVariableDefinitions in interface NaryOperatorNodepublic boolean hasAChildWithLiftableDefinition(Variable variable, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
UnionNodehasAChildWithLiftableDefinition in interface UnionNodepublic boolean isVariableNullable(IntermediateQuery query, Variable variable)
QueryNodeisVariableNullable in interface QueryNodepublic VariableNullability getVariableNullability(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
getVariableNullability in interface NaryOperatorNodepublic boolean isConstructed(Variable variable, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
isConstructed in interface NaryOperatorNodepublic boolean isDistinct(IQTree tree, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
isDistinct in interface NaryOperatorNodepublic IQTree makeDistinct(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
UnionNodemakeDistinct in interface UnionNodepublic IQTree liftIncompatibleDefinitions(Variable variable, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children, VariableGenerator variableGenerator)
liftIncompatibleDefinitions in interface NaryOperatorNodepublic IQTree propagateDownConstraint(ImmutableExpression constraint, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
propagateDownConstraint in interface NaryOperatorNodepublic IQTree acceptTransformer(IQTree tree, IQTreeVisitingTransformer transformer, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
acceptTransformer in interface NaryOperatorNodepublic <T> T acceptVisitor(IQVisitor<T> visitor, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
acceptVisitor in interface NaryOperatorNodepublic void validateNode(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children) throws InvalidIntermediateQueryException
NaryOperatorNodevalidateNode in interface NaryOperatorNodeInvalidIntermediateQueryExceptionpublic IQTree removeDistincts(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children, IQProperties properties)
removeDistincts in interface NaryOperatorNodepublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable>> inferUniqueConstraints(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
inferUniqueConstraints in interface NaryOperatorNodepublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> computeNotInternallyRequiredVariables(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
computeNotInternallyRequiredVariables in interface NaryOperatorNodepublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> getVariables()
ExplicitVariableProjectionNodegetVariables in interface ExplicitVariableProjectionNodepublic boolean isSyntacticallyEquivalentTo(QueryNode node)
QueryNodeisSyntacticallyEquivalentTo in interface QueryNodepublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> getLocalVariables()
QueryNodegetLocalVariables in interface QueryNodepublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> getLocallyRequiredVariables()
QueryNodegetLocallyRequiredVariables in interface QueryNodepublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> getRequiredVariables(IntermediateQuery query)
QueryNodegetRequiredVariables in interface QueryNodepublic it.unibz.inf.ontop.com.google.common.collect.ImmutableSet<Variable> getLocallyDefinedVariables()
QueryNodegetLocallyDefinedVariables in interface QueryNodepublic boolean isEquivalentTo(QueryNode queryNode)
QueryNodeisEquivalentTo in interface QueryNodepublic IQTree normalizeForOptimization(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children, VariableGenerator variableGenerator, IQProperties currentIQProperties)
normalizeForOptimization in interface NaryOperatorNodepublic IQTree applyDescendingSubstitution(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, Optional<ImmutableExpression> constraint, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
applyDescendingSubstitution in interface NaryOperatorNodepublic IQTree applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children)
applyDescendingSubstitutionWithoutOptimizing in interface NaryOperatorNodepublic IQTree applyFreshRenaming(InjectiveVar2VarSubstitution renamingSubstitution, it.unibz.inf.ontop.com.google.common.collect.ImmutableList<IQTree> children, IQTreeCache treeCache)
applyFreshRenaming in interface NaryOperatorNodeCopyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.