java.lang.Object | ||
↳ | com.microstrategy.web.blocks.DefaultBlockVisitor | |
↳ | com.microstrategy.web.blocks.renderers.XmlRendererBlockVisitorENF |
![]() |
This class renders a Block tree in XML format, specifically Element Normal Form, where the scalar properties are not represented as attributes, but as elements (with the name of the property defining the name of the element). This renderer does not generate any XML attributes whatsoever.
Here are the rules for converting an arbitrary Block tree into an XML structure:
getDocumentElementName(Block)
. The default implementation returns
"root". The root element has no attributes.getBlockInListElementName(Block)
. The
default implementation returns "block".Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected BlockContext | blockContext | ||||||||||
protected XMLBuilder | xmlBuilder |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
XmlRendererBlockVisitorENF(BlockContext blockContext) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getXML()
Gets the XML generated as a String.
| ||||||||||
void |
visitBlockEnd(Block block, BlockTarget parent)
Invoked for each Block after all of its properties are visited.
| ||||||||||
boolean |
visitBlockStart(Block block, BlockTarget parent)
Invoked for each Block before any of its properties are visited.
| ||||||||||
boolean |
visitCompositeProperty(BlockProperty blockProperty, Block parent, boolean firstAssignedProperty)
Invoked for each composite (Block or BlockList) Block Property.
| ||||||||||
void |
visitListEnd(BlockList blockList, BlockTarget parent)
Invoked at the end of a BlockList.
| ||||||||||
boolean |
visitListStart(BlockList blockList, BlockTarget parent)
Invoked at the beginning of a BlockList.
| ||||||||||
void |
visitScalarProperty(BlockProperty blockProperty, Block parent, boolean firstAssignedProperty)
Invoked for each scalar (non-Block, non-BlockList) Block Property.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getBlockInListElementName(Block block)
Returns the element name to use for a Block in a List.
| ||||||||||
String |
getDocumentElementName(Block rootBlock)
Returns the element name to use for the document element.
| ||||||||||
String |
getNestedListElementName()
Returns the element name to use for a BlockList which appears nested
inside another BlockList.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Gets the XML generated as a String.
Invoked for each Block after all of its properties are visited.
block | The Block being visited. |
---|---|
parent | The BlockTarget that contains the supplied Block.
|
Invoked for each Block before any of its properties are visited.
block | The Block being visited. |
---|---|
parent | The BlockTarget that contains the supplied Block. |
visitBlockEnd(Block, BlockTarget)
.
Invoked for each composite (Block or BlockList) Block Property. In
particular, it is only invoked for BlockProperty instances whose value is
non-null
.
blockProperty | The BlockProperty that has an assigned value. |
---|---|
parent | The Block that contains this BlockProperty. |
firstAssignedProperty | Whether or not this is the first assigned property of the Block. |
Invoked at the end of a BlockList.
blockList | The BlockList that we are visiting. |
---|---|
parent | The BlockTarget that contains the supplied BlockList.
|
Invoked at the beginning of a BlockList.
blockList | The BlockList that we are visiting. |
---|---|
parent | The BlockTarget that contains the supplied BlockList. |
Invoked for each scalar (non-Block, non-BlockList) Block Property. In
particular, it is only invoked for BlockProperty instances whose value is
non-null
.
blockProperty | The BlockProperty that has an assigned value. |
---|---|
parent | The Block that contains this BlockProperty. |
firstAssignedProperty | Whether or not this is the first assigned property of the Block. |
Returns the element name to use for a Block in a List.
block | The block being converted to XML. |
---|
Returns the element name to use for the document element.
rootBlock | The root block being converted to XML. |
---|
Returns the element name to use for a BlockList which appears nested inside another BlockList.