org.ipdr.utils
Class IPDRException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.ipdr.utils.IPDRException
All Implemented Interfaces:
java.io.Serializable

public class IPDRException
extends java.lang.Exception

This IPDRException class will have all the variables which will be used to store the Fatal Exception information that has occured during the processing of Read / Write functionality of IPDRDocs so that appropiate message can be sent to the the user.

See Also:
Serialized Form

Field Summary
protected  java.lang.Exception exceptionCaught_
          To store the base exception that was caught.
protected  int exceptionCode_
          To store Exception Code to identify the event
protected  int exceptionIpdrCount_
          To store number of errors.
protected  java.lang.String exceptionLocation_
          To store Location of error message, ie, the method name / class name.
protected  long exceptionOffset_
          To store the offset.
static int IPDR_ARRAYINDEX_OUTOF_BOUND
          Code for : Index value is greater than the size of array / arraylist
static int IPDR_BASE_SCHEMA_INVALID
          Code for : Invalid Base schema.
static int IPDR_BASE_SCHEMA_NOT_FOUND
          Code for : Base schema not found or not recognized
static int IPDR_BLANK_DEFAULTNAMESPACE
          Code for : Default Namespace is blank
static int IPDR_DNS_NULL
          Code for : defaultNameSpace or serviceDefURIs or otherNamespaceURIs is NULL
static int IPDR_DUPLICATE_ATTRIBUTE_NAME
          Code for : Encountered duplicate AttributeName
static int IPDR_EOF_ENCOUNTERED
          Code for : Cannot proceed, EOF encountered
static int IPDR_EOF_NOT_FOUND_IN_IPDRDOC
          Code for : EOF Not found at the end of IPDRDocument
static int IPDR_FILE_NOT_EXIST
          Code for : File does not exist
static int IPDR_INVALID_ARRAY_LENGTH
          Code for : Array length exceeds maximum as specified by MaxLength
static int IPDR_INVALID_DATA_TYPE
          Code for : Invalid Data type encountered
static int IPDR_INVALID_DATA_VALUE
          Code for : Data value for Unsigned Long/Unsigned Int is negative
static int IPDR_INVALID_DESCRIMINATOR
          Code for : Invalid descriminator
static int IPDR_INVALID_DOCSTATE_MAKE_READABLE
          Code for : Invalid DocState, should be READABLE
static int IPDR_INVALID_DOCSTATE_MAKE_UNREADABLE
          Code for : Invalid DocState, should be UNREADABLE
static int IPDR_INVALID_DOCSTATE_MAKE_UNWRITABLE
          Code for : Invalid DocState, should be UNWRITEABLE
static int IPDR_INVALID_DOCSTATE_MAKE_WRITABLE
          Code for : Invalid DocState, should be WRITEABLE
static int IPDR_INVALID_DOCTYPE
          Code for : Invalid DocType passed, should be either XDR or XML
static int IPDR_INVALID_ELEMENT
          Code for : Element not found.
static int IPDR_INVALID_FILE
          Code for : Invalid file
static int IPDR_INVALID_INPUT_DATA
          Code for : Input raw data is not valid
static int IPDR_INVALID_STREAM_HANDLE
          Code for : Invalid Stream Handle
static int IPDR_INVALID_TIME_FORMAT
          Code for : Invalid Date/Time
static int IPDR_INVALID_VERSION
          Code for : Invalid IPDR Version
static int IPDR_IP_ADDR
          Code for : Invalid IP Address
static int IPDR_IPV4_ADDR
          Code for : Invalid IPV4 address
static int IPDR_IPV6_ADDR
          Code for : Invalid IPV6 address
static int IPDR_LESS_SD_THAN_NS
          Code for : Length of ServiceDefinitionURIs array is less than the length of otherNameSpaces
static int IPDR_MAC_ADDR
          Code for : Invalid MAC Address
static int IPDR_MACTH_ONS_DNS
          Code for : For non-zero namespace ID, other namespace is matching with default name space
static int IPDR_MANDATORY_ATTR_NOT_FOUND
          Code for : Mandatory attribute defined in schema is not found
static int IPDR_MISMATCH_ATTRTAGS_IPDRDOC_SCHEMA
          Code for : Mismatch in attribute tags present in IPDRDoc and Schema
static int IPDR_MISMATCH_DESCRIPTOR_DATA_ARRAY
          Code for : Mismatch in length of descriptor & data array
static int IPDR_MISMATCH_INPUT_WITH_SCHEMA_DATATYPE
          Code for : Data Type for attribute of Schema and corresponding attribute of CompositeData is not matching
