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 JSPTreeNodeIFcurrentprotected ErrorHandlerehandlerprotected Locatorlocatorprotected Stack<String>parentsprotected JSPTreeNodeIFrootprotected JSPTagFactoryIFtagFactoryprotected booleanuseTagPooling
-
Constructor Summary
Constructors Constructor Description JSPContentHandler()JSPContentHandler(boolean useTagPooling)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendDocument()voidendElement(String uri, String lname, String qname)protected ErrorHandlergetDefaultErrorHandler()JSPTreeNodeIFgetRootNode()Returns the root node of the just read-in and built JSPTree.voidregister(XMLReader parser)voidsetDocumentLocator(Locator locator)voidstartDocument()voidstartElement(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:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classDefaultHandler
-
register
public void register(XMLReader parser)
-
getDefaultErrorHandler
protected ErrorHandler getDefaultErrorHandler()
-
startDocument
public void startDocument()
- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler
-
endDocument
public void endDocument()
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classDefaultHandler
-
startElement
public void startElement(String uri, String lname, String qname, Attributes atts) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String lname, String qname) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
getRootNode
public JSPTreeNodeIF getRootNode()
Returns the root node of the just read-in and built JSPTree.
-
-