wt.step.processor
Class EntityTraverser

java.lang.Object
  extended bywt.step.processor.EntityTraverser

public class EntityTraverser
extends Object

A utility class used to traverse a StepData structure following Entity attributes.


Field Summary
private  StepEntity _currentEntity
           
private  ExpressSchema _schema
           
private  StepData _stepData
           
 
Constructor Summary
EntityTraverser(ExpressSchema schemaForEntitiesInTraversal, StepData stepDataToTraverse)
           
 
Method Summary
 StepEntity getEntity(String entityAttributeName)
          Gets an Entity attribute from the current entity.
 String getEntityType()
          Returns the type name for the current entity.
 Vector getList(String listAttributeName)
           
 String getString(String stringAttributeName)
          Gets a String attribute from the current entity.
 EntityTraverser gotoEntity(String nextEntityAttribute)
          Traverse through the current entities attributes to a new entity.
 boolean hasEntity(String entityAttributeName)
           
 EntityTraverser startFrom(StepEntity entity)
          Reinitialise the start point for traversal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_currentEntity

private StepEntity _currentEntity

_schema

private ExpressSchema _schema

_stepData

private StepData _stepData
Constructor Detail

EntityTraverser

public EntityTraverser(ExpressSchema schemaForEntitiesInTraversal,
                       StepData stepDataToTraverse)
Method Detail

startFrom

public EntityTraverser startFrom(StepEntity entity)
Reinitialise the start point for traversal

Returns:
This EntityTraverser instance but with its internal entity set to the given start point.

gotoEntity

public EntityTraverser gotoEntity(String nextEntityAttribute)
                           throws TransferException
Traverse through the current entities attributes to a new entity. If the attribute is not set then a MandatoryAttributeException is thrown.

Returns:
This EntityTraverser instance but with its internal entity set to the result of the traversal.
Throws:
TransferException

getEntityType

public String getEntityType()
Returns the type name for the current entity.


hasEntity

public boolean hasEntity(String entityAttributeName)
                  throws TransferException
Throws:
TransferException

getEntity

public StepEntity getEntity(String entityAttributeName)
                     throws TransferException
Gets an Entity attribute from the current entity.

Throws:
TransferException

getString

public String getString(String stringAttributeName)
                 throws TransferException
Gets a String attribute from the current entity.

Throws:
TransferException

getList

public Vector getList(String listAttributeName)
               throws TransferException
Throws:
TransferException