Class ReportXMLTransform
- 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
-
- All Implemented Interfaces:
Transform
- Direct Known Subclasses:
IPhoneReportDataXMLTransform
,IPhoneReportXMLTransform
public class ReportXMLTransform extends AbstractReportXMLTransform
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>
- Since:
- MicroStrategy Web 8.0.2
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_errorMessage
FormalParameter
_excludeVisualizationProperties
FormalParameter
_includeMobileProperties
FormalParameter
_optimizeMobileXML
FormalParameter
_pageByXml
Formal parameter that contains the page by information in the form of an XML.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.FormalParameter
_renderPageByAxis
FormalParameter
_renderPagebyInfo
Whether to render page by info
Default value: trueFormalParameter
_renderReportDataListNode
Whether to render the root node (report_data_list)
Default value: trueFormalParameter
_renderStyles
Whether to render styles
Default value: trueFormalParameter
_renderSubtotals
protected int
_rowCount
FormalParameter
_secondaryProviderStyle
static java.lang.String
FP_EXCLUDE_VISUALIZATION_PROPERTIES
static java.lang.String
FP_INCLUDE_MD_PROPERTIES
static java.lang.String
FP_INCLUDE_MOBILE_PROPERTIES
static java.lang.String
FP_OPTIMIZE_MOBILE_XML
static java.lang.String
FP_PAGE_BY_XML
static java.lang.String
FP_RENDER_PAGEBY_AXISE
static java.lang.String
FP_RENDER_PAGEBY_INFO
static java.lang.String
FP_RENDER_STYLES
static java.lang.String
FP_SECONDARY_PROVIDER_STYLE
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractBasicReportTransform
_bean, _rb, _rwb, _vb
-
-
Constructor Summary
Constructors Constructor Description ReportXMLTransform()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAttributeFormsToObjectsTag(Tag parentTag, WebTemplateAttribute attTemplateUnit, com.microstrategy.web.app.transforms.AbstractSimplifiedReportXMLTransform.RefIDCounter rfdCounter)
protected Tag
addAttributeFormToObjectsTag(Tag parentTag, java.lang.String id, java.lang.String name, int rfd, java.lang.String parentObjectId, int baseFormType, boolean isIDForm)
protected void
addVisPropsProperty(Tag prsTag)
protected boolean
areMetricsOnPages()
protected boolean
doRenderSecondaryDataProviders()
java.lang.String
getDescription()
Returns a textual description of the transform.protected java.lang.String
getDescriptor(int key)
Get the descriptor for the given key.protected java.lang.String
getDescriptor(java.lang.String key)
Get the descriptor for the given key.protected HashList
getListOfMetricHeaders()
protected int
getPropSetId(java.lang.String pSetName)
TagsFactory
getTagsFactory()
Convenience method for obtaining an instance of theTagsFactory
class.protected java.lang.String
getValidationMessage()
protected boolean
isSubtotal(WebRow wr)
Determines whether a particular row is to display a subtotalprotected static boolean
isTabular(WebTemplate template)
protected boolean
isValidTemplate()
protected void
renderDefinition(Tag reportDataTag)
protected void
renderHeaders(Tag rawDataTag)
protected Tag
renderHeaderValue(Tag rowTag, WebHeader header, java.lang.String currentElementID, java.lang.String styleID)
protected void
renderProperties(Tag reportDataTag)
protected void
renderRawData(Tag reportDataTag)
protected void
renderValue(Tag rowTag, WebRowValue metricValue)
protected Tag
renderValue(Tag headersTag, java.lang.String id, java.lang.String value, java.lang.String styleID)
protected Tag
renderValue(Tag headersTag, java.lang.String id, java.lang.String value, java.lang.String styleID, int semantics, java.lang.String replaceValue)
protected void
renderValues(Tag reportDataTag)
void
renderXml(MarkupOutput out)
Renders the report's XML.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractReportXMLTransform
encodeXMLText, getWebTemplate, initGridData, render
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractBasicReportTransform
addFormalParameter, getElemsMapHelper, getGraphBean, getGridData, getHyperLinkHelper, getReportBean, getRWBean, getSupportedBeanType, getViewBean, getWebGridData, getWebReportGrid, initBeans, isDesignMode, isFeatureAvailable, isReport, isTrue, supports, transform
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports
-
-
-
-
Field Detail
-
_rowCount
protected int _rowCount
-
_errorMessage
protected java.lang.String _errorMessage
-
_renderReportDataListNode
public FormalParameter _renderReportDataListNode
Whether to render the root node (report_data_list)
Default value: true
-
_renderMetricNumberFormattingOnly
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
- Since:
- MicroStrategy Web 8.1.0
-
_renderSubtotals
public FormalParameter _renderSubtotals
- Since:
- MicroStrategy Web 8.1.1
-
_secondaryProviderStyle
public FormalParameter _secondaryProviderStyle
- Since:
- MicroStrategy Web 8.1.1
-
FP_SECONDARY_PROVIDER_STYLE
public static final java.lang.String FP_SECONDARY_PROVIDER_STYLE
- Since:
- MicroStrategy Web 8.1.1
- See Also:
- Constant Field Values
-
_excludeVisualizationProperties
public FormalParameter _excludeVisualizationProperties
- Since:
- MicroStrategy Web 8.1.1
-
FP_EXCLUDE_VISUALIZATION_PROPERTIES
public static final java.lang.String FP_EXCLUDE_VISUALIZATION_PROPERTIES
- Since:
- MicroStrategy Web 8.1.1
- See Also:
- Constant Field Values
-
_optimizeMobileXML
public FormalParameter _optimizeMobileXML
- Since:
- MicroStrategy Web 8.1.2
-
FP_OPTIMIZE_MOBILE_XML
public static final java.lang.String FP_OPTIMIZE_MOBILE_XML
- Since:
- MicroStrategy Web 8.1.2
- See Also:
- Constant Field Values
-
_includeMobileProperties
public FormalParameter _includeMobileProperties
- Since:
- MicroStrategy Web 8.1.2
-
FP_INCLUDE_MOBILE_PROPERTIES
public static final java.lang.String FP_INCLUDE_MOBILE_PROPERTIES
- Since:
- MicroStrategy Web 8.1.2
- See Also:
- Constant Field Values
-
_renderPagebyInfo
public FormalParameter _renderPagebyInfo
Whether to render page by info
Default value: true
-
FP_RENDER_PAGEBY_INFO
public static final java.lang.String FP_RENDER_PAGEBY_INFO
- See Also:
- Constant Field Values
-
_renderStyles
public FormalParameter _renderStyles
Whether to render styles
Default value: true
-
FP_RENDER_STYLES
public static final java.lang.String FP_RENDER_STYLES
- See Also:
- Constant Field Values
-
_renderPageByAxis
public FormalParameter _renderPageByAxis
-
FP_RENDER_PAGEBY_AXISE
public static final java.lang.String FP_RENDER_PAGEBY_AXISE
- See Also:
- Constant Field Values
-
_pageByXml
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>
-
FP_PAGE_BY_XML
public static final java.lang.String FP_PAGE_BY_XML
- See Also:
- Constant Field Values
-
FP_INCLUDE_MD_PROPERTIES
public static final java.lang.String FP_INCLUDE_MD_PROPERTIES
- See Also:
- Constant Field Values
-
-
Method Detail
-
renderXml
public void renderXml(MarkupOutput out)
Description copied from class:AbstractReportXMLTransform
Renders the report's XML.- Specified by:
renderXml
in classAbstractReportXMLTransform
- Since:
- MicroStrategy Web 8.1.1
-
doRenderSecondaryDataProviders
protected boolean doRenderSecondaryDataProviders()
-
getValidationMessage
protected java.lang.String getValidationMessage()
-
isValidTemplate
protected boolean isValidTemplate() throws MSTRCheckedException
- Throws:
MSTRCheckedException
-
isTabular
protected static boolean isTabular(WebTemplate template)
-
renderDefinition
protected void renderDefinition(Tag reportDataTag) throws WebObjectsException, WebBeanException
- Throws:
WebObjectsException
WebBeanException
-
renderProperties
protected void renderProperties(Tag reportDataTag)
-
addVisPropsProperty
protected void addVisPropsProperty(Tag prsTag)
-
renderRawData
protected void renderRawData(Tag reportDataTag) throws WebObjectsException, WebBeanException
- Throws:
WebObjectsException
WebBeanException
-
renderHeaders
protected void renderHeaders(Tag rawDataTag) throws WebObjectsException
- Throws:
WebObjectsException
-
getListOfMetricHeaders
protected HashList getListOfMetricHeaders() throws WebObjectsException
- Throws:
WebObjectsException
-
areMetricsOnPages
protected boolean areMetricsOnPages()
-
renderValues
protected void renderValues(Tag reportDataTag) throws WebObjectsException
- Throws:
WebObjectsException
-
renderValue
protected void renderValue(Tag rowTag, WebRowValue metricValue)
-
renderHeaderValue
protected Tag renderHeaderValue(Tag rowTag, WebHeader header, java.lang.String currentElementID, java.lang.String styleID)
-
renderValue
protected Tag renderValue(Tag headersTag, java.lang.String id, java.lang.String value, java.lang.String styleID)
-
renderValue
protected Tag renderValue(Tag headersTag, java.lang.String id, java.lang.String value, java.lang.String styleID, int semantics, java.lang.String replaceValue)
-
isSubtotal
protected boolean isSubtotal(WebRow wr)
Determines whether a particular row is to display a subtotal- Parameters:
wr
-
-
getDescription
public java.lang.String getDescription()
Description copied from interface:Transform
Returns a textual description of the transform.- Returns:
- The textual description of the transform.
-
getDescriptor
protected java.lang.String getDescriptor(int key)
Get the descriptor for the given key.
By default this method appends the prefix
If a descriptor is not found for the given key it returns [na]mstrWeb.
to the key to find the resources in the Messages bundle. To find a descriptor for a specific key you might usegetDescriptor(String)
.- Parameters:
key
- input key as anint
, for example,1
- Returns:
- descriptor as a
String
corresponding to the key sent in as parameter, for example,
Home
-
getDescriptor
protected java.lang.String getDescriptor(java.lang.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 aString
, for example,mstrWeb.1
*- Returns:
- descriptor as a
String
corresponding to the key sent in as parameter, for example,
Home
. - Since:
- MicroStrategy Web 8.0.0
-
addAttributeFormsToObjectsTag
protected void addAttributeFormsToObjectsTag(Tag parentTag, WebTemplateAttribute attTemplateUnit, com.microstrategy.web.app.transforms.AbstractSimplifiedReportXMLTransform.RefIDCounter rfdCounter)
-
addAttributeFormToObjectsTag
protected Tag addAttributeFormToObjectsTag(Tag parentTag, java.lang.String id, java.lang.String name, int rfd, java.lang.String parentObjectId, int baseFormType, boolean isIDForm)
-
getTagsFactory
public TagsFactory getTagsFactory()
Convenience method for obtaining an instance of theTagsFactory
class.- Returns:
- a
TagsFactory
instance to use for generatingTag
instances
-
getPropSetId
protected int getPropSetId(java.lang.String pSetName)
-
-