Interface NarrativeContainer
-
- All Known Implementing Classes:
Field29A
,Field37N
,Field45B
,Field46B
,Field47B
,Field49M
,Field49N
,Field70
,Field71B
,Field71D
,Field71E
,Field72
,Field72Z
,Field73
,Field73A
,Field74
,Field75
,Field76
,Field77
,Field77A
,Field77B
,Field77D
,Field77J
,StructuredNarrativeField
public interface NarrativeContainer
Fields that are modelled as a single component, but the value contains a narrative that can be parsed into a structured or unstructured format.- Since:
- 8.1.0
- See Also:
Narrative
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NarrativeContainer
appendLine(java.lang.String line)
Appends a line of content to this field.Narrative
narrative()
Parses the field content into a narrative model.NarrativeContainer
setNarrative(Narrative narrative)
Sets or overrides this field value serializing the content of the structured narrative provided by parameter.
-
-
-
Method Detail
-
narrative
Narrative narrative()
Parses the field content into a narrative model.- Returns:
- the content parsed into a Narrative or an empty Narrative it the field is not well-formed
-
appendLine
NarrativeContainer appendLine(java.lang.String line)
Appends a line of content to this field.The parameter line is added to the current value without restrictions or validation. This method is intended for use cases when the internal structure of the field is well-known and you are confident of the content that is added has valid line formats for the specific field.
- Parameters:
line
- a properly formatted line of content such as "/NAME/Joe Doe"- Returns:
- this field
-
setNarrative
NarrativeContainer setNarrative(Narrative narrative)
Sets or overrides this field value serializing the content of the structured narrative provided by parameter.- Parameters:
narrative
- a narrative instance- Returns:
- this field
- See Also:
Narrative.builder(int)
-
-