Package gov.usgs.earthquake.distribution
Class ProductTrackerParser
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- gov.usgs.util.SAXAdapter
-
- gov.usgs.earthquake.distribution.ProductTrackerParser
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
public class ProductTrackerParser extends SAXAdapter
Parser for ProductTracker responses.
-
-
Constructor Summary
Constructors Constructor Description ProductTrackerParser(java.net.URL trackerURL)
Create a new TrackerUpdateParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ProductTrackerUpdate>
getUpdates()
Get the parsed updates.void
onEndElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, java.lang.String content)
SAXAdapter end element handler.void
onStartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
SAXAdapter start element handler.-
Methods inherited from class gov.usgs.util.SAXAdapter
characters, endElement, parse, parse, startElement
-
-
-
-
Method Detail
-
getUpdates
public java.util.List<ProductTrackerUpdate> getUpdates()
Get the parsed updates.- Returns:
- list of parsed updates
-
onStartElement
public void onStartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
SAXAdapter start element handler.- Overrides:
onStartElement
in classSAXAdapter
- Parameters:
uri
- element uri.localName
- element localName.qName
- element qName.attributes
- element attributes.- Throws:
org.xml.sax.SAXException
- if there is an error.
-
onEndElement
public void onEndElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, java.lang.String content) throws org.xml.sax.SAXException
SAXAdapter end element handler. Content only includes characters that were read from this element, NOT any characters from child elements.- Overrides:
onEndElement
in classSAXAdapter
- Parameters:
uri
- element uri.localName
- element localName.qName
- element qName.content
- element content.- Throws:
org.xml.sax.SAXException
- if onEndElement throws a SAXException.
-
-