public interface OMEXMLService
extends loci.common.services.Service
Modifier and Type | Method and Description |
---|---|
void |
addMetadataOnly(OMEXMLMetadata omexmlMeta,
int image)
Insert a MetadataOnly element under the Image specified by 'index' in the
given OME-XML metadata object.
|
void |
addMetadataOnly(OMEXMLMetadata omexmlMeta,
int image,
boolean resolve)
Insert a MetadataOnly element under the Image specified by 'index' in the
given OME-XML metadata object.
|
void |
addModuloAlong(OMEXMLMetadata omexmlMeta,
CoreMetadata core,
int image)
Adds ModuloAlong* annotations to the given OME-XML metadata object,
using the given CoreMetadata object to determine modulo dimensions.
|
MetadataRetrieve |
asRetrieve(MetadataStore meta)
Gets the given
MetadataStore object as a MetadataRetrieve . |
MetadataStore |
asStore(MetadataRetrieve meta)
Gets the given
MetadataRetrieve object as a MetadataStore . |
void |
convertMetadata(MetadataRetrieve src,
MetadataStore dest)
Copies information from a metadata retrieval object
(source) into a metadata store (destination).
|
void |
convertMetadata(java.lang.String xml,
MetadataStore dest)
Converts information from an OME-XML string (source)
into a metadata store (destination).
|
OMEXMLMetadata |
createOMEXMLMetadata()
Creates an OME-XML metadata object using reflection, to avoid
direct dependencies on the optional
loci.formats.ome package. |
OMEXMLMetadata |
createOMEXMLMetadata(java.lang.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. |
OMEXMLMetadata |
createOMEXMLMetadata(java.lang.String xml,
java.lang.String version)
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. |
ome.xml.model.OMEModelObject |
createOMEXMLRoot(java.lang.String xml)
Constructs an OME root node.
|
java.lang.String |
getLatestVersion()
Retrieves the latest supported version of the OME-XML schema.
|
Modulo |
getModuloAlongC(OMEXMLMetadata omexmlMeta,
int image)
Retrieve the ModuloAlongC annotation in the given Image in the given
OME-XML metadata object.
|
Modulo |
getModuloAlongT(OMEXMLMetadata omexmlMeta,
int image)
Retrieve the ModuloAlongT annotation in the given Image in the given
OME-XML metadata object.
|
Modulo |
getModuloAlongZ(OMEXMLMetadata omexmlMeta,
int image)
Retrieve the ModuloAlongZ annotation in the given Image in the given
OME-XML metadata object.
|
OMEXMLMetadata |
getOMEMetadata(MetadataRetrieve src)
Returns a
OMEXMLMetadata object with the same
contents as the given MetadataRetrieve, converting it if necessary. |
java.lang.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.
|
java.lang.String |
getOMEXMLVersion(java.lang.Object o)
Gets the schema version for the given OME-XML metadata or root object
(e.g., "2007-06" or "2003-FC").
|
java.util.Hashtable |
getOriginalMetadata(OMEXMLMetadata omexmlMeta)
Parse any OriginalMetadata annotations from the given OME-XML metadata
object and store them in a Hashtable.
|
boolean |
isEqual(OMEXMLMetadata src1,
OMEXMLMetadata src2)
Determine whether or not two OMEXMLMetadata objects are equal.
|
boolean |
isOMEXMLMetadata(java.lang.Object o)
Checks whether the given object is an OME-XML metadata object.
|
boolean |
isOMEXMLRoot(java.lang.Object o)
Checks whether the given object is an OME-XML root object.
|
void |
populateOriginalMetadata(OMEXMLMetadata omexmlMeta,
java.util.Hashtable<java.lang.String,java.lang.Object> metadata)
Adds the key/value pairs in the specified Hashtable as new
OriginalMetadata annotations in the given OME-XML metadata object.
|
void |
populateOriginalMetadata(OMEXMLMetadata omexmlMeta,
java.lang.String key,
java.lang.String value)
Adds the specified key/value pair as a new OriginalMetadata node
to the given OME-XML metadata object.
|
void |
removeBinData(OMEXMLMetadata omexmlMeta)
Remove all of the BinData elements from the given OME-XML metadata object.
|
void |
removeChannels(OMEXMLMetadata omexmlMeta,
int image,
int sizeC)
Remove all but the first sizeC valid Channel elements from the given
OME-XML metadata object.
|
void |
removeTiffData(OMEXMLMetadata omexmlMeta)
Remove all of the TiffData elements from the given OME-XML metadata object.
|
java.lang.String |
transformToLatestVersion(java.lang.String xml)
Transforms the given OME-XML string to the latest supported version of
of the OME-XML schema.
|
boolean |
validateOMEXML(java.lang.String xml)
Attempts to validate the given OME-XML string using
Java's XML validation facility.
|
boolean |
validateOMEXML(java.lang.String xml,
boolean pixelsHack)
Attempts to validate the given OME-XML string using
Java's XML validation facility.
|
java.lang.String getLatestVersion()
java.lang.String transformToLatestVersion(java.lang.String xml) throws loci.common.services.ServiceException
loci.common.services.ServiceException
OMEXMLMetadata createOMEXMLMetadata() throws loci.common.services.ServiceException
loci.formats.ome
package.AbstractOMEXMLMetadata
,
or null if the class is not available.loci.common.services.ServiceException
- If there is an error creating the OME-XML
metadata object.OMEXMLMetadata createOMEXMLMetadata(java.lang.String xml) throws loci.common.services.ServiceException
loci.formats.ome
package,
wrapping a DOM representation of the given OME-XML string.AbstractOMEXMLMetadata
,
or null if the class is not available.loci.common.services.ServiceException
- If there is an error creating the OME-XML
metadata object.OMEXMLMetadata createOMEXMLMetadata(java.lang.String xml, java.lang.String version) throws loci.common.services.ServiceException
loci.formats.ome
package,
wrapping a DOM representation of the given OME-XML string.xml
- The OME-XML string to use for initial population of the
metadata object.version
- The OME-XML version to use (e.g., "2003-FC" or "2007-06").
If the xml and version parameters are both null, the newest version is
used.AbstractOMEXMLMetadata
,
or null if the class is not available.loci.common.services.ServiceException
- If there is an error creating the OME-XML
metadata object.ome.xml.model.OMEModelObject createOMEXMLRoot(java.lang.String xml) throws loci.common.services.ServiceException
xml
- String of XML to create the root node from.loci.common.services.ServiceException
- If there is an error creating the OME-XML
metadata object.boolean isOMEXMLMetadata(java.lang.Object o)
OMEXMLMetadata
.boolean isOMEXMLRoot(java.lang.Object o)
OME
.java.lang.String getOMEXMLVersion(java.lang.Object o)
OMEXMLMetadata
.OMEXMLMetadata getOMEMetadata(MetadataRetrieve src) throws loci.common.services.ServiceException
OMEXMLMetadata
object with the same
contents as the given MetadataRetrieve, converting it if necessary.loci.common.services.ServiceException
- If there is an error creating the OME-XML
metadata object.java.lang.String getOMEXML(MetadataRetrieve src) throws loci.common.services.ServiceException
loci.common.services.ServiceException
- If there is an error creating the OME-XML
metadata object.boolean validateOMEXML(java.lang.String xml)
xml
- XML string to validate.boolean validateOMEXML(java.lang.String xml, boolean pixelsHack)
xml
- XML string to validate.pixelsHack
- Whether to ignore validation errors
due to childless Pixels elementsvoid populateOriginalMetadata(OMEXMLMetadata omexmlMeta, java.util.Hashtable<java.lang.String,java.lang.Object> metadata)
omexmlMeta
- An object of type
OMEXMLMetadata
.metadata
- A hashtable containing metadata key/value pairs.Modulo getModuloAlongZ(OMEXMLMetadata omexmlMeta, int image)
omexmlMeta
- An object of type
OMEXMLMetadata
image
- the index of the Image to which the Annotation is linkedModulo getModuloAlongC(OMEXMLMetadata omexmlMeta, int image)
omexmlMeta
- An object of type
OMEXMLMetadata
image
- the index of the Image to which the Annotation is linkedModulo getModuloAlongT(OMEXMLMetadata omexmlMeta, int image)
omexmlMeta
- An object of type
OMEXMLMetadata
image
- the index of the Image to which the Annotation is linkedjava.util.Hashtable getOriginalMetadata(OMEXMLMetadata omexmlMeta)
omexmlMeta
- An object of type
OMEXMLMetadata
.void populateOriginalMetadata(OMEXMLMetadata omexmlMeta, java.lang.String key, java.lang.String value)
omexmlMeta
- An object of type
OMEXMLMetadata
.key
- Metadata key to populate.value
- Metadata value corresponding to the specified key.void addModuloAlong(OMEXMLMetadata omexmlMeta, CoreMetadata core, int image)
omexmlMeta
- An object of type OMEXMLMetadata
core
- A fully populated object of type
CoreMetadata
image
- Index of the Image to which the annotation should be linked.void convertMetadata(java.lang.String xml, MetadataStore dest) throws loci.common.services.ServiceException
loci.common.services.ServiceException
- If there is an error creating the OME-XML
metadata object.void convertMetadata(MetadataRetrieve src, MetadataStore dest)
void removeBinData(OMEXMLMetadata omexmlMeta)
void removeTiffData(OMEXMLMetadata omexmlMeta)
void removeChannels(OMEXMLMetadata omexmlMeta, int image, int sizeC)
void addMetadataOnly(OMEXMLMetadata omexmlMeta, int image)
void addMetadataOnly(OMEXMLMetadata omexmlMeta, int image, boolean resolve)
boolean isEqual(OMEXMLMetadata src1, OMEXMLMetadata src2)
MetadataStore asStore(MetadataRetrieve meta)
MetadataRetrieve
object as a MetadataStore
.
Returns null if the object is incompatible and cannot be casted.MetadataRetrieve asRetrieve(MetadataStore meta)
MetadataStore
object as a MetadataRetrieve
.
Returns null if the object is incompatible and cannot be casted.Copyright © 2024 Open Microscopy Environment