gate.util
Class Lax

java.lang.Object
  |
  +--org.xml.sax.HandlerBase
        |
        +--gate.util.Lax
All Implemented Interfaces:
org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class Lax
extends org.xml.sax.HandlerBase

LAX (LazyProgrammer Api for XML) layer for a SAX parser, based on Sun's JAXP layer...so it works with any JAXP compliant parser


Constructor Summary
Lax(LaxErrorHandler leh)
          Lax default constructor
Lax(Object handler_, LaxErrorHandler leh)
          Lax ctor with a single handler
 
Method Summary
 void addHandler(Object objHandler_)
          Add a handler to the list of handler objects.
 void characters(char[] caChars, int iStart, int iEnd)
          Handle an incoming block of text by calling the textOf method for the current tag.
 void endDocument()
          endDocument method comment.
 void endElement(String sTag)
          Call all end tag methods in the handler list
 void error(org.xml.sax.SAXParseException ex)
          error method comment.
 void fatalError(org.xml.sax.SAXParseException ex)
          fatalError method comment.
 LaxErrorHandler getErrorHandler()
          Get the CustomErrorHandler
 boolean getNamespacesAware()
          Get the namespacesAware property
 boolean getValidating()
          Get the validating property
 void parseXmlDocument(File xmlFile)
           
 void parseXmlDocument(org.xml.sax.InputSource xmlInputSource)
           
 void parseXmlDocument(InputStream xmlInputStream)
           
 void parseXmlDocument(String xmlURI)
           
 void setErrorHandler(LaxErrorHandler leh)
          Sets the CustomErrorHandler
 void setNamespacesAware(boolean namespacesAware)
          Sets the parser to be a namespaces aware one implicit parameter is false (so the parser is not a namespaces aware one)
 void setValidating(boolean validating)
          Sets the parser to be a validating one implicit parameter is false (so the parser is not a validating one)
 void startDocument()
          startDocument method comment.
 void startElement(String sTag, org.xml.sax.AttributeList alAttrs)
          Call all start methods for this tag.
 void warning(org.xml.sax.SAXParseException ex)
          warning method comment.
 
Methods inherited from class org.xml.sax.HandlerBase
ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lax

public Lax(LaxErrorHandler leh)
Lax default constructor

Lax

public Lax(Object handler_,
           LaxErrorHandler leh)
Lax ctor with a single handler
Method Detail

setErrorHandler

public void setErrorHandler(LaxErrorHandler leh)
Sets the CustomErrorHandler
Parameters:
leh - gate.util.LaxErrorHandler

getErrorHandler

public LaxErrorHandler getErrorHandler()
Get the CustomErrorHandler
Returns:
gate.util.LaxErrorHandler

setValidating

public void setValidating(boolean validating)
Sets the parser to be a validating one implicit parameter is false (so the parser is not a validating one)
Parameters:
validating - boolean

getValidating

public boolean getValidating()
Get the validating property
Returns:
boolean

setNamespacesAware

public void setNamespacesAware(boolean namespacesAware)
Sets the parser to be a namespaces aware one implicit parameter is false (so the parser is not a namespaces aware one)
Parameters:
namespacesAware - boolean

getNamespacesAware

public boolean getNamespacesAware()
Get the namespacesAware property
Returns:
boolean

addHandler

public void addHandler(Object objHandler_)
Add a handler to the list of handler objects.
Parameters:
objHandler_ - java.lang.Object

characters

public void characters(char[] caChars,
                       int iStart,
                       int iEnd)
                throws org.xml.sax.SAXException
Handle an incoming block of text by calling the textOf method for the current tag.
Overrides:
characters in class org.xml.sax.HandlerBase

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
endDocument method comment.
Overrides:
endDocument in class org.xml.sax.HandlerBase

endElement

public void endElement(String sTag)
                throws org.xml.sax.SAXException
Call all end tag methods in the handler list
Overrides:
endElement in class org.xml.sax.HandlerBase

error

public void error(org.xml.sax.SAXParseException ex)
           throws org.xml.sax.SAXException
error method comment.
Overrides:
error in class org.xml.sax.HandlerBase

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
fatalError method comment.
Overrides:
fatalError in class org.xml.sax.HandlerBase

parseXmlDocument

public void parseXmlDocument(File xmlFile)

parseXmlDocument

public void parseXmlDocument(org.xml.sax.InputSource xmlInputSource)

parseXmlDocument

public void parseXmlDocument(InputStream xmlInputStream)

parseXmlDocument

public void parseXmlDocument(String xmlURI)

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
startDocument method comment.
Overrides:
startDocument in class org.xml.sax.HandlerBase

startElement

public void startElement(String sTag,
                         org.xml.sax.AttributeList alAttrs)
Call all start methods for this tag.
Overrides:
startElement in class org.xml.sax.HandlerBase

warning

public void warning(org.xml.sax.SAXParseException ex)
             throws org.xml.sax.SAXException
warning method comment.
Overrides:
warning in class org.xml.sax.HandlerBase