Class PlannerGraphProperty

    • Method Detail

      • show

        @Nonnull
        public static String show​(boolean renderSingleGroups,
                                  @Nonnull
                                  RelationalExpression relationalExpression)
        Show the planner expression that is passed in as a graph rendered in your default browser.
        Parameters:
        renderSingleGroups - iff true group references with just one member are not rendered
        relationalExpression - the planner expression to be rendered.
        Returns:
        the word "done" (IntelliJ really likes a return of String).
      • createHtmlLauncher

        @Nonnull
        public static URI createHtmlLauncher​(@Nonnull
                                             AbstractPlannerGraph<PlannerGraph.Node,​PlannerGraph.Edge> plannerGraph)
                                      throws Exception
        For debugging only! This method locates a template html launcher file from the resources folder and writes a specific launcher html file into a temp directory. If wanted the caller can open the html in a browser of choice.
        Parameters:
        plannerGraph - -- the planner graph we should create the launcher for
        Returns:
        a URI pointing to an html file in a temp location which renders the graph
        Throws:
        Exception - -- thrown from methods called in here.
      • explain

        @Nonnull
        public static String explain​(@Nonnull
                                     RelationalExpression relationalExpression)
        Generate the explain of the planner expression that is passed in.
        Parameters:
        relationalExpression - the planner expression to be explained.
        Returns:
        the explain of the planner expression handing in as a string in GML format.
      • explain

        @Nonnull
        public static String explain​(@Nonnull
                                     RelationalExpression relationalExpression,
                                     @Nonnull
                                     Map<String,​Attribute> additionalDescriptionMap)
        Generate the explain of the planner expression that is passed in.
        Parameters:
        relationalExpression - the planner expression to be explained.
        additionalDescriptionMap - a map used to generate names and descriptions for operators.
        Returns:
        the explain of the planner expression handing in as a string in GML format.
      • exportToGml

        @Nonnull
        public static String exportToGml​(@Nonnull
                                         PlannerGraph plannerGraph,
                                         @Nonnull
                                         Map<String,​Attribute> additionalInfoMap)
        Creates a serialized format of this graph as a gml-compatible definition.
        Parameters:
        plannerGraph - the planner graph to be exported
        additionalInfoMap - a map used to generate names and descriptions for operators.
        Returns:
        the graph as string in gml format.
      • forInternalShow

        public static PlannerGraphProperty forInternalShow​(boolean renderSingleGroups)
      • evaluateAtExpression

        @Nonnull
        public PlannerGraph evaluateAtExpression​(@Nonnull
                                                 RelationalExpression expression,
                                                 @Nonnull
                                                 List<PlannerGraph> childGraphs)
        Description copied from interface: PlannerProperty
        Evaluate the property at the given expression, using the results of evaluating the property at its children. Called on nodes in the graph in visit post-order of the depth-first traversal of the graph. That is, as each expression is visited (after all of its children have been visited, if applicable), evaluateAtExpression() is called on that expression.
        Specified by:
        evaluateAtExpression in interface PlannerProperty<PlannerGraph>
        Parameters:
        expression - the cursor to visit
        childGraphs - the results of the property evaluated at the children of expression
        Returns:
        the value of property at the given expression
      • evaluateAtRef

        @Nonnull
        public PlannerGraph evaluateAtRef​(@Nonnull
                                          ExpressionRef<? extends RelationalExpression> ref,
                                          @Nonnull
                                          List<PlannerGraph> memberResults)
        Description copied from interface: PlannerProperty
        Evaluate the property at the given reference, using the results of evaluating the property at its members. Called on nodes in the graph in visit post-order of the depth-first traversal of the graph. That is, as each reference is visited (after all of its members have been visited, if applicable), evaluateAtRef() is called on that reference.
        Specified by:
        evaluateAtRef in interface PlannerProperty<PlannerGraph>
        Parameters:
        ref - the expression reference to visit
        memberResults - the results of the property evaluated at the members of ref
        Returns:
        the value of property at the given reference