public class TierTableInstanceModel extends Object implements XMLMarshallable
The instance must meets the following constraints:
null input string (default group) must be at the end.
TierTableModel (directly or through getInstanceChronology())
it must contains at least the default group.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="tierTableInstance">
<xs:complexType>
<xs:sequence>
<xs:element ref="tierTableRow" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="tableCode" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="isPrivate" type="xs:boolean" default="false"/>
<xs:attribute name="instanceName" type="xs:string"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
TierTableInstanceModel()
Builds an empty TierInstanceModel.
|
TierTableInstanceModel(String tableCode)
Builds a TierTableInstanceModel from a tier table code.
|
TierTableInstanceModel(String name,
String tableCode,
boolean isPrivate,
String instanceName)
Builds a TierTableInstanceModel from a tier table code.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
boolean |
areRowsOrdered()
Checks if the tier table instance rows are chronologicaly ordered
|
String |
getInstanceName()
Returns the mapped instance name.
|
String |
getName()
Returns the name of the instance.
|
Vector<TierTableRowModel> |
getRows()
Gets the rows.
|
String |
getTableCode()
Gets the table code.
|
boolean |
hasMissingPeriods()
Checks if the tier table instance has missing periods.
|
boolean |
hasOverlappingPeriods()
Checks if the tier table instance has overlapping periods
|
boolean |
isPrivate()
Returns the visibility of the instance.
|
boolean |
isValid(TierTableModel tm)
Returns true if the tier table is valid.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setInstanceName(String instanceName)
Sets the mapped instance name.
|
void |
setName(String name)
Sets the name of the instance.
|
void |
setPrivate(boolean isPrivate)
Sets the instance visibility.
|
void |
setTableCode(String code)
Sets the table code.
|
public TierTableInstanceModel()
public TierTableInstanceModel(String name, String tableCode, boolean isPrivate, String instanceName)
name - tableCode - isPrivate - instanceName - public TierTableInstanceModel(String tableCode)
tableCode - public String getTableCode()
public void setTableCode(String code)
code - the table code.public String getName()
public void setName(String name)
name - the name of the instance.public Vector<TierTableRowModel> getRows()
TierTableRowModel representing rows.public String getInstanceName()
public void setInstanceName(String instanceName)
instanceName - the name of the mapped instance.public boolean isPrivate()
true if the instance is private.public void setPrivate(boolean isPrivate)
isPrivate - the level of the visibility.public boolean isValid(TierTableModel tm)
tm - the tier table Model.public boolean hasMissingPeriods()
public boolean hasOverlappingPeriods()
public boolean areRowsOrdered()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into