Class StructureHandle

Direct Known Subclasses:
ActionHandle, AggregationArgumentHandle, CachedMetaDataHandle, CalculationArgumentHandle, ColumnHintHandle, ComputedColumnHandle, ConfigVariableHandle, CustomColorHandle, DataSetParameterHandle, DimensionConditionHandle, DimensionJoinConditionHandle, EmbeddedImageHandle, ExtendedPropertyHandle, FilterConditionHandle, FormatValueHandle, HideRuleHandle, IncludedCssStyleSheetHandle, IncludedLibraryHandle, IncludeScriptHandle, JoinConditionHandle, LevelAttributeHandle, OdaDesignerStateHandle, ParamBindingHandle, PropertyBindingHandle, PropertyMaskHandle, ResultSetColumnHandle, RuleHandle, ScriptLibHandle, SearchKeyHandle, SelectionChoiceHandle, SortHintHandle, SortKeyHandle, StyleRuleHandle, TimeIntervalHandle, TOCHandle

public class StructureHandle extends ValueHandle
Handle to a structure within a list property. List properties contain objects called structures. Structures have members that hold data values.
See Also:
  • Field Details

    • structContext

      protected org.eclipse.birt.report.model.core.StructureContext structContext
      Reference to the structure.
  • Constructor Details

    • StructureHandle

      public StructureHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext context)
      Constructs a handle for a structure within a list property of a given element.
      Parameters:
      element - handle to the report element.
      context - context of the structure
    • StructureHandle

      @Deprecated public StructureHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef ref)
      Deprecated.
      Constructs a handle for a structure within a list property of a given element.
      Parameters:
      element - handle to the report element.
      ref - reference to the structure
    • StructureHandle

      public StructureHandle(SimpleValueHandle valueHandle, int index)
      Constructs a handle for a structure within a list property or a structure member.
      Parameters:
      valueHandle - handle to a list property or member
      index - index of the structure within the list
  • Method Details

    • getPropertyDefn

      public IElementPropertyDefn getPropertyDefn()
      Description copied from class: ValueHandle
      Gets the property definition. This is the definition of the property that contains the specific value. If the value is a structure or member, then this is the definition of the property that contains the list that contains the structure that contains the member.
      Specified by:
      getPropertyDefn in class ValueHandle
      Returns:
      the property definition
    • getStructure

      public IStructure getStructure()
      Returns the structure. The application can cast this to the specific structure type to query the structure directly. Note: do not modify the structure directly; use the MemberHandle class for all modifications.
      Returns:
      the structure
    • getProperty

      public Object getProperty(String memberName)
      Gets the value of a member.
      Parameters:
      memberName - name of the member to get
      Returns:
      String value of the member, or null if the member is not set or is not found.
    • getStringProperty

      protected String getStringProperty(String memberName)
      Get the string value of a member.
      Parameters:
      memberName - name of the member to get
      Returns:
      String value of the member, or null if the member is not set or is not found.
    • getIntProperty

      protected int getIntProperty(String memberName)
      Get the integer value of a member.
      Parameters:
      memberName - name of the member to get
      Returns:
      integer value of the member, or 0 if the member is not set or is not defined.
    • setProperty

      public void setProperty(String memberName, Object value) throws SemanticException
      Sets the value of the member.
      Parameters:
      memberName - name of the member to set.
      value - the value to set
      Throws:
      SemanticException - if the member name is not defined on the structure or the value is not valid for the member.
    • setPropertySilently

      protected final void setPropertySilently(String memberName, Object value)
      Set the value of a member without throwing exceptions. That is the set operation should not failed. This method is designed to be called by the sub-class where that it is certain that a set operation should never failed.

      Note that this method will internal swallow exceptions thrown when performing the set operation. The exception will be deemed as internal error. So calling this method when you are sure that exception is a programming error.

      Parameters:
      memberName - name of the member to set.
      value - value to set.
    • getDefn

      public IStructureDefn getDefn()
      Returns the definition of the structure.
      Returns:
      the structure definition
    • getMember

      public MemberHandle getMember(String memberName)
      Returns a handle to a structure member.
      Parameters:
      memberName - the name of the member
      Returns:
      a handle to the member or null if the member is not defined on the structure.
    • iterator

      public Iterator iterator()
      Returns an iterator over the members of this structure. The iterator is of type MemberIterator.
      Returns:
      an iterator over the members of the structure.
      See Also:
    • getContext

      public org.eclipse.birt.report.model.core.StructureContext getContext()
      Description copied from class: ValueHandle
      Returns the structure context to the value. The context is used to identify a list entry or member.
      Specified by:
      getContext in class ValueHandle
    • drop

      public void drop() throws PropertyValueException
      Removes this structure from a list property or member. Once the structure is dropped, the handle should not be used to do any setter operations.
      Throws:
      PropertyValueException - if the structure is not contained in the list.
    • getExternalizedValue

      public String getExternalizedValue(String textIDProp, String textProp)
      Returns externalized message.
      Parameters:
      textIDProp - name of the property that defines the message key
      textProp - name of the property that defines the default non-externalized value if the key is not found in message file
      Returns:
      externalized message if found, otherwise return the default non-externalized value defined by property textProp
    • getExternalizedValue

      public String getExternalizedValue(String textIDProp, String textProp, com.ibm.icu.util.ULocale locale)
      Returns the externalized message.
      Parameters:
      textIDProp - name of the property that defines the message key
      textProp - name of the property that defines the default non-externalized value if the key is not found in message file
      locale - the user-defined locale
      Returns:
      externalized message if found, otherwise return the default non-externalized value defined by property textProp
    • isDesignTime

      public boolean isDesignTime()
      Justifies whether this structure handle is generated in design time.
      Returns:
      if the structure handle is generated in design time, otherwise return .
    • setDesignTime

      public void setDesignTime(boolean isDesignTime) throws SemanticException
      Parameters:
      isDesignTime -
      Throws:
      SemanticException
    • setExpressionProperty

      public void setExpressionProperty(String memberName, Expression value) throws SemanticException
      Sets the value of the member as an expression.
      Parameters:
      memberName - name of the member to set.
      value - the expression to set
      Throws:
      SemanticException - if the member name is not defined on the structure or the value is not valid for the member.
    • getExpressionProperty

      public ExpressionHandle getExpressionProperty(String memberName)
      Gets the value of the member as an expression.
      Parameters:
      memberName - name of the member to set.
      Returns:
      the expression
      Throws:
      SemanticException - if the member name is not defined on the structure or the value is not valid for the member.
    • isLocal

      public boolean isLocal(String memberName)
      Determines whether this value is set locally for the given member in this structure. It is set if and only if it is defined on this structure local property.
      Returns:
      true if the local value is set, otherwise false.