/** * clears the set. */ public void clearLightSource() { if (! _loaded ) errorIfUnloaded(); if (getLightSource() == null) { throwNullCollectionException("LightSource"); } getLightSource().clear(); java.util.Iterator<ome.model.acquisition.LightSource> it = iterateLightSource(); while (it.hasNext()) { ome.model.acquisition.LightSource target = it.next(); target.setInstrument ( null ); } }
/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, Microscope sourceObject, Map<String, Integer> indexes) { int instrumentIndex = indexes.get("instrumentIndex"); instrumentList.get(instrumentIndex).setMicroscope(sourceObject); }
public ome.model.acquisition.Instrument proxy() { return new ome.model.acquisition.Instrument(this.id, false); }
return null; } else if (field.equals(ID)) { return getId(); } else if (field.equals(VERSION)) { return getVersion(); } else if (field.equals(MICROSCOPE)) { return getMicroscope(); } else if (field.equals(DETECTOR)) { return getDetector(); } else if (field.equals(OBJECTIVE)) { return getObjective(); } else if (field.equals(LIGHTSOURCE)) { return getLightSource(); } else if (field.equals(FILTER)) { return getFilter(); } else if (field.equals(DICHROIC)) { return getDichroic(); } else if (field.equals(FILTERSET)) { return getFilterSet(); } else if (field.equals(OTF)) { return getOtf(); } else if (field.equals(ANNOTATIONLINKSCOUNTPEROWNER)) { return getAnnotationLinksCountPerOwner(); } else if (field.equals(ANNOTATIONLINKS)) { return getAnnotationLinks(); } else if (field.equals(DETAILS)) { return getDetails(); } else { if (_dynamicFields != null) {
return; } else if (field.equals(ID)) { setId((Long) value); } else if (field.equals(VERSION)) { setVersion((Integer) value); } else if (field.equals(MICROSCOPE)) { setMicroscope((ome.model.acquisition.Microscope)value); } else if (field.equals(DETECTOR)) { setDetector((java.util.Set<ome.model.acquisition.Detector>)value); } else if (field.equals(OBJECTIVE)) { setObjective((java.util.Set<ome.model.acquisition.Objective>)value); } else if (field.equals(LIGHTSOURCE)) { setLightSource((java.util.Set<ome.model.acquisition.LightSource>)value); } else if (field.equals(FILTER)) { setFilter((java.util.Set<ome.model.acquisition.Filter>)value); } else if (field.equals(DICHROIC)) { setDichroic((java.util.Set<ome.model.acquisition.Dichroic>)value); } else if (field.equals(FILTERSET)) { setFilterSet((java.util.Set<ome.model.acquisition.FilterSet>)value); } else if (field.equals(OTF)) { setOtf((java.util.Set<ome.model.acquisition.OTF>)value); } else if (field.equals(ANNOTATIONLINKSCOUNTPEROWNER)) { setAnnotationLinksCountPerOwner((java.util.Map<Long,Long>)value); } else if (field.equals(ANNOTATIONLINKS)) { setAnnotationLinks((java.util.Set<ome.model.annotations.InstrumentAnnotationLink>)value); } else if (field.equals(DETAILS)) { setDetails((ome.model.internal.Details)value); } else { if (_dynamicFields == null) {
Iterator<LightSource> i = value.iterateLightSource(); Laser laser; value.clearLightSource(); Iterator<IObject> j = list.iterator(); while (j.hasNext()) { value.addLightSource((LightSource) j.next());
/** * takes a CBlock and calls the block once for each ome.model.acquisition.LightSource while * collecting the results. If <code>block == null</code>, then the * iterator values themselves are collected. This method uses * {@link #iterateLightSource} internally and so will return a value * even if the underlying collection is null. */ @SuppressWarnings("unchecked") public <E> java.util.List<E> collectLightSource(ome.util.CBlock<E> block) { if (! _loaded ) errorIfUnloaded(); java.util.List<E> result = new java.util.ArrayList<E>(); java.util.Iterator<ome.model.acquisition.LightSource> it = iterateLightSource(); while ( it.hasNext() ) { IObject obj = (IObject) it.next(); if ( block != null ) { result.add( block.call( obj ) ); } else { result.add( (E) obj ); } } return result; }
/** * Adds a ome.model.annotations.InstrumentAnnotationLink to annotationLinks . This entails changing our annotationLinks Set, * creating a new ome.model.annotations.InstrumentAnnotationLink and calling linkAnnotation on the ome.model.annotations.Annotation. */ public ome.model.annotations.InstrumentAnnotationLink linkAnnotation (ome.model.annotations.Annotation addition) { if (! _loaded ) errorIfUnloaded(); // Setup link ome.model.annotations.InstrumentAnnotationLink link = new ome.model.annotations.InstrumentAnnotationLink(); link.link( this, addition ); // Add it to us and possibly the other side. addInstrumentAnnotationLink( link, true ); return link; }
@SuppressWarnings("unchecked") boolean imagesContainsInstrument(Session s, List<Long> images, Instrument instr, Map<Long, List<Long>> cache) { if (instr == null) { return false; } Long instrID = instr.getId(); List<Long> imgIDs; if (cache.containsKey(instrID)) { imgIDs = cache.get(instrID); } else { imgIDs = (List<Long>) s .createQuery("select id from Image where instrument.id = ?") .setParameter(0, instrID).list(); cache.put(instrID, imgIDs); } return CollectionUtils.containsAny(images, imgIDs); }
/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, Dichroic sourceObject, Map<String, Integer> indexes) { Instrument i = instrumentList.get(indexes.get("instrumentIndex")); i.addDichroic(sourceObject); }
/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, Filter sourceObject, Map<String, Integer> indexes) { Instrument i = instrumentList.get(indexes.get("instrumentIndex")); i.addFilter(sourceObject); }
/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, LightSource sourceObject, Map<String, Integer> indexes) { Instrument i = instrumentList.get(indexes.get("instrumentIndex")); i.addLightSource(sourceObject); }
/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, FilterSet sourceObject, Map<String, Integer> indexes) { Instrument i = instrumentList.get(indexes.get("instrumentIndex")); i.addFilterSet(sourceObject); }
/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, Detector sourceObject, Map<String, Integer> indexes) { Instrument i = getInstrument(indexes.get("instrumentIndex")); i.addDetector(sourceObject); }
public ome.model.acquisition.Instrument newInstance() { return new ome.model.acquisition.Instrument(); }