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 FileDefault output directorystatic final StringSets default output format to cube.txtstatic final FileDefault temp directorystatic final StringProperty for file namestatic final StringProperty for output directorystatic final StringProperty for output formatstatic final StringString for output type of cubestatic final StringString for output type of EQXMLstatic final StringString for output type of quakemlstatic final StringProperty 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_DUPLICATESFields 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 TypeMethodDescriptionvoidConfigurationvoidReceive a product from Product Distribution.voidsetDirectory(File directory) voidsetOutputFormat(String outputFormat) voidsetTempDirectory(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, startupMethods 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, setTimeoutMethods inherited from class gov.usgs.util.DefaultConfigurable
getName, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gov.usgs.util.Configurable
getName, setNameMethods 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:
onProductin classDefaultNotificationListener- Parameters:
product- A product- Throws:
Exception- if error occurs
-
configure
Configuration- Specified by:
configurein interfaceConfigurable- Overrides:
configurein 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
-