Package gov.usgs.earthquake.product.io
Class DirectoryProductHandler
java.lang.Object
gov.usgs.earthquake.product.io.ObjectProductHandler
gov.usgs.earthquake.product.io.DirectoryProductHandler
- All Implemented Interfaces:
ProductHandler
- Direct Known Subclasses:
JsonDirectoryProductHandler
,XmlDirectoryProductHandler
Base class for storing a product to a Directory.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDirectoryProductHandler
(File directory) Construct a new DirectoryProductHandler object. -
Method Summary
Methods inherited from class gov.usgs.earthquake.product.io.ObjectProductHandler
close, getProduct, getProduct, onBeginProduct, onLink, onProperty, onSignature, onSignatureHistory, onSignatureVersion
-
Field Details
-
directory
Directory where product contents are stored.
-
-
Constructor Details
-
DirectoryProductHandler
Construct a new DirectoryProductHandler object.- Parameters:
directory
- where product contents will be stored.
-
-
Method Details
-
onContent
Extract content when path isn't empty.- Specified by:
onContent
in interfaceProductHandler
- Overrides:
onContent
in classObjectProductHandler
- Parameters:
id
- which product.path
- path to content within product.content
- the product content.- Throws:
Exception
- if error occurs
-
onEndProduct
Description copied from interface:ProductHandler
A product is finished being output. The ProductHandler should expect no more calls to other on-Methods, except perhaps onBeginProduct again, after the onEndProduct method is called.- Specified by:
onEndProduct
in interfaceProductHandler
- Overrides:
onEndProduct
in classObjectProductHandler
- Parameters:
id
- which product.- Throws:
Exception
- if error occurs
-