|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.search.query.formhandlers.TagBuilder atg.search.query.formhandlers.XMLTagBuilderVisitor
public class XMLTagBuilderVisitor
This class recursively visits a map that may contain other maps and from the HashMap data builds one or more XML tags. The hashmaps have keys that are strings and values that are either strings or other hashmaps. The recognized keys include:
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.search.query.formhandlers.TagBuilder |
---|
ATTRIBUTES_KEY, BODY_KEY, NESTED_ATTR, OPTIONS_KEY, TAGNAME_KEY |
Constructor Summary | |
---|---|
XMLTagBuilderVisitor()
Create a builder with an initially empty buffer and a zero indent value. |
|
XMLTagBuilderVisitor(java.lang.StringBuffer pBuffer)
Create a builder which will use an existing string buffer |
|
XMLTagBuilderVisitor(java.lang.StringBuffer pBuffer,
int pInitialIndent,
java.lang.String pNestedTagRegex)
Create a builder which will use an existing string buffer and which also uses the specified indentation level |
Method Summary | |
---|---|
void |
depart(java.lang.Object pKey,
java.util.Map pMap)
We've enjoyed our visit with this tag but now it's time to say goodbye. |
protected boolean |
shouldGenerate(java.util.Map pOptions)
Return true if the preprocessor has set the "__generate" key to to "true" or if it is not present. |
boolean |
visit(java.lang.Object pKey,
java.util.Map pMap)
Visit a HashMap and possibly generate some XML |
Methods inherited from class atg.search.query.formhandlers.TagBuilder |
---|
addIndent, escape, escape, formatAttributes, getIndent, getMapValueOrNull, getNestedTagPattern, getParentTag, getStringBuffer, getStringValueOrNull, getTagName, hasValue, indent, isNested, setIndent, unindent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public XMLTagBuilderVisitor()
public XMLTagBuilderVisitor(java.lang.StringBuffer pBuffer)
pBuffer
- string buffer to usepublic XMLTagBuilderVisitor(java.lang.StringBuffer pBuffer, int pInitialIndent, java.lang.String pNestedTagRegex)
pBuffer
- string buffer to usepInitialIndent
- initial indentation levelpNestedTagRegex
- the regular expression matching tags which
can contain other tags or null for default
PatternSyntaxException
- If the expression's syntax is
invalidMethod Detail |
---|
public boolean visit(java.lang.Object pKey, java.util.Map pMap)
visit
in interface HashMapMapVisitor
pKey
- key under which the map is stored in parent map or
null if this is the root map. This value is probably only useful
for informational messagespHashMapMap
- the map
public void depart(java.lang.Object pKey, java.util.Map pMap)
depart
in interface HashMapMapVisitor
pKey
- key under which the map is stored in parent map or
null if this is the root mappMap
- the mapprotected boolean shouldGenerate(java.util.Map pOptions)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |