Class FileDataProvenance.ProvenanceXMLHandler

java.lang.Object
org.xml.sax.helpers.DefaultHandler
gov.nih.mipav.model.file.FileDataProvenance.ProvenanceXMLHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Enclosing class:
FileDataProvenance

private class FileDataProvenance.ProvenanceXMLHandler extends DefaultHandler
Handle events generated while parsing the XML file.
  • Field Details

    • currentKey

      private String currentKey
      The current XML tag we are parsing.
    • elementBuffer

      private String elementBuffer
      The data for the current element being parsed.
    • holder

      private ProvenanceHolder holder
      the provenance holder to read information into
    • currentEntry

      private ProvenanceEntry currentEntry
      the current provenance entry (to be inserted into the holder)
  • Constructor Details

    • ProvenanceXMLHandler

      public ProvenanceXMLHandler(ProvenanceHolder ph)
      Default constructor
      Parameters:
      ph - the provenance holder to read the information into
  • Method Details

    • characters

      public void characters(char[] ch, int start, int length)
      DOCUMENT ME!
      Specified by:
      characters in interface ContentHandler
      Overrides:
      characters in class DefaultHandler
      Parameters:
      ch - char[]
      start - int
      length - int
    • endElement

      public void endElement(String namespaceURI, String localName, String qName) throws SAXException
      Parser calls this when the end tag of each element is reached. Data collected in the elementbuffer is generally saved to the image info.
      Specified by:
      endElement in interface ContentHandler
      Overrides:
      endElement in class DefaultHandler
      Parameters:
      namespaceURI - the namespace (not used)
      localName - the current tag we are parsing
      qName - ? (not used)
      Throws:
      SAXException - if there is a problem with the parser
    • startElement

      public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
      Parser calls this for each element in a document.
      Specified by:
      startElement in interface ContentHandler
      Overrides:
      startElement in class DefaultHandler
      Parameters:
      namespaceURI - the namespace (not used)
      localName - the current tag we are parsing
      qName - ? (not used)
      atts - attributes for the current tag
      Throws:
      SAXException - if there is a problem with the parser