public class RegistryTransformer extends Object implements InputTransformer, MetacardTransformer
Constructor and Description |
---|
RegistryTransformer() |
Modifier and Type | Method and Description |
---|---|
void |
setParser(Parser parser) |
void |
setRegistryMetacardType(MetacardType registryMetacardType) |
Metacard |
transform(InputStream inputStream)
Transforms the input into a
Metacard . |
Metacard |
transform(InputStream inputStream,
String id)
|
BinaryContent |
transform(Metacard metacard,
Map<String,Serializable> arguments)
Transforms the provided
Metacard into a BinaryContent |
public Metacard transform(InputStream inputStream) throws IOException, CatalogTransformerException
InputTransformer
Metacard
.transform
in interface InputTransformer
inputStream
- the binary InputStream
to transformMetacard
IOException
- if an I/O exception occurs when reading the InputStream
CatalogTransformerException
- if an error occurs during transformationpublic Metacard transform(InputStream inputStream, String id) throws IOException, CatalogTransformerException
InputTransformer
transform
in interface InputTransformer
inputStream
- the binary InputStream
to transformid
- the attribute value for the Metacard.ID
attribute that should be set in the
generated Metacard
Metacard
IOException
- if an I/O exception occurs when reading the InputStream
CatalogTransformerException
- if an error occurs during transformationpublic BinaryContent transform(Metacard metacard, Map<String,Serializable> arguments) throws CatalogTransformerException
MetacardTransformer
Metacard
into a BinaryContent
transform
in interface MetacardTransformer
metacard
- the Metacard
to be transformedarguments
- any arguments to be used in the transformation. Keys are specific to each
MetacardTransformer
implementationBinaryContent
the result of the Metacard
transformationCatalogTransformerException
- if the Metacard
can not be transformedpublic void setParser(Parser parser)
public void setRegistryMetacardType(MetacardType registryMetacardType)
This work is licensed under a Creative Commons Attribution 4.0 International License.