Package de.xima.fc.mdl.fdv.form
Class FormContainerMetaData
java.lang.Object
de.xima.fc.mdl.fdv.form.FormContainerMetaData
- All Implemented Interfaces:
IFormContainerMetaData,Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFormContainerMetaData(String containerName) FormContainerMetaData(String containerName, ArrayList<Integer> rows) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFormField(String fieldName, Integer index) booleancontainsField(String fieldName) containsFormField(String fieldName) intgetSize()ordinalIndexToRepetitionId(Integer inputIndex) Finds the repetition ID for an ordinal index (the nth repetition of the element).voidremoveRows(List<Integer> idxList) repetitionIdToOrdinalIndex(Integer inputIndex) Finds the ordinal index for a repetition ID.resolveIndex(Integer inputIndex) void
-
Constructor Details
-
FormContainerMetaData
-
FormContainerMetaData
-
-
Method Details
-
getFieldList
- Specified by:
getFieldListin interfaceIFormContainerMetaData- Returns:
- The field names of all repeated instances of the form field.
-
getSize
public int getSize()- Specified by:
getSizein interfaceIFormContainerMetaData- Returns:
- The number of existing repetition of the form field.
-
getContainerName
- Specified by:
getContainerNamein interfaceIFormContainerMetaData- Returns:
- The name of the repeated container that contains this element. May be the element itself.
-
containsFormField
-
containsField
- Specified by:
containsFieldin interfaceIFormContainerMetaData- 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
- Specified by:
getIdListin interfaceIFormContainerMetaData- Returns:
- The repetition IDs of all repeated instances of the form field.
-
addFormField
-
setSize
-
resolveIndex
-
ordinalIndexToRepetitionId
Description copied from interface:IFormContainerMetaDataFinds the repetition ID for an ordinal index (the nth repetition of the element). For example, when there are three element repetitions, the first could betf1_dyn_tf1_4, the seconds could betf1_dyn_tf1_9, and the third could betf1_dyn_tf1_15. Then this method would returnordinalToRepetitionId(0) == 4,ordinalToRepetitionId(1) == 9, andordinalToRepetitionId(2) = 15. All other parameters return-1.- Specified by:
ordinalIndexToRepetitionIdin interfaceIFormContainerMetaData- Parameters:
inputIndex- Repetition ID of the given repetition.- Returns:
- Ordinal index of the element repetition.
-1when no element with the given repetition index exists.
-
repetitionIdToOrdinalIndex
Description copied from interface:IFormContainerMetaDataFinds the ordinal index for a repetition ID. For example, when there are three element repetitions, the first could betf1_dyn_tf1_4, the seconds could betf1_dyn_tf1_9, and the third could betf1_dyn_tf1_15. Then this method would returnrepetitionIdToOrdinalIndex(4) == 0,repetitionIdToOrdinalIndex(9) == 1, andrepetitionIdToOrdinalIndex(15) = 2. All other parameters return-1.- Specified by:
repetitionIdToOrdinalIndexin interfaceIFormContainerMetaData- Parameters:
inputIndex- Repetition ID of the given repetition.- Returns:
- Ordinal index of the element repetition.
-1when no element with the given repetition index exists.
-
removeRows
-