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 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URLNotification
parseXML
(InputStream message) Parses an XML message into a URLNotificationstatic String
toXML
(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
-