Class 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 the XmlRendererBlockVisitorANF class to perform the actual traversal of the Block tree.
    Since:
    MicroStrategy Web 9.0.1
    • Constructor Detail

      • XmlRendererANF

        public XmlRendererANF()
    • 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 class XmlRenderer
        Parameters:
        context - the BlockContext 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 class XmlRenderer
        Returns:
        XmlRendererANF.BlockPropertyComparator