wt.visitor
Class BasicNodeExpandInfo

java.lang.Object
  extended bywt.visitor.BasicNodeExpandInfo
All Implemented Interfaces:
NodeExpandInfo, Serializable

public class BasicNodeExpandInfo
extends Object
implements NodeExpandInfo, Serializable

This interface describes the applicable links and expand method for a given node during traversal. The links are specified by returning a Vector of RoleExpandInfo objects. The expand method is specified by returning an Expander object .

A class implementing this interface could use either a static or dynamic approach. For example, a static approach could use a hash table to return the RoleExpandInfo. The hash table with the appropriate RoleExpandInfo objects for each type of node. An example of a dynamic implementation could be done using introspection to return all of the association links at runtime and convert them to RoleExpandInfo objects.



Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private static Vector linkExclusionList
           
 
Constructor Summary
BasicNodeExpandInfo()
           
 
Method Summary
private  void getAllEdges(String name, ObjectGraphEdge[] oge, Vector linksvec)
           
private  void getAllRefs(String name, ObjectGraphEdge[] oge, Vector linksvec)
           
 Expander getExpander(Persistable obj)
          Return an Expander for the specified node.
private  void getNeighboringNodesOf(String originClassName, Vector expandInfoVector)
           
private  void getNeighboringRefsOf(String originClassName, Vector expandInfoVector)
           
 Vector getRoleExpandInfos(Persistable obj)
          Return a Vector of RoleExpandInfo objects for the specified node.
 Vector getRoleExpandInfos(Persistable obj, ObjectGraphTemplate ogt)
           
 Vector getRoleExpandRefInfos(Persistable obj, ObjectGraphTemplate ogt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

linkExclusionList

private static Vector linkExclusionList
Constructor Detail

BasicNodeExpandInfo

public BasicNodeExpandInfo()
Method Detail

getExpander

public Expander getExpander(Persistable obj)
                     throws WTException
Return an Expander for the specified node.

Supported API: true

Specified by:
getExpander in interface NodeExpandInfo
Parameters:
obj -
Returns:
Expander
Throws:
WTException

getRoleExpandInfos

public Vector getRoleExpandInfos(Persistable obj)
                          throws WTException
Description copied from interface: NodeExpandInfo
Return a Vector of RoleExpandInfo objects for the specified node.

Supported API: true

Specified by:
getRoleExpandInfos in interface NodeExpandInfo
Parameters:
obj -
Returns:
Vector
Throws:
WTException

getRoleExpandInfos

public Vector getRoleExpandInfos(Persistable obj,
                                 ObjectGraphTemplate ogt)
                          throws WTException
Throws:
WTException

getRoleExpandRefInfos

public Vector getRoleExpandRefInfos(Persistable obj,
                                    ObjectGraphTemplate ogt)
                             throws WTException
Throws:
WTException

getAllEdges

private void getAllEdges(String name,
                         ObjectGraphEdge[] oge,
                         Vector linksvec)

getAllRefs

private void getAllRefs(String name,
                        ObjectGraphEdge[] oge,
                        Vector linksvec)

getNeighboringRefsOf

private void getNeighboringRefsOf(String originClassName,
                                  Vector expandInfoVector)
                           throws WTException,
                                  WTPropertyVetoException,
                                  ObjectGraphException
Throws:
WTException
WTPropertyVetoException
ObjectGraphException

getNeighboringNodesOf

private void getNeighboringNodesOf(String originClassName,
                                   Vector expandInfoVector)
                            throws WTException,
                                   WTPropertyVetoException,
                                   ObjectGraphException
Throws:
WTException
WTPropertyVetoException
ObjectGraphException