Package gov.usgs.earthquake.product.io
Interface ProductSource
- All Known Implementing Classes:
BinaryProductSource
,DirectoryProductSource
,JsonProductSource
,ObjectProductSource
,SearchResponseXmlProductSource
,XmlProductSource
,ZipProductSource
public interface ProductSource
A Source of Product events.
ProductSources are used to read Products from other formats like XML.
ProductSources send a stream of events to ProductOutputs and provide stream
like processing for Products.
ProductSources should strive to call ProductOutput methods in the following
order:
- onBeginProduct()
- onProperty(), by property name alphabetically
- onLink(), by relation alphabetically, by URI alphabetically
- onContent(), by content path alphabetically.
- onSignature()
- onEndProduct()
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Free any resources associated with this source.void
streamTo
(ProductHandler out) Send a product to the ProductOutput.
-
Method Details
-
streamTo
Send a product to the ProductOutput.- Parameters:
out
- the output that will receive the product.- Throws:
Exception
- if error occurs
-
close
void close()Free any resources associated with this source.
-