static int IPDR_MISMATCH_NS_DFLT_NS
          Code for : For zero length Namespace ID, one or more of the other NamespaceURIs is not matching with Default Namespace URI.
static int IPDR_MISMATCH_OPTIONAL_ATTRNAME_SCHEMA
          Code for : Optional Attributes Name does not match with Schema optional Attributes
static int IPDR_MISMATCH_TRGT_NS_DFLT_NS
          Code for : Mismatch between Target Namespace and Default Namespace
static int IPDR_MISMATCH_TRGT_NS_ONS
          Code for : Mismatch between Target Namespace and Namespace of Other Namespaces for the same position
static int IPDR_MISMATCH_VERSION
          Code for : Mismatch in Version
static int IPDR_MISMATCH_XML_TAGS
          Code for : Mismatch in XML tags found
static int IPDR_MISSING_CREATIONTIME
          Code for : CreationTime is Missing
static int IPDR_MISSING_DOCID
          Code for : DocID is Missing
static int IPDR_MISSING_IPDRRECORDERINFO
          Code for : IPDRRecoderInfo is Missing
static int IPDR_MISSING_NAMESPACES
          Code for : Default NameSpace or Other NameSpaces are Missing
static int IPDR_MISSING_SDURI
          Code for : Service Definition URI / URIs are Missing
static int IPDR_MISSING_VERSION
          Code for : Version is Missing
static int IPDR_NO_DESCID
          Code for : Descriptor ID not found
static int IPDR_NO_DOCEND
          Code for : DocEnd not found
static int IPDR_NO_SUCH_ATTRIBUTE_IN_SCHEMA
          Code for : Attribute not present in the Schema
static int IPDR_NO_SUCH_DESCRIPTOR
          Code for : Descriptor is not found for encountered descriptorID
static int IPDR_NSURI_NOT_FOUND
          Code for : NameSpace URI corresponding to NameSpace ID not found
static int IPDR_NULL_INPUT_DATA
          Code for : Input data passed as NULL
static int IPDR_NULL_INPUT_PARAMETER
          Code for : Input parameter passed as NULL
static int IPDR_NULL_KEY_VALUE
          Code for : Key/Value is null
static int IPDR_OK
          Code for : Ok.
static int IPDR_OPENTYPE_ARRAY_FAILURE
          Code for : Creation of OpenType array Failed
static int IPDR_PARSING_ERROR
          Code for : Parsing Error
static int IPDR_ST_FOR_SCHEMA_ABSENT
          Code for : Service Type(complex Type) for the Schema is absent
static int IPDR_STREAM_NOT_READABLE
          Code for : Input Stream is not readable
static int IPDR_STREAM_NOT_WRITABLE
          Code for : Output Stream is not writable
static int IPDR_TYPE_DATA_LENGTH_MISMATCH
          Code for : Composite Type and Data are of different length
static int IPDR_UUID_FORMAT
          Code for : Invalid UUID format
static int IPDR_VERSION_MISMATCH
          Code for : IPDR Version Mis-match between versions in setVersion / chema / XDR / XML
static int IPDR_VERSION_NULL
          Code for : IPDR Version is not set
 
Constructor Summary
IPDRException(int exceptionCode, int exceptionIpdrCount, java.lang.String exceptionLocation)
          Constructor to initialise all the member variables during writing of an IPDRDoc.
IPDRException(int exceptionCode, int exceptionIpdrCount, java.lang.String exceptionLocation, long exceptionOffset)
          Constructor to initialise all the member variables with offset value during reading of an IPDRDoc.
IPDRException(int exceptionCode, java.lang.String exceptionLocation, java.lang.Exception ex)
          Constructor for IPDRException used only for FTP libraies.
 
Method Summary
 int getCode()
          Method to get the Exception Code.
 int getIpdrCount()
          Method to get the Exception count.
 java.lang.String getLocation()
          Method to get the Exception Location.
static java.lang.String getMessage(int exceptioncode)
          Method to get the Exception Message.
 long getOffset()
          Method to get the Exception Offset.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exceptionCode_

protected int exceptionCode_
To store Exception Code to identify the event


exceptionIpdrCount_

protected int exceptionIpdrCount_
To store number of errors.


exceptionOffset_

protected long exceptionOffset_
To store the offset.


exceptionLocation_

protected java.lang.String exceptionLocation_
To store Location of error message, ie, the method name / class name.


exceptionCaught_

protected java.lang.Exception exceptionCaught_
To store the base exception that was caught.


IPDR_OK

