|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.visitor.VisitorAdapter
wt.visitor.TextOutputVisitor
wt.part.BOMHierarchyVisitor
This class is a Visitor that generates text ouptut for a product structure
hierarchy. The node identity, the usage links' attributes and an indication
of the hierarchal level of the node are included in the text output.
Supported API: true
Extendable: true
Field Summary | |
protected static String |
BLANK_SPACE
|
private static String |
CLASSNAME
|
private static String |
LINE_NUMBER_SEPARATOR
|
private DecimalFormat |
quantityFormat
|
private static String |
RESOURCE
|
private static boolean |
SHOW_ORGID
|
Fields inherited from class wt.visitor.TextOutputVisitor |
|
Constructor Summary | |
BOMHierarchyVisitor()
|
Method Summary | |
String |
getMessageKey()
By default this method returns the PART_USAGE message key from partResource. |
protected String |
getNodeIdentity(Persistable node)
Returns a String representation of the identity for the given node. |
protected Object[] |
midVisitParams(Persistable fromNode,
Link link,
Persistable toNode,
int level,
boolean previouslyVisited)
By deafult midVisitParams returns an array of five values. |
void |
postNavigateWrite()
This method should be called after navigating the structure. |
protected abstract void |
postVisitWrite(int a_level)
This method is called from the visit() method after the node text is written. |
void |
preNavigateWrite()
This method should be called prior to navigating the structure. |
protected abstract void |
preVisitWrite(int a_level)
This method is called from the visit() method before the node text is written. |
boolean |
visit(Persistable fromNode,
Link link,
Persistable toNode,
int level,
boolean previouslyVisited)
Visit a node. |
Methods inherited from class wt.visitor.TextOutputVisitor |
getLocale, getPrintWriter, getResourceBundle, printLocalizedMessage, printLocalizedMessage, printLocalizedMessage, setLocale, 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 |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
protected static final String BLANK_SPACE
private static final String LINE_NUMBER_SEPARATOR
private DecimalFormat quantityFormat
private static boolean SHOW_ORGID
Constructor Detail |
public BOMHierarchyVisitor()
Method Detail |
public final boolean visit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited) throws WTException
visit
in interface Visitor
visit
in class VisitorAdapter
fromNode
- link
- toNode
- level
- previouslyVisited
-
WTException
protected abstract void preVisitWrite(int a_level)
a_level
- protected Object[] midVisitParams(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited)
fromNode
- link
- toNode
- level
- previouslyVisited
-
protected abstract void postVisitWrite(int a_level)
a_level
- public void preNavigateWrite()
public void postNavigateWrite()
public String getMessageKey()
protected String getNodeIdentity(Persistable node)
node
- the Persistable whose identity is returned
IdentityFactory
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |