|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jelly.tags.xml.TransformTag.TagBodyXMLReader
private class TransformTag.TagBodyXMLReader
A helper class that converts a transform tag body to an XMLReader to hide the details of where the input for the transform is obtained
Field Summary | |
---|---|
private org.xml.sax.DTDHandler |
dtdHandler
Storage for a DTDHandler if set by the user of the reader. |
private org.xml.sax.EntityResolver |
entityResolver
Storage for a EntityResolver if set by the user of the reader. |
private org.xml.sax.ErrorHandler |
errorHandler
Storage for a ErrorHandler if set by the user of the reader. |
private org.apache.commons.jelly.Tag |
tag
The tag whose body is to be read. |
private org.apache.commons.jelly.XMLOutput |
xmlOutput
The destination for the sax events generated by the reader. |
Constructor Summary | |
---|---|
TransformTag.TagBodyXMLReader(org.apache.commons.jelly.Tag tag)
Construct an XMLReader for the specified Tag |
Method Summary | |
---|---|
private void |
doInvokeBody()
Actually invoke the tag body to generate the SAX events |
org.xml.sax.ContentHandler |
getContentHandler()
Gets the SAX ContentHandler to feed SAX events into |
org.xml.sax.DTDHandler |
getDTDHandler()
Gets the DTD Handler to feed SAX events into |
org.xml.sax.EntityResolver |
getEntityResolver()
Gets the Entity Resolver to feed SAX events into |
org.xml.sax.ErrorHandler |
getErrorHandler()
Gets the Error Handler to feed SAX events into |
boolean |
getFeature(java.lang.String name)
Lookup the value of a feature |
java.lang.Object |
getProperty(java.lang.String name)
Lookup the value of a property |
void |
parse(org.xml.sax.InputSource input)
Parse an XML source. |
void |
parse(java.lang.String systemId)
Parse an XML source specified by a system id |
void |
setContentHandler(org.xml.sax.ContentHandler contentHandler)
Sets the SAX ContentHandler to feed SAX events into |
void |
setDTDHandler(org.xml.sax.DTDHandler dtdHandler)
Sets the DTD Handler to feed SAX events into |
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
Sets the Entity Resolver to feed SAX events into |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
Sets the Error Handler to feed SAX events into |
void |
setFeature(java.lang.String name,
boolean value)
Set the value of a feature |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set the value of a property |
private boolean |
shouldParseBody()
Helper method to determin if nested body needs to be parsed by (an xml parser, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private org.apache.commons.jelly.Tag tag
private org.apache.commons.jelly.XMLOutput xmlOutput
private org.xml.sax.DTDHandler dtdHandler
private org.xml.sax.ErrorHandler errorHandler
private org.xml.sax.EntityResolver entityResolver
Constructor Detail |
---|
public TransformTag.TagBodyXMLReader(org.apache.commons.jelly.Tag tag)
tag
- The Tag to convert to an XMLReaderMethod Detail |
---|
public void parse(org.xml.sax.InputSource input) throws java.io.IOException, org.xml.sax.SAXException
parse
in interface org.xml.sax.XMLReader
input
- The source of the xml
org.xml.sax.SAXException
- -
Any SAX exception, possibly wrapping another exception.
java.io.IOException
- -
An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.public void parse(java.lang.String systemId) throws java.io.IOException, org.xml.sax.SAXException
parse
in interface org.xml.sax.XMLReader
input
- The system identifier (URI)
org.xml.sax.SAXException
- -
Any SAX exception, possibly wrapping another exception.
java.io.IOException
- -
An IO exception from the parser, possibly from a byte
stream or character stream supplied by the application.private void doInvokeBody() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- -
Any SAX exception, possibly wrapping another exception.private boolean shouldParseBody() throws org.apache.commons.jelly.JellyTagException
org.apache.commons.jelly.JellyTagException
public org.xml.sax.ContentHandler getContentHandler()
getContentHandler
in interface org.xml.sax.XMLReader
public void setContentHandler(org.xml.sax.ContentHandler contentHandler)
setContentHandler
in interface org.xml.sax.XMLReader
contentHandler
- is the ContentHandler to use.
This value cannot be null.public org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler
in interface org.xml.sax.XMLReader
public void setDTDHandler(org.xml.sax.DTDHandler dtdHandler)
setDTDHandler
in interface org.xml.sax.XMLReader
the
- DTD Handler to use to feed SAX events intopublic org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler
in interface org.xml.sax.XMLReader
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
setErrorHandler
in interface org.xml.sax.XMLReader
the
- Error Handler to use to feed SAX events intopublic org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver
in interface org.xml.sax.XMLReader
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
setEntityResolver
in interface org.xml.sax.XMLReader
the
- Entity Resolver to use to feed SAX events intopublic java.lang.Object getProperty(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getProperty
in interface org.xml.sax.XMLReader
name
- - The property name, which is a fully-qualified URI.
org.xml.sax.SAXNotRecognizedException
- -
When the XMLReader does not recognize the property name.
org.xml.sax.SAXNotSupportedException
- -
When the XMLReader recognizes the property name but
cannot determine its value at this time.public void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setProperty
in interface org.xml.sax.XMLReader
name
- - The property name, which is a fully-qualified URI.value
- - The property value
org.xml.sax.SAXNotRecognizedException
- -
When the XMLReader does not recognize the property name.
org.xml.sax.SAXNotSupportedException
- -
When the XMLReader recognizes the property name but
cannot determine its value at this time.public boolean getFeature(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getFeature
in interface org.xml.sax.XMLReader
name
- - The feature name, which is a fully-qualified URI.
org.xml.sax.SAXNotRecognizedException
- -
When the XMLReader does not recognize the feature name.
org.xml.sax.SAXNotSupportedException
- -
When the XMLReader recognizes the feature name but
cannot determine its value at this time.public void setFeature(java.lang.String name, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setFeature
in interface org.xml.sax.XMLReader
name
- - The feature name, which is a fully-qualified URI.value
- - The current state of the feature (true or false)
org.xml.sax.SAXNotRecognizedException
- -
When the XMLReader does not recognize the feature name.
org.xml.sax.SAXNotSupportedException
- -
When the XMLReader recognizes the feature name but
cannot determine its value at this time.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |