All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com
- Version:
- 1.4.1
- 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
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 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 name)
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 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. |
TemplateDE |
setDataElement(int pos,
org.xml.sax.AttributeList atts)
help method to build a template data element |
TemplateComposite |
setTemplateComposite(int pos,
org.xml.sax.AttributeList atts)
help method to build a template composite |
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
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.HandlerBase |
characters,
ignorableWhitespace,
notationDecl,
processingInstruction,
resolveEntity,
setDocumentLocator,
startDocument,
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()
- construct the factory with a xml parser
- Parameters:
org.xml.sax.Parser
- parser
startElement
public void startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
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.HandlerBase
- Parameters:
String
- data element nameAttributeList
- attributes associated with data element
endElement
public void endElement(java.lang.String name)
throws org.xml.sax.SAXException
- Method called by the SAX parser at the
- Overrides:
- endElement in class org.xml.sax.HandlerBase
- Parameters:
String
- name of element found- Throws:
- org.xml.sax.SAXException -
setTemplateComposite
public TemplateComposite setTemplateComposite(int pos,
org.xml.sax.AttributeList atts)
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.AttributeList atts)
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.HandlerBase
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.HandlerBase
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.HandlerBase
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.HandlerBase
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
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
-
- 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.