public interface Translator extends SCIFIOPlugin, SingletonPlugin
Translators can be defined for a given
encodes a process for converting from one
Metadata type to
another (where either the source or the destination is the
type associated with this
translate(Metadata, Metadata) method always accepts an instance
of both source and destination
Metadata. This allows chaining of
multiple translators (or other methods) to populate a single instance of
Metadata instance is readily available for translation, it can
be created through the
Format, and existing
instances can be reset to ensure no previous information persists.
|Modifier and Type||Method and Description|
Uses the source
Metadatato populate the destination
Metadata. Specifically, the format-specific metadata and/or
ImageMetadataof the source are used to populate the format- specific metadata of the destination (from which the destination's
ImageMetadatacan be derived}.
Note that the destination does not have to be empty, but can be built up through multiple translations. However each translation step is assumed to overwrite any previously existing data.
For a reference to a fresh
Metadata instance to use in translation,
void translate(Metadata source, List<ImageMetadata> sourceImgMeta, Metadata destination)
translate(Metadata, Metadata)with the format-specific and image metadata explicitly split out.
NB: it is NOT GUARANTEED that the
Metadata.getAll() method of the
source here will provide equivalent
ImageMetadata as sourceImgMeta.
For example, if a
MetadataWrapper was used, the two are unlikely to
match up. This is necessary, as
Translator discovery depends on the
format of source and destination, but augmentation via wrapping must affect
Metadatato use to populate
ImageMetadatato use to populate
Metadatato be populated
Copyright © 2015–2017 SCIFIO. All rights reserved.