com.berryworks.edireader
Class EDIParser

java.lang.Object
  extended by javax.xml.parsers.SAXParser
      extended by com.berryworks.edireader.EDIParser

public class EDIParser
extends javax.xml.parsers.SAXParser

Wraps an EDIReader.

EDIParser is necessary to satisfy the JAXP conventions for dynamic selection and loading of a specific XML parser into an XML application. By following this convention, it is possible to integrate EDIReader (and therefore EDI data) into various XML applications without any changes to those applications.


Constructor Summary
EDIParser()
          Construct an EDIParser object.
EDIParser(EDIReader ediReader)
          Construct an EDIParser object.
 
Method Summary
 org.xml.sax.Parser getParser()
          Get the parser attribute of the EDIParser.
 java.lang.Object getProperty(java.lang.String name)
          Get the property attribute of the EDIReader.
 org.xml.sax.XMLReader getXMLReader()
          Get the XMLReader attribute of the EDIParser.
 boolean isNamespaceAware()
          Get the namespaceAware attribute of the EDIParser object
 boolean isValidating()
          Get the validating attribute of the EDIParser.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets the property attribute of the EDIReader.
 
Methods inherited from class javax.xml.parsers.SAXParser
getSchema, isXIncludeAware, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, reset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EDIParser

public EDIParser()
Construct an EDIParser object.

This EDIParser provides for delayed format recognition, where the actual subclass of EDIReader is not created until the parse method is first called. This mechanism is in support of the JAXP interfaces.


EDIParser

public EDIParser(EDIReader ediReader)
Construct an EDIParser object.

Parameters:
ediReader - wrapped within this EDIParser
Method Detail

getXMLReader

public org.xml.sax.XMLReader getXMLReader()
Get the XMLReader attribute of the EDIParser.

Specified by:
getXMLReader in class javax.xml.parsers.SAXParser
Returns:
XMLReader the EDIReader wrapped within this EDIParser

getParser

public org.xml.sax.Parser getParser()
Get the parser attribute of the EDIParser.

Specified by:
getParser in class javax.xml.parsers.SAXParser
Returns:
null this deprecated method is only for SAX1 compatibility

isValidating

public boolean isValidating()
Get the validating attribute of the EDIParser.

Specified by:
isValidating in class javax.xml.parsers.SAXParser
Returns:
The validating value

isNamespaceAware

public boolean isNamespaceAware()
Get the namespaceAware attribute of the EDIParser object

Specified by:
isNamespaceAware in class javax.xml.parsers.SAXParser
Returns:
The namespaceAware value

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
Sets the property attribute of the EDIReader.

Specified by:
setProperty in class javax.xml.parsers.SAXParser
Parameters:
name - The new property value
value - The new property value
Throws:
org.xml.sax.SAXNotRecognizedException - for SAX compatibility
org.xml.sax.SAXNotSupportedException - for SAX compatibility

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws org.xml.sax.SAXNotRecognizedException,
                                    org.xml.sax.SAXNotSupportedException
Get the property attribute of the EDIReader.

Specified by:
getProperty in class javax.xml.parsers.SAXParser
Parameters:
name - Description of the Parameter
Returns:
The property value
Throws:
org.xml.sax.SAXNotRecognizedException - for SAX compatibility
org.xml.sax.SAXNotSupportedException - for SAX compatibility