atg.search.query.formhandlers
Class XMLPreProcessorVisitor

java.lang.Object
  extended by atg.search.query.formhandlers.TagBuilder
      extended by atg.search.query.formhandlers.XMLPreProcessorVisitor
All Implemented Interfaces:
HashMapMapVisitor

public class XMLPreProcessorVisitor
extends TagBuilder
implements HashMapMapVisitor

This class provides a first pass over constraints to simplify tag output. Currently, it just sets the "opts.__generate" flag based on the value of "opts.generate". The XMLTagBuilderVisitor reads "opts.__generate" to know whether or not to generate the tag.


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
XMLPreProcessorVisitor()
          Create an XMLPreProcessorVisitor
 
Method Summary
 void depart(java.lang.Object pKey, java.util.Map pTag)
          On the way back up, after visiting any sub-tags.
protected  java.util.Map getContext()
          Get the current context
protected  java.util.Map popContext()
          Pop the context
protected  java.util.Map pushContext()
          Push the context
 boolean visit(java.lang.Object pKey, java.util.Map pMap)
          Visit a HashMap and 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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

XMLPreProcessorVisitor

public XMLPreProcessorVisitor()
Create an XMLPreProcessorVisitor

Method Detail

pushContext

protected java.util.Map pushContext()
Push the context

Returns:
the new context

popContext

protected java.util.Map popContext()
Pop the context

Returns:
the popped context

getContext

protected java.util.Map getContext()
Get the current context

Returns:
the current context

visit

public boolean visit(java.lang.Object pKey,
                     java.util.Map pMap)
Visit a HashMap and generate some XML

Specified by:
visit in interface HashMapMapVisitor
Parameters:
pKey - key under which the map is stored in parent map or null if this is the root map
pHashMapMap - the map

depart

public void depart(java.lang.Object pKey,
                   java.util.Map pTag)
On the way back up, after visiting any sub-tags.

Specified by:
depart in interface HashMapMapVisitor
Parameters:
pKey - the key for this tag or null if root
pTag - a map which may contain a tag definition