Package gov.usgs.earthquake.distribution
Class URLNotificationXMLConverter
java.lang.Object
gov.usgs.earthquake.distribution.URLNotificationXMLConverter
Converts to and from XML for URL notifications
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URLNotificationparseXML(InputStream message) Parses an XML message into a URLNotificationstatic StringtoXML(URLNotification notification) Converts a URLNotification to XML
-
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
-
URLNotificationXMLConverter
public URLNotificationXMLConverter()
-
-
Method Details
-
toXML
Converts a URLNotification to XML- Parameters:
notification- The URLNotification to be converted- Returns:
- an XML-formatted string
-
parseXML
Parses an XML message into a URLNotification- Parameters:
message- The convertee- Returns:
- A parsed URL notification
- Throws:
Exception- If parse goes wrong
-