/** * removes the given RoiAnnotationLink from annotationLinks, allowing for recursion -- whether * or not the removal will call unlinkRoi again <b>if loaded</b>. */ public void removeRoiAnnotationLink (ome.model.annotations.RoiAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( link ); }
/** * use like removeFolderRoiLink */ public void removeFolderRoiLinkSet(java.util.Collection<ome.model.containers.FolderRoiLink> targets ) { if (! _loaded ) errorIfUnloaded(); if (getFolderLinks() == null) { throwNullCollectionException("FolderLinks"); } getFolderLinks().removeAll( targets ); java.util.Iterator<ome.model.containers.FolderRoiLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.containers.FolderRoiLink target = it.next(); target.setChild ( null ); } }
/** * Swaps the first element of shapes with the first instance of the * given element. If the given element is not in the list, an * {@link IndexOutOfBoundsException} will be thrown. Returns the swapped * element. This method * will also throw an {@link ApiUsageException} if the collection is * unloaded. See {@link #sizeOfShapes()} for more information. */ public ome.model.roi.Shape setPrimaryShape(ome.model.roi.Shape element) throws IndexOutOfBoundsException { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } java.util.List<ome.model.roi.Shape> list = getShapes(); int index = list.indexOf(element); ome.model.roi.Shape old = list.get(0); list.set(index, old); list.set(0, element); return old; }
/** * Gets the first element of shapes which can be interpreted as the * primary or default element in some situations. If there is not first * element, an {@link IndexOutOfBoundsException} is throws. This method * will also throw an {@link ApiUsageException} if the collection is * unloaded. See {@link #sizeOfShapes()} for more information. */ @javax.persistence.Transient public ome.model.roi.Shape getPrimaryShape() throws IndexOutOfBoundsException { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } return getShapes().get(0); }
/** * Adds a ome.model.annotations.RoiAnnotationLink to annotationLinks, allowing for recursion -- whether * or not addRoiAnnotationLink will be called on the addition <b>if it is loaded</b> */ public void addRoiAnnotationLink (ome.model.annotations.RoiAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().add( link ); }
/** * Gets the ome.model.roi.Shape at the given index. */ public ome.model.roi.Shape getShape(int index) throws IndexOutOfBoundsException { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } return getShapes().get(index); }
/** * use like removeRoiAnnotationLink */ public void removeRoiAnnotationLinkSet(java.util.Collection<ome.model.annotations.RoiAnnotationLink> targets ) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().removeAll( targets ); java.util.Iterator<ome.model.annotations.RoiAnnotationLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.annotations.RoiAnnotationLink target = it.next(); target.setParent ( null ); } }
/** * use like addRoiAnnotationLink. */ public void addRoiAnnotationLinkSet(java.util.Collection<ome.model.annotations.RoiAnnotationLink> targets) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().addAll( targets ); java.util.Iterator<ome.model.annotations.RoiAnnotationLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.annotations.RoiAnnotationLink 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 ); } } }
/** * use like addFolderRoiLink. */ public void addFolderRoiLinkSet(java.util.Collection<ome.model.containers.FolderRoiLink> targets) { if (! _loaded ) errorIfUnloaded(); if (getFolderLinks() == null) { throwNullCollectionException("FolderLinks"); } getFolderLinks().addAll( targets ); java.util.Iterator<ome.model.containers.FolderRoiLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.containers.FolderRoiLink target = it.next(); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setChild ( this ); } } }
/** * clears the set. */ public void clearShapes() { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } getShapes().clear(); java.util.Iterator<ome.model.roi.Shape> it = iterateShapes(); while (it.hasNext()) { ome.model.roi.Shape target = it.next(); target.setRoi ( null ); } }
/** * removes a single element from this set and makes the inverse call on ome.model.containers.FolderRoiLink */ public void removeFolderRoiLink(ome.model.containers.FolderRoiLink target) { if (! _loaded ) errorIfUnloaded(); if (getFolderLinks() == null) { throwNullCollectionException("FolderLinks"); } getFolderLinks().remove( target ); target.setChild ( null ); }
/** * use like removeShape */ public void removeShapeSet(java.util.Collection<ome.model.roi.Shape> targets ) { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } getShapes().removeAll( targets ); java.util.Iterator<ome.model.roi.Shape> it = targets.iterator(); while ( it.hasNext() ) { ome.model.roi.Shape target = it.next(); if (target.isLoaded()) { target.setRoi ( null ); } } }
/** * removes a single element from this set and makes the inverse call on ome.model.annotations.RoiAnnotationLink */ public void removeRoiAnnotationLink(ome.model.annotations.RoiAnnotationLink target) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( target ); target.setParent ( null ); }
/** * use instead of setFolderLinks . Makes the necessary * call on ome.model.containers.FolderRoiLink as well. */ public void addFolderRoiLink(ome.model.containers.FolderRoiLink target) { if (! _loaded ) errorIfUnloaded(); if (getFolderLinks() == null) { throwNullCollectionException("FolderLinks"); } getFolderLinks().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { target.setChild ( this ); } }
/** * use instead of setAnnotationLinks . Makes the necessary * call on ome.model.annotations.RoiAnnotationLink as well. */ public void addRoiAnnotationLink(ome.model.annotations.RoiAnnotationLink 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 ); } }
/** * removes a single element from this set and makes the inverse call on ome.model.roi.Shape */ public void removeShape(ome.model.roi.Shape target) { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } getShapes().remove( target ); if (target.isLoaded()) { target.setRoi ( null ); } }
/** * use instead of setShapes . Makes the necessary * call on ome.model.roi.Shape as well. */ public void addShape(ome.model.roi.Shape target) { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } getShapes().add( target ); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (target != null) { if (target.isLoaded()) { target.setRoi ( this ); } } }
/** * Sets the ome.model.roi.Shape at the given index. Adheres to the {@link java.util.List#set(int, Object)} * contract. To extend the list, use {@link #addShape(Shape)}. * @see java.util.List#set(int, Object) */ public ome.model.roi.Shape setShape(int index, ome.model.roi.Shape element) throws IndexOutOfBoundsException { if (! _loaded ) errorIfUnloaded(); if (getShapes() == null) { throwNullCollectionException("Shapes"); } ome.model.roi.Shape old = getShapes().set(index, element); // If this relationship is not ordered, then we will // "attempt" the setting even if it is loaded. if (element != null) { if (element.isLoaded()) { element.setRoi ( this ); } } return old; }
/** * removes the given FolderRoiLink from folderLinks, allowing for recursion -- whether * or not the removal will call unlinkRoi again <b>if loaded</b>. */ public void removeFolderRoiLink (ome.model.containers.FolderRoiLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getFolderLinks() == null ) { throwNullCollectionException("FolderLinks"); } getFolderLinks().remove( link ); if ( bothSides && link.parent().isLoaded() ) { link.parent().removeFolderRoiLink( link, false ); } }
/** * Adds a ome.model.containers.FolderRoiLink to folderLinks, allowing for recursion -- whether * or not addFolderRoiLink will be called on the addition <b>if it is loaded</b> */ public void addFolderRoiLink (ome.model.containers.FolderRoiLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getFolderLinks() == null ) { throwNullCollectionException("FolderLinks"); } getFolderLinks().add( link ); if ( bothSides && link.parent().isLoaded() ) { link.parent().addFolderRoiLink( link, false ); } }