Class 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 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
      • 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_INCLUDE_MD_PROPERTIES

        public static final java.lang.String FP_INCLUDE_MD_PROPERTIES
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReportXMLTransform

        public ReportXMLTransform()
    • Method Detail

      • doRenderSecondaryDataProviders

        protected boolean doRenderSecondaryDataProviders()
      • getValidationMessage

        protected java.lang.String getValidationMessage()
      • isTabular

        protected static boolean isTabular​(WebTemplate template)
      • renderProperties

        protected void renderProperties​(Tag reportDataTag)
      • addVisPropsProperty

        protected void addVisPropsProperty​(Tag prsTag)
      • areMetricsOnPages

        protected boolean areMetricsOnPages()
      • 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 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
      • 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 a String, 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 the TagsFactory class.
        Returns:
        a TagsFactory instance to use for generating Tag instances
      • getPropSetId

        protected int getPropSetId​(java.lang.String pSetName)