Package gov.usgs.earthquake.geoserve
Class RegionsXML
- java.lang.Object
-
- gov.usgs.earthquake.geoserve.RegionsXML
-
public class RegionsXML extends java.lang.Object
Legacy Regions XML formatting for gov.usgs.earthquake.qdm.Regions.
-
-
Constructor Summary
Constructors Constructor Description RegionsXML()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
formatXML(Regions regions)
Output ANSS Authoritative Regions in the legacy Regions XML format.static Regions
getRegions(java.io.InputStream in)
Parse regions from an XML input stream.static void
main(java.lang.String[] args)
Download ANSS Authoritative regions from Geoserve, and print to the screen in Regions XML format.
-
-
-
Method Detail
-
formatXML
public java.lang.String formatXML(Regions regions)
Output ANSS Authoritative Regions in the legacy Regions XML format.- Parameters:
regions
- ANSS Authoritative regions- Returns:
- String on regions in an XML format
-
getRegions
public static Regions getRegions(java.io.InputStream in) throws java.lang.Exception
Parse regions from an XML input stream.- Parameters:
in
- input stream- Returns:
- Regions
- Throws:
java.lang.Exception
- if error occurs
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Download ANSS Authoritative regions from Geoserve, and print to the screen in Regions XML format.- Parameters:
args
- console arguments- Throws:
java.lang.Exception
- if error occurs
-
-