org.ipdr.utils
Class ErrorMessage

java.lang.Object
  extended by org.ipdr.utils.ErrorMessage

public class ErrorMessage
extends java.lang.Object

This error message class will have all the variables which will be used to store the warning message and description of type of warning that has occured during the processing of Read Write functionality of IPDRDocs. All messages will be stored in ArrayList Object variable which is declared as member variable in IPDRDocWriter class.


Field Summary
protected  int errorCode_
          To store Error Code to identify the event.
protected  int errorIpdrCount_
          To store Error Count.
protected  java.lang.String errorLocation_
          To store Location of error message.
protected  long errorOffset_
          To store Exact location in bytes of the error message.
static int IPDR_ARRAY_LENGTH_MISMATCH
          Code for : MaxLength of CompositeData attribute does not match with maxOccurs of Schema attribute
static int IPDR_CONNECTION_FAILED
          Code for : Connection Failed
static int IPDR_DESC_NOT_VALID
          Code for : Descriptor ID is not valid
static int IPDR_DOCEND_MISSING
          Code for : DocEnd is not present in the XML document
static int IPDR_DUPLICATE_DESCID
          Code for : Encountered duplicate descriptorID
static int IPDR_INVALID_DOCTYPE_MAKE_XML
          Code for : Invalid DocType passed, should be XDR or XML
static int IPDR_INVALID_IPV4ADDR
          Code for : Invalid Ipv4Addr
static int IPDR_INVALID_IPV6ADDR
          Code for : Invalid Ipv6Addr
static int IPDR_INVALID_LOGIN
          Code for : Login / Password is not correct
static int IPDR_INVALID_SCHEMA
          Code for : Invalid Schema
static int IPDR_INVALID_TIME_FORMAT
          Code for : Invalid Time Format
static int IPDR_INVALID_URL
          Code for : Invalid URL
static int IPDR_IPDRRECCOUNT_NOT_INITIALISED
          Code for : ipdrRecordCount is not initialized properly
static int IPDR_MANDATORY_ATTR_NOT_FOUND
          Code for : Mandatory attribute defined in schema is not found
static int IPDR_MANDATORY_PRST_IN_OPT_ARRAY
          Code for : Mandatory Attribute is present in Optional Attributes Array
static int IPDR_MISMATCH_ATTRIBUTE_DATA_ARRAY
          Code for : Mismatch in AttributeType & Input Data Type
static int IPDR_MISMATCH_IN_ENCODED_DECODED_RECORDS
          Code for : Mismatch in number of decoded & encoded records in the IPDR Document
static int IPDR_MISMATCH_INPUT_DATA_SCHEMA_LOOKUP
          Code for : Mismatch in attributes between input data and Schema Lookup table
static int IPDR_MISMATCH_INPUT_WITH_SCHEMA_DATATYPE
          Code for : Mismatch between Input data type and schema data type
static int IPDR_MISMATCH_NS_SD
          Code for : Mismatch in number of elements in nameSpaceInfo & serviceDefinitionURI arrays
static int IPDR_NO_DOCEND
          Code for : DocEnd not found
static int IPDR_NO_SCHEMA
          Code for : No Schema is available
static int IPDR_NO_SD_FILE
          Code for : No Service Definition file is present
