com.vinculumtech.carrierwave.plan
Class ImageableNavigation

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

public final class ImageableNavigation
extends java.lang.Object

The Navigation class provides a set of utilities for retrieving elements from imageable graphs via directed graph nodes.

A directed graph node, is a child node in a graph node tree. It represents a position in an imageable graph.

Version:
$Id: //depot/carrierwave/src/server/com/vinculumtech/carrierwave/plan/ImageableNavigation.java#14 $

Constructor Summary
ImageableNavigation()
           
 
Method Summary
static java.util.List findDescendantsOf(Imageable originImageable, GraphNode leafNode)
          Returns a List of all the Imageable instances than can be reached by the given leafNode value.
A leaf node is a node in a graph node tree.
static java.lang.Object getChild(GraphNode graphNode, Imageable parentImageable)
          Returns the child object referenced by the given GraphNode instance from the given parentImageable.
If the graphNode references a contained element, it will NOT be extracted from the container.
static java.lang.Object getChildNarrow(GraphNode graphNode, Imageable parentImageable)
          Returns the child object referenced by the given GraphNode instance from the given parentImageable.
If the graphNode references a contained element (by index or key), it will be extracted from the container (thus narrowing).
static void setChild(GraphNode graphNode, Imageable parentImageable, java.lang.Object child)
          Sets the given childImageable on the parentImageable at the location referenced by the graphNode parameter.
Note the child parameter may be null.
static void setChildImageable(GraphNode graphNode, Imageable parentImageable, Imageable childImageable)
          Sets the given childImageable on the parentImageable at the location referenced by the graphNode parameter.
Note the childImageable may not be null if the graphNode references a position in a List.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageableNavigation

public ImageableNavigation()
Method Detail

findDescendantsOf

public static final java.util.List findDescendantsOf(Imageable originImageable,
                                                     GraphNode leafNode)
                                              throws GraphException
Returns a List of all the Imageable instances than can be reached by the given leafNode value.
A leaf node is a node in a graph node tree. The origin node in the tree should match the originImageable.

Parameters:
originImageable -
leafNode -
Returns:
Throws:
GraphException

getChildNarrow

public static final java.lang.Object getChildNarrow(GraphNode graphNode,
                                                    Imageable parentImageable)
                                             throws EdgeNotFoundException,
                                                    GraphException
Returns the child object referenced by the given GraphNode instance from the given parentImageable.
If the graphNode references a contained element (by index or key), it will be extracted from the container (thus narrowing).

Parameters:
graphNode -
parentImageable -
Returns:
Throws:
EdgeNotFoundException
GraphException

getChild

public static final java.lang.Object getChild(GraphNode graphNode,
                                              Imageable parentImageable)
                                       throws EdgeNotFoundException,
                                              GraphException
Returns the child object referenced by the given GraphNode instance from the given parentImageable.
If the graphNode references a contained element, it will NOT be extracted from the container.

Parameters:
graphNode -
parentImageable -
Returns:
Throws:
EdgeNotFoundException
GraphException

setChildImageable

public static final void setChildImageable(GraphNode graphNode,
                                           Imageable parentImageable,
                                           Imageable childImageable)
                                    throws EdgeNotFoundException,
                                           GraphException
Sets the given childImageable on the parentImageable at the location referenced by the graphNode parameter.
Note the childImageable may not be null if the graphNode references a position in a List. Order is not guaranteed in Lists (as per persistence mechanisms).

Parameters:
graphNode -
parentImageable -
childImageable -
Throws:
EdgeNotFoundException
GraphException

setChild

public static final void setChild(GraphNode graphNode,
                                  Imageable parentImageable,
                                  java.lang.Object child)
                           throws EdgeNotFoundException,
                                  GraphException
Sets the given childImageable on the parentImageable at the location referenced by the graphNode parameter.
Note the child parameter may be null. This method will not insert a value into a container.

Parameters:
graphNode -
parentImageable -
child -
Throws:
EdgeNotFoundException
GraphException


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