Package ome.xml.meta
Class MetadataConverter
java.lang.Object
ome.xml.meta.MetadataConverter
A utility class containing a method for piping a source
MetadataRetrieve object into a destination MetadataStore.
This technique allows conversion between two different storage media.
For example, it can be used to convert an OMEROMetadataStore
(OMERO's metadata store implementation) into an
OMEXMLMetadataImpl, thus generating OME-XML from
information in an OMERO database.
- Author:
- Curtis Rueden ctrueden at wisc.edu
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvertChannels(MetadataRetrieve src, int srcImage, int srcChannel, MetadataStore dest, int destImage, int destChannel, boolean copyID) Copy all metadata from the specified channel in the source MetadataRetrieve to the specified channel in the destination MetadataStore.static voidconvertChannels(MetadataRetrieve src, int srcImage, int srcChannel, MetadataStore dest, int destImage, int destChannel, boolean copyID, List<String> lightSourceIds) Copy all metadata from the specified channel in the source MetadataRetrieve to the specified channel in the destination MetadataStore.static voidconvertMetadata(MetadataRetrieve src, MetadataStore dest) Copies information from a metadata retrieval object (source) into a metadata store (destination).
-
Method Details
-
convertMetadata
Copies information from a metadata retrieval object (source) into a metadata store (destination). -
convertChannels
public static void convertChannels(MetadataRetrieve src, int srcImage, int srcChannel, MetadataStore dest, int destImage, int destChannel, boolean copyID) Copy all metadata from the specified channel in the source MetadataRetrieve to the specified channel in the destination MetadataStore. The specified destination Image must exist (e.g. via callingsetImageID(..., destImage)), but the destination Channel only needs to exist if the copyID flag isfalseLightSource references are assumed to be correct and are not checked for validity.- Parameters:
src- the sourceMetadataRetrievesrcImage- the index of the Channel's parent Image in srcsrcChannel- the index of the Channel in srcdest- the destinationMetadataStoredestImage- the index of the Channel's parent Image in destdestChannel- the index of the Channel in destcopyID- false if the Channel ID should be omitted from the copy operation
-
convertChannels
public static void convertChannels(MetadataRetrieve src, int srcImage, int srcChannel, MetadataStore dest, int destImage, int destChannel, boolean copyID, List<String> lightSourceIds) Copy all metadata from the specified channel in the source MetadataRetrieve to the specified channel in the destination MetadataStore. The specified destination Image must exist (e.g. via callingsetImageID(..., destImage)), but the destination Channel only needs to exist if the copyID flag isfalse- Parameters:
src- the sourceMetadataRetrievesrcImage- the index of the Channel's parent Image in srcsrcChannel- the index of the Channel in srcdest- the destinationMetadataStoredestImage- the index of the Channel's parent Image in destdestChannel- the index of the Channel in destcopyID- false if the Channel ID should be omitted from the copy operationlightSourceIds- list of valid LightSource IDs for reference checking
-