wt.part
Class BOMPartsListVisitor

java.lang.Object
  extended by wt.visitor.VisitorAdapter
      extended by wt.visitor.TextOutputVisitor
          extended by wt.part.BOMPartsListVisitor
All Implemented Interfaces:
Serializable, Visitor
Direct Known Subclasses:
HtmlPreformattedPartsListVisitor

public abstract class BOMPartsListVisitor
extends TextOutputVisitor
implements Serializable

This class is a Visitor that maintains a list of parts (nodes) as the structure is navigated. The usage information (links) is maintained internally. After navigation is complete, the parts list table represents the entire list of parts that make up the structure. Only parts that do not use any other parts (i.e. leaf nodes) are included. The keys in this table are the part identities and the associated value is the usage information.

Supported API: true

Extendable: true

See Also:
Serialized Form

Method Summary
 Hashtable getPartsList()
          Gets the object for the association that plays role: partsList.
abstract  void report()
          This operation outputs a text report of the internal parts list.
 boolean visit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited)
          Visit a node.
 
Methods inherited from class wt.visitor.TextOutputVisitor
getPrintWriter, getResourceBundle, printLocalizedMessage, printLocalizedMessage, printLocalizedMessage, setPrintWriter, setPrintWriter, setResourceBundle
 
Methods inherited from class wt.visitor.VisitorAdapter
visitLevel, visitLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPartsList

public Hashtable getPartsList()
Gets the object for the association that plays role: partsList.

Supported API: true

Returns:
Hashtable

visit

public final boolean visit(Persistable fromNode,
                           Link link,
                           Persistable toNode,
                           int level,
                           boolean previouslyVisited)
                    throws WTException
Visit a node. Information is stored in an internal hash table for this link and node. A boolean true value is always returned so that every node is visited.

Supported API: true

Specified by:
visit in interface Visitor
Overrides:
visit in class VisitorAdapter
Parameters:
fromNode -
link -
toNode -
level -
previouslyVisited -
Returns:
boolean
Throws:
WTException

report

public abstract void report()
This operation outputs a text report of the internal parts list. This operation should only be called after navigation is complete.

Supported API: true