com.vinculumtech.carrierwave.plan
Class GraphPlanFactory

java.lang.Object
  extended bycom.vinculumtech.carrierwave.plan.GraphPlanFactory

public final class GraphPlanFactory
extends java.lang.Object

The GraphPlanFactory class provides methods to instantiate or generate GraphPlan instances or GraphNode node trees from an Image class or instance.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/plan/GraphPlanFactory.java#23 $

Method Summary
protected static void addAllChildrenNodesTo(GraphPlan graphPlan, ImageTypeMap imageTypeMap, GraphNode parentNode, boolean includeLiterals, int depth)
          not sure if includeLiterals should be promoted to GraphPlan, since it only affects plan generation (so far), and not modify or select calls.
static GraphPlan createGraphPlanFor(Image originImage, java.lang.String fullName)
          Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.
static GraphPlan createGraphPlanFor(Image originImage, java.lang.String fullName, int depth)
          Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.
static GraphPlan createGraphPlanFor(Image originImage, java.lang.String fullName, int depth, boolean isFuzzy)
          Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.
static GraphPlan createGraphPlanFor(Image originImage, java.lang.String fullName, int depth, boolean ignoreReadonly, boolean dependentsInclusive, boolean isFuzzy)
          Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.
static GraphPlan createGraphPlanFor(java.lang.String imageType, java.lang.String fullName, int depth)
          Returns a new GraphPlan instance with a static graph node tree generated by the given meta-data.
static GraphPlan createGraphPlanFor(java.lang.String imageType, java.lang.String fullName, int depth, boolean isFuzzy)
          Returns a new GraphPlan instance with a static graph node tree generated by the given meta-data.
static GraphPlan createGraphPlanFor(java.lang.String imageType, java.lang.String fullName, int depth, boolean ignoreReadonly, boolean dependentsInclusive, boolean isFuzzy)
          Returns a new GraphPlan instance with a static graph node tree generated by the given meta-data.
static GraphNode createNodeSetFor(java.lang.String defaultImageType, GraphNode parentNode, GraphNode foundNode, GraphNode currentNode)
           
static GraphNode getGraphNodeTreeFor(GraphPlan graphPlan, Image originImage)
          Returns the graph node tree associated with the given GraphPlan instance, otherwise a new runtime graph node tree is generated using the GraphPlan meta-data and the Image instance.
static GraphNode getGraphNodeTreeFor(GraphPlan graphPlan, java.lang.String imageType)
          Returns the graph node tree associated with the given GraphPlan instance, otherwise a new static graph node tree is generated using the GraphPlan meta-data and the imageType.
static java.util.List getGraphNodeTreesFor(GraphPlan graphPlan, ImageGraph imageGraph)
          Returns a list of runtime graph node trees (one for each originImage) using the GraphPlan meta-data and the ImageGraph instance.
Note, this method currently ignores any originNode on the given GraphPlan instance.
static GraphPlan initializeGraphPlan(Image originImage, GraphPlan graphPlan)
          Returns the given GraphPlan instance initialized with a static graph node tree using the graph plan meta-data and the given Image instance.
static GraphPlan initializeGraphPlan(java.lang.String imageType, GraphPlan graphPlan)
          Returns the given GraphPlan instance initialized with a static graph node tree using the graph plan meta-data and the given imageType.
static GraphNode makeGraphNodeTreeFor(GraphPlan graphPlan, Image originImage)
          Creates a new graph node tree using the GraphPlan meta-data and the given Image instance.
static GraphNode makeGraphNodeTreeFor(GraphPlan graphPlan, java.lang.String imageType)
          Creates a new graph node tree using the GraphPlan meta-data and the given imageType.
static GraphNode makeGraphNodeTreeFor(GraphPlan graphPlan, java.lang.String imageType, boolean includeLiterals)
           
static java.util.List makeGraphNodeTreesFor(GraphPlan graphPlan, ImageGraph imageGraph)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createGraphPlanFor

