Class PomHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.owasp.dependencycheck.xml.pom.PomHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
A handler to read the pom.xml model.
- Author:
- Jeremy Long
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe artifactId element.static final StringThe description element.static final StringThe developer email element.static final StringThe developer id element.static final StringThe developer element.static final StringThe developer organization element.static final StringThe developer organization URL element.static final StringThe developers element.static final StringThe artifactId element.static final StringThe license element.static final StringThe licenses element.static final StringThe name element.static final StringThe organization element.static final StringThe parent element.static final StringThe project element.static final StringThe URL element.static final StringThe version element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Collects the body text of the node being processed.voidendElement(String uri, String localName, String qName) Handles the end element event.getModel()Returns the model obtained from the pom.xml.voidstartElement(String uri, String localName, String qName, Attributes attributes) Handles the start element event.Methods inherited from class DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
Field Details
-
PROJECT
-
GROUPID
-
ARTIFACTID
-
VERSION
-
PARENT
-
NAME
-
ORGANIZATION
-
DESCRIPTION
-
LICENSES
-
LICENSE_NODE
-
DEVELOPERS
-
DEVELOPER_NODE
-
DEVELOPER_ID
-
DEVELOPER_EMAIL
-
DEVELOPER_ORGANIZATION
-
DEVELOPER_ORGANIZATION_URL
The developer organization URL element.- See Also:
-
URL
-
-
Constructor Details
-
PomHandler
public PomHandler()
-
-
Method Details
-
getModel
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException Handles the start element event.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Parameters:
uri- the uri of the element being processedlocalName- the local name of the element being processedqName- the qName of the element being processedattributes- the attributes of the element being processed- Throws:
SAXException- thrown if there is an exception processing
-
endElement
Handles the end element event.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Parameters:
uri- the URI of the elementlocalName- the local name of the elementqName- the qName of the element- Throws:
SAXException- thrown if there is an exception processing
-
characters
Collects the body text of the node being processed.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Parameters:
ch- the char array of textstart- the start position to copy text from in the char arraylength- the number of characters to copy from the char array- Throws:
SAXException- thrown if there is a parsing exception
-