/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.acquisition.LightSource> unmodifiableLightSource() { if (! _loaded ) errorIfUnloaded(); if ( getLightSource() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getLightSource() ); }
/** * should be used rather than accessing the lightSource 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 #sizeOfLightSource()} is less than zero. */ public java.util.Iterator<ome.model.acquisition.LightSource> iterateLightSource() { if (! _loaded ) errorIfUnloaded(); if ( getLightSource() == null ) { return new ome.util.EmptyIterator<ome.model.acquisition.LightSource>(); } return getLightSource().iterator(); // TODO should this be direct access }
/** * removes a single element from this set and makes the inverse call on ome.model.acquisition.LightSource */ public void removeLightSource(ome.model.acquisition.LightSource target) { if (! _loaded ) errorIfUnloaded(); if (getLightSource() == null) { throwNullCollectionException("LightSource"); } getLightSource().remove( target ); target.setInstrument ( null ); }
/** * use like removeLightSource */ public void removeLightSourceSet(java.util.Collection<ome.model.acquisition.LightSource> targets ) { if (! _loaded ) errorIfUnloaded(); if (getLightSource() == null) { throwNullCollectionException("LightSource"); } getLightSource().removeAll( targets ); java.util.Iterator<ome.model.acquisition.LightSource> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.LightSource target = it.next(); target.setInstrument ( null ); } }
/** * use instead of setLightSource . Makes the necessary * call on ome.model.acquisition.LightSource as well. */ public void addLightSource(ome.model.acquisition.LightSource target) { if (! _loaded ) errorIfUnloaded(); if (getLightSource() == null) { throwNullCollectionException("LightSource"); } getLightSource().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 ); } }
/** * use like addLightSource. */ public void addLightSourceSet(java.util.Collection<ome.model.acquisition.LightSource> targets) { if (! _loaded ) errorIfUnloaded(); if (getLightSource() == null) { throwNullCollectionException("LightSource"); } getLightSource().addAll( targets ); java.util.Iterator<ome.model.acquisition.LightSource> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.LightSource 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 ); } } }
/** * 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 ); } }
return getObjective(); } else if (field.equals(LIGHTSOURCE)) { return getLightSource(); } else if (field.equals(FILTER)) { return getFilter();