public final class PomHandler
extends org.xml.sax.helpers.DefaultHandler
org.eclipse.ant.internal.core.contentDescriber.AntHandler| Modifier and Type | Class and Description |
|---|---|
private class |
PomHandler.StopParsingException
An exception indicating that the parsing should stop.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
ARTIFACTID |
private boolean |
fArtifactIdFound |
private javax.xml.parsers.SAXParserFactory |
fFactory |
private int |
fLevel |
private java.lang.String |
fTopElementFound
This is the name of the top-level element found in the XML file.
|
private static java.lang.String |
PROJECT |
| Constructor and Description |
|---|
PomHandler() |
| Modifier and Type | Method and Description |
|---|---|
private javax.xml.parsers.SAXParser |
createParser(javax.xml.parsers.SAXParserFactory parserFactory)
Creates a new SAX parser for use within this instance.
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName) |
private javax.xml.parsers.SAXParserFactory |
getFactory() |
protected boolean |
hasArtifactIdElement() |
protected boolean |
hasRootProjectElement() |
protected boolean |
parseContents(org.xml.sax.InputSource contents) |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId) |
void |
startElement(java.lang.String uri,
java.lang.String elementName,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes) |
private static final java.lang.String PROJECT
private static final java.lang.String ARTIFACTID
private java.lang.String fTopElementFound
null unless
the file has been parsed successful to the point of finding the top-level element.private javax.xml.parsers.SAXParserFactory fFactory
private boolean fArtifactIdFound
private int fLevel
private final javax.xml.parsers.SAXParser createParser(javax.xml.parsers.SAXParserFactory parserFactory)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
javax.xml.parsers.ParserConfigurationException - If a parser of the given configuration cannot be created.org.xml.sax.SAXException - If something in general goes wrong when creating the parser.org.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedExceptionprivate javax.xml.parsers.SAXParserFactory getFactory()
protected boolean parseContents(org.xml.sax.InputSource contents)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionpublic org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
resolveEntity in interface org.xml.sax.EntityResolverresolveEntity in class org.xml.sax.helpers.DefaultHandlerpublic final void startElement(java.lang.String uri,
java.lang.String elementName,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionprotected boolean hasRootProjectElement()
protected boolean hasArtifactIdElement()