public class UserDefinedRecordModel extends java.lang.Object implements XMLMarshallable
Java class represents a user defined record (UDR) that references a set of attribute descriptions.AttributeDescriptionModelThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="userDefinedRecord">
<xs:complexType>
<xs:sequence>
<xs:element ref="attributeDescription" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="code" type="xs:string"/>
<xs:attribute name="ref" type="xs:string"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
UserDefinedRecordModel()
Builds an empty user defined record.
|
UserDefinedRecordModel(java.lang.String code,
java.lang.String description)
Builds an empty user defined record with a code and a text description.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeDescription(AttributeDescriptionModel ad)
Adds an attribute description in
the user defined record.
|
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. |
java.util.List<AttributeDescriptionModel> |
getAttributeDescriptions()
Returns the list of attribute descriptions which defines
this user defined record.
|
java.lang.String |
getCode()
Returns the identification code of the user defined record.
|
java.lang.String |
getDescription()
Returns the comprehensive description of the user defined record.
|
java.lang.String |
getReference()
Gets the reference.
|
boolean |
isValid()
Checks if this user defined record is valid; Each included attribute description has also to be valid and must have a unique name
in the same user user defined record.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
removeAttributeDescription(int index)
Removes an attribute description from
the user defined record.
|
void |
setAttributeDescriptions(java.util.List<AttributeDescriptionModel> descriptions)
Sets the
list of attribute descriptions in
the user defined record. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setCode(java.lang.String code)
Sets the identification code of the user defined record.
|
void |
setDescription(java.lang.String description)
Sets the comprehensive description of the user defined record.
|
void |
setReference(java.lang.String r)
Sets the reference.
|
public UserDefinedRecordModel()
public UserDefinedRecordModel(java.lang.String code,
java.lang.String description)
code - The identification code of the user defined recorddescription - The comprehensive description of the user defined recordpublic java.lang.String getReference()
public void setReference(java.lang.String r)
r - The referencepublic java.lang.String getCode()
public void setCode(java.lang.String code)
code - The identification code of the UDRpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - The text description of the UDRpublic java.util.List<AttributeDescriptionModel> getAttributeDescriptions()
public void setAttributeDescriptions(java.util.List<AttributeDescriptionModel> descriptions)
list of attribute descriptions in
the user defined record.descriptions - A list of attribute descriptionspublic void addAttributeDescription(AttributeDescriptionModel ad)
ad - The attribute description to add in the UDRpublic void removeAttributeDescription(int index)
index - The index of the attribute description to deletepublic boolean isValid()
true if this user defined record is valid, false otherwisepublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic 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 addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into