|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.argouml.persistence.SAXParserBase
Field Summary | |
protected static boolean |
DBG
Switching this to true gives some extra logging messages. |
private static XMLElement[] |
elements
This acts as a stack of elements. |
private static XMLElement[] |
freeElements
This acts as a stack of elements. |
private static Logger |
LOG
Logger. |
private static int |
nElements
The number of items actually in use on the elements stack. |
private static int |
nFreeElements
|
private static long |
parseTime
|
private static String |
RETURNSTRING
|
private static boolean |
stats
|
Constructor Summary | |
SAXParserBase()
The constructor. |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
|
private XMLElement |
createXmlElement(String name,
Attributes atts)
Factory method to return an XMLElement. |
void |
endElement(String uri,
String localname,
String name)
|
String |
getJarResource(String cls)
|
long |
getParseTime()
|
boolean |
getStats()
|
protected abstract void |
handleEndElement(XMLElement e)
Implement in the concrete class to handle reaching the end tag of an element of interest. |
protected abstract void |
handleStartElement(XMLElement e)
Implement in the concrete class to handle reaching the start tag of an element of interest. |
void |
ignoreElement(XMLElement e)
|
protected boolean |
isElementOfInterest(String name)
Determine if an element of the given name is of interest to the parser. |
void |
notImplemented(XMLElement e)
|
void |
parse(InputStream is)
|
InputSource |
resolveEntity(String publicId,
String systemId)
|
void |
setStats(boolean s)
|
void |
startElement(String uri,
String localname,
String name,
Attributes atts)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Logger LOG
private static final String RETURNSTRING
protected static final boolean DBG
private static XMLElement[] elements
private static int nElements
private static XMLElement[] freeElements
private static int nFreeElements
private static boolean stats
private static long parseTime
Constructor Detail |
public SAXParserBase()
Method Detail |
public void setStats(boolean s)
s
- true if statistics have to be shownpublic boolean getStats()
public long getParseTime()
public void parse(InputStream is) throws SAXException
is
- the inputstream of the project to read
SAXException
- when parsing xmlprotected abstract void handleStartElement(XMLElement e) throws SAXException
e
- the element.
SAXException
- on any error parsing the element.protected abstract void handleEndElement(XMLElement e) throws SAXException
e
- the element.
SAXException
- on any error parsing the element.public void startElement(String uri, String localname, String name, Attributes atts) throws SAXException
SAXException
ContentHandler.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
private XMLElement createXmlElement(String name, Attributes atts)
name
- The element name.atts
- The element attributes.
public void endElement(String uri, String localname, String name) throws SAXException
SAXException
ContentHandler.endElement(java.lang.String,
java.lang.String, java.lang.String)
protected boolean isElementOfInterest(String name)
name
- the element name.
public void characters(char[] ch, int start, int length) throws SAXException
SAXException
ContentHandler.characters(char[], int, int)
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
SAXException
EntityResolver.resolveEntity(java.lang.String,
java.lang.String)
public String getJarResource(String cls)
cls
- the class
public void ignoreElement(XMLElement e)
e
- the elementpublic void notImplemented(XMLElement e)
e
- the element
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |