Package gov.nih.mipav.model.file
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
Handle events generated while parsing the XML file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ProvenanceEntrythe current provenance entry (to be inserted into the holder)private StringThe current XML tag we are parsing.private StringThe data for the current element being parsed.private ProvenanceHolderthe provenance holder to read information into -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) DOCUMENT ME!voidendElement(String namespaceURI, String localName, String qName) Parser calls this when the end tag of each element is reached.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts) Parser calls this for each element in a document.Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
currentKey
The current XML tag we are parsing. -
elementBuffer
The data for the current element being parsed. -
holder
the provenance holder to read information into -
currentEntry
the current provenance entry (to be inserted into the holder)
-
-
Constructor Details
-
ProvenanceXMLHandler
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:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Parameters:
ch- char[]start- intlength- int
-
endElement
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:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Parameters:
namespaceURI- the namespace (not used)localName- the current tag we are parsingqName- ? (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:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Parameters:
namespaceURI- the namespace (not used)localName- the current tag we are parsingqName- ? (not used)atts- attributes for the current tag- Throws:
SAXException- if there is a problem with the parser
-