public LightSettings( ome.model.acquisition.LightSource _lightSource ) { this(null, true); setLightSource(_lightSource); }
public ome.model.acquisition.LightSettings newInstance() { return new ome.model.acquisition.LightSettings(); }
public void setLightSource(ome.model.acquisition.LightSource lightSource) { if (! _loaded ) errorIfUnloaded(); this.lightSource = lightSource; } protected ome.model.experiment.MicrobeamManipulation microbeamManipulation = null;
@Override public Object retrieve(String field) { if (field == null) { return null; } else if (field.equals(ID)) { return getId(); } else if (field.equals(VERSION)) { return getVersion(); } else if (field.equals(ATTENUATION)) { return getAttenuation(); } else if (field.equals(WAVELENGTH)) { return getWavelength(); } else if (field.equals(LIGHTSOURCE)) { return getLightSource(); } else if (field.equals(MICROBEAMMANIPULATION)) { return getMicrobeamManipulation(); } else if (field.equals(DETAILS)) { return getDetails(); } else { if (_dynamicFields != null) { return _dynamicFields.get(field); } return null; } }
/** * Finds the matching unique settings for a logical channel. * @param uniqueSettings Set of existing unique settings. * @param lc Logical channel to find unique settings for. * @return Matched unique settings or <code>null</code> if * <code>lc.getLightSourceSettings() == null</code>. */ private LightSettings getUniqueLightSettings( Set<LightSettings> uniqueSettings, LogicalChannel lc) { LightSettings s1 = lc.getLightSourceSettings(); if (s1 == null) { return null; } for (LightSettings s2 : uniqueSettings) { if (compare(s1.getAttenuation(), s2.getAttenuation()) && s1.getLightSource() == s2.getLightSource() && s1.getMicrobeamManipulation() == s2.getMicrobeamManipulation() && compare(s1.getWavelength(), s2.getWavelength())) { return s2; } } uniqueSettings.add(s1); return s1; }
@Override public void putAt(String field, Object value) { if (field == null) { return; } else if (field.equals(ID)) { setId((Long) value); } else if (field.equals(VERSION)) { setVersion((Integer) value); } else if (field.equals(ATTENUATION)) { setAttenuation((java.lang.Double)value); } else if (field.equals(WAVELENGTH)) { setWavelength((ome.model.units.Length)value); } else if (field.equals(LIGHTSOURCE)) { setLightSource((ome.model.acquisition.LightSource)value); } else if (field.equals(MICROBEAMMANIPULATION)) { setMicrobeamManipulation((ome.model.experiment.MicrobeamManipulation)value); } else if (field.equals(DETAILS)) { setDetails((ome.model.internal.Details)value); } else { if (_dynamicFields == null) { _dynamicFields = new java.util.HashMap<String, Object>(); } _dynamicFields.put(field,value); } }
LightSource src = lc.getLightSourceSettings().getLightSource(); if (src instanceof Laser) { Laser laser = (Laser) src;
light = channel.getLightSourceSettings(); if (light != null) { src = light.getLightSource(); if (!(src instanceof LightEmittingDiode)) { sb = createLightQuery(src, true); iQuery.findByQuery(sb.toString(), params)); light.setLightSource(laser); } else light.setLightSource(src);
/** * Main constructor. */ public LightSettings (Long id, boolean loaded) { setId(id); if (loaded) { getDetails().setContext(this); } else { if (this.id == null) { throw new ApiUsageException("Id cannot be null for a proxy"); } unload(); } }
LightSettings obj = (LightSettings) s.get(LightSettings.class, objId); return imagesContainsInstrument(s, images, obj.getLightSource() .getInstrument(), obToImageCache); } else if (DetectorSettings.class.isAssignableFrom(kls)) {
LightSource ls = lc.getLightSourceSettings().getLightSource(); if (ls instanceof Laser) valueWavelength = ((Laser) ls).getWavelength();
public void setMicrobeamManipulation(ome.model.experiment.MicrobeamManipulation microbeamManipulation) { if (! _loaded ) errorIfUnloaded(); this.microbeamManipulation = microbeamManipulation; } protected ome.model.internal.Details details = new Details();
/** * Handles linking a specific reference object to a target object in our * object graph. * @param target Target model object. * @param reference Reference model object. */ private void handleReference(LightSettings target, LightSource reference) { target.setLightSource(reference); }
public ome.model.acquisition.LightSettings proxy() { return new ome.model.acquisition.LightSettings(this.id, false); }
LightSource src = lc.getLightSourceSettings().getLightSource(); if (src instanceof Laser) { Laser laser = (Laser) src;
/** * Use the {@link ome.model.internal.Details#copy(ome.model.internal.Details)} * or {@link ome.model.internal.Details#shallowCopy(ome.model.internal.Details)} * methods to set the {@link Details} instance instead. */ protected void setDetails(ome.model.internal.Details details) { if (! _loaded ) errorIfUnloaded(); this.details = (Details) details; }
@Override public void setVersion(Integer version) { if (! _loaded ) errorIfUnloaded(); this.version = version; }
/** * This version number is controlled by the database for optimisitic * locking. */ @javax.persistence.Column(name="version") // @javax.persistence.Version //TODO mark off #118 if this succeeds, otherwise, completely remove versions and test updateEvent @Override public Integer getVersion() { if (! _loaded ) errorIfUnloaded(); return this.version; }
public void setAttenuation(java.lang.Double attenuation) { if (! _loaded ) errorIfUnloaded(); if (attenuation != null && (attenuation < 0 || attenuation > 1)) { throw new IllegalArgumentException("values of LightSettings.attenuation may range from zero to one only"); } this.attenuation = (java.lang.Double) attenuation; } protected ome.model.units.Length wavelength = null;
public void setWavelength(ome.model.units.Length wavelength) { if (! _loaded ) errorIfUnloaded(); if (wavelength != null && wavelength.getValue() <= 0) { throw new IllegalArgumentException("values of LightSettings.wavelength must be strictly positive"); } this.wavelength = wavelength; }