Package net.ontopia.utils.ontojsp
Class JSPContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- net.ontopia.utils.ontojsp.JSPContentHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
ModuleContentHandler
public class JSPContentHandler extends DefaultHandler
INTERNAL: A Content Handler that reads a JSP file and builds a JSP tree of JSPTreeNodeIF objects from a XML instance.
-
-
Field Summary
Fields Modifier and Type Field Description protected JSPTreeNodeIF
current
protected ErrorHandler
ehandler
protected Locator
locator
protected Stack<String>
parents
protected JSPTreeNodeIF
root
protected JSPTagFactoryIF
tagFactory
protected boolean
useTagPooling
-
Constructor Summary
Constructors Constructor Description JSPContentHandler()
JSPContentHandler(boolean useTagPooling)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endDocument()
void
endElement(String uri, String lname, String qname)
protected ErrorHandler
getDefaultErrorHandler()
JSPTreeNodeIF
getRootNode()
Returns the root node of the just read-in and built JSPTree.void
register(XMLReader parser)
void
setDocumentLocator(Locator locator)
void
startDocument()
void
startElement(String uri, String lname, String qname, Attributes atts)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
root
protected JSPTreeNodeIF root
-
current
protected JSPTreeNodeIF current
-
tagFactory
protected JSPTagFactoryIF tagFactory
-
useTagPooling
protected final boolean useTagPooling
-
ehandler
protected ErrorHandler ehandler
-
locator
protected Locator locator
-
-
Method Detail
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classDefaultHandler
-
register
public void register(XMLReader parser)
-
getDefaultErrorHandler
protected ErrorHandler getDefaultErrorHandler()
-
startDocument
public void startDocument()
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
-
endDocument
public void endDocument()
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
-
startElement
public void startElement(String uri, String lname, String qname, Attributes atts) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String lname, String qname) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
getRootNode
public JSPTreeNodeIF getRootNode()
Returns the root node of the just read-in and built JSPTree.
-
-