Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Class XMLErrors

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

public class XMLErrors
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
XMLErrors()
          Constructor
 
Method Summary
 void addError(int inLine, java.lang.String inDescription, com.americancoders.edi.IContainedObject inContainer, int inLevel)
           
 void addError(java.lang.String inDescription, com.americancoders.edi.IContainedObject inContainer, org.w3c.dom.Node inNode, int inLevel)
           
 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.
 int getErrorCount()
          returns the number of segment errors
 java.lang.String getErrorDescription(int inPosition)
          returns the description of the error
 int getErrorLevel(int inLvl)
           
 int getLevel(int inPosition)
          returns the level of error
 int getLineNumber(int inPosition)
           
 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

XMLErrors

public XMLErrors()
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(java.lang.String inDescription,
                     com.americancoders.edi.IContainedObject inContainer,
                     org.w3c.dom.Node inNode,
                     int inLevel)
Parameters:
inDescription -
inContainer -
inNode -
inLevel -

addError

public void addError(int inLine,
                     java.lang.String inDescription,
                     com.americancoders.edi.IContainedObject inContainer,
                     int inLevel)
Parameters:
inLine -
inDescription -
inContainer -
inLevel -

getErrorCount

public int getErrorCount()
returns the number of segment errors

Returns:
int

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

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

getLineNumber

public int getLineNumber(int inPosition)

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.