public class

ReportXMLTransform

extends AbstractReportXMLTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.app.transforms.AbstractBasicReportTransform
       ↳ com.microstrategy.web.app.transforms.AbstractReportXMLTransform
         ↳ com.microstrategy.web.app.transforms.ReportXMLTransform
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

ReportXMLTransform is a report transform that generates a simplified version of the report xml.

The XML has the following format:

 <report_data_list @name @id> <!-- Optional (renderReportDataListNode formal parameter)-->
   <error @code>Error Text Here</error>
   <report_data @name @id>
       <prs>
           <prs @psn @n @v/>
           ...
       </prs>
       <objects>
           <attribute @type @id @name @rfd>
                <form @id @name @rfd/>
                 ...
           </attribute>
			<metric @id @type @name @key>
			    <format @dp @nn @cs @cp @ts @cat>
			    full format text goes here
			    </format>
			</metric>
           <consolidation @type @id @name @rfd />
           <custom_group @type @id @name @rfd />
           <dimension @type @id @name @rfd/>
       </objects>
       <template>
            <axis id="1">
                 <unit unit_type="1" @rfd> //attribute
                     <oi @rfd />         //forms
                     <oi @rfd />
                 </unit>
                 <unit unit_type="3">  // metrics collection
                    <oi @rfd />
                    <oi @rfd />
                 </unit>
                 <unit @unit_type @rfd />
                 <unit @unit_type @rfd />
            </axis>
            <axis id="2">
             ...
            </axis>
       </template>
       <raw_data>
           <headers>
               <oi @rfd>
                   <oi @rfd /> // attribute forms appear like this
                   <oi @rfd />
               </oi>
               <oi @rfd />
               <oi @rfd />
               <oi @rfd />
           </headers>
           <rows>
                <r>
                   <v @id>December</v>
                   <v>12</v> // second form value has no id
                   <v>35444</v>
                     ...
                </r>
                <r>
                   <v @id>January</v>
                   <v>1</v> // second form value has no id
                   <v>12000</v>
                     ...
                </r>
                ...
           </rows>
       </raw_data>
   </report_data>
 </report_data_list>
 

Summary

Constants
String FP_EXCLUDE_VISUALIZATION_PROPERTIES
String FP_INCLUDE_MD_PROPERTIES
String FP_INCLUDE_MOBILE_PROPERTIES
String FP_OPTIMIZE_MOBILE_XML
String FP_PAGE_BY_XML
String FP_RENDER_PAGEBY_AXISE
String FP_RENDER_PAGEBY_INFO
String FP_RENDER_STYLES
String FP_SECONDARY_PROVIDER_STYLE
Fields
protected String _errorMessage
public FormalParameter _excludeVisualizationProperties
public FormalParameter _includeMobileProperties
public FormalParameter _optimizeMobileXML
public FormalParameter _pageByXml Formal parameter that contains the page by information in the form of an XML.
public FormalParameter _renderMetricNumberFormattingOnly Formal parameter that determines whether only the metric values have 'style' associated with them and only the FormattingNumber property set is included in the 'styles' section for these metric styles.
public FormalParameter _renderPageByAxis
public FormalParameter _renderPagebyInfo Whether to render page by info
Default value: true
public FormalParameter _renderReportDataListNode Whether to render the root node (report_data_list)
Default value: true
public FormalParameter _renderStyles Whether to render styles
Default value: true
public FormalParameter _renderSubtotals
protected int _rowCount
public FormalParameter _secondaryProviderStyle
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractBasicReportTransform
Public Constructors
ReportXMLTransform()
Public Methods
String getDescription()
TagsFactory getTagsFactory()
Convenience method for obtaining an instance of the TagsFactory class.
void renderXml(MarkupOutput out)
Renders the report's XML.
Protected Methods
Tag addAttributeFormToObjectsTag(Tag parentTag, String id, String name, int rfd, String parentObjectId, int baseFormType, boolean isIDForm)
void addAttributeFormsToObjectsTag(Tag parentTag, WebTemplateAttribute attTemplateUnit, AbstractSimplifiedReportXMLTransform.RefIDCounter rfdCounter)
void addVisPropsProperty(Tag prsTag)
boolean areMetricsOnPages()
boolean doRenderSecondaryDataProviders()
String getDescriptor(int key)

Get the descriptor for the given key.

String getDescriptor(String key)

Get the descriptor for the given key.

HashList getListOfMetricHeaders()
int getPropSetId(String pSetName)
String getValidationMessage()
boolean isSubtotal(WebRow wr)
Determines whether a particular row is to display a subtotal
static boolean isTabular(WebTemplate template)
boolean isValidTemplate()
void renderDefinition(Tag reportDataTag)
Tag renderHeaderValue(Tag rowTag, WebHeader header, String currentElementID, String styleID)
void renderHeaders(Tag rawDataTag)
void renderProperties(Tag reportDataTag)
void renderRawData(Tag reportDataTag)
Tag renderValue(Tag headersTag, String id, String value, String styleID, int semantics, String replaceValue)
void renderValue(Tag rowTag, WebRowValue metricValue)
Tag renderValue(Tag headersTag, String id, String value, String styleID)
void renderValues(Tag reportDataTag)
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractReportXMLTransform
From class com.microstrategy.web.app.transforms.AbstractBasicReportTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.transform.Transform