static int IPDR_NO_SD_URI
          Code for : Ok public static final int IPDR_OK = 0; /** Code for : Service Definition URI is NULL
static int IPDR_NO_SUCH_ATTRIBUTE_IN_SCHEMA
          Code for : Attribute not present in the Schema
static int IPDR_NULL_INPUT_PARAMETER
          Code for : Input parameter passed as NULL
static int IPDR_NULL_TIME
          Code for : Time is generated as NULL
static int IPDR_NULL_UUID
          Code for : UUID is generated as NULL
static int IPDR_ORDER_MISMATCH
          Code for : Order of CompositeData attributes does not match with order of Schema attributes
static int IPDR_TYPE_MISMATCH_IN_SCHEMA_AND_COMPDATA
          Code for : Data Type for attribute of Schema and corresponding attribute of CompositeData does not match
static int IPDR_UNKNOWN_NS_PREFIX
          Code for : Unknown namespace prefix is present in service definition URI
static int PDR_INVALID_SD_FILE
          Code for : Invalid Service Definition file
 
Constructor Summary
ErrorMessage(int errorCode, int errorIpdrCount, java.lang.String errorLocation)
          Constructor to initialise all the member variables during writing of an IPDRDoc.
ErrorMessage(int errorCode, int errorIpdrCount, java.lang.String errorLocation, long errorOffset)
          Constructor to initialise all the member variables with offset value during reading of an IPDRDoc.
 
Method Summary
 int getCode()
          Method to get the Error Code of an error object.
 int getIpdrCount()
          Method to get the Error Count of an error object.
 java.lang.String getLocation()
          Method to get the Error Location of an error object.
static java.lang.String getMessage(int errorcode)
          This method returns Error Message.
 long getOffset()
          Method to get the Error Offset of an error object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorCode_

protected int errorCode_
To store Error Code to identify the event.


errorIpdrCount_

protected int errorIpdrCount_
To store Error Count.


errorOffset_

protected long errorOffset_
To store Exact location in bytes of the error message.


errorLocation_

protected java.lang.String errorLocation_
To store Location of error message.


IPDR_NO_SD_URI

public static final int IPDR_NO_SD_URI
Code for : Ok public static final int IPDR_OK = 0; /** Code for : Service Definition URI is NULL

See Also:
Constant Field Values

IPDR_INVALID_URL

public static final int IPDR_INVALID_URL
Code for : Invalid URL

See Also:
Constant Field Values

IPDR_NO_SD_FILE

public static final int IPDR_NO_SD_FILE
Code for : No Service Definition file is present

See Also:
Constant Field Values

PDR_INVALID_SD_FILE

public static final int PDR_INVALID_SD_FILE
Code for : Invalid Service Definition file

See Also:
Constant Field Values

IPDR_NO_SCHEMA

public static final int IPDR_NO_SCHEMA
Code for : No Schema is available

See Also:
Constant Field Values

IPDR_UNKNOWN_NS_PREFIX

public static final int IPDR_UNKNOWN_NS_PREFIX
Code for : Unknown namespace prefix is present in service definition URI

See Also:
Constant Field Values

IPDR_INVALID_SCHEMA

public static final int IPDR_INVALID_SCHEMA
Code for : Invalid Schema

See Also:
Constant Field Values

IPDR_INVALID_LOGIN

public static final int IPDR_INVALID_LOGIN
Code for : Login / Password is not correct

See Also:
Constant Field Values

IPDR_CONNECTION_FAILED

public static final int IPDR_CONNECTION_FAILED
Code for : Connection Failed

See Also:
Constant Field Values

IPDR_NULL_UUID

public static final int IPDR_NULL_UUID
Code for : UUID is generated as NULL

See Also:
Constant Field Values

IPDR_NULL_TIME

public static final int IPDR_NULL_TIME
Code for : Time is generated as NULL

See Also:
Constant Field Values

IPDR_INVALID_TIME_FORMAT

public static final int IPDR_INVALID_TIME_FORMAT
Code for : Invalid Time Format

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_MISMATCH_NS_SD

public static final int IPDR_MISMATCH_NS_SD
Code for : Mismatch in number of elements in nameSpaceInfo & serviceDefinitionURI arrays

See Also:
Constant Field Values

IPDR_MISMATCH_ATTRIBUTE_DATA_ARRAY

public static final int IPDR_MISMATCH_ATTRIBUTE_DATA_ARRAY
Code for : Mismatch in AttributeType & Input Data Type

See Also:
Constant Field Values

IPDR_INVALID_IPV4ADDR

public static final int IPDR_INVALID_IPV4ADDR
Code for : Invalid Ipv4Addr

See Also:
Constant Field Values

IPDR_INVALID_IPV6ADDR

public static final int IPDR_INVALID_IPV6ADDR
Code for : Invalid Ipv6Addr

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_IPDRRECCOUNT_NOT_INITIALISED

public static final int IPDR_IPDRRECCOUNT_NOT_INITIALISED
Code for : ipdrRecordCount is not initialized properly

See Also:
Constant Field Values

IPDR_MISMATCH_INPUT_DATA_SCHEMA_LOOKUP

public static final int IPDR_MISMATCH_INPUT_DATA_SCHEMA_LOOKUP
Code for : Mismatch in attributes between input data and Schema Lookup table

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 : Mismatch between Input data type and schema data type

See Also:
Constant Field Values

IPDR_MISMATCH_IN_ENCODED_DECODED_RECORDS

public static final int IPDR_MISMATCH_IN_ENCODED_DECODED_RECORDS
Code for : Mismatch in number of decoded & encoded records in the IPDR Document

See Also:
Constant Field Values

IPDR_DUPLICATE_DESCID

public static final int IPDR_DUPLICATE_DESCID
Code for : Encountered duplicate descriptorID

See Also:
Constant Field Values

IPDR_INVALID_DOCTYPE_MAKE_XML

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

See Also:
Constant Field Values

IPDR_DESC_NOT_VALID

public static final int IPDR_DESC_NOT_VALID
Code for : Descriptor ID is not valid

See Also:
Constant Field Values

IPDR_MANDATORY_PRST_IN_OPT_ARRAY

public static final int IPDR_MANDATORY_PRST_IN_OPT_ARRAY
Code for : Mandatory Attribute is present in Optional Attributes Array

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_TYPE_MISMATCH_IN_SCHEMA_AND_COMPDATA

public static final int IPDR_TYPE_MISMATCH_IN_SCHEMA_AND_COMPDATA
Code for : Data Type for attribute of Schema and corresponding attribute of CompositeData does not match

See Also:
Constant Field Values

IPDR_DOCEND_MISSING

public static final int IPDR_DOCEND_MISSING
Code for : DocEnd is not present in the XML document

See Also:
Constant Field Values

IPDR_ORDER_MISMATCH

public static final int IPDR_ORDER_MISMATCH
Code for : Order of CompositeData attributes does not match with order of Schema attributes

See Also:
Constant Field Values

IPDR_ARRAY_LENGTH_MISMATCH

public static final int IPDR_ARRAY_LENGTH_MISMATCH
Code for : MaxLength of CompositeData attribute does not match with maxOccurs of Schema attribute

See Also:
Constant Field Values
Constructor Detail

ErrorMessage

public ErrorMessage(int errorCode,
                    int errorIpdrCount,
                    java.lang.String errorLocation,
                    long errorOffset)
Constructor to initialise all the member variables with offset value during reading of an IPDRDoc.


ErrorMessage

public ErrorMessage(int errorCode,
                    int errorIpdrCount,
                    java.lang.String errorLocation)
Constructor to initialise all the member variables during writing of an IPDRDoc.

Method Detail

getCode

public int getCode()
Method to get the Error Code of an error object.


getLocation

public java.lang.String getLocation()
Method to get the Error Location of an error object.


getIpdrCount

public int getIpdrCount()
Method to get the Error Count of an error object.


getOffset

public long getOffset()
Method to get the Error Offset of an error object.


getMessage

public static java.lang.String getMessage(int errorcode)
This method returns Error Message.