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 Stringattribute for expiresstatic final Stringattribute for product idstatic final Stringattribute for updatedstatic final Stringattribute for urlstatic final Stringstatic var for notification elementstatic final StringNamespace for product XML -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstruct a URLNotificationParser. -
Method Summary
Modifier and TypeMethodDescriptionvoidonStartElement(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, startElementMethods 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
-
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:
onStartElementin classSAXAdapter- Parameters:
uri- element uri.localName- element localName.qName- element qName.attributes- element attributes.- Throws:
SAXException- if there is an error.
-