Package gov.usgs.earthquake.distribution
Class URLNotificationXMLConverter
- java.lang.Object
-
- gov.usgs.earthquake.distribution.URLNotificationXMLConverter
-
public class URLNotificationXMLConverter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_EXPIRES
attribute for expiresstatic java.lang.String
ATTRIBUTE_PRODUCT_ID
attribute for product idstatic java.lang.String
ATTRIBUTE_PRODUCT_UPDATED
attribute for updatedstatic java.lang.String
ATTRIBUTE_TRACKER_URL
attribute for trackerURLstatic java.lang.String
ATTRIBUTE_URL
attribute for urlstatic java.lang.String
NOTIFICATION_ELEMENT
static var for notification elementstatic java.lang.String
PRODUCT_XML_NAMESPACE
Namespace for product XML
-
Constructor Summary
Constructors Constructor Description URLNotificationXMLConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URLNotification
parseXML(java.io.InputStream message)
Parses an XML message into a URLNotificationstatic java.lang.String
toXML(URLNotification notification)
Converts a URLNotification to XML
-
-
-
Field Detail
-
PRODUCT_XML_NAMESPACE
public static final java.lang.String PRODUCT_XML_NAMESPACE
Namespace for product XML- See Also:
- Constant Field Values
-
NOTIFICATION_ELEMENT
public static final java.lang.String NOTIFICATION_ELEMENT
static var for notification element- See Also:
- Constant Field Values
-
ATTRIBUTE_PRODUCT_ID
public static final java.lang.String ATTRIBUTE_PRODUCT_ID
attribute for product id- See Also:
- Constant Field Values
-
ATTRIBUTE_PRODUCT_UPDATED
public static final java.lang.String ATTRIBUTE_PRODUCT_UPDATED
attribute for updated- See Also:
- Constant Field Values
-
ATTRIBUTE_TRACKER_URL
public static final java.lang.String ATTRIBUTE_TRACKER_URL
attribute for trackerURL- See Also:
- Constant Field Values
-
ATTRIBUTE_EXPIRES
public static final java.lang.String ATTRIBUTE_EXPIRES
attribute for expires- See Also:
- Constant Field Values
-
ATTRIBUTE_URL
public static final java.lang.String ATTRIBUTE_URL
attribute for url- See Also:
- Constant Field Values
-
-
Method Detail
-
toXML
public static java.lang.String toXML(URLNotification notification)
Converts a URLNotification to XML- Parameters:
notification
- The URLNotification to be converted- Returns:
- an XML-formatted string
-
parseXML
public static URLNotification parseXML(java.io.InputStream message) throws java.lang.Exception
Parses an XML message into a URLNotification- Parameters:
message
- The convertee- Returns:
- A parsed URL notification
- Throws:
java.lang.Exception
- If parse goes wrong
-
-