Quadcap Embeddable Server

com.quadcap.text.sax.Handler Class Reference

Inheritance diagram for com.quadcap.text.sax.Handler:

DocumentHandler ErrorHandler List of all members.

Detailed Description

General purpose sax handler class.

Author:
Stan Bailes

Definition at line 66 of file Handler.java.

Public Member Functions

 Handler () throws SAXException
 Construct a new parser.

void parse (Reader r, Object context) throws SAXException
 Parse the specified file the context of the specified web application.

 SAX parser callback to handle XML Parser errors.

 SAX parser callback to handle XML Parser fatal errors.

 SAX parser callback to handle XML Parser fatal errors.

void characters (char[] ch, int start, int length) throws SAXException
 SAX parser callback to handle character data found in the parsed document.

void endDocument ()
 SAX parser callback function that is called when the end of the document is reached.

void endElement (String name) throws SAXException
 SAX parser callback function called for the end of an element.

void ignorableWhitespace (char[] ch, int start, int length)
 SAX parser callback for ignorable whitespace.

void processingInstruction (String target, String data)
 SAX parser callback for processing instructions.

void setDocumentLocator (Locator locator)
 SAX parser callback used to receive a document locator.

void startDocument ()
 SAX parser callback for document start.

void startElement (String name, AttributeList attrs) throws SAXException
 SAX parser callback for the start of an element.


Protected Member Functions

final String consumeAny (String name) throws SAXException
final String consume (String name) throws SAXException
final String consumeData ()

Protected Attributes

Object context = null
Hashtable env = new Hashtable()
StringBuffer data = new StringBuffer("")

Package Attributes

Parser parser
Locator locator


Constructor & Destructor Documentation

com.quadcap.text.sax.Handler.Handler  ) 
 

Construct a new parser.

Definition at line 77 of file Handler.java.

References com.quadcap.text.sax.Handler.parser, com.quadcap.text.sax.Parser.setDocumentHandler(), com.quadcap.text.sax.Parser.setErrorHandler(), and com.quadcap.util.ConfigString.toString().


Member Function Documentation

void com.quadcap.text.sax.Handler.characters char[]  ch,
int  start,
int  length
 

SAX parser callback to handle character data found in the parsed document.

Parameters:
ch the buffer containing the parsed characters.
star the buffer position of the first character
length the number of characters
Exceptions:
SAXException may be thrown if this data represents a database value and there's a SQL exception thrown while trying to update the underlying resultset object with this data.

Definition at line 162 of file Handler.java.

References com.quadcap.text.sax.Handler.characters(), and com.quadcap.text.sax.Handler.data.

Referenced by com.quadcap.text.sax.Handler.characters().

final String com.quadcap.text.sax.Handler.consume String  name  ) 
 

Definition at line 193 of file Handler.java.

References com.quadcap.text.sax.Handler.consume().

Referenced by com.quadcap.text.sax.Handler.consume().

final String com.quadcap.text.sax.Handler.consumeAny String  name  ) 
 

Definition at line 185 of file Handler.java.

References com.quadcap.text.sax.Handler.consumeAny(), and com.quadcap.text.sax.Handler.env.

Referenced by com.quadcap.text.sax.Handler.consumeAny().

final String com.quadcap.text.sax.Handler.consumeData  )  [protected]
 

Definition at line 201 of file Handler.java.

References com.quadcap.text.sax.Handler.data.

void com.quadcap.text.sax.Handler.endDocument  ) 
 

SAX parser callback function that is called when the end of the document is reached.

This implementation does nothing.

Definition at line 172 of file Handler.java.

void com.quadcap.text.sax.Handler.endElement String  name  ) 
 

SAX parser callback function called for the end of an element.

Parameters:
name the name of this element
Exceptions:
SAXException may be thrown

Definition at line 181 of file Handler.java.

References com.quadcap.text.sax.Handler.endElement().

Referenced by com.quadcap.text.sax.Handler.endElement().

void com.quadcap.text.sax.Handler.error exception  ) 
 

SAX parser callback to handle XML Parser errors.

This implementation just prints them to System.err.

Parameters:
exception the exception generated by the parser.

Definition at line 120 of file Handler.java.

References com.quadcap.text.sax.Handler.error().

Referenced by com.quadcap.text.sax.Handler.error().

void com.quadcap.text.sax.Handler.fatalError exception  ) 
 

SAX parser callback to handle XML Parser fatal errors.

This implementation just prints them to System.err.

Parameters:
exception the exception generated by the parser.

Definition at line 132 of file Handler.java.

References com.quadcap.text.sax.Handler.fatalError().

Referenced by com.quadcap.text.sax.Handler.fatalError().

void com.quadcap.text.sax.Handler.ignorableWhitespace char[]  ch,
int  start,
int  length
 

SAX parser callback for ignorable whitespace.

We just ignore it

Parameters:
ch the buffer containing the parsed characters.
star the buffer position of the first character
length the number of characters

Definition at line 214 of file Handler.java.

References com.quadcap.text.sax.Handler.ignorableWhitespace().

Referenced by com.quadcap.text.sax.Handler.ignorableWhitespace().

void com.quadcap.text.sax.Handler.parse Reader  r,
Object  context
 

Parse the specified file the context of the specified web application.

Parameters:
dd the inputstream containing the deployment descriptor
app the web application being constructed

Definition at line 99 of file Handler.java.

References com.quadcap.text.sax.Handler.context, com.quadcap.text.sax.Parser.parse(), com.quadcap.text.sax.Handler.parse(), and com.quadcap.text.sax.Handler.parser.

Referenced by com.quadcap.text.sax.Handler.parse().

void com.quadcap.text.sax.Handler.processingInstruction String  target,
String  data
 

SAX parser callback for processing instructions.

This implementation does nothing.

Parameters:
target the processing instruction target.
data the processing instruction data.

Definition at line 224 of file Handler.java.

References com.quadcap.text.sax.Handler.processingInstruction().

Referenced by com.quadcap.text.sax.Handler.processingInstruction().

void com.quadcap.text.sax.Handler.setDocumentLocator Locator  locator  ) 
 

SAX parser callback used to receive a document locator.

Parameters:
locator the parser's locator object.

Definition at line 232 of file Handler.java.

References com.quadcap.text.sax.Handler.setDocumentLocator().

Referenced by com.quadcap.text.sax.Handler.setDocumentLocator().

void com.quadcap.text.sax.Handler.startDocument  ) 
 

SAX parser callback for document start.

This implementation does nothing.

Definition at line 240 of file Handler.java.

void com.quadcap.text.sax.Handler.startElement String  name,
AttributeList  attrs
 

SAX parser callback for the start of an element.

Parameters:
name the element name
attrs the element's attributes
Exceptions:
SAXException may be thrown

Definition at line 251 of file Handler.java.

References com.quadcap.text.sax.Handler.data, and com.quadcap.text.sax.Handler.startElement().

Referenced by com.quadcap.text.sax.Handler.startElement().

void com.quadcap.text.sax.Handler.warning exception  ) 
 

SAX parser callback to handle XML Parser fatal errors.

This implementation just prints them to System.err.

Parameters:
exception the exception generated by the parser.

Definition at line 144 of file Handler.java.

References com.quadcap.text.sax.Handler.warning().

Referenced by com.quadcap.text.sax.Handler.warning().


Member Data Documentation

Object com.quadcap.text.sax.Handler.context = null [protected]
 

Definition at line 67 of file Handler.java.

Referenced by com.quadcap.text.sax.Handler.parse().

StringBuffer com.quadcap.text.sax.Handler.data = new StringBuffer("") [protected]
 

Definition at line 69 of file Handler.java.

Referenced by com.quadcap.text.sax.Handler.characters(), com.quadcap.text.sax.Handler.consumeData(), and com.quadcap.text.sax.Handler.startElement().

Hashtable com.quadcap.text.sax.Handler.env = new Hashtable() [protected]
 

Definition at line 68 of file Handler.java.

Referenced by com.quadcap.text.sax.Handler.consumeAny().

Locator com.quadcap.text.sax.Handler.locator [package]
 

Definition at line 72 of file Handler.java.

Parser com.quadcap.text.sax.Handler.parser [package]
 

Definition at line 71 of file Handler.java.

Referenced by com.quadcap.text.sax.Handler.Handler(), and com.quadcap.text.sax.Handler.parse().