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
Output received products as files in a folder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final File
Default output directorystatic final String
Sets default output format to cube.txtstatic final File
Default temp directorystatic final String
Property for file namestatic final String
Property for output directorystatic final String
Property for output formatstatic final String
String for output type of cubestatic final String
String for output type of EQXMLstatic final String
String for output type of quakemlstatic final String
Property for temp directoryFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configurationvoid
Receive a product from Product Distribution.void
setDirectory
(File directory) void
setOutputFormat
(String outputFormat) void
setTempDirectory
(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 Details
-
OUTPUT_TYPE_EQXML
String for output type of EQXML- See Also:
-
OUTPUT_TYPE_QUAKEML
String for output type of quakeml- See Also:
-
OUTPUT_TYPE_CUBE
String for output type of cube- See Also:
-
OUTPUT_DIRECTORY_PROPERTY
Property for output directory- See Also:
-
TEMP_DIRECTORY_PROPERTY
Property for temp directory- See Also:
-
FILE_NAME_PROPERTY
Property for file name- See Also:
-
OUTPUT_FORMAT_PROPERTY
Property for output format- See Also:
-
DEFAULT_DIRECTORY
Default output directory -
DEFAULT_TEMP_DIRECTORY
Default temp directory -
DEFAULT_OUTPUT_FORMAT
Sets default output format to cube.txt- See Also:
-
-
Constructor Details
-
EIDSOutputWedge
public EIDSOutputWedge()Create a new EIDSOutputWedge. Sets up the includeTypes list to contain "origin". Override this if you want the behavior to extend past origin products.
-
-
Method Details
-
onProduct
Receive a product from Product Distribution.- Overrides:
onProduct
in classDefaultNotificationListener
- Parameters:
product
- A product- Throws:
Exception
- if error occurs
-
configure
Configuration- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classDefaultNotificationListener
- Parameters:
config
- the Config object with settings.- Throws:
Exception
- if configuration exceptions occur.
-
getDirectory
- Returns:
- directory
-
getTempDirectory
- Returns:
- tempDirectory
-
getOutputFormat
- Returns:
- outputFormat
-
getConverter
- Returns:
- legacy converter
-
setDirectory
- Parameters:
directory
- file to set
-
setTempDirectory
- Parameters:
tempDirectory
- file to set
-
setOutputFormat
- Parameters:
outputFormat
- string to set
-