public class TableStructure extends java.lang.Object implements IStructureType
IStructureType implementation for table structures. A table contains
of rows of values separated by a delimiter.
Tables rows can have different lengths, as long as all values have consistent
indexes. This means that trailing values are optional (see Ele2
in example below).
Example:
Assuming the following IStructure (delimiter=",")
PROP_ElementName
PROP_Type
PROP_Username
the following table:
Ele1,jpg,Stephen
Ele2,txt
Ele3,,John
would result in IPropertyData with the following
IPropertyElements:
PropertyElement [PROP_ElementName="Ele1", PROP_Type="jpg", PROP_Username="Stephen"]
PropertyElement [PROP_ElementName="Ele2", PROP_Type="txt"]
PropertyElement [PROP_ElementName="Ele3", PROP_Type="", PROP_Username="John"]
When calling readStructure(FileDescriptor, String) or vice versa
when calling createStructure(FileDescriptor, IPropertyData).
On creation of the structure the third IPropertyElement would not even need a
PROP_Type value at all, since the empty String would be created
automatically.
| Constructor and Description |
|---|
TableStructure() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
createStructure(FileDescriptor pFileDescriptor,
IPropertyData pPropertyData) |
java.lang.String |
getID() |
java.lang.String |
getName() |
IPropertyData |
readStructure(FileDescriptor pDescription,
java.lang.String pStructuredContents)
...
|
public java.lang.String getName()
getName in interface IStructureTypepublic java.lang.String getID()
getID in interface IStructureTypepublic IPropertyData readStructure(FileDescriptor pDescription, java.lang.String pStructuredContents)
IStructureType
If the given structure document can be considered empty (empty string or
e.g. just a header), an IPropertyData instance with no
IPropertyElements must be returned.
readStructure in interface IStructureTypenullpublic java.lang.String createStructure(FileDescriptor pFileDescriptor, IPropertyData pPropertyData) throws TaurusCoreException
createStructure in interface IStructureTypeTaurusCoreExceptionCopyright © 2015 Micro Focus GmbH. All rights reserved.