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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Free any resources associated with this source.void
streamTo(ProductHandler out)
Send a product to the ProductOutput.
-
-
-
Method Detail
-
streamTo
void streamTo(ProductHandler out) throws java.lang.Exception
Send a product to the ProductOutput.- Parameters:
out
- the output that will receive the product.- Throws:
java.lang.Exception
- if error occurs
-
close
void close()
Free any resources associated with this source.
-
-