public static final int IPDR_OK
Code for : Ok.

See Also:
Constant Field Values

IPDR_ST_FOR_SCHEMA_ABSENT

public static final int IPDR_ST_FOR_SCHEMA_ABSENT
Code for : Service Type(complex Type) for the Schema is absent

See Also:
Constant Field Values

IPDR_LESS_SD_THAN_NS

public static final int IPDR_LESS_SD_THAN_NS
Code for : Length of ServiceDefinitionURIs array is less than the length of otherNameSpaces

See Also:
Constant Field Values

IPDR_DNS_NULL

public static final int IPDR_DNS_NULL
Code for : defaultNameSpace or serviceDefURIs or otherNamespaceURIs is NULL

See Also:
Constant Field Values

IPDR_INVALID_FILE

public static final int IPDR_INVALID_FILE
Code for : Invalid file

See Also:
Constant Field Values

IPDR_INVALID_STREAM_HANDLE

public static final int IPDR_INVALID_STREAM_HANDLE
Code for : Invalid Stream Handle

See Also:
Constant Field Values

IPDR_FILE_NOT_EXIST

public static final int IPDR_FILE_NOT_EXIST
Code for : File does not exist

See Also:
Constant Field Values

IPDR_INVALID_DOCTYPE

public static final int IPDR_INVALID_DOCTYPE
Code for : Invalid DocType passed, should be either XDR or XML

See Also:
Constant Field Values

IPDR_NULL_INPUT_DATA

public static final int IPDR_NULL_INPUT_DATA
Code for : Input data passed as NULL

See Also:
Constant Field Values

IPDR_STREAM_NOT_READABLE

public static final int IPDR_STREAM_NOT_READABLE
Code for : Input Stream is not readable

See Also:
Constant Field Values

IPDR_STREAM_NOT_WRITABLE

public static final int IPDR_STREAM_NOT_WRITABLE
Code for : Output Stream is not writable

See Also:
Constant Field Values

IPDR_INVALID_DOCSTATE_MAKE_READABLE

public static final int IPDR_INVALID_DOCSTATE_MAKE_READABLE
Code for : Invalid DocState, should be READABLE

See Also:
Constant Field Values

IPDR_INVALID_DOCSTATE_MAKE_UNREADABLE

public static final int IPDR_INVALID_DOCSTATE_MAKE_UNREADABLE
Code for : Invalid DocState, should be UNREADABLE

See Also:
Constant Field Values

IPDR_INVALID_DOCSTATE_MAKE_WRITABLE

public static final int IPDR_INVALID_DOCSTATE_MAKE_WRITABLE
Code for : Invalid DocState, should be WRITEABLE

See Also:
Constant Field Values

IPDR_INVALID_DOCSTATE_MAKE_UNWRITABLE

public static final int IPDR_INVALID_DOCSTATE_MAKE_UNWRITABLE
Code for : Invalid DocState, should be UNWRITEABLE

See Also:
Constant Field Values

IPDR_NULL_INPUT_PARAMETER

public static final int IPDR_NULL_INPUT_PARAMETER
Code for : Input parameter passed as NULL

See Also:
Constant Field Values

IPDR_IPV4_ADDR

public static final int IPDR_IPV4_ADDR
Code for : Invalid IPV4 address

See Also:
Constant Field Values

IPDR_INVALID_DATA_TYPE

public static final int IPDR_INVALID_DATA_TYPE
Code for : Invalid Data type encountered

See Also:
Constant Field Values

IPDR_MISMATCH_DESCRIPTOR_DATA_ARRAY

public static final int IPDR_MISMATCH_DESCRIPTOR_DATA_ARRAY
Code for : Mismatch in length of descriptor & data array

See Also:
Constant Field Values

IPDR_NO_DESCID

public static final int IPDR_NO_DESCID
Code for : Descriptor ID not found

See Also:
Constant Field Values

IPDR_INVALID_DESCRIMINATOR

public static final int IPDR_INVALID_DESCRIMINATOR
Code for : Invalid descriminator

See Also:
Constant Field Values

IPDR_INVALID_VERSION

public static final int IPDR_INVALID_VERSION
Code for : Invalid IPDR Version

See Also:
Constant Field Values

IPDR_MISMATCH_VERSION

public static final int IPDR_MISMATCH_VERSION
Code for : Mismatch in Version

See Also:
Constant Field Values

IPDR_MISMATCH_OPTIONAL_ATTRNAME_SCHEMA

public static final int IPDR_MISMATCH_OPTIONAL_ATTRNAME_SCHEMA
Code for : Optional Attributes Name does not match with Schema optional Attributes

