Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Class DocumentErrors

java.lang.Object
  |
  +--com.americancoders.edi.DocumentErrors

public class DocumentErrors
extends java.lang.Object

class to keep track of errors in EDI documents.

OBOE - Open Business Objects for EDI

Part of the OBOE Basic Extended Package
An EDI and XML Translator Written In Java
Copyright 1998-2009 - American Coders, LTD - Raleigh NC USA
All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com

Version:
3.6.0
Author:
Joe McVerry - American Coders, Ltd.

Constructor Summary
DocumentErrors()
          Constructor
 
Method Summary
 void addError(int inPos, java.lang.String inID, java.lang.String inDescription, com.americancoders.edi.IContainedObject inContainer, java.lang.String inCode, java.lang.Object inErrObject)
          Deprecated. use addError(int, String, String, IContainedObject, String, Object, int)
 void addError(int inPos, java.lang.String inID, java.lang.String inDescription, com.americancoders.edi.IContainedObject inContainer, java.lang.String inCode, java.lang.Object inErrObject, boolean inReportable)
          Deprecated. use addError(int inPos, String inID, String inDescription, IContainedObject inContainer, String inCode, Object inErrObject, boolean inReportable, int level)
 void addError(int inPos, java.lang.String inID, java.lang.String inDescription, com.americancoders.edi.IContainedObject inContainer, java.lang.String inCode, java.lang.Object inErrObject, int inLevel)
          add an error to the vectors,
method will skip add if incoming level is greater than level set by OBOE.properties field ErrorLevelToReport, if no field present defaults to 3.
 com.americancoders.edi.IContainedObject getContainer(int inPosition)
          returns the container of the segment in error or the last valid container
 java.lang.String[] getError()
          returns a string array of the errors found, or null if no errors.
 java.lang.String getErrorCode(int inPosition)
          returns the code of the error
 int getErrorCount()
          returns the number of segment errors
 java.lang.String getErrorDescription(int inPosition)
          returns the description of the error
 java.lang.String getErrorID(int inPosition)
          returns the id of the segment in error
 int getErrorLevel(int inLvl)
           
 java.lang.Object getErrorObject(int inPosition)
          returns the object causing the error
 int getErrorPosition(int inPosition)
          returns the int position of the segment in error
 int getLevel(int inPosition)
          returns the level of error
 boolean isReportable(int inPosition)
          returns the boolean indicator if the error is reportable by 997/CONTRL
 void logErrors()
          logs the document error lines to the log file
 void setErrorLevel(int inLvl)
          sets the minimim level of compliance checking
default value is set to 2
minimum value is 1
maximum value is 10
 void writeErrors(java.io.Writer inWrtr)
          sends the document error lines to a java.io.Writer object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentErrors

public DocumentErrors()
Constructor

Method Detail

setErrorLevel

public void setErrorLevel(int inLvl)
sets the minimim level of compliance checking
default value is set to 2
minimum value is 1
maximum value is 10

Parameters:
inLvl -

getErrorLevel

public int getErrorLevel(int inLvl)

addError

public void addError(int inPos,
                     java.lang.String inID,
                     java.lang.String inDescription,
                     com.americancoders.edi.IContainedObject inContainer,
                     java.lang.String inCode,
                     java.lang.Object inErrObject)
Deprecated. use addError(int, String, String, IContainedObject, String, Object, int)

add an error to the vectors

Parameters:
inPos - - integer position of segment in error
inID - - String id of segment in error
inDescription - - String description of error
inContainer - - IContainedObject that may own the erroneous segment or the last valid container
inCode - - String representing X12 or EDFact error code
inErrObject - - object causing error - ts, seg, de,...

addError

public void addError(int inPos,
                     java.lang.String inID,
                     java.lang.String inDescription,
                     com.americancoders.edi.IContainedObject inContainer,
                     java.lang.String inCode,
                     java.lang.Object inErrObject,
                     boolean inReportable)
Deprecated. use addError(int inPos, String inID, String inDescription, IContainedObject inContainer, String inCode, Object inErrObject, boolean inReportable, int level)

add an error to the vectors

Parameters:
inPos - - integer position of segment in error
inID - - String id of segment in error
inDescription - - String description of error
inContainer - - IContainedObject that may own the erroneous segment or the last valid container
inCode - - String representing X12 or EDFact error code
inErrObject - - object causing error - ts, seg, de,...
inReportable - - so serious report it

addError

public void addError(int inPos,
                     java.lang.String inID,
                     java.lang.String inDescription,
                     com.americancoders.edi.IContainedObject inContainer,
                     java.lang.String inCode,
                     java.lang.Object inErrObject,
                     int inLevel)
add an error to the vectors,
method will skip add if incoming level is greater than level set by OBOE.properties field ErrorLevelToReport, if no field present defaults to 3.
if property field value out of range (< 0 or > 10) field value reset to 3.

Parameters:
inPos - - integer position of segment in error
inID - - String id of segment in error
inDescription - - String description of error
inContainer - - IContainedObject that may own the erroneous segment or the last valid container
inCode - - String representing X12 or EDFact error code
inErrObject - - object causing error - ts, seg, de,...
inLevel - - int level, HIPAA compliance level. Not doing HIPAA use zero.

getErrorCount

public int getErrorCount()
returns the number of segment errors

Returns:
int

getErrorPosition

public int getErrorPosition(int inPosition)
returns the int position of the segment in error

Parameters:
inPosition - is the position in the vector of errors

getErrorID

public java.lang.String getErrorID(int inPosition)
returns the id of the segment in error

Parameters:
inPosition - is the position in the vector of errors

getErrorDescription

public java.lang.String getErrorDescription(int inPosition)
returns the description of the error

Parameters:
inPosition - is the position in the vector of errors

getContainer

public com.americancoders.edi.IContainedObject getContainer(int inPosition)
returns the container of the segment in error or the last valid container

Parameters:
inPosition - is the position in the vector of errors

getErrorCode

public java.lang.String getErrorCode(int inPosition)
returns the code of the error

Parameters:
inPosition - is the position in the vector of errors

getErrorObject

public java.lang.Object getErrorObject(int inPosition)
returns the object causing the error

Parameters:
inPosition - is the position in the vector of errorObjects

isReportable

public boolean isReportable(int inPosition)
returns the boolean indicator if the error is reportable by 997/CONTRL

Parameters:
inPosition - is the position in the vector of boolean indicator

getLevel

public int getLevel(int inPosition)
returns the level of error

Parameters:
inPosition - is the position in the vector of boolean indicator
Returns:
int

getError

public java.lang.String[] getError()
returns a string array of the errors found, or null if no errors.

Returns:
String[]

logErrors

public void logErrors()
logs the document error lines to the log file


writeErrors

public void writeErrors(java.io.Writer inWrtr)
                 throws java.io.IOException
sends the document error lines to a java.io.Writer object

Parameters:
inWrtr - Writer
Throws:
java.io.IOException - - something wrong with the Writer object?

Open Business Objects for EDI
v3.6.0


OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries.
Copyright 1999-2004 American Coders, Ltd.
POB 97462
Raleigh NC 27624 USA
All Rights Reserved.