Class FormContainerMetaData

java.lang.Object
de.xima.fc.mdl.fdv.form.FormContainerMetaData
All Implemented Interfaces:
IFormContainerMetaData, Serializable

public class FormContainerMetaData extends Object implements IFormContainerMetaData, Serializable
See Also:
  • Constructor Details

    • FormContainerMetaData

      public FormContainerMetaData(String containerName, ArrayList<Integer> rows)
    • FormContainerMetaData

      public FormContainerMetaData(String containerName, List<Integer> rows)
    • FormContainerMetaData

      public FormContainerMetaData(String containerName)
  • Method Details

    • getFieldList

      public Set<String> getFieldList()
      Specified by:
      getFieldList in interface IFormContainerMetaData
      Returns:
      The field names of all repeated instances of the form field.
    • getSize

      public int getSize()
      Specified by:
      getSize in interface IFormContainerMetaData
      Returns:
      The number of existing repetition of the form field.
    • getContainerName

      public String getContainerName()
      Specified by:
      getContainerName in interface IFormContainerMetaData
      Returns:
      The name of the repeated container that contains this element. May be the element itself.
    • containsFormField

      @Deprecated public Boolean containsFormField(String fieldName)
      Deprecated.
      Checks whether getFieldList() contains the given field name.
      Parameters:
      fieldName - Name of a field to check.
      Returns:
      Whether this container includes the given field name.
    • containsField

      public boolean containsField(String fieldName)
      Specified by:
      containsField in interface IFormContainerMetaData
      Parameters:
      fieldName - Name to check.
      Returns:
      Whether a repetition of the form element with the given name exists. Same as checking the IFormContainerMetaData.getFieldList().
    • getIdList

      public List<Integer> getIdList()
      Specified by:
      getIdList in interface IFormContainerMetaData
      Returns:
      The repetition IDs of all repeated instances of the form field.
    • addFormField

      public void addFormField(String fieldName, Integer index)
      Specified by:
      addFormField in interface IFormContainerMetaData
    • setSize

      @Deprecated public void setSize(Integer size)
      Parameters:
      size - New size to set.
    • resolveIndex

      public Integer resolveIndex(Integer inputIndex)
      Parameters:
      inputIndex - Index to resolve.
      Returns:
      The ID corresponding to the index.
    • ordinalIndexToRepetitionId

      public Integer ordinalIndexToRepetitionId(Integer inputIndex)
      Description copied from interface: IFormContainerMetaData
      Finds the repetition ID for an ordinal index (the nth repetition of the element). For example, when there are three element repetitions, the first could be tf1_dyn_tf1_4, the seconds could be tf1_dyn_tf1_9, and the third could be tf1_dyn_tf1_15. Then this method would return ordinalToRepetitionId(0) == 4, ordinalToRepetitionId(1) == 9, and ordinalToRepetitionId(2) = 15. All other parameters return -1.
      Specified by:
      ordinalIndexToRepetitionId in interface IFormContainerMetaData
      Parameters:
      inputIndex - Repetition ID of the given repetition.
      Returns:
      Ordinal index of the element repetition. -1 when no element with the given repetition index exists.
    • repetitionIdToOrdinalIndex

      public Integer repetitionIdToOrdinalIndex(Integer inputIndex)
      Description copied from interface: IFormContainerMetaData
      Finds the ordinal index for a repetition ID. For example, when there are three element repetitions, the first could be tf1_dyn_tf1_4, the seconds could be tf1_dyn_tf1_9, and the third could be tf1_dyn_tf1_15. Then this method would return repetitionIdToOrdinalIndex(4) == 0, repetitionIdToOrdinalIndex(9) == 1, and repetitionIdToOrdinalIndex(15) = 2. All other parameters return -1.
      Specified by:
      repetitionIdToOrdinalIndex in interface IFormContainerMetaData
      Parameters:
      inputIndex - Repetition ID of the given repetition.
      Returns:
      Ordinal index of the element repetition. -1 when no element with the given repetition index exists.
    • removeRows

      public void removeRows(List<Integer> idxList)
      Specified by:
      removeRows in interface IFormContainerMetaData