public ome.model.roi.Roi newInstance() { return new ome.model.roi.Roi(); }
/** * produces a {@link java.util.List}-copy of the underlying collection. Unlike, * {@link #linkedFolderIterator()}, while using the returned {@link java.util.List}, * modifications can be made to the underlying collection without throwing * {@link java.util.ConcurrentModificationException}. */ public java.util.List<ome.model.containers.Folder> linkedFolderList() { if (! _loaded ) errorIfUnloaded(); java.util.Iterator<ome.model.containers.Folder> it = linkedFolderIterator(); java.util.List<ome.model.containers.Folder> list = new java.util.ArrayList<ome.model.containers.Folder>(); while ( it.hasNext() ) { list.add( it.next() ); } return list; }
/** * unlinks all ome.model.containers.Folder instances from this instance. */ public void unlinkFolder (ome.model.containers.Folder removal) { if (! _loaded ) errorIfUnloaded(); java.util.Set<ome.model.containers.FolderRoiLink> toRemove = findFolderRoiLink( removal ); java.util.Iterator<ome.model.containers.FolderRoiLink> it = toRemove.iterator(); while ( it.hasNext() ) { removeFolderRoiLink( it.next(), true ); } }
/** * 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 ); }
/** * 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); }
/** * clears the set. */ public void clearAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); java.util.List<ome.model.annotations.RoiAnnotationLink> list = new java.util.ArrayList<ome.model.annotations.RoiAnnotationLink>( getAnnotationLinks() ); for (ome.model.annotations.RoiAnnotationLink link : list) { removeRoiAnnotationLink( link, true ); } }
return null; } else if (field.equals(ID)) { return getId(); } else if (field.equals(VERSION)) { return getVersion(); } else if (field.equals(NAME)) { return getName(); } else if (field.equals(SHAPES)) { return getShapes(); } else if (field.equals(IMAGE)) { return getImage(); } else if (field.equals(SOURCE)) { return getSource(); } else if (field.equals(FOLDERLINKSCOUNTPEROWNER)) { return getFolderLinksCountPerOwner(); } else if (field.equals(FOLDERLINKS)) { return getFolderLinks(); } else if (field.equals(ANNOTATIONLINKSCOUNTPEROWNER)) { return getAnnotationLinksCountPerOwner(); } else if (field.equals(ANNOTATIONLINKS)) { return getAnnotationLinks(); } else if (field.equals(DESCRIPTION)) { return getDescription(); } else if (field.equals(DETAILS)) { return getDetails(); } else { if (_dynamicFields != null) {
return; } else if (field.equals(ID)) { setId((Long) value); } else if (field.equals(VERSION)) { setVersion((Integer) value); } else if (field.equals(NAME)) { setName((java.lang.String)value); } else if (field.equals(SHAPES)) { setShapes((java.util.List<ome.model.roi.Shape>)value); } else if (field.equals(IMAGE)) { setImage((ome.model.core.Image)value); } else if (field.equals(SOURCE)) { setSource((ome.model.core.OriginalFile)value); } else if (field.equals(FOLDERLINKSCOUNTPEROWNER)) { setFolderLinksCountPerOwner((java.util.Map<Long,Long>)value); } else if (field.equals(FOLDERLINKS)) { setFolderLinks((java.util.Set<ome.model.containers.FolderRoiLink>)value); } else if (field.equals(ANNOTATIONLINKSCOUNTPEROWNER)) { setAnnotationLinksCountPerOwner((java.util.Map<Long,Long>)value); } else if (field.equals(ANNOTATIONLINKS)) { setAnnotationLinks((java.util.Set<ome.model.annotations.RoiAnnotationLink>)value); } else if (field.equals(DESCRIPTION)) { setDescription((java.lang.String)value); } else if (field.equals(DETAILS)) { setDetails((ome.model.internal.Details)value); } else { if (_dynamicFields == 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 ); }
roi = new ome.model.roi.Roi(); roi.setImage(image); ome.model.roi.Mask toSaveMask = mask.asMaskI(z, t); roi.addShape(toSaveMask); ome.model.roi.Roi newROI = update.saveAndReturnObject(roi);
/** * 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 ); } }
private void appendRoi(String lsid, Roi roi) throws ServerError { Image image = null; IObject obj = lsidMap.get(lsid); if (obj instanceof Image) { image = (Image) obj; } if (image == null || image.getId() == null) { throw new ApiUsageException(null, null, "No image set; cannot create Roi"); } roi.setImage(image); lsidMap.put(lsid, roi); }
public void setSource(ome.model.core.OriginalFile source) { if (! _loaded ) errorIfUnloaded(); this.source = source; } protected java.util.Set<ome.model.containers.FolderRoiLink> folderLinks = new java.util.HashSet<ome.model.containers.FolderRoiLink>();
/** * clears the set. */ public void clearFolderLinks() { if (! _loaded ) errorIfUnloaded(); java.util.List<ome.model.containers.FolderRoiLink> list = new java.util.ArrayList<ome.model.containers.FolderRoiLink>( getFolderLinks() ); for (ome.model.containers.FolderRoiLink link : list) { removeFolderRoiLink( link, true ); } }
/** * unlinks all ome.model.annotations.Annotation instances from this instance. */ public void unlinkAnnotation (ome.model.annotations.Annotation removal) { if (! _loaded ) errorIfUnloaded(); java.util.Set<ome.model.annotations.RoiAnnotationLink> toRemove = findRoiAnnotationLink( removal ); java.util.Iterator<ome.model.annotations.RoiAnnotationLink> it = toRemove.iterator(); while ( it.hasNext() ) { removeRoiAnnotationLink( it.next(), true ); } }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.annotations.RoiAnnotationLink> unmodifiableAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getAnnotationLinks() ); }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.containers.FolderRoiLink> unmodifiableFolderLinks() { if (! _loaded ) errorIfUnloaded(); if ( getFolderLinks() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getFolderLinks() ); }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.roi.Shape> unmodifiableShapes() { if (! _loaded ) errorIfUnloaded(); if ( getShapes() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getShapes() ); }