See Also:
Constant Field Values

IPDR_DUPLICATE_ATTRIBUTE_NAME

public static final int IPDR_DUPLICATE_ATTRIBUTE_NAME
Code for : Encountered duplicate AttributeName

See Also:
Constant Field Values

IPDR_NO_SUCH_DESCRIPTOR

public static final int IPDR_NO_SUCH_DESCRIPTOR
Code for : Descriptor is not found for encountered descriptorID

See Also:
Constant Field Values

IPDR_PARSING_ERROR

public static final int IPDR_PARSING_ERROR
Code for : Parsing Error

See Also:
Constant Field Values

IPDR_MISMATCH_XML_TAGS

public static final int IPDR_MISMATCH_XML_TAGS
Code for : Mismatch in XML tags found

See Also:
Constant Field Values

IPDR_MISMATCH_ATTRTAGS_IPDRDOC_SCHEMA

public static final int IPDR_MISMATCH_ATTRTAGS_IPDRDOC_SCHEMA
Code for : Mismatch in attribute tags present in IPDRDoc and Schema

See Also:
Constant Field Values

IPDR_EOF_ENCOUNTERED

public static final int IPDR_EOF_ENCOUNTERED
Code for : Cannot proceed, EOF encountered

See Also:
Constant Field Values

IPDR_EOF_NOT_FOUND_IN_IPDRDOC

public static final int IPDR_EOF_NOT_FOUND_IN_IPDRDOC
Code for : EOF Not found at the end of IPDRDocument

See Also:
Constant Field Values

IPDR_NO_DOCEND

public static final int IPDR_NO_DOCEND
Code for : DocEnd not found

See Also:
Constant Field Values

IPDR_OPENTYPE_ARRAY_FAILURE

public static final int IPDR_OPENTYPE_ARRAY_FAILURE
Code for : Creation of OpenType array Failed

See Also:
Constant Field Values

IPDR_ARRAYINDEX_OUTOF_BOUND

public static final int IPDR_ARRAYINDEX_OUTOF_BOUND
Code for : Index value is greater than the size of array / arraylist

See Also:
Constant Field Values

IPDR_INVALID_TIME_FORMAT

public static final int IPDR_INVALID_TIME_FORMAT
Code for : Invalid Date/Time

See Also:
Constant Field Values

IPDR_MISMATCH_NS_DFLT_NS

public static final int IPDR_MISMATCH_NS_DFLT_NS
Code for : For zero length Namespace ID, one or more of the other NamespaceURIs is not matching with Default Namespace URI.

See Also:
Constant Field Values

IPDR_MISMATCH_TRGT_NS_ONS

public static final int IPDR_MISMATCH_TRGT_NS_ONS
Code for : Mismatch between Target Namespace and Namespace of Other Namespaces for the same position

See Also:
Constant Field Values

IPDR_MISMATCH_TRGT_NS_DFLT_NS

public static final int IPDR_MISMATCH_TRGT_NS_DFLT_NS
Code for : Mismatch between Target Namespace and Default Namespace

See Also:
Constant Field Values

IPDR_NULL_KEY_VALUE

public static final int IPDR_NULL_KEY_VALUE
Code for : Key/Value is null

See Also:
Constant Field Values

IPDR_MANDATORY_ATTR_NOT_FOUND

public static final int IPDR_MANDATORY_ATTR_NOT_FOUND
Code for : Mandatory attribute defined in schema is not found

See Also:
Constant Field Values

IPDR_MISMATCH_INPUT_WITH_SCHEMA_DATATYPE

public static final int IPDR_MISMATCH_INPUT_WITH_SCHEMA_DATATYPE
Code for : Data Type for attribute of Schema and corresponding attribute of CompositeData is not matching

See Also:
Constant Field Values

IPDR_NO_SUCH_ATTRIBUTE_IN_SCHEMA

public static final int IPDR_NO_SUCH_ATTRIBUTE_IN_SCHEMA
Code for : Attribute not present in the Schema

See Also:
Constant Field Values

IPDR_INVALID_INPUT_DATA

public static final int IPDR_INVALID_INPUT_DATA
Code for : Input raw data is not valid

See Also:
Constant Field Values

IPDR_IPV6_ADDR

public static final int IPDR_IPV6_ADDR
Code for : Invalid IPV6 address

See Also:
Constant Field Values

IPDR_UUID_FORMAT

public static final int IPDR_UUID_FORMAT
Code for : Invalid UUID format

See Also:
Constant Field Values

