|
Open Business Objects for EDI v3.6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--com.americancoders.edi.IDListParser
SAX2 parser handler for IDList xml files
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
| Field Summary | |
protected int |
_iElement
current element count |
protected int |
_iLine
current line number |
protected java.util.Vector |
codes
vectors of idlist codes and values |
protected javax.xml.parsers.SAXParser |
parser
SAX parser |
protected java.util.Vector |
values
vectors of idlist codes and values |
protected java.lang.String |
xmlDirectoryPath
directory path for xml file |
| Constructor Summary | |
IDListParser()
constructor, sets up SAX parser, turns off validation, turns on namespaces, sets up content handler and error handler as this object. |
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
catches the element's value |
void |
comment(char[] chars,
int start,
int length)
|
void |
endCDATA()
|
void |
endDTD()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
Method called by the SAX parser at the |
void |
endEntity(java.lang.String arg0)
|
void |
error(org.xml.sax.SAXParseException e)
catches error SAXParseExceptions this code causes exception to continue |
void |
fatalError(org.xml.sax.SAXParseException e)
catches fatal SAXParseExceptions this code causes exception to continue |
java.lang.String |
getCode(int i)
gets code as specific location |
int |
getCount()
returns number of code/value pairs |
javax.xml.parsers.SAXParser |
getParser()
get SAX parser |
java.lang.String |
getValue(int i)
returns descriptive value at position |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
I use this to keep track of line #s |
void |
parse(java.lang.String inXMLFile,
java.lang.String inLastDirectoryToLook,
java.util.Vector vCodes,
java.util.Vector vValues)
makes the SAX2 parser call |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
resolves the DTD file name for the xerces parser |
void |
startCDATA()
|
void |
startDTD(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
method called for each xml element found. |
void |
startEntity(java.lang.String arg0)
|
void |
warning(org.xml.sax.SAXParseException e)
catches warning SAXParseExceptions this code sends exception to stdio and allows public classto continue |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int _iElement
protected int _iLine
protected java.util.Vector codes
protected java.util.Vector values
protected javax.xml.parsers.SAXParser parser
protected java.lang.String xmlDirectoryPath
| Constructor Detail |
public IDListParser()
throws OBOEException
| Method Detail |
public void parse(java.lang.String inXMLFile,
java.lang.String inLastDirectoryToLook,
java.util.Vector vCodes,
java.util.Vector vValues)
inXMLFile - String of filename to parseinLastDirectoryToLook - - name of the top directory where the IDList file could residevCodes - vector of codesvValues - vector of code descriptive values
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleruri - URI of incoming filelocalName - String of element's local namerawName - String of element's raw nameattributes - Vector of the elements attributes
org.xml.sax.SAXException - many possible exceptions
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerch - char array of the current element value contentsstart - int start position within the arraylength - int of characters found so far
org.xml.sax.SAXException - many possible
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleruri - URI of incoming filelocalName - String of element's local namerawName - String of element's raw name
org.xml.sax.SAXException - many possible
public void ignorableWhitespace(char[] ch,
int start,
int length)
ignorableWhitespace in interface org.xml.sax.ContentHandlerignorableWhitespace in class org.xml.sax.helpers.DefaultHandlerch - char array of found whitespacesstart - int start position in arraylength - int length of what's been found
public void warning(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandlere - SaxException object
org.xml.sax.SAXException - exception
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlere - SaxException object
org.xml.sax.SAXException - thrown
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlere - SAXException object
org.xml.sax.SAXException - thrown
public void startDTD(java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws org.xml.sax.SAXException
startDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void endDTD()
throws org.xml.sax.SAXException
endDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void startEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
startEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void endEntity(java.lang.String arg0)
throws org.xml.sax.SAXException
endEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void startCDATA()
throws org.xml.sax.SAXException
startCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void endCDATA()
throws org.xml.sax.SAXException
endCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public void comment(char[] chars,
int start,
int length)
throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXException
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
resolveEntity in interface org.xml.sax.EntityResolverresolveEntity in class org.xml.sax.helpers.DefaultHandlerpublicId - - String name of xml public idsystemId - - String name of xml system id
org.xml.sax.SAXExceptionpublic javax.xml.parsers.SAXParser getParser()
public int getCount()
public java.lang.String getCode(int i)
i - int position to look at
public java.lang.String getValue(int i)
i - int position to look at
|
Open Business Objects for EDI v3.6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||