/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.acquisition.LightSettings> unmodifiableLightSourceSettings() { if (! _loaded ) errorIfUnloaded(); if ( getLightSourceSettings() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getLightSourceSettings() ); }
/** * should be used rather than accessing the lightSourceSettings 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 #sizeOfLightSourceSettings()} is less than zero. */ public java.util.Iterator<ome.model.acquisition.LightSettings> iterateLightSourceSettings() { if (! _loaded ) errorIfUnloaded(); if ( getLightSourceSettings() == null ) { return new ome.util.EmptyIterator<ome.model.acquisition.LightSettings>(); } return getLightSourceSettings().iterator(); // TODO should this be direct access }
/** * removes a single element from this set and makes the inverse call on ome.model.acquisition.LightSettings */ public void removeLightSettings(ome.model.acquisition.LightSettings target) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().remove( target ); target.setMicrobeamManipulation ( null ); }
/** * use like removeLightSettings */ public void removeLightSettingsSet(java.util.Collection<ome.model.acquisition.LightSettings> targets ) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().removeAll( targets ); java.util.Iterator<ome.model.acquisition.LightSettings> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.LightSettings target = it.next(); target.setMicrobeamManipulation ( null ); } }
/** * use instead of setLightSourceSettings . Makes the necessary * call on ome.model.acquisition.LightSettings as well. */ public void addLightSettings(ome.model.acquisition.LightSettings target) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setMicrobeamManipulation ( this ); } }
/** * use like addLightSettings. */ public void addLightSettingsSet(java.util.Collection<ome.model.acquisition.LightSettings> targets) { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().addAll( targets ); java.util.Iterator<ome.model.acquisition.LightSettings> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.LightSettings target = it.next(); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setMicrobeamManipulation ( this ); } } }
/** * clears the set. */ public void clearLightSourceSettings() { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().clear(); java.util.Iterator<ome.model.acquisition.LightSettings> it = iterateLightSourceSettings(); while (it.hasNext()) { ome.model.acquisition.LightSettings target = it.next(); target.setMicrobeamManipulation ( 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(TYPE)) { return getType(); } else if (field.equals(LIGHTSOURCESETTINGS)) { return getLightSourceSettings(); } else if (field.equals(EXPERIMENT)) { return getExperiment(); } else if (field.equals(DESCRIPTION)) { return getDescription(); } else if (field.equals(DETAILS)) { return getDetails(); } else { if (_dynamicFields != null) { return _dynamicFields.get(field); } return null; } }