Package ome.formats
Class OMEROMetadataStore
- java.lang.Object
-
- ome.formats.OMEROMetadataStore
-
public class OMEROMetadataStore extends java.lang.Object
An OMERO metadata store. This particular metadata store requires the user to be logged into OMERO prior to use with theSecuritySystem.login(ome.system.Principal)
method. While attempts have been made to allow the caller to switch back and forth between Images and Pixels during metadata population it is strongly encouraged that at least Images and Pixels are populated in ascending order. For example: Image_1 -> Pixels_1, Pixels_2 followed by Image_2 -> Pixels_1, Pixels2, Pixels_3.
-
-
Constructor Summary
Constructors Constructor Description OMEROMetadataStore()
Empty constructor for testing purposes.OMEROMetadataStore(ome.system.ServiceFactory factory, ome.util.SqlAction sql)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkAndCollapseGraph()
Checks the entire object graph for sections that may be collapsed if the data is derived from a Plate.void
createRoot()
ome.model.IObject
getObjectByLSID(ome.util.LSID lsid)
Retrieves an object from the internal object graph by LSID.void
populateMinMax(double[][][] imageChannelGlobalMinMax)
Synchronize the minimum and maximum intensity values with those specified by the client and save them in the DB.java.util.List<ome.model.core.Pixels>
saveToDB(ome.model.fs.FilesetJobLink link)
Saves the current object graph to the database.void
updateObject(java.lang.String lsid, ome.model.IObject sourceObject, java.util.Map<java.lang.String,java.lang.Integer> indexes)
Updates a given model object in our object graph.void
updateReferences(java.util.Map<java.lang.String,java.lang.String[]> referenceCache)
Updates our object graph references.
-
-
-
Constructor Detail
-
OMEROMetadataStore
public OMEROMetadataStore()
Empty constructor for testing purposes.
-
OMEROMetadataStore
public OMEROMetadataStore(ome.system.ServiceFactory factory, ome.util.SqlAction sql) throws ome.conditions.ValidationException
Creates a new instance.- Parameters:
factory
- a non-null, activeServiceFactory
sql
- the SQL action instance- Throws:
ome.conditions.ValidationException
- if the factory is null or there is another error instantiating required services.
-
-
Method Detail
-
updateObject
public void updateObject(java.lang.String lsid, ome.model.IObject sourceObject, java.util.Map<java.lang.String,java.lang.Integer> indexes)
Updates a given model object in our object graph.- Parameters:
lsid
- LSID of model object.sourceObject
- Model object itself.indexes
- Any indexes that should are used to describe the model object's graph location.
-
updateReferences
public void updateReferences(java.util.Map<java.lang.String,java.lang.String[]> referenceCache)
Updates our object graph references.- Parameters:
referenceCache
- Client side LSID reference cache.
-
getObjectByLSID
public ome.model.IObject getObjectByLSID(ome.util.LSID lsid)
Retrieves an object from the internal object graph by LSID.- Parameters:
lsid
- LSID of the object.- Returns:
- See above.
null
if the object is not in the internal LSID map.
-
createRoot
public void createRoot()
-
checkAndCollapseGraph
public void checkAndCollapseGraph()
Checks the entire object graph for sections that may be collapsed if the data is derived from a Plate. Collapsible points:- Image -> ObjectiveSettings
- Image -> Channel -> LogicalChannel -> LightSettings
- Image -> Channel -> LogicalChannel -> LightPath
- Image -> Channel -> LogicalChannel -> DetectorSettings
-
saveToDB
public java.util.List<ome.model.core.Pixels> saveToDB(ome.model.fs.FilesetJobLink link)
Saves the current object graph to the database.- Parameters:
link
- a link from the fileset to be linked from- Returns:
- List of the Pixels objects with their attached object graphs that have been saved.
-
populateMinMax
public void populateMinMax(double[][][] imageChannelGlobalMinMax)
Synchronize the minimum and maximum intensity values with those specified by the client and save them in the DB.- Parameters:
imageChannelGlobalMinMax
- Minimums and maximums to update.
-
-