Package com.highdeal.hci
Class FileEnvelope
java.lang.Object
com.highdeal.hci.FileEnvelope
- All Implemented Interfaces:
XMLMapping,XMLMarshallable
This class is used for save in and load from file a set of
XMLMarshallable objects.XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="objectSet">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="version" type="xs:string"/>
</xs:complexType>
</xs:element>
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newFileEnvelopeusing the current SAP Convergent Charging version.FileEnvelope(String version) Creates a newFileEnvelopeusing the givenStringas version. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.voidaddElement(XMLMarshallable element) Adds an element.Class<?>getClass(String nsUri, String tag, XMLAttributes atts) Returns theJava classfor a specifiedXML tagand its attributes in a namespace.getElement(int i) Returns the element at the specified index.Returns theVectorof elements.intReturns the number of elements embedded in this.Returns the version used for this.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetVersion(String version) Sets the version to be used.
-
Constructor Details
-
FileEnvelope
public FileEnvelope()Creates a newFileEnvelopeusing the current SAP Convergent Charging version.- See Also:
-
Version
-
FileEnvelope
Creates a newFileEnvelopeusing the givenStringas version.- Parameters:
version- the version to be used.
-
-
Method Details
-
getLength
public int getLength()Returns the number of elements embedded in this.- Returns:
- the size of content list.
-
addElement
Adds an element.- Parameters:
element- theXMLMarshallableobject to be added.
-
getElement
Returns the element at the specified index.- Parameters:
i- the index of the element to retrieve.- Returns:
- the element at the specified index.
-
getElements
Returns theVectorof elements.- Returns:
- a list of
XMLMarshallableelements.
-
setVersion
Sets the version to be used.- Parameters:
version- the version to be used.
-
getVersion
Returns the version used for this.- Returns:
- the
versionfield.
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
getClass
Description copied from interface:XMLMappingReturns theJava classfor a specifiedXML tagand its attributes in a namespace.- Specified by:
getClassin interfaceXMLMapping- Parameters:
nsUri- The unique resource identifier of the namespace of the XML tagtag- The local part of the XML tagatts- The attributes of the XML tag- Returns:
- A
Java classwith a default constructor
-