Package ome.xml.meta

Class MetadataConverter


  • public final class MetadataConverter
    extends java.lang.Object
    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

      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, java.util.List<java.lang.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).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 calling setImageID(..., destImage)), but the destination Channel only needs to exist if the copyID flag is false LightSource references are assumed to be correct and are not checked for validity.
        Parameters:
        src - the source MetadataRetrieve
        srcImage - the index of the Channel's parent Image in src
        srcChannel - the index of the Channel in src
        dest - the destination MetadataStore
        destImage - the index of the Channel's parent Image in dest
        destChannel - the index of the Channel in dest
        copyID - 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,
                                           java.util.List<java.lang.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 calling setImageID(..., destImage)), but the destination Channel only needs to exist if the copyID flag is false
        Parameters:
        src - the source MetadataRetrieve
        srcImage - the index of the Channel's parent Image in src
        srcChannel - the index of the Channel in src
        dest - the destination MetadataStore
        destImage - the index of the Channel's parent Image in dest
        destChannel - the index of the Channel in dest
        copyID - false if the Channel ID should be omitted from the copy operation
        lightSourceIds - list of valid LightSource IDs for reference checking