/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.acquisition.Objective> unmodifiableObjective() { if (! _loaded ) errorIfUnloaded(); if ( getObjective() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getObjective() ); }
/** * should be used rather than accessing the objective 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 #sizeOfObjective()} is less than zero. */ public java.util.Iterator<ome.model.acquisition.Objective> iterateObjective() { if (! _loaded ) errorIfUnloaded(); if ( getObjective() == null ) { return new ome.util.EmptyIterator<ome.model.acquisition.Objective>(); } return getObjective().iterator(); // TODO should this be direct access }
/** * removes a single element from this set and makes the inverse call on ome.model.acquisition.Objective */ public void removeObjective(ome.model.acquisition.Objective target) { if (! _loaded ) errorIfUnloaded(); if (getObjective() == null) { throwNullCollectionException("Objective"); } getObjective().remove( target ); target.setInstrument ( null ); }
/** * use like removeObjective */ public void removeObjectiveSet(java.util.Collection<ome.model.acquisition.Objective> targets ) { if (! _loaded ) errorIfUnloaded(); if (getObjective() == null) { throwNullCollectionException("Objective"); } getObjective().removeAll( targets ); java.util.Iterator<ome.model.acquisition.Objective> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.Objective target = it.next(); target.setInstrument ( null ); } }
/** * use instead of setObjective . Makes the necessary * call on ome.model.acquisition.Objective as well. */ public void addObjective(ome.model.acquisition.Objective target) { if (! _loaded ) errorIfUnloaded(); if (getObjective() == null) { throwNullCollectionException("Objective"); } getObjective().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 addObjective. */ public void addObjectiveSet(java.util.Collection<ome.model.acquisition.Objective> targets) { if (! _loaded ) errorIfUnloaded(); if (getObjective() == null) { throwNullCollectionException("Objective"); } getObjective().addAll( targets ); java.util.Iterator<ome.model.acquisition.Objective> it = targets.iterator(); while ( it.hasNext() ) { ome.model.acquisition.Objective 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 clearObjective() { if (! _loaded ) errorIfUnloaded(); if (getObjective() == null) { throwNullCollectionException("Objective"); } getObjective().clear(); java.util.Iterator<ome.model.acquisition.Objective> it = iterateObjective(); while (it.hasNext()) { ome.model.acquisition.Objective target = it.next(); target.setInstrument ( null ); } }
return getDetector(); } else if (field.equals(OBJECTIVE)) { return getObjective(); } else if (field.equals(LIGHTSOURCE)) { return getLightSource();