org.apache.tools.ant.taskdefs.optional.ejb
public class DescriptorHandler extends HandlerBase
Field Summary | |
---|---|
protected String | currentElement
Instance variable used to store the name of the current element being
processed by the SAX parser. |
protected String | currentText
The text of the current element |
protected Hashtable | ejbFiles
Instance variable that stores the names of the files as they will be
put into the jar file, mapped to File objects Accessed by the SAX
parser call-back method characters(). |
protected String | ejbName
Instance variable that stores the value found in the <ejb-name> element |
Constructor Summary | |
---|---|
DescriptorHandler(Task task, File srcDir)
Constructor for DescriptorHandler. |
Method Summary | |
---|---|
void | characters(char[] ch, int start, int length)
SAX parser call-back method invoked whenever characters are located within
an element. currentAttribute (modified by startElement and endElement)
tells us whether we are in an interesting element (one of the up to four
classes of an EJB). |
void | endElement(String name)
SAX parser call-back method that is invoked when an element is exited.
|
String | getEjbName()
Getter method that returns the value of the <ejb-name> element. |
Hashtable | getFiles()
Getter method that returns the set of files to include in the EJB jar. |
String | getPublicId()
Get the publicId of the DTD |
protected void | processElement()
Called when an endelement is seen.
|
void | registerDTD(String publicId, String location)
Register a dtd with a location.
|
InputSource | resolveEntity(String publicId, String systemId)
Resolve the entity. |
void | startDocument()
SAX parser call-back method that is used to initialize the values of some
instance variables to ensure safe operation. |
void | startElement(String name, AttributeList attrs)
SAX parser call-back method that is invoked when a new element is entered
into. |
Parameters: task the task that owns this desciptor srcDir the source directory
Parameters: ch A character array containing all the characters in the element, and maybe others that should be ignored. start An integer marking the position in the char array to start reading from. length An integer representing an offset into the char array where the current data terminates.
Throws: SAXException on error
Parameters: name The name of the attribute being exited. Ignored in this implementation.
Throws: SAXException on error
Returns: the ejb name
Returns: the map of files
Returns: the public id
Parameters: publicId the public identity of the dtd location the location of the dtd
Parameters: publicId The public identifier, or null
if none is available. systemId The system identifier provided in the XML
document. Will not be null
.
Returns: an inputsource for this identifier
Throws: SAXException if there is a problem.
See Also: org.xml.sax.EntityResolver#resolveEntity(String, String).
Throws: SAXException on error
Parameters: name The name of the element being entered. attrs Attributes associated to the element.
Throws: SAXException on error