public class FileEnvelope extends Object implements XMLMarshallable, XMLMapping
XMLMarshallable objects.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 and Description |
|---|
FileEnvelope()
Creates a new
FileEnvelope using the current SAP Convergent Charging version. |
FileEnvelope(String version)
Creates a new
FileEnvelope using the given String as version. |
| 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. |
void |
addElement(XMLMarshallable element)
Adds an element.
|
Class<?> |
getClass(String nsUri,
String tag,
XMLAttributes atts)
Returns the
Java class for a specified XML tag and its attributes in a namespace. |
XMLMarshallable |
getElement(int i)
Returns the element at the specified index.
|
Vector<XMLMarshallable> |
getElements()
Returns the
Vector of elements. |
int |
getLength()
Returns the number of elements embedded in this.
|
String |
getVersion()
Returns the version used for this.
|
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 |
setVersion(String version)
Sets the version to be used.
|
public FileEnvelope()
FileEnvelope using the current SAP Convergent Charging version.Versionpublic FileEnvelope(String version)
FileEnvelope using the given String as version.version - the version to be used.public int getLength()
public void addElement(XMLMarshallable element)
element - the XMLMarshallable object to be added.public XMLMarshallable getElement(int i)
i - the index of the element to retrieve.public Vector<XMLMarshallable> getElements()
Vector of elements.XMLMarshallable elements.public void setVersion(String version)
version - the version to be used.public String getVersion()
version field.public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic 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 addCharacterData(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 intopublic Class<?> getClass(String nsUri, String tag, XMLAttributes atts)
XMLMappingJava class for a specified XML tag and its attributes in a namespace.getClass in interface XMLMappingnsUri - The unique resource identifier of the namespace of the XML tagtag - The local part of the XML tagatts - The attributes of the XML tagJava class with a default constructor