Package ddf.catalog.transform
Interface InputTransformer
public interface InputTransformer
An InputTransformer has the purpose of creating a
Metacard from a given
InputStream. Alternatively a Metacard implementation's constructor can be used to create
Metacards.
Implementations of this interface must:
-
Register with the OSGi Service Registry using the
InputTransformer interface
Include a Service property with name "id" (Constants.SERVICE_ID) and a
String value uniquely identifying the particular implementation
-
Method Summary
Modifier and TypeMethodDescriptiontransform(InputStream input) Transforms the input into aMetacard.transform(InputStream input, String id)
-
Method Details
-
transform
Transforms the input into aMetacard.- Parameters:
input- the binaryInputStreamto transform- Returns:
- the generated
Metacard - Throws:
IOException- if an I/O exception occurs when reading theInputStreamCatalogTransformerException- if an error occurs during transformation
-
transform
- Parameters:
input- the binaryInputStreamto transformid- the attribute value for theMetacard.IDattribute that should be set in the generatedMetacard- Returns:
- the generated
Metacard - Throws:
IOException- if an I/O exception occurs when reading theInputStreamCatalogTransformerException- if an error occurs during transformation
-