|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectloci.formats.MetadataTools
public final class MetadataTools
A utility class for working with metadata objects,
including MetadataStore
, MetadataRetrieve
,
and OME-XML strings.
Most of the methods require the optional loci.formats.ome
package, and optional ome-java.jar library, to be present at runtime.
Method Summary | |
---|---|
static void |
convertMetadata(MetadataRetrieve src,
MetadataStore dest)
Copies information from a metadata retrieval object (source) into a metadata store (destination). |
static void |
convertMetadata(String xml,
MetadataStore dest)
Converts information from an OME-XML string (source) into a metadata store (destination). |
static MetadataStore |
createOMEXMLMetadata()
Creates an OME-XML metadata object using reflection, to avoid direct dependencies on the optional loci.formats.ome package. |
static MetadataStore |
createOMEXMLMetadata(String xml)
Creates an OME-XML metadata object using reflection, to avoid direct dependencies on the optional loci.formats.ome package,
wrapping a DOM representation of the given OME-XML string. |
static String |
getOMEXML(MetadataRetrieve src)
Extracts an OME-XML metadata string from the given metadata object, by converting to an OME-XML metadata object if necessary. |
static boolean |
isOMEXMLMetadata(Object o)
Checks whether the given object is an OME-XML metadata object. |
static void |
populateOriginalMetadata(Object o,
String key,
String value)
Adds the specified key/value pair as a new OriginalMetadata node to the given OME-XML metadata object. |
static void |
validateOMEXML(String xml)
Attempts to validate the given OME-XML string using Java's XML validation facility. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static MetadataStore createOMEXMLMetadata()
loci.formats.ome
package.
loci.formats.ome.OMEXMLMetadata
,
or null if the class is not available.public static MetadataStore createOMEXMLMetadata(String xml)
loci.formats.ome
package,
wrapping a DOM representation of the given OME-XML string.
loci.formats.ome.OMEXMLMetadata
,
or null if the class is not available.public static boolean isOMEXMLMetadata(Object o)
loci.formats.ome.OMEXMLMetadata
.public static void populateOriginalMetadata(Object o, String key, String value)
o
- An object of type loci.formats.ome.OMEXMLMetadata
.key
- Metadata key to populate.value
- Metadata value corresponding to the specified key.public static String getOMEXML(MetadataRetrieve src)
public static void validateOMEXML(String xml)
public static void convertMetadata(String xml, MetadataStore dest)
public static void convertMetadata(MetadataRetrieve src, MetadataStore dest)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |