/** * Adds a ome.model.annotations.LightSourceAnnotationLink to annotationLinks, allowing for recursion -- whether * or not addLightSourceAnnotationLink will be called on the addition <b>if it is loaded</b> */ public void addLightSourceAnnotationLink (ome.model.annotations.LightSourceAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().add( link ); }
/** * use like removeLightSourceAnnotationLink */ public void removeLightSourceAnnotationLinkSet(java.util.Collection<ome.model.annotations.LightSourceAnnotationLink> targets ) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().removeAll( targets ); java.util.Iterator<ome.model.annotations.LightSourceAnnotationLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.annotations.LightSourceAnnotationLink target = it.next(); target.setParent ( null ); } }
/** * removes the given LightSourceAnnotationLink from annotationLinks, allowing for recursion -- whether * or not the removal will call unlinkLightSource again <b>if loaded</b>. */ public void removeLightSourceAnnotationLink (ome.model.annotations.LightSourceAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( link ); }
/** * use like addLightSourceAnnotationLink. */ public void addLightSourceAnnotationLinkSet(java.util.Collection<ome.model.annotations.LightSourceAnnotationLink> targets) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().addAll( targets ); java.util.Iterator<ome.model.annotations.LightSourceAnnotationLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.annotations.LightSourceAnnotationLink target = it.next(); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setParent ( this ); } } }
/** * removes a single element from this set and makes the inverse call on ome.model.annotations.LightSourceAnnotationLink */ public void removeLightSourceAnnotationLink(ome.model.annotations.LightSourceAnnotationLink target) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( target ); target.setParent ( null ); }
/** * use instead of setAnnotationLinks . Makes the necessary * call on ome.model.annotations.LightSourceAnnotationLink as well. */ public void addLightSourceAnnotationLink(ome.model.annotations.LightSourceAnnotationLink target) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setParent ( this ); } }