@AssistedInject private UnaryIQTreeImpl(@Assisted UnaryOperatorNode rootNode, @Assisted IQTree child, IQTreeTools iqTreeTools, IntermediateQueryFactory iqFactory, OntopModelSettings settings) { this(rootNode, child, iqFactory.createIQProperties(), iqTreeTools, iqFactory, settings); }
@AssistedInject private BinaryNonCommutativeIQTreeImpl(@Assisted BinaryNonCommutativeOperatorNode rootNode, @Assisted("left") IQTree leftChild, @Assisted("right") IQTree rightChild, IQTreeTools iqTreeTools, IntermediateQueryFactory iqFactory, OntopModelSettings settings) { this(rootNode, leftChild, rightChild, iqFactory.createIQProperties(), iqTreeTools, iqFactory, settings); }
@AssistedInject private NaryIQTreeImpl(@Assisted NaryOperatorNode rootNode, @Assisted ImmutableList<IQTree> children, IQTreeTools iqTreeTools, IntermediateQueryFactory iqFactory, OntopModelSettings settings) { this(rootNode, children, iqFactory.createIQProperties(), iqTreeTools, iqFactory, settings); }
@Override public IQTree transformConstruction(IQTree tree, ConstructionNode rootCn, IQTree child) { IQTree transformedChild = child.acceptTransformer(this); QueryNode transformedChildRoot = transformedChild.getRootNode(); // if the child is a union, lift it if (transformedChildRoot instanceof UnionNode) { return iqFactory.createNaryIQTree( iqFactory.createUnionNode(rootCn.getVariables()), transformedChild.getChildren().stream() .map(t -> iqFactory.createUnaryIQTree(rootCn, t)) .collect(ImmutableCollectors.toList()) ); } // if the child is a construction node, merge it if (transformedChildRoot instanceof ConstructionNode) { return rootCn.liftBinding( transformedChild, variableGenerator, iqFactory.createIQProperties() ); } return iqFactory.createUnaryIQTree(rootCn, transformedChild); }