Class CweHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    @NotThreadSafe
    public class CweHandler
    extends org.xml.sax.helpers.DefaultHandler
    A SAX Handler that will parse the CWE XML.
    Author:
    Jeremy Long
    • Constructor Summary

      Constructors 
      Constructor Description
      CweHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.HashMap<java.lang.String,​java.lang.String> getCwe()
      Returns the HashMap of CWE entries (CWE-ID, Full CWE Name).
      void startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)  
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CweHandler

        public CweHandler()
    • Method Detail

      • getCwe

        public java.util.HashMap<java.lang.String,​java.lang.String> getCwe()
        Returns the HashMap of CWE entries (CWE-ID, Full CWE Name).
        Returns:
        a HashMap of CWE entries <String, String>
      • startElement

        public void startElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName,
                                 org.xml.sax.Attributes attributes)
                          throws org.xml.sax.SAXException
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException