Package gov.usgs.earthquake.eids
Class EIDSOutputWedge
- java.lang.Object
-
- gov.usgs.util.DefaultConfigurable
-
- gov.usgs.earthquake.product.AbstractListener
-
- gov.usgs.earthquake.distribution.DefaultNotificationListener
-
- gov.usgs.earthquake.eids.EIDSOutputWedge
-
- All Implemented Interfaces:
NotificationIndexCleanup.Listener
,NotificationListener
,Configurable
public class EIDSOutputWedge extends DefaultNotificationListener
Output received products as files in a folder.
-
-
Field Summary
Fields Modifier and Type Field Description static java.io.File
DEFAULT_DIRECTORY
Default output directorystatic java.lang.String
DEFAULT_OUTPUT_FORMAT
Sets default output format to cube.txtstatic java.io.File
DEFAULT_TEMP_DIRECTORY
Default temp directorystatic java.lang.String
FILE_NAME_PROPERTY
Property for file namestatic java.lang.String
OUTPUT_DIRECTORY_PROPERTY
Property for output directorystatic java.lang.String
OUTPUT_FORMAT_PROPERTY
Property for output formatstatic java.lang.String
OUTPUT_TYPE_CUBE
String for output type of cubestatic java.lang.String
OUTPUT_TYPE_EQXML
String for output type of EQXMLstatic java.lang.String
OUTPUT_TYPE_QUAKEML
String for output type of quakemlstatic java.lang.String
TEMP_DIRECTORY_PROPERTY
Property for temp directory-
Fields inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
CLEANUP_INTERVAL_PROPERTY, CONCURRENT_PRODUCTS_PROPERTY, DEFAULT_CLEANUP_INTERVAL, DEFAULT_CONCURRENT_PRODUCTS, DEFAULT_PROCESS_DUPLICATES, EXCLUDE_PATHS_PROPERTY, INCLUDE_PATHS_PROPERTY, INDEX_FILE_PROPERTY, NOTIFICATION_INDEX_PROPERTY, PROCESS_DUPLICATES
-
Fields inherited from class gov.usgs.earthquake.product.AbstractListener
ATTEMPT_COUNT_PROPERTY, DEFAULT_ATTEMPT_COUNT, DEFAULT_RETRY_DELAY, DEFAULT_TIMEOUT, EXCLUDE_SOURCES_PROPERTY, EXCLUDE_TYPES_PROPERTY, INCLUDE_ACTUALS_PROPERTY, INCLUDE_DEVELOPMENTS_PROPERTY, INCLUDE_INTERNALS_PROPERTY, INCLUDE_SCENARIOS_PROPERTY, INCLUDE_SOURCES_PROPERTY, INCLUDE_TESTS_PROPERTY, INCLUDE_TYPES_PROPERTY, MAX_TRIES_PROPERTY, RETRY_DELAY_PROPERTY, TIMEOUT_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description EIDSOutputWedge()
Create a new EIDSOutputWedge.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Config config)
ConfigurationLegacyConverter
getConverter()
java.io.File
getDirectory()
java.lang.String
getOutputFormat()
java.io.File
getTempDirectory()
void
onProduct(Product product)
Receive a product from Product Distribution.void
setDirectory(java.io.File directory)
void
setOutputFormat(java.lang.String outputFormat)
void
setTempDirectory(java.io.File tempDirectory)
-
Methods inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
cleanup, getCleanupInterval, getConcurrentProducts, getExcludePaths, getIncludePaths, getNotificationIndex, isProcessDuplicates, onAfterProcessNotification, onBeforeProcessNotification, onBeforeProcessProduct, onExpiredNotification, onNotification, setCleanupInterval, setConcurrentProducts, setNotificationIndex, setProcessDuplicates, shutdown, startup
-
Methods inherited from class gov.usgs.earthquake.product.AbstractListener
accept, getExcludeSources, getExcludeTypes, getIncludeSources, getIncludeTypes, getMaxTries, getRetryDelay, getTimeout, isIncludeActuals, isIncludeDevelopments, isIncludeInternals, isIncludeScenarios, isIncludeTests, setIncludeActuals, setIncludeDevelopments, setIncludeInternals, setIncludeScenarios, setIncludeTests, setMaxTries, setRetryDelay, setTimeout
-
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.usgs.util.Configurable
getName, setName
-
Methods inherited from interface gov.usgs.earthquake.distribution.NotificationListener
getMaxTries, getTimeout
-
-
-
-
Field Detail
-
OUTPUT_TYPE_EQXML
public static final java.lang.String OUTPUT_TYPE_EQXML
String for output type of EQXML- See Also:
- Constant Field Values
-
OUTPUT_TYPE_QUAKEML
public static final java.lang.String OUTPUT_TYPE_QUAKEML
String for output type of quakeml- See Also:
- Constant Field Values
-
OUTPUT_TYPE_CUBE
public static final java.lang.String OUTPUT_TYPE_CUBE
String for output type of cube- See Also:
- Constant Field Values
-
OUTPUT_DIRECTORY_PROPERTY
public static final java.lang.String OUTPUT_DIRECTORY_PROPERTY
Property for output directory- See Also:
- Constant Field Values
-
TEMP_DIRECTORY_PROPERTY
public static final java.lang.String TEMP_DIRECTORY_PROPERTY
Property for temp directory- See Also:
- Constant Field Values
-
FILE_NAME_PROPERTY
public static final java.lang.String FILE_NAME_PROPERTY
Property for file name- See Also:
- Constant Field Values
-
OUTPUT_FORMAT_PROPERTY
public static final java.lang.String OUTPUT_FORMAT_PROPERTY
Property for output format- See Also:
- Constant Field Values
-
DEFAULT_DIRECTORY
public static final java.io.File DEFAULT_DIRECTORY
Default output directory
-
DEFAULT_TEMP_DIRECTORY
public static final java.io.File DEFAULT_TEMP_DIRECTORY
Default temp directory
-
DEFAULT_OUTPUT_FORMAT
public static final java.lang.String DEFAULT_OUTPUT_FORMAT
Sets default output format to cube.txt- See Also:
- Constant Field Values
-
-
Method Detail
-
onProduct
public void onProduct(Product product) throws java.lang.Exception
Receive a product from Product Distribution.- Overrides:
onProduct
in classDefaultNotificationListener
- Parameters:
product
- A product- Throws:
java.lang.Exception
- if error occurs
-
configure
public void configure(Config config) throws java.lang.Exception
Configuration- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classDefaultNotificationListener
- Parameters:
config
- the Config object with settings.- Throws:
java.lang.Exception
- if configuration exceptions occur.
-
getDirectory
public java.io.File getDirectory()
- Returns:
- directory
-
getTempDirectory
public java.io.File getTempDirectory()
- Returns:
- tempDirectory
-
getOutputFormat
public java.lang.String getOutputFormat()
- Returns:
- outputFormat
-
getConverter
public LegacyConverter getConverter()
- Returns:
- legacy converter
-
setDirectory
public void setDirectory(java.io.File directory)
- Parameters:
directory
- file to set
-
setTempDirectory
public void setTempDirectory(java.io.File tempDirectory)
- Parameters:
tempDirectory
- file to set
-
setOutputFormat
public void setOutputFormat(java.lang.String outputFormat)
- Parameters:
outputFormat
- string to set
-
-