public class TranslationInstanceModel extends java.lang.Object implements XMLMarshallable
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="tableInstance">
<xs:complexType>
<xs:sequence>
<xs:element ref="row" 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 |
|---|
TranslationInstanceModel()
Builds an empty TranslationInstanceModel.
|
TranslationInstanceModel(java.lang.String tableCode)
Builds a TranslationInstanceModel from a translation table code.
|
TranslationInstanceModel(java.lang.String name,
java.lang.String tableCode,
boolean isPrivate,
java.lang.String instanceName)
Builds a TranslationInstanceModel from a translation table code.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
boolean |
getIfDatesAreUsed() |
java.lang.String |
getInstanceName()
Returns the mapped instance name.
|
java.lang.String |
getName()
Returns the name of the instance.
|
java.util.Vector<TranslationRowModel> |
getRows()
Gets the rows.
|
java.lang.String |
getTableCode()
Gets the table code.
|
boolean |
isPrivate()
Returns the visibility of the instance.
|
boolean |
isValid(TranslationTableModel tm)
Returns true if the translation 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(java.lang.String instanceName)
Sets the mapped instance name.
|
void |
setName(java.lang.String name)
Sets the name of the instance.
|
void |
setPrivate(boolean isPrivate)
Sets the instance visibility.
|
void |
setTableCode(java.lang.String code)
Sets the table code.
|
public TranslationInstanceModel()
public TranslationInstanceModel(java.lang.String name,
java.lang.String tableCode,
boolean isPrivate,
java.lang.String instanceName)
name - tableCode - isPrivate - instanceName - public TranslationInstanceModel(java.lang.String tableCode)
tableCode - public java.lang.String getTableCode()
public void setTableCode(java.lang.String code)
code - the table code.public java.lang.String getName()
public void setName(java.lang.String name)
name - the name of the instance.public java.util.Vector<TranslationRowModel> getRows()
TranslationRowModel representing rows.public java.lang.String getInstanceName()
public void setInstanceName(java.lang.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(TranslationTableModel tm)
tm - the translation table Model.public boolean getIfDatesAreUsed()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void addChild(java.lang.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