Class LevelHandle

  • All Implemented Interfaces:
    org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.ILevelModel
    Direct Known Subclasses:
    OdaLevelHandle, TabularLevelHandle

    public abstract class LevelHandle
    extends ReportElementHandle
    implements org.eclipse.birt.report.model.elements.interfaces.ILevelModel
    Represents a level element.
    See Also:
    Level
    • Constructor Detail

      • LevelHandle

        public LevelHandle​(org.eclipse.birt.report.model.core.Module module,
                           org.eclipse.birt.report.model.core.DesignElement element)
        Constructs a handle for the given design and design element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.
        Parameters:
        module - the module
        element - the model representation of the element
    • Method Detail

      • attributesIterator

        public java.util.Iterator attributesIterator()
        Returns the iterator of attributes. The element in the iterator is a LevelAttributeHandle for TabularLevel. To OdaLevel, each member is OdaLevelAttributeHandle.
        Returns:
        the iterator of attribute string list
      • staticValuesIterator

        public java.util.Iterator staticValuesIterator()
        Returns the iterator of static values. The element in the iterator is instanceof RuleHandle.
        Returns:
        iterator of static values
      • setIntervalBase

        public void setIntervalBase​(java.lang.String intervalBase)
                             throws SemanticException
        Sets the base of the interval property of this level.IntervalBase, in conjunction with Interval and IntervalRange, determines how data is divided into levels.
        Parameters:
        intervalBase - interval base property value.
        Throws:
        SemanticException - if the property is locked.
      • getIntervalBase

        public java.lang.String getIntervalBase()
        Return the interval base property value of this level.
        Returns:
        interval baseF property value of this level.
      • getInterval

        public java.lang.String getInterval()
        Returns the interval of this level. The return value is defined in DesignChoiceConstants and can be one of:
        • INTERVAL_NONE
        • INTERVAL_PREFIX
        • INTERVAL_INTERVAL
        Returns:
        the interval value as a string
      • setInterval

        public void setInterval​(java.lang.String interval)
                         throws SemanticException
        Returns the interval of this level. The input value is defined in DesignChoiceConstants and can be one of:
        • INTERVAL_NONE
        • INTERVAL_PREFIX
        • INTERVAL_INTERVAL
        Parameters:
        interval - the interval value as a string
        Throws:
        SemanticException - if the property is locked or the input value is not one of the above.
      • getIntervalRange

        public double getIntervalRange()
        Returns the interval range of this level.
        Returns:
        the interval range value as a double
      • setIntervalRange

        public void setIntervalRange​(double intervalRange)
                              throws SemanticException
        Returns the interval range of this level.
        Parameters:
        intervalRange - the interval range value as a double
        Throws:
        SemanticException - if the property is locked.
      • setIntervalRange

        public void setIntervalRange​(java.lang.String intervalRange)
                              throws SemanticException
        Sets the interval range of this level.
        Parameters:
        intervalRange - the interval range value as a string.value is locale dependent.
        Throws:
        SemanticException - if the property is locked.
      • getLevelType

        public java.lang.String getLevelType()
        Returns the level type of this level. The returned value is one of:
        • LEVEL_TYPE_DYNAMIC
        • LEVEL_TYPE_MIRRORED
        Returns:
        the level type
      • setLevelType

        public void setLevelType​(java.lang.String levelType)
                          throws SemanticException
        Sets the level type. The input value is defined in DesignChoiceConstants and can be one of:
        • LEVEL_TYPE_DYNAMIC
        • LEVEL_TYPE_MIRRORED
        Parameters:
        levelType -
        Throws:
        SemanticException
      • getDataType

        public java.lang.String getDataType()
        Returns the data type of this level. The possible values are defined in DesignChoiceConstants, and they are:
        • COLUMN_DATA_TYPE_ANY
        • COLUMN_DATA_TYPE_INTEGER
        • COLUMN_DATA_TYPE_STRING
        • COLUMN_DATA_TYPE_DATETIME
        • COLUMN_DATA_TYPE_DECIMAL
        • COLUMN_DATA_TYPE_FLOAT
        • COLUMN_DATA_TYPE_STRUCTURE
        • COLUMN_DATA_TYPE_TABLE
        Returns:
        the data type of this level.
      • setDataType

        public void setDataType​(java.lang.String dataType)
                         throws SemanticException
        Sets the data type of this level. The allowed values are defined in DesignChoiceConstants, and they are:
        • COLUMN_DATA_TYPE_ANY
        • COLUMN_DATA_TYPE_INTEGER
        • COLUMN_DATA_TYPE_STRING
        • COLUMN_DATA_TYPE_DATETIME
        • COLUMN_DATA_TYPE_DECIMAL
        • COLUMN_DATA_TYPE_FLOAT
        • COLUMN_DATA_TYPE_STRUCTURE
        • COLUMN_DATA_TYPE_TABLE
        Parameters:
        dataType - the data type to set
        Throws:
        SemanticException - if the dataType is not in the choice list.
      • valueAccessControlsIterator

        public java.util.Iterator valueAccessControlsIterator()
        Returns an iterator for the value access controls. Each object returned is of type ValueAccessControlHandle.
        Returns:
        the iterator for user accesses defined on this cube.
      • getDateTimeLevelType

        public java.lang.String getDateTimeLevelType()
        Returns the date-time type of this level. The possible values are defined in DesignChoiceConstants, and they are:
        • DATE_TIME_LEVEL_TYPE_YEAR
        • DATE_TIME_LEVEL_TYPE_MONTH
        • DATE_TIME_LEVEL_TYPE_QUARTER
        • DATE_TIME_LEVEL_TYPE_WEEK
        • DATE_TIME_LEVEL_TYPE_DAY
        • DATE_TIME_LEVEL_TYPE_HOUR
        • DATE_TIME_LEVEL_TYPE_MINUTE
        • DATE_TIME_LEVEL_TYPE_SECOND
        Returns:
        the date-time type of this level.
      • setDateTimeLevelType

        public void setDateTimeLevelType​(java.lang.String dateTimeType)
                                  throws SemanticException
        Sets the date-time type of this level. The allowed values are defined in DesignChoiceConstants, and they are:
        • DATE_TIME_LEVEL_TYPE_YEAR
        • DATE_TIME_LEVEL_TYPE_MONTH
        • DATE_TIME_LEVEL_TYPE_QUARTER
        • DATE_TIME_LEVEL_TYPE_WEEK
        • DATE_TIME_LEVEL_TYPE_DAY
        • DATE_TIME_LEVEL_TYPE_HOUR
        • DATE_TIME_LEVEL_TYPE_MINUTE
        • DATE_TIME_LEVEL_TYPE_SECOND
        Parameters:
        dateTimeType - the date-time type to set
        Throws:
        SemanticException - if the dateTimeType is not in the choice list.
      • getDateTimeFormat

        public java.lang.String getDateTimeFormat()
        Returns the date-time format of this level.
        Returns:
        the date-time format of this level.
      • setDateTimeFormat

        public void setDateTimeFormat​(java.lang.String dateTimeFormat)
                               throws SemanticException
        Sets the date-time format of this level.
        Parameters:
        dateTimeFormat - the date-time format to set
        Throws:
        SemanticException - if the date-time-format is locked
      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
                             throws SemanticException
        Sets the default value of this level.
        Parameters:
        defaultValue - the default value.
        Throws:
        SemanticException
      • getDefaultValue

        public java.lang.String getDefaultValue()
        Gets the default value of this level.
        Returns:
        the default value.
      • getACLExpression

        public ExpressionHandle getACLExpression()
        Gets the expression handle for the ACLExpression property.
        Returns:
      • getMemberACLExpression

        public ExpressionHandle getMemberACLExpression()
        Gets the expression handle for the ACL expression for any member of this level.
        Returns:
      • getActionHandle

        public ActionHandle getActionHandle()
        Returns a handle to work with the action property, action is a structure that defines a hyperlink.
        Returns:
        a handle to the action property, return null if the action has not been set on the level.
        See Also:
        ActionHandle
      • setAction

        public ActionHandle setAction​(Action action)
                               throws SemanticException
        Set an action on the level.
        Parameters:
        action - new action to be set on the level, it represents a bookmark link, hyper-link, and drill through etc.
        Returns:
        a handle to the action property, return null if the action has not been set on the level.
        Throws:
        SemanticException - if member of the action is not valid.
      • actionsIterator

        public java.util.Iterator<ActionHandle> actionsIterator()
        Returns the iterator for action defined on this level.
        Returns:
        the iterator for Action structure list defined on this level
      • getFormat

        public FormatValueHandle getFormat()
        Gets the format of the level.
        Returns:
        the format, or null if not set.
      • getAlignment

        public java.lang.String getAlignment()
        Gets the alignment of the level. The returned value may be one of the following constants defined in DesignChoiceConstants:
        • TEXT_ALIGN_LEFT
        • TEXT_ALIGN_CENTER
        • TEXT_ALIGN_RIGHT
        • TEXT_ALIGN_JUSTIFY
        Returns:
        the alignment of the level.
      • setAlignment

        public void setAlignment​(java.lang.String alignment)
                          throws SemanticException
        Sets the alignment of the level. The value to set should be one of the following constants defined in DesignChoiceConstants:
        • TEXT_ALIGN_LEFT
        • TEXT_ALIGN_CENTER
        • TEXT_ALIGN_RIGHT
        • TEXT_ALIGN_JUSTIFY
        Parameters:
        alignment - the new alignment to set.
        Throws:
        SemanticException