Task #2322 (closed)
Opened 14 years ago
Closed 14 years ago
OMEROMetadataStore conversion
Reported by: | cxallan | Owned by: | bwzloranger |
---|---|---|---|
Priority: | minor | Milestone: | OMERO-Beta4.2 |
Component: | General | Version: | n.a. |
Keywords: | n.a. | Cc: | ajpatterson, mlinkert |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2010-06-10 (11) |
Description
The client OMERO metadata store must be converted to use the new metadata store interface present in bio-formats:r6231.
Change History (37)
comment:1 Changed 14 years ago by cxallan
- Cc ajpatterson mlinkert-x added
- Owner set to bwzloranger
comment:2 Changed 14 years ago by bwzloranger
- Status changed from new to assigned
comment:3 Changed 14 years ago by cxallan
comment:4 Changed 14 years ago by ajpatterson
comment:5 Changed 14 years ago by bwzloranger
Examples from old metadata store
/* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setFilterSetID(java.lang.String, int, int) */ public void setFilterSetID(String id, int instrumentIndex, int filterSetIndex) { checkDuplicateLSID(FilterSet.class, id); LinkedHashMap<String, Integer> indexes = new LinkedHashMap<String, Integer>(); indexes.put("instrumentIndex", instrumentIndex); indexes.put("filterSetIndex", filterSetIndex); IObjectContainer o = getIObjectContainer(FilterSet.class, indexes); o.LSID = id; addAuthoritativeContainer(FilterSet.class, id, o); } /** * @param imageIndex * @param roiIndex * @param shapeIndex * @return */ private Shape getShape(int imageIndex, int roiIndex, int shapeIndex) { LinkedHashMap<String, Integer> indexes = new LinkedHashMap<String, Integer>(); indexes.put("imageIndex", imageIndex); indexes.put("roiIndex", roiIndex); indexes.put("shapeIndex", shapeIndex); return getSourceObject(Shape.class, indexes); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setPlateWellOriginY(java.lang.Double, int) */ public void setPlateWellOriginY(Double wellOriginY, int plateIndex) { Plate o = getPlate(plateIndex); o.setWellOriginX(toRType(wellOriginY)); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setWellSampleImageRef(java.lang.String, int, int, int) */ public void setWellSampleImageRef(String image, int plateIndex, int wellIndex, int wellSampleIndex) { LSID key = new LSID(WellSample.class, plateIndex, wellIndex, wellSampleIndex); addReference(key, new LSID(image)); } /** * @param instrumentIndex * @return */ private Microscope getMicroscope(int instrumentIndex) { Instrument instrument = getInstrument(instrumentIndex); Microscope microscope = instrument.getMicroscope(); if (microscope == null) { microscope = new MicroscopeI(); instrument.setMicroscope(microscope); } return microscope; } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setLogicalChannelSecondaryEmissionFilter(java.lang.String, int, int) */ public void setLogicalChannelSecondaryEmissionFilter( String secondaryEmissionFilter, int imageIndex, int logicalChannelIndex) { // XXX: Using this suffix is kind of a gross hack but the reference // processing logic does not easily handle multiple A --> B or B --> A // linkages of the same type so we'll compromise. // Thu Jul 2 12:08:19 BST 2009 -- Chris Allan <callan@blackcat.ca> secondaryEmissionFilter += OMERO_EMISSION_FILTER_SUFFIX; LSID key = new LSID(LogicalChannel.class, imageIndex, logicalChannelIndex); addReference(key, new LSID(secondaryEmissionFilter)); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setLogicalChannelSecondaryExcitationFilter(java.lang.String, int, int) */ public void setLogicalChannelSecondaryExcitationFilter( String secondaryExcitationFilter, int imageIndex, int logicalChannelIndex) { // XXX: Using this suffix is kind of a gross hack but the reference // processing logic does not easily handle multiple A --> B or B --> A // linkages of the same type so we'll compromise. // Thu Jul 2 12:08:19 BST 2009 -- Chris Allan <callan@blackcat.ca> secondaryExcitationFilter += OMERO_EXCITATION_FILTER_SUFFIX; LSID key = new LSID(LogicalChannel.class, imageIndex, logicalChannelIndex); addReference(key, new LSID(secondaryExcitationFilter)); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setLogicalChannelLightSource(java.lang.String, int, int) */ public void setLogicalChannelLightSource( String lightSource, int imageIndex, int logicalChannelIndex) { log.warn("Handling legacy LogicalChannel --> LightSource reference."); // Create the non-existant LightSettings object; it's unlikely // we'll ever see method calls associated with it because the Reader // that called us is likely the OMEXMLReader with a 2003FC OME-XML // instance document or OME-TIFF. getLightSettings(imageIndex, logicalChannelIndex); setLightSourceSettingsLightSource(lightSource, imageIndex, logicalChannelIndex); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setLogicalChannelDetector(java.lang.String, int, int) */ public void setLogicalChannelDetector( String detector, int imageIndex, int logicalChannelIndex) { log.warn("Handling legacy LogicalChannel --> Detector reference."); // Create the non-existant DetectorSettings object; it's unlikely // we'll ever see method calls associated with it because the Reader // that called us is likely the OMEXMLReader with a 2003FC OME-XML // instance document or OME-TIFF. getDetectorSettings(imageIndex, logicalChannelIndex); setDetectorSettingsDetector(detector, imageIndex, logicalChannelIndex); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setFilterSetEmFilter(java.lang.String, int, int) */ public void setFilterSetEmFilter(String emFilter, int instrumentIndex, int filterSetIndex) { // XXX: Using this suffix is kind of a gross hack but the reference // processing logic does not easily handle multiple A --> B or B --> A // linkages of the same type so we'll compromise. // Thu Jul 16 13:34:37 BST 2009 -- Chris Allan <callan@blackcat.ca> emFilter += OMERO_EMISSION_FILTER_SUFFIX; LSID key = new LSID(FilterSet.class, instrumentIndex, filterSetIndex); addReference(key, new LSID(emFilter)); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setFilterSetExFilter(java.lang.String, int, int) */ public void setFilterSetExFilter(String exFilter, int instrumentIndex, int filterSetIndex) { // XXX: Using this suffix is kind of a gross hack but the reference // processing logic does not easily handle multiple A --> B or B --> A // linkages of the same type so we'll compromise. // Thu Jul 16 13:34:37 BST 2009 -- Chris Allan <callan@blackcat.ca> exFilter += OMERO_EXCITATION_FILTER_SUFFIX; LSID key = new LSID(FilterSet.class, instrumentIndex, filterSetIndex); addReference(key, new LSID(exFilter)); } /* (non-Javadoc) * @see loci.formats.meta.MetadataStore#setImageCreationDate(java.lang.String, int) */ public void setImageCreationDate(String creationDate, int imageIndex) { if (creationDate != null) { try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss"); java.util.Date date = sdf.parse(creationDate); Timestamp creationTimestamp = new Timestamp(date.getTime()); Image i = getImage(imageIndex); i.setAcquisitionDate(toRType(creationTimestamp)); } catch (ParseException e) { log.error(String.format("Parsing start time failed!"), e); } } }
comment:6 Changed 14 years ago by ajpatterson
comment:7 Changed 14 years ago by ajpatterson
comment:8 Changed 14 years ago by bwzloranger
comment:9 Changed 14 years ago by bwzloranger
comment:10 Changed 14 years ago by bwzloranger
comment:11 Changed 14 years ago by ajpatterson
(In [6873]) rewriting MetadataStore? (see #2322)
comment:12 Changed 14 years ago by ajpatterson
(In [6874]) rewriting MetadataStore? (see #2322)
comment:13 Changed 14 years ago by ajpatterson
(In [6875]) rewriting MetadataStore? (see #2322)
comment:14 Changed 14 years ago by ajpatterson
comment:15 Changed 14 years ago by ajpatterson
(In [6879]) rewriting MetadataStore? (see #2322)
comment:16 Changed 14 years ago by bwzloranger
comment:17 Changed 14 years ago by ajpatterson
comment:18 Changed 14 years ago by ajpatterson
comment:19 Changed 14 years ago by ajpatterson
comment:20 Changed 14 years ago by ajpatterson
comment:21 Changed 14 years ago by bwzloranger
comment:22 Changed 14 years ago by ajpatterson
comment:23 Changed 14 years ago by mlinkert
(In [6895]) Implemented Plate and PlateAcquisition? setters in OMEROMetadataStoreClient. See #2322.
comment:24 Changed 14 years ago by mlinkert
comment:25 Changed 14 years ago by mlinkert
comment:26 Changed 14 years ago by bwzloranger
comment:27 Changed 14 years ago by mlinkert
comment:28 Changed 14 years ago by mlinkert
comment:29 Changed 14 years ago by bwzloranger
comment:30 Changed 14 years ago by mlinkert
comment:31 Changed 14 years ago by jmoore
- Sprint changed from 2010-04-30 (8) to 2010-05-13 (9)
comment:32 Changed 14 years ago by bwzloranger
comment:33 Changed 14 years ago by bwzloranger
- Remaining Time changed from 5 to 0
- Status changed from assigned to closed
comment:34 Changed 14 years ago by bwzloranger
- Status changed from closed to reopened
comment:35 Changed 14 years ago by cxallan
- Sprint changed from 2010-05-13 (9) to 2010-05-27 (10)
comment:36 Changed 14 years ago by cxallan
- Sprint changed from 2010-05-27 (10) to 2010-06-10 (11)
comment:37 Changed 14 years ago by cxallan
- Status changed from reopened to closed
(In [6858]) Created a new branch for OMEROMetadataStore merge work. (See #2322)