IPDR_BLANK_DEFAULTNAMESPACE

public static final int IPDR_BLANK_DEFAULTNAMESPACE
Code for : Default Namespace is blank

See Also:
Constant Field Values

IPDR_MACTH_ONS_DNS

public static final int IPDR_MACTH_ONS_DNS
Code for : For non-zero namespace ID, other namespace is matching with default name space

See Also:
Constant Field Values

IPDR_MISSING_VERSION

public static final int IPDR_MISSING_VERSION
Code for : Version is Missing

See Also:
Constant Field Values

IPDR_MISSING_IPDRRECORDERINFO

public static final int IPDR_MISSING_IPDRRECORDERINFO
Code for : IPDRRecoderInfo is Missing

See Also:
Constant Field Values

IPDR_MISSING_CREATIONTIME

public static final int IPDR_MISSING_CREATIONTIME
Code for : CreationTime is Missing

See Also:
Constant Field Values

IPDR_MISSING_DOCID

public static final int IPDR_MISSING_DOCID
Code for : DocID is Missing

See Also:
Constant Field Values

IPDR_MISSING_NAMESPACES

public static final int IPDR_MISSING_NAMESPACES
Code for : Default NameSpace or Other NameSpaces are Missing

See Also:
Constant Field Values

IPDR_MISSING_SDURI

public static final int IPDR_MISSING_SDURI
Code for : Service Definition URI / URIs are Missing

See Also:
Constant Field Values

IPDR_INVALID_DATA_VALUE

public static final int IPDR_INVALID_DATA_VALUE
Code for : Data value for Unsigned Long/Unsigned Int is negative

See Also:
Constant Field Values

IPDR_NSURI_NOT_FOUND

public static final int IPDR_NSURI_NOT_FOUND
Code for : NameSpace URI corresponding to NameSpace ID not found

See Also:
Constant Field Values

IPDR_VERSION_MISMATCH

public static final int IPDR_VERSION_MISMATCH
Code for : IPDR Version Mis-match between versions in setVersion / chema / XDR / XML

See Also:
Constant Field Values

IPDR_VERSION_NULL

public static final int IPDR_VERSION_NULL
Code for : IPDR Version is not set

See Also:
Constant Field Values

IPDR_INVALID_ARRAY_LENGTH

public static final int IPDR_INVALID_ARRAY_LENGTH
Code for : Array length exceeds maximum as specified by MaxLength

See Also:
Constant Field Values

IPDR_TYPE_DATA_LENGTH_MISMATCH

public static final int IPDR_TYPE_DATA_LENGTH_MISMATCH
Code for : Composite Type and Data are of different length

See Also:
Constant Field Values

IPDR_IP_ADDR

public static final int IPDR_IP_ADDR
Code for : Invalid IP Address

See Also:
Constant Field Values

IPDR_MAC_ADDR

public static final int IPDR_MAC_ADDR
Code for : Invalid MAC Address

See Also:
Constant Field Values

IPDR_BASE_SCHEMA_NOT_FOUND

public static final int IPDR_BASE_SCHEMA_NOT_FOUND
Code for : Base schema not found or not recognized

See Also:
Constant Field Values

IPDR_BASE_SCHEMA_INVALID

public static final int IPDR_BASE_SCHEMA_INVALID
Code for : Invalid Base schema. Check for latest version

See Also:
Constant Field Values

IPDR_INVALID_ELEMENT

public static final int IPDR_INVALID_ELEMENT
Code for : Element not found. Check name space and element name

See Also:
Constant Field Values
Constructor Detail

IPDRException

public IPDRException(int exceptionCode,
                     int exceptionIpdrCount,
                     java.lang.String exceptionLocation,
                     long exceptionOffset)
Constructor to initialise all the member variables with offset value during reading of an IPDRDoc.


IPDRException

public IPDRException(int exceptionCode,
                     int exceptionIpdrCount,
                     java.lang.String exceptionLocation)
Constructor to initialise all the member variables during writing of an IPDRDoc.


IPDRException

public IPDRException(int exceptionCode,
                     java.lang.String exceptionLocation,
                     java.lang.Exception ex)
Constructor for IPDRException used only for FTP libraies.

Method Detail

getCode

public int getCode()
Method to get the Exception Code.


getLocation

public java.lang.String getLocation()
Method to get the Exception Location.


getIpdrCount

public int getIpdrCount()
Method to get the Exception count.


getOffset

public long getOffset()
Method to get the Exception Offset.


getMessage

public static java.lang.String getMessage(int exceptioncode)
Method to get the Exception Message.