Constants

public static final String FP_EXCLUDE_VISUALIZATION_PROPERTIES

Constant Value: "excludeVisualizationProperties"

public static final String FP_INCLUDE_MD_PROPERTIES

Constant Value: "includeMDProperties"

public static final String FP_INCLUDE_MOBILE_PROPERTIES

Constant Value: "includeMobileProperties"

public static final String FP_OPTIMIZE_MOBILE_XML

Constant Value: "optimizeMobileXML"

public static final String FP_PAGE_BY_XML

Constant Value: "pageByXML"

public static final String FP_RENDER_PAGEBY_AXISE

Constant Value: "renderPageByAxis"

public static final String FP_RENDER_PAGEBY_INFO

Constant Value: "renderPageByInfo"

public static final String FP_RENDER_STYLES

Constant Value: "renderStyles"

public static final String FP_SECONDARY_PROVIDER_STYLE

Constant Value: "secondaryProviderStyle"

Fields

protected String _errorMessage

public FormalParameter _excludeVisualizationProperties

public FormalParameter _includeMobileProperties

public FormalParameter _optimizeMobileXML

public FormalParameter _pageByXml

Formal parameter that contains the page by information in the form of an XML. When this formal parameter is set, this information is also included in the output of the transform. Also, the rows are re-ordered such that the rows corresponding to the current page by elements are rendered first and then the rest of the rows The XML structure is as follows
<pageby cn="2">
  <pageByUnit id="" unitName="" type="" pos="1" ceid="" cename=""/>
  <pageByUnit id="" unitName="" type="" pos="1" ceid="" cename=""/>
  ...
</pageby>

public FormalParameter _renderMetricNumberFormattingOnly

Formal parameter that determines whether only the metric values have 'style' associated with them and only the FormattingNumber property set is included in the 'styles' section for these metric styles. Default value : true

public FormalParameter _renderPageByAxis

public FormalParameter _renderPagebyInfo

Whether to render page by info
Default value: true

public FormalParameter _renderReportDataListNode

Whether to render the root node (report_data_list)
Default value: true

public FormalParameter _renderStyles

Whether to render styles
Default value: true

public FormalParameter _renderSubtotals

protected int _rowCount

public FormalParameter _secondaryProviderStyle

Public Constructors

public ReportXMLTransform ()

Public Methods

public String getDescription ()

public TagsFactory getTagsFactory ()

Convenience method for obtaining an instance of the TagsFactory class.

Returns
  • a TagsFactory instance to use for generating Tag instances

public void renderXml (MarkupOutput out)

Renders the report's XML.

Protected Methods

protected Tag addAttributeFormToObjectsTag (Tag parentTag, String id, String name, int rfd, String parentObjectId, int baseFormType, boolean isIDForm)

protected void addAttributeFormsToObjectsTag (Tag parentTag, WebTemplateAttribute attTemplateUnit, AbstractSimplifiedReportXMLTransform.RefIDCounter rfdCounter)

protected void addVisPropsProperty (Tag prsTag)

protected boolean areMetricsOnPages ()

protected boolean doRenderSecondaryDataProviders ()

protected String getDescriptor (int key)

Get the descriptor for the given key.

By default this method appends the prefix mstrWeb. to the key to find the resources in the Messages bundle. To find a descriptor for a specific key you might use getDescriptor(String).

If a descriptor is not found for the given key it returns [na]

Parameters
key input key as an int, for example, 1
Returns
  • descriptor as a String corresponding to the key sent in as parameter, for example, Home

protected String getDescriptor (String key)

Get the descriptor for the given key.

The key is searched exactly as given in the Messages bundle.

If a descriptor is not found for the given key it returns [na]

Parameters
key input key as a String, for example, mstrWeb.1 *
Returns
  • descriptor as a String corresponding to the key sent in as parameter, for example, Home.

protected HashList getListOfMetricHeaders ()

protected int getPropSetId (String pSetName)

protected String getValidationMessage ()

protected boolean isSubtotal (WebRow wr)

Determines whether a particular row is to display a subtotal

protected static boolean isTabular (WebTemplate template)

protected boolean isValidTemplate ()

protected void renderDefinition (Tag reportDataTag)

protected Tag renderHeaderValue (Tag rowTag, WebHeader header, String currentElementID, String styleID)

protected void renderHeaders (Tag rawDataTag)

protected void renderProperties (Tag reportDataTag)

protected void renderRawData (Tag reportDataTag)

protected Tag renderValue (Tag headersTag, String id, String value, String styleID, int semantics, String replaceValue)

protected void renderValue (Tag rowTag, WebRowValue metricValue)

protected Tag renderValue (Tag headersTag, String id, String value, String styleID)

protected void renderValues (Tag reportDataTag)