Package gov.usgs.earthquake.eids
Class LegacyConverter
java.lang.Object
gov.usgs.earthquake.eids.LegacyConverter
Utility class to translate between Quakeml, EQXML, and CUBE formats.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LegacyConverter.FormatCube Formatstatic final LegacyConverter.FormatEQXML Formatstatic final StringPath to EQXML contentstatic final LegacyConverter.FormatQUAKEML Formatstatic final StringPath to Quakeml content -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]convert(gov.usgs.ansseqmsg.EQMessage eqxml) Handles conversion from an eqxml to either eqxml, quakeml, or cube byte array.byte[]convert(gov.usgs.earthquake.cube.CubeMessage cube) Handles conversion from a cube message to either eqxml, quakeml, or cube byte array.byte[]Handles conversion from a product containing either eqxml or quakeml contents to either eqxml, quakeml, or cube byte array.byte[]convert(org.quakeml_1_2.Quakeml quakeml) Handles conversion from a quakeml message to either eqxml, quakeml, or cube byte array.static LegacyConverterstatic LegacyConverterstatic LegacyConverter
-
Field Details
-
CUBE
Cube Format -
EQXML
EQXML Format -
QUAKEML
QUAKEML Format -
EQXML_CONTENT_PATH
Path to EQXML content- See Also:
-
QUAKEML_CONTENT_PATH
Path to Quakeml content- See Also:
-
-
Constructor Details
-
LegacyConverter
Constructor- Parameters:
outputFormat- format you want to switch to
-
-
Method Details
-
cubeConverter
- Returns:
- converter that outputs cube.
-
eqxmlConverter
- Returns:
- converter that outputs eqxml.
-
quakemlConverter
- Returns:
- converter that outputs quakeml.
-
convert
Handles conversion from a product containing either eqxml or quakeml contents to either eqxml, quakeml, or cube byte array.- Parameters:
product- the product object to convert.- Returns:
- byte array containing the output format, or null if unable to convert.
- Throws:
Exception- if error occurs
-
convert
Handles conversion from an eqxml to either eqxml, quakeml, or cube byte array.- Parameters:
eqxml- the eqxml object to convert.- Returns:
- byte array containing output format, or null if unable to convert.
- Throws:
Exception- if error occurs
-
convert
Handles conversion from a quakeml message to either eqxml, quakeml, or cube byte array.- Parameters:
quakeml- the quakeml object to convert.- Returns:
- byte array containing output format, or null if unable to convert.
- Throws:
Exception- if error occurs
-
convert
Handles conversion from a cube message to either eqxml, quakeml, or cube byte array.- Parameters:
cube- the cube object to convert.- Returns:
- byte array containing output format, or null if unable to convert.
- Throws:
Exception- if error occurs
-