Package gov.usgs.earthquake.distribution
Class URLNotificationParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
gov.usgs.util.SAXAdapter
gov.usgs.earthquake.distribution.URLNotificationParser
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
This class is not intended to be instantiated directly. Instead, use the
static URLNotification.parse method
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
attribute for expiresstatic final String
attribute for product idstatic final String
attribute for updatedstatic final String
attribute for urlstatic final String
static var for notification elementstatic final String
Namespace for product XML -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Construct a URLNotificationParser. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onStartElement
(String uri, String localName, String qName, Attributes attributes) SAXAdapter start element handler.Methods inherited from class gov.usgs.util.SAXAdapter
characters, endElement, onEndElement, parse, parse, startElement
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, 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
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
PRODUCT_XML_NAMESPACE
Namespace for product XML- See Also:
-
NOTIFICATION_ELEMENT
static var for notification element- See Also:
-
ATTRIBUTE_PRODUCT_ID
attribute for product id- See Also:
-
ATTRIBUTE_PRODUCT_UPDATED
attribute for updated- See Also:
-
ATTRIBUTE_EXPIRES
attribute for expires- See Also:
-
ATTRIBUTE_URL
attribute for url- See Also:
-
-
Constructor Details
-
URLNotificationParser
protected URLNotificationParser()Construct a URLNotificationParser. This class is not intended to be instantiated directly. Instead, use the static URLNotification.parse method.
-
-
Method Details
-
getNotification
- Returns:
- the parsed notification
-
onStartElement
public void onStartElement(String uri, String localName, String qName, Attributes attributes) throws SAXException SAXAdapter start element handler.- Overrides:
onStartElement
in classSAXAdapter
- Parameters:
uri
- element uri.localName
- element localName.qName
- element qName.attributes
- element attributes.- Throws:
SAXException
- if there is an error.
-