Package com.tietoenator.trip.jxp.data
Class TdbStructuredField
java.lang.Object
com.tietoenator.trip.jxp.data.TdbField
com.tietoenator.trip.jxp.data.TdbStructuredField
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
- Direct Known Subclasses:
TdbDateField
,TdbIntegerField
,TdbNumberField
,TdbPhraseField
,TdbTimeField
Intermediary abstract representation for subfields from a structured
field type such as PHrase, NUmber, etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendValue
(String val) Append a new subfield to the field.void
appendValues
(Collection<String> values) Append several new subfields to the field.void
clear()
Clear the field's content; leaves the display form intactint
Retrieve the size of the value in the field.getValue
(int index) Get the subfield value at the defined index.int
Retrieve the count of the values in the field.void
insertValue
(int index, String value) Inserts a new subfield into the field.void
insertValues
(int index, Collection<String> values) Inserts several new subfields into the field.boolean
Returns true if this field contains a partial value.Retrieve a display form of the field's content -- see TdbField.getOriginalValues() for more detail.void
removeValue
(int index) Removes a subfield from the field.void
Set the defined subfield to the provided value.toString()
Retrieves a simple newline-delimited version of the field's content, complete with search term markup, if defined.values()
Retrieve the current content of the field -- see TdbField.getValues() for more detail.Methods inherited from class com.tietoenator.trip.jxp.data.TdbField
getName, getOwnerComponent, getType, isChanged
-
Method Details
-
originalValues
Retrieve a display form of the field's content -- see TdbField.getOriginalValues() for more detail.- Specified by:
originalValues
in classTdbField
- Returns:
- Collection of display values
-
values
Retrieve the current content of the field -- see TdbField.getValues() for more detail. -
clear
public void clear()Clear the field's content; leaves the display form intact -
getFieldSize
public int getFieldSize()Retrieve the size of the value in the field.- Specified by:
getFieldSize
in classTdbField
- Returns:
- Total size of the contents of the field.
- See Also:
-
isPartial
public boolean isPartial()Returns true if this field contains a partial value. -
getValue
Get the subfield value at the defined index.- Specified by:
getValue
in classTdbField
- Parameters:
index
- Zero-based index of item to retrieve- Returns:
- Value of subfield if available, null otherwise.
- Throws:
TdbException
-
setValue
Set the defined subfield to the provided value.- Specified by:
setValue
in classTdbField
- Parameters:
index
- Zero-based ndex of subfield to modify.val
- Value to assign- Throws:
TdbException
-
appendValue
Append a new subfield to the field.- Specified by:
appendValue
in classTdbField
- Parameters:
val
- The value to append to the field- Throws:
TdbException
-
appendValues
Append several new subfields to the field.- Specified by:
appendValues
in classTdbField
- Parameters:
values
- The value to append to the field- Throws:
TdbException
-
getValueCount
Retrieve the count of the values in the field.- Specified by:
getValueCount
in classTdbField
- Returns:
- Number of subfields in the field.
- Throws:
TdbException
-
insertValue
Inserts a new subfield into the field.- Specified by:
insertValue
in classTdbField
- Parameters:
index
- Zero-based index at which to insert the new subfield.value
- The value to insert into the field.- Throws:
TdbException
- If the index is out of bounds or the value is invalid.
-
insertValues
Inserts several new subfields into the field.- Specified by:
insertValues
in classTdbField
- Parameters:
index
- Zero-based index at which to insert the new subfield.values
- The values to insert into the field.- Throws:
TdbException
- If the index is out of bounds or the value is invalid.
-
removeValue
Removes a subfield from the field.- Specified by:
removeValue
in classTdbField
- Parameters:
index
- Zero-based index from which to remove a subfield.- Throws:
TdbException
- If the index is out of bounds.
-
toString
Retrieves a simple newline-delimited version of the field's content, complete with search term markup, if defined.
-