Class XmlRendererANF
- java.lang.Object
-
- com.microstrategy.web.blocks.renderers.AbstractRenderer
-
- com.microstrategy.web.blocks.renderers.XmlRenderer
-
- com.microstrategy.web.blocks.renderers.XmlRendererANF
-
- All Implemented Interfaces:
Renderer
public class XmlRendererANF extends XmlRenderer
This class is the renderer that converts a Block tree into XML Attribute Normal Form. It uses theXmlRendererBlockVisitorANF
class to perform the actual traversal of the Block tree.- Since:
- MicroStrategy Web 9.0.1
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.blocks.renderers.AbstractRenderer
contentEncoders
-
-
Constructor Summary
Constructors Constructor Description XmlRendererANF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Comparator<BlockProperty>
getBlockPropertyComparator()
Returns a comparator used to sort the block properties.protected com.microstrategy.web.blocks.renderers.XmlRendererBlockVisitor
getBlockVisitor(BlockContext context)
The XMLRendererANF will return a block visitor of ANF type.-
Methods inherited from class com.microstrategy.web.blocks.renderers.XmlRenderer
generateMarkup
-
Methods inherited from class com.microstrategy.web.blocks.renderers.AbstractRenderer
setEncoderChain
-
-
-
-
Method Detail
-
getBlockVisitor
protected com.microstrategy.web.blocks.renderers.XmlRendererBlockVisitor getBlockVisitor(BlockContext context)
The XMLRendererANF will return a block visitor of ANF type. The ANF type block visitor will output the XML in the Attribute Normal Form.- Overrides:
getBlockVisitor
in classXmlRenderer
- Parameters:
context
- theBlockContext
object.- Returns:
- the
XmlRendererBlockVisitorANF
object
-
getBlockPropertyComparator
protected java.util.Comparator<BlockProperty> getBlockPropertyComparator()
Returns a comparator used to sort the block properties. The comparator will sort the scalar properties before the composite ones. For the XMLRenderer to output the XML in ANF form it needs to sort the block properties so that all scalar properties are traversed and added as attributes before the composite ones are added as child.- Overrides:
getBlockPropertyComparator
in classXmlRenderer
- Returns:
XmlRendererANF.BlockPropertyComparator
-
-