public static final GraphPlan createGraphPlanFor(java.lang.String imageType,
                                                 java.lang.String fullName,
                                                 int depth)
                                          throws GraphPlanException
Returns a new GraphPlan instance with a static graph node tree generated by the given meta-data.

Parameters:
imageType -
fullName -
depth -
Returns:
Throws:
GraphPlanException

createGraphPlanFor

public static final GraphPlan createGraphPlanFor(java.lang.String imageType,
                                                 java.lang.String fullName,
                                                 int depth,
                                                 boolean isFuzzy)
                                          throws GraphPlanException
Returns a new GraphPlan instance with a static graph node tree generated by the given meta-data.

Parameters:
imageType -
fullName -
depth -
isFuzzy -
Returns:
Throws:
GraphPlanException

createGraphPlanFor

public static final GraphPlan createGraphPlanFor(java.lang.String imageType,
                                                 java.lang.String fullName,
                                                 int depth,
                                                 boolean ignoreReadonly,
                                                 boolean dependentsInclusive,
                                                 boolean isFuzzy)
                                          throws GraphPlanException
Returns a new GraphPlan instance with a static graph node tree generated by the given meta-data.

Parameters:
imageType - when null, a simple graph plan is returned with no node tree
fullName -
depth -
ignoreReadonly -
dependentsInclusive -
isFuzzy -
Returns:
Throws:
GraphPlanException

initializeGraphPlan

public static final GraphPlan initializeGraphPlan(java.lang.String imageType,
                                                  GraphPlan graphPlan)
                                           throws GraphPlanException
Returns the given GraphPlan instance initialized with a static graph node tree using the graph plan meta-data and the given imageType.

Parameters:
imageType -
graphPlan -
Returns:
Throws:
GraphPlanException

createGraphPlanFor

public static final GraphPlan createGraphPlanFor(Image originImage,
                                                 java.lang.String fullName)
                                          throws GraphPlanException,
                                                 EdgeNotFoundException,
                                                 GraphException
Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.

Parameters:
originImage -
fullName -
Returns:
Throws:
GraphPlanException
EdgeNotFoundException
GraphException

createGraphPlanFor

public static final GraphPlan createGraphPlanFor(Image originImage,
                                                 java.lang.String fullName,
                                                 int depth)
                                          throws GraphPlanException,
                                                 EdgeNotFoundException,
                                                 GraphException
Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.

Parameters:
originImage -
fullName -
depth -
Returns:
Throws:
GraphPlanException
EdgeNotFoundException
GraphException

createGraphPlanFor

public static final GraphPlan createGraphPlanFor(Image originImage,
                                                 java.lang.String fullName,
                                                 int depth,
                                                 boolean isFuzzy)
                                          throws GraphPlanException,
                                                 EdgeNotFoundException,
                                                 GraphException
Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.

Parameters:
originImage -
fullName -
depth -
isFuzzy -
Returns:
Throws:
GraphPlanException
EdgeNotFoundException
GraphException

createGraphPlanFor

public static final GraphPlan createGraphPlanFor(Image originImage,
                                                 java.lang.String fullName,
                                                 int depth,
                                                 boolean ignoreReadonly,
                                                 boolean dependentsInclusive,
                                                 boolean isFuzzy)
                                          throws GraphPlanException,
                                                 EdgeNotFoundException,
                                                 GraphException
Returns a new GraphPlan instance with a runtime graph node tree generated by the given meta-data.

Parameters:
originImage -
fullName -
depth -
ignoreReadonly -
dependentsInclusive -
isFuzzy -
Returns:
Throws:
GraphPlanException
EdgeNotFoundException
GraphException

initializeGraphPlan

public static final GraphPlan initializeGraphPlan(Image originImage,
                                                  GraphPlan graphPlan)
                                           throws GraphPlanException,
                                                  EdgeNotFoundException,
                                                  GraphException
Returns the given GraphPlan instance initialized with a static graph node tree using the graph plan meta-data and the given Image instance.

Parameters:
originImage -
graphPlan -
Returns:
Throws:
GraphPlanException
EdgeNotFoundException
GraphException

getGraphNodeTreeFor

public static final GraphNode getGraphNodeTreeFor(GraphPlan graphPlan,
                                                  java.lang.String imageType)
                                           throws GraphPlanException
Returns the graph node tree associated with the given GraphPlan instance, otherwise a new static graph node tree is generated using the GraphPlan meta-data and the imageType.

Parameters:
graphPlan -
imageType -
Returns:
Throws:
GraphPlanException

getGraphNodeTreeFor

public static final GraphNode getGraphNodeTreeFor(GraphPlan graphPlan,
                                                  Image originImage)
                                           throws GraphPlanException,
                                                  EdgeNotFoundException,
                                                  GraphException
Returns the graph node tree associated with the given GraphPlan instance, otherwise a new runtime graph node tree is generated using the GraphPlan meta-data and the Image instance.

Parameters:
graphPlan -
originImage -
Returns:
Throws:
GraphPlanException
EdgeNotFoundException
GraphException

getGraphNodeTreesFor

public static final java.util.List getGraphNodeTreesFor(GraphPlan graphPlan,
                                                        ImageGraph imageGraph)
                                                 throws GraphPlanException,
                                                        EdgeNotFoundException,
                                                        GraphException
Returns a list of runtime graph node trees (one for each originImage) using the GraphPlan meta-data and the ImageGraph instance.
Note, this method currently ignores any originNode on the given GraphPlan instance.

Parameters:
graphPlan -
imageGraph -
Returns:
Throws:
GraphPlanException
EdgeNotFoundException
GraphException

makeGraphNodeTreeFor

public static final GraphNode makeGraphNodeTreeFor(GraphPlan graphPlan,
                                                   java.lang.String imageType)
                                            throws GraphPlanException
Creates a new graph node tree using the GraphPlan meta-data and the given imageType.

Parameters:
graphPlan -
imageType -
Returns:
Throws:
GraphPlanException

makeGraphNodeTreeFor

public static final GraphNode makeGraphNodeTreeFor(GraphPlan graphPlan,
                                                   java.lang.String imageType,
                                                   boolean includeLiterals)
                                            throws GraphPlanException
Throws:
GraphPlanException

addAllChildrenNodesTo

protected static final void addAllChildrenNodesTo(GraphPlan graphPlan,
                                                  ImageTypeMap imageTypeMap,
                                                  GraphNode parentNode,
                                                  boolean includeLiterals,
                                                  int depth)
                                           throws GraphPlanException
not sure if includeLiterals should be promoted to GraphPlan, since it only affects plan generation (so far), and not modify or select calls.

Parameters:
graphPlan -
imageTypeMap -
parentNode -
includeLiterals -
depth -
Throws:
GraphPlanException

makeGraphNodeTreesFor

public static final java.util.List makeGraphNodeTreesFor(GraphPlan graphPlan,
                                                         ImageGraph imageGraph)
                                                  throws EdgeNotFoundException,
                                                         GraphException
Throws:
EdgeNotFoundException
GraphException

makeGraphNodeTreeFor

public static final GraphNode makeGraphNodeTreeFor(GraphPlan graphPlan,
                                                   Image originImage)
                                            throws EdgeNotFoundException,
                                                   GraphException
Creates a new graph node tree using the GraphPlan meta-data and the given Image instance.

Parameters:
graphPlan -
originImage -
Returns:
Throws:
EdgeNotFoundException
GraphException

createNodeSetFor

public static final GraphNode createNodeSetFor(java.lang.String defaultImageType,
                                               GraphNode parentNode,
                                               GraphNode foundNode,
                                               GraphNode currentNode)


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.