/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.acquisition.Detector> unmodifiableDetector() { if (! _loaded ) errorIfUnloaded(); if ( getDetector() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getDetector() ); }
/** * should be used rather than accessing the detector set directly. * This method will never return null, but rather will return an instance * of {@link ome.util.EmptyIterator}. To test for a null collection, * see of {@link #sizeOfDetector()} is less than zero. */ public java.util.Iterator<ome.model.acquisition.Detector> iterateDetector() { if (! _loaded ) errorIfUnloaded(); if ( getDetector() == null ) { return new ome.util.EmptyIterator<ome.model.acquisition.Detector>(); } return getDetector().iterator(); // TODO should this be direct access }
/** * removes a single element from this set and makes the inverse call on ome.model.acquisition.Detector */ public void removeDetector(ome.model.acquisition.Detector target) { if (! _loaded ) errorIfUnloaded(); if (getDetector() == null) { throwNullCollectionException("Detector"); } getDetector().remove( target ); target.setInstrument ( null ); }
/** * use like removeDetector */ public void removeDetectorSet(java.util.Collection<ome.model.acquisition.Detector> targets ) { if (! _loaded ) errorIfUnloaded(); if (getDetector() == null) { throwNullCollectionException("Detector"); } getDetector().removeAll( targets ); java.util.Iterator<ome.model.acquisition.Detector> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.Detector target = it.next(); target.setInstrument ( null ); } }
/** * use instead of setDetector . Makes the necessary * call on ome.model.acquisition.Detector as well. */ public void addDetector(ome.model.acquisition.Detector target) { if (! _loaded ) errorIfUnloaded(); if (getDetector() == null) { throwNullCollectionException("Detector"); } getDetector().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setInstrument ( this ); } }
/** * clears the set. */ public void clearDetector() { if (! _loaded ) errorIfUnloaded(); if (getDetector() == null) { throwNullCollectionException("Detector"); } getDetector().clear(); java.util.Iterator<ome.model.acquisition.Detector> it = iterateDetector(); while (it.hasNext()) { ome.model.acquisition.Detector target = it.next(); target.setInstrument ( null ); } }
/** * use like addDetector. */ public void addDetectorSet(java.util.Collection<ome.model.acquisition.Detector> targets) { if (! _loaded ) errorIfUnloaded(); if (getDetector() == null) { throwNullCollectionException("Detector"); } getDetector().addAll( targets ); java.util.Iterator<ome.model.acquisition.Detector> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.Detector target = it.next(); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setInstrument ( this ); } } }
return getMicroscope(); } else if (field.equals(DETECTOR)) { return getDetector(); } else if (field.equals(OBJECTIVE)) { return getObjective();