public class StructuredTextRecord extends Object
Modifier and Type | Field and Description |
---|---|
static StructuredTextRecord |
EMPTY |
static String |
RECORD_NAME_ATTRIBUTE |
static String |
RECORD_NUMBER_ATTRIBUTE |
Constructor and Description |
---|
StructuredTextRecord()
Constructor to create an empty record.
|
StructuredTextRecord(Map<String,String> attributes,
List<StructuredTextRecord> children)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String name,
String value)
Add an attribute to the record.
|
void |
addChild(StructuredTextRecord child)
Add a child to the record.
|
String |
getAttribute(String name)
Retrieve an attribute by name.
|
Map<String,String> |
getAttributes()
Retrieve all attributes.
|
StructuredTextRecord |
getChild(String name)
Retrieve a child record by name.
|
List<StructuredTextRecord> |
getChildren()
Retrieve all child records.
|
String |
getRecordName()
Retrieve the record name.
|
String |
getRecordNumber()
Retrieve the record number.
|
public static final String RECORD_NUMBER_ATTRIBUTE
public static final String RECORD_NAME_ATTRIBUTE
public static final StructuredTextRecord EMPTY
public StructuredTextRecord()
public StructuredTextRecord(Map<String,String> attributes, List<StructuredTextRecord> children)
attributes
- attributes of this recordchildren
- child recordspublic String getRecordName()
public String getRecordNumber()
public String getAttribute(String name)
name
- attribute namepublic Map<String,String> getAttributes()
public List<StructuredTextRecord> getChildren()
public StructuredTextRecord getChild(String name)
name
- child record namepublic void addAttribute(String name, String value)
name
- attribute namevalue
- attribute valuepublic void addChild(StructuredTextRecord child)
child
- StructuredTextRecord instanceCopyright © 2000–2024 Packwood Software. All rights reserved.