com.redhat.lightblue.assoc

Class QueryPlan

    • Constructor Detail

      • QueryPlan

        public QueryPlan(CompositeMetadata root,
                 QueryPlanScorer qdf)
        Constructs a query plan from the composite metadata by recursively descending through the associated entities, and creating a node for every entity.
      • QueryPlan

        public QueryPlan(CompositeMetadata root,
                 QueryPlanScorer qdf,
                 Set<CompositeMetadata> filter)
        Constructs a query plan from the composite metadata by recursively descending through the associated entities as deterimed by the filter, and creating a node for every entity.
        Parameters:
        root - The root composite metadata
        qdf - The scorer
        filter - A set of composite metadata objects containing only those entities that should be included in the plan. If null, all entities will be included.
    • Method Detail

      • getSize

        public int getSize()
        Returns the size (number of nodes) of the query plan
      • newData

        public QueryPlanData newData()
        Creates a new instance of QueryPlanData
      • getSources

        public QueryPlanNode[] getSources()
        Returns an array of source nodes, nodes with no incoming edges. This can never return null, or an empty array. Worst case, it will return the root entity.
      • getUnassignedClauses

        public List<Conjunct> getUnassignedClauses()
        Returns the list containing clauses that cannot be associated with a node or an edge (i.e. clauses refer to more than two nodes).
      • deepCopy

        public QueryPlan deepCopy()
        Returns a deep copy of the query plan.
      • getAllNodes

        public QueryPlanNode[] getAllNodes()
        Returns all nodes
      • isDirectedConnected

        public boolean isDirectedConnected(QueryPlanNode from,
                                  QueryPlanNode to)
        Returns if there exists a directed edge between the nodes, directed from from to to
      • isUndirectedConnected

        public boolean isUndirectedConnected(QueryPlanNode from,
                                    QueryPlanNode to)
        Returns if there exists an edge between the two nodes, pointing either way
      • getBreadthFirstNodeOrdering

        public QueryPlanNode[] getBreadthFirstNodeOrdering()
      • mxToString

        public String mxToString()
      • getNode

        public QueryPlanNode getNode(CompositeMetadata md)
        Returns the query plan node corresponding to the given composite metadata instance. This checks object identity to find the node containing the composite metadata
      • treeToString

        public String treeToString()

Copyright © 2015. All rights reserved.