Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

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

(In [6858]) Created a new branch for OMEROMetadataStore merge work. (See #2322)

comment:4 Changed 14 years ago by ajpatterson

(In [6863]) Got server side components working using stubs. (see #2322)

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

(In [6864]) got public repository compiling (see #2322)

comment:7 Changed 14 years ago by ajpatterson

(In [6865]) fixing warnings in public repository (see #2322)

comment:8 Changed 14 years ago by bwzloranger

(In [6866]) New version of the OMEROMetadataStore. Added Index enumeration to ease the writing of implementations. (See #2322)

comment:9 Changed 14 years ago by bwzloranger

(In [6867]) New version of the OMEROMetadataStore. Example method setups for Andrew. (See #2322)

comment:10 Changed 14 years ago by bwzloranger

(In [6871]) New version of the OMEROMetadataStore. Example method setups for Andrew. (See #2322)

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

(In [6877]) fixing warnings in metadata store (see #2322)

comment:15 Changed 14 years ago by ajpatterson

(In [6879]) rewriting MetadataStore? (see #2322)

comment:16 Changed 14 years ago by bwzloranger

(In [6881]) interm commit for omerometeadatastore update (see #2322)

comment:17 Changed 14 years ago by ajpatterson

(In [6883]) rewriting metadata store (see #2322)

comment:18 Changed 14 years ago by ajpatterson

(In [6885]) rewriting metadata store (see #2322)

comment:19 Changed 14 years ago by ajpatterson

(In [6886]) rewriting metadata store - should compile but has lots of stubs (see #2322)

comment:20 Changed 14 years ago by ajpatterson

(In [6887]) rewriting metadata store - should compile but has lots of stubs (see #2322)

comment:21 Changed 14 years ago by bwzloranger

(In [6889]) interm commit for omerometeadatastore update (see #2322)

comment:22 Changed 14 years ago by ajpatterson

(In [6891]) rewriting metadata store - should compile but has lots of stubs (see #2322)

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

(In [6896]) Implemented Pixels and Plane setters in OMEROMetadataStoreClient. See #2322.

comment:25 Changed 14 years ago by mlinkert

(In [6898]) Implemented Objective and Path setters in OMEROMetadataStoreClient. See #2322.

comment:26 Changed 14 years ago by bwzloranger

(In [6908]) interm commit for omerometeadatastore. Updated eclipse, experiment, experimenter and filament (see #2322)

comment:27 Changed 14 years ago by mlinkert

(In [6910]) Implemented Microscope and OTF setters in OMEROMetadataStoreClient. See #2322.

comment:28 Changed 14 years ago by mlinkert

(In [6924]) Implemented Mask setters. See #2322.

comment:29 Changed 14 years ago by bwzloranger

(In [6928]) commit for line - most methods now being called - still needs testing! (see #2322)

comment:30 Changed 14 years ago by mlinkert

(In [6929]) Implemented missing Ellipse methods. See #2322.

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

(In [6960]) updated bio-formats to new omerometadatastore.java (see #2322)

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
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.73386 sec.)

We're Hiring!