Class Overview
This class renders a Block tree in XML format, specifically Attribute Normal
Form, where the scalar properties are represented as attributes.
Here are the rules for converting an arbitrary Block tree into an XML
structure:
- The name of the root element is determined by calling the method
getDocumentElementName(Block)
. The default implementation returns
"root".
- The scalar properties are represented as attributes.
Scalar-based properties use the name of the BlockProperty as the attribute
name and the value of the BlockProperty as the attribute value.
- Block-based properties use the name of the BlockProperty as the element
name. The properties of this child Block become the attributes of it using the rule described above.
- List-based properties use the name of the BlockProperty as the element
name. However, as the elements of a list have no names (and
are only listed one after another), the name of the element that is used for
this list element is found by calling
getBlockInListElementName(Block)
. The
default implementation returns "block".
Summary
[Expand]
Inherited Methods |
From class
com.microstrategy.web.blocks.renderers.XmlRendererBlockVisitorENF
|
From class
com.microstrategy.web.blocks.DefaultBlockVisitor
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.
|
void
|
visitUnassignedProperty(BlockProperty blockProperty, Block parent)
Invoked for each unassigned block property.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
com.microstrategy.web.blocks.BlockVisitor
abstract
void
|
visitBlockEnd(Block block, BlockTarget parent)
Invoked for each Block after all of its properties are visited.
|
abstract
boolean
|
visitBlockStart(Block block, BlockTarget parent)
Invoked for each Block before any of its properties are visited.
|
abstract
boolean
|
visitCompositeProperty(BlockProperty blockProperty, Block parent, boolean firstAssignedProperty)
Invoked for each composite (Block or BlockList) Block Property.
|
abstract
void
|
visitListEnd(BlockList blockList, BlockTarget parent)
Invoked at the end of a BlockList.
|
abstract
boolean
|
visitListStart(BlockList blockList, BlockTarget parent)
Invoked at the beginning of a BlockList.
|
abstract
void
|
visitScalarProperty(BlockProperty blockProperty, Block parent, boolean firstAssignedProperty)
Invoked for each scalar (non-Block, non-BlockList) Block Property.
|
abstract
void
|
visitUnassignedProperty(BlockProperty blockProperty, Block parent)
Invoked for each unassigned block property.
|
|
Public Constructors
public
XmlRendererBlockVisitorANF
(BlockContext blockContext)
Public Methods
public
void
visitScalarProperty
(BlockProperty blockProperty, Block parent, boolean firstAssignedProperty)
Invoked for each scalar (non-Block, non-BlockList) Block Property. In
particular, it is only invoked for BlockProperty instances whose value is
non-null
.
Parameters
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.
|