@Override protected boolean requiresRecursiveSearch() { return graphTransformer != null || super.requiresRecursiveSearch(); }
processLogger.logDebug( "preparing match within: {}", this.getClass().getSimpleName() ); ElementGraph prepared = prepareForMatch( processLogger, transformed, graph ); return graph; Set<FlowElement> exclusions = addExclusions( graph ); processLogger.logDebug( "performing transform in place within: {}", this.getClass().getSimpleName() ); boolean transformResult = transformGraphInPlaceUsingSafe( transformed, graph, match ); if( !requiresRecursiveSearch() ) return graph; return transform( processLogger, transformed, graph, maxDepth, ++currentDepth );
@Override public Transformed<ElementGraph> transform( PlannerContext plannerContext, ElementGraph rootGraph ) { return super.transform( plannerContext, new ElementMultiGraph( rootGraph ) ); }
private boolean transformGraphInPlaceUsingSafe( Transformed<E> transformed, E graph, Match match ) { try { return transformGraphInPlaceUsing( transformed, graph, match ); } catch( TransformException exception ) { throw exception; } catch( Throwable throwable ) { throw new TransformException( throwable, transformed ); } }
@Override public Transformed<E> transform( PlannerContext plannerContext, E rootGraph ) { int maxDepth = plannerContext.getIntProperty( TRANSFORM_RECURSION_DEPTH_MAX, DEFAULT_TRANSFORM_RECURSION_DEPTH_MAX ); Transformed<E> transformed = new Transformed<>( plannerContext, this, expressionGraph, rootGraph ); E result = transform( plannerContext.getLogger(), transformed, rootGraph, maxDepth, 0 ); transformed.setEndGraph( result ); return transformed; }
public Transformed<ElementGraph> performTransform( PlannerContext plannerContext, ElementGraph rootGraph ) { Transformed<ElementGraph> result = new Transformed<>( plannerContext, this, rootGraph ); ElementGraph graphCopy = rootGraph.copyElementGraph(); Transformed<ElementGraph> transformed = graphTransformer.transform( plannerContext, graphCopy ); result.addChildTransform( transformed ); if( transformed.getEndGraph() != null && !rootGraph.equals( transformed.getEndGraph() ) ) result.setEndGraph( transformed.getEndGraph() ); return result; }
@Override protected boolean requiresRecursiveSearch() { return graphTransformer != null || super.requiresRecursiveSearch(); }