All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com
- Version:
- 1.5.0
- Author:
- Joe McVerry, American Coders Ltd.
Method Summary |
static TransactionSet |
buildTransactionSet(java.lang.String inTSID)
static class method will build a transaction set based on input string and OBOE.properties defintion
see OBOE.properties file to define the directory path |
static TransactionSet |
buildTransactionSet(java.lang.String inTSID,
java.lang.String inPropertiesFileName)
static class method will build a transaction set based on input string and OBOE.properties definition
see OBOE.properties file to define the directory path
file name is preppended with xmlPath from OBOE.properties and appended with ".xml"
example
OBOE.properties file contains: xmlPath = c:/xmlDefinitions/
input String is 840
method will read file named: x:/xmlDefinitions/840.xml |
static TransactionSet |
buildTransactionSet(java.lang.String inTSID,
java.net.URL inURL)
static class method will build a transaction set based on url file name and OBOE.properties defintion
used by the sample html viewer on web page
see OBOE.properties file to define the directory path
file name is preppended with xmlPath from OBOE.properties and appended with ".xml"
example
OBOE.properties file contains: xmlPath = c:/xmlDefinitions/
input String is 840
method will read file named: x:/xmlDefinitions/840.xml |
void |
endDocument()
method called when xml file is read to completion |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
Method called by the SAX parser at the |
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 |
static java.lang.String |
getPropertiesFilePath()
static class method to build the properties file path
see OBOE.properties file to define the directory path
file name is preppended with xmlPath from OBOE.properties and appended with ".xml"
example
OBOE.properties file contains: xmlPath = c:/xmlDefinitions/
input String is 840
method will read file named: x:/xmlDefinitions/840.xml
method will search for the OBOE.properties file
local directory user.home directory java.home directory |
static void |
main(java.lang.String[] args)
static main class used for testing
Class contains a main method to allow it to invoked as an application. |
void |
parse(org.xml.sax.InputSource is)
method to call parser with an InputSource argument |
void |
parse(java.lang.String is)
method to call parser with a String argument |
TemplateDE |
setDataElement(int pos,
org.xml.sax.Attributes attributes)
help method to build a template data element |
TemplateComposite |
setTemplateComposite(int pos,
org.xml.sax.Attributes attributes)
help method to build a template composite |
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 |
warning(org.xml.sax.SAXParseException e)
catches warning SAXParseExceptions
this code sends exception to stdio and allows class to continue |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters,
endPrefixMapping,
ignorableWhitespace,
notationDecl,
processingInstruction,
resolveEntity,
setDocumentLocator,
skippedEntity,
startDocument,
startPrefixMapping,
unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_iElement
protected int _iElement
currentTransactionSet
protected static TransactionSet currentTransactionSet
currentTable
protected Table currentTable
currentTemplateSegmentContainer
protected ITemplateSegmentContainer currentTemplateSegmentContainer
currentTemplateSegment
protected TemplateSegment currentTemplateSegment
currentCompositeDE
protected TemplateComposite currentCompositeDE
currentDataElement
protected TemplateDE currentDataElement
currentLoopID
protected java.lang.String currentLoopID
currentID
protected java.lang.String currentID
currentSegContainerStack
protected java.util.Stack currentSegContainerStack
TransactionSetFactory
public TransactionSetFactory()
throws java.lang.Exception
- construct the factory with a xml parser
parse
public void parse(org.xml.sax.InputSource is)
throws java.lang.Exception
- method to call parser with an InputSource argument
- Parameters:
InputSource
- - Throws:
- an - xml parser exception
parse
public void parse(java.lang.String is)
throws java.lang.Exception
- method to call parser with a String argument
- Parameters:
String
- - Throws:
- an - xml parser exception
startElement
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
- method called for each xml element found.
process logic
- test each name found for edi type: transactionSet, table, segment, dataelement
- for each type pull appropriate attributes and construct object
- for transaction set build transaction set
- for table build a table
- for segments build a template segment
- for data element build a template datalement
- Overrides:
- startElement in class org.xml.sax.helpers.DefaultHandler
- Parameters:
String
- data element nameAttributeList
- attributes associated with data element
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
throws org.xml.sax.SAXException
- Method called by the SAX parser at the
- Overrides:
- endElement in class org.xml.sax.helpers.DefaultHandler
- Parameters:
String
- name of element found- Throws:
- org.xml.sax.SAXException -
setTemplateComposite
public TemplateComposite setTemplateComposite(int pos,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- help method to build a template composite
- Parameters:
AttributeList
- attributes associated with data element- Returns:
- TemplateComposite template composite
setDataElement
public TemplateDE setDataElement(int pos,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- help method to build a template data element
- Parameters:
int
- pos in segment or compositeAttributeList
- attributes associated with data element- Returns:
- TemplateDE template data element
endDocument
public void endDocument()
- method called when xml file is read to completion
- Overrides:
- endDocument in class org.xml.sax.helpers.DefaultHandler
warning
public void warning(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- catches warning SAXParseExceptions
this code sends exception to stdio and allows class to continue
- Overrides:
- warning in class org.xml.sax.helpers.DefaultHandler
error
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- catches error SAXParseExceptions
this code causes exception to continue
- Overrides:
- error in class org.xml.sax.helpers.DefaultHandler
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- catches fatal SAXParseExceptions
this code causes exception to continue
- Overrides:
- fatalError in class org.xml.sax.helpers.DefaultHandler
getPropertiesFilePath
public static java.lang.String getPropertiesFilePath()
throws java.lang.Exception
- static class method to build the properties file path
see OBOE.properties file to define the directory path
file name is preppended with xmlPath from OBOE.properties and appended with ".xml"
example
OBOE.properties file contains: xmlPath = c:/xmlDefinitions/
input String is 840
method will read file named: x:/xmlDefinitions/840.xml
method will search for the OBOE.properties file
- local directory
- user.home directory
- java.home directory
-
- Returns:
- String pathname to Properties file
buildTransactionSet
public static TransactionSet buildTransactionSet(java.lang.String inTSID)
throws java.lang.Exception
- static class method will build a transaction set based on input string and OBOE.properties defintion
see OBOE.properties file to define the directory path
- Parameters:
String
- transaction id- Returns:
- TransactionSet
buildTransactionSet
public static TransactionSet buildTransactionSet(java.lang.String inTSID,
java.lang.String inPropertiesFileName)
throws java.lang.Exception
- static class method will build a transaction set based on input string and OBOE.properties definition
see OBOE.properties file to define the directory path
file name is preppended with xmlPath from OBOE.properties and appended with ".xml"
example
OBOE.properties file contains: xmlPath = c:/xmlDefinitions/
input String is 840
method will read file named: x:/xmlDefinitions/840.xml
- Parameters:
String
- qualified properties files nameString
- transaction id- Returns:
- TransactionSet
buildTransactionSet
public static TransactionSet buildTransactionSet(java.lang.String inTSID,
java.net.URL inURL)
throws java.lang.Exception
- static class method will build a transaction set based on url file name and OBOE.properties defintion
used by the sample html viewer on web page
see OBOE.properties file to define the directory path
file name is preppended with xmlPath from OBOE.properties and appended with ".xml"
example
OBOE.properties file contains: xmlPath = c:/xmlDefinitions/
input String is 840
method will read file named: x:/xmlDefinitions/840.xml
- Parameters:
String
- transaction idURL
- url of properties file- Returns:
- TransactionSet
main
public static void main(java.lang.String[] args)
- static main class used for testing
Class contains a main method to allow it to invoked as an application.
format: java com.americancoders.edi.TransactionSetFactory xmlfilename
where xmlfilename is a xml file based on transactionSet.dtd.