public interface OMEXMLService extends 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(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(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(String xml,
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. |
OMEModelObject |
createOMEXMLRoot(String xml)
Constructs an OME root node.
|
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. |
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.
|
String |
getOMEXMLVersion(Object o)
Gets the schema version for the given OME-XML metadata or root object
(e.g., "2007-06" or "2003-FC").
|
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(Object o)
Checks whether the given object is an OME-XML metadata object.
|
boolean |
isOMEXMLRoot(Object o)
Checks whether the given object is an OME-XML root object.
|
void |
populateOriginalMetadata(OMEXMLMetadata omexmlMeta,
Hashtable<String,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,
String key,
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.
|
String |
transformToLatestVersion(String xml)
Transforms the given OME-XML string to the latest supported version of
of the OME-XML schema.
|
boolean |
validateOMEXML(String xml)
Attempts to validate the given OME-XML string using
Java's XML validation facility.
|
boolean |
validateOMEXML(String xml,
boolean pixelsHack)
Attempts to validate the given OME-XML string using
Java's XML validation facility.
|
String getLatestVersion()
String transformToLatestVersion(String xml) throws ServiceException
ServiceException
OMEXMLMetadata createOMEXMLMetadata() throws ServiceException
loci.formats.ome
package.AbstractOMEXMLMetadata
,
or null if the class is not available.ServiceException
- If there is an error creating the OME-XML
metadata object.OMEXMLMetadata createOMEXMLMetadata(String xml) throws ServiceException
loci.formats.ome
package,
wrapping a DOM representation of the given OME-XML string.AbstractOMEXMLMetadata
,
or null if the class is not available.ServiceException
- If there is an error creating the OME-XML
metadata object.OMEXMLMetadata createOMEXMLMetadata(String xml, String version) throws 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.ServiceException
- If there is an error creating the OME-XML
metadata object.OMEModelObject createOMEXMLRoot(String xml) throws ServiceException
xml
- String of XML to create the root node from.ServiceException
- If there is an error creating the OME-XML
metadata object.boolean isOMEXMLMetadata(Object o)
OMEXMLMetadata
.boolean isOMEXMLRoot(Object o)
OME
.String getOMEXMLVersion(Object o)
OMEXMLMetadata
.OMEXMLMetadata getOMEMetadata(MetadataRetrieve src) throws ServiceException
OMEXMLMetadata
object with the same
contents as the given MetadataRetrieve, converting it if necessary.ServiceException
- If there is an error creating the OME-XML
metadata object.String getOMEXML(MetadataRetrieve src) throws ServiceException
ServiceException
- If there is an error creating the OME-XML
metadata object.boolean validateOMEXML(String xml)
xml
- XML string to validate.boolean validateOMEXML(String xml, boolean pixelsHack)
xml
- XML string to validate.pixelsHack
- Whether to ignore validation errors
due to childless Pixels elementsvoid populateOriginalMetadata(OMEXMLMetadata omexmlMeta, Hashtable<String,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 linkedHashtable getOriginalMetadata(OMEXMLMetadata omexmlMeta)
omexmlMeta
- An object of type
OMEXMLMetadata
.void populateOriginalMetadata(OMEXMLMetadata omexmlMeta, String key, 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(String xml, MetadataStore dest) throws ServiceException
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 © 2016 Open Microscopy Environment