Package ome.xml.meta
Class MetadataConverter
- java.lang.Object
-
- ome.xml.meta.MetadataConverter
-
public final class MetadataConverter extends Object
A utility class containing a method for piping a sourceMetadataRetrieve
object into a destinationMetadataStore
.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 anOMEXMLMetadataImpl
, thus generating OME-XML from information in an OMERO database.- Author:
- Curtis Rueden ctrueden at wisc.edu
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.static void
convertMetadata(MetadataRetrieve src, MetadataStore dest)
Copies information from a metadata retrieval object (source) into a metadata store (destination).
-
-
-
Method Detail
-
convertMetadata
public static void convertMetadata(MetadataRetrieve src, MetadataStore dest)
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 isfalse
LightSource references are assumed to be correct and are not checked for validity.- Parameters:
src
- the sourceMetadataRetrieve
srcImage
- the index of the Channel's parent Image in srcsrcChannel
- the index of the Channel in srcdest
- the destinationMetadataStore
destImage
- 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 sourceMetadataRetrieve
srcImage
- the index of the Channel's parent Image in srcsrcChannel
- the index of the Channel in srcdest
- the destinationMetadataStore
destImage
- 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
-
-