org.ipdr.xml
Class IPDRXMLRecordHelper

java.lang.Object
  extended by org.ipdr.xml.IPDRXMLRecordHelper

public abstract class IPDRXMLRecordHelper
extends java.lang.Object

This class is used for writing XML Records to the IPDRDoc in XML format and reading XML Records from the IPDRDoc in XML format.


Field Summary
protected static java.util.ArrayList serviceType_
          To store the service types of XML format for all records
protected static boolean settlementDoc_
          Flag indicating Settlement Doc
protected static java.util.ArrayList xmlRootElements_
          To store the Root Elements
 
Constructor Summary
IPDRXMLRecordHelper()
           
 
Method Summary
protected static java.lang.Object convertDerivedType(java.lang.String derivedType, java.lang.String value)
          Method to convert the Derived Type attributes to desired types.
static CompositeData read(XMLUnMarshaller istream, Schema schema)
          Method to read XML records from IPDRDoc in XML format.
static void write(XMLMarshaller ostream, CompositeData value, int ipdrCount)
          Method to write XML records to IPDRDoc in XML format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceType_

protected static java.util.ArrayList serviceType_
To store the service types of XML format for all records


settlementDoc_

protected static boolean settlementDoc_
Flag indicating Settlement Doc


xmlRootElements_

protected static java.util.ArrayList xmlRootElements_
To store the Root Elements

Constructor Detail

IPDRXMLRecordHelper

public IPDRXMLRecordHelper()
Method Detail

write

public static void write(XMLMarshaller ostream,
                         CompositeData value,
                         int ipdrCount)
                  throws java.io.IOException,
                         IPDRException
Method to write XML records to IPDRDoc in XML format.

Parameters:
ostream - Object of XMLMarshaller
value - Objetct of CompositeData to be written
ipdrCount - Record number
Throws:
IPDRException - when a IPDR functionality related exception occurs
java.io.IOException - when an exception occurs while writing

read

public static CompositeData read(XMLUnMarshaller istream,
                                 Schema schema)
                          throws IPDRException,
                                 BadCompositeException
Method to read XML records from IPDRDoc in XML format. Schema validation is also performed within the function.

Parameters:
istream - Object of XMLUnMarshaller
schema - Object of Schema
Returns:
Composite Data read
Throws:
IPDRException - when a IPDR functionality related exception occurs
BadCompositeException - when an exception occurs creation of the Composite Data object

convertDerivedType

protected static java.lang.Object convertDerivedType(java.lang.String derivedType,
                                                     java.lang.String value)
                                              throws IPDRException
Method to convert the Derived Type attributes to desired types.

Parameters:
derivedType - The Derived Type
value - the String value
Returns:
Corresponding Object
Throws:
IPDRException