public class AttributeMetacardTransformer extends Object implements MetacardTransformer
Metacard
, this class can be used to return the contents of the Metacard
attributes. Supported formats are String and byte[]MetacardTransformer
Constructor and Description |
---|
AttributeMetacardTransformer(String attributeName,
String id,
MimeType mimeType)
Constructor for this transformer
|
Modifier and Type | Method and Description |
---|---|
String |
getAttributeName() |
String |
toString() |
BinaryContent |
transform(Metacard metacard,
Map<String,Serializable> arguments)
Transforms the provided
Metacard into a BinaryContent |
public AttributeMetacardTransformer(String attributeName, String id, MimeType mimeType)
attributeName
- The name of the attribute that will be used to retrieve the value within
the Metacard
id
- the MetacardTransformer
idmimeType
- the MIME type that should be returnedpublic 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 String getAttributeName()
This work is licensed under a Creative Commons Attribution 4.0 International License.