/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.annotations.LightPathAnnotationLink> unmodifiableAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getAnnotationLinks() ); }
return getAnnotationLinksCountPerOwner(); } else if (field.equals(ANNOTATIONLINKS)) { return getAnnotationLinks(); } else if (field.equals(DETAILS)) { return getDetails();
/** * should be used rather than accessing the annotationLinks 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 #sizeOfAnnotationLinks()} is less than zero. */ public java.util.Iterator<ome.model.annotations.LightPathAnnotationLink> iterateAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return new ome.util.EmptyIterator<ome.model.annotations.LightPathAnnotationLink>(); } return getAnnotationLinks().iterator(); // TODO should this be direct access }
/** * Adds a ome.model.annotations.LightPathAnnotationLink to annotationLinks, allowing for recursion -- whether * or not addLightPathAnnotationLink will be called on the addition <b>if it is loaded</b> */ public void addLightPathAnnotationLink (ome.model.annotations.LightPathAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().add( link ); }
/** * removes the given LightPathAnnotationLink from annotationLinks, allowing for recursion -- whether * or not the removal will call unlinkLightPath again <b>if loaded</b>. */ public void removeLightPathAnnotationLink (ome.model.annotations.LightPathAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( link ); }
/** * removes a single element from this set and makes the inverse call on ome.model.annotations.LightPathAnnotationLink */ public void removeLightPathAnnotationLink(ome.model.annotations.LightPathAnnotationLink target) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( target ); target.setParent ( null ); }
/** * clears the set. */ public void clearAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); java.util.List<ome.model.annotations.LightPathAnnotationLink> list = new java.util.ArrayList<ome.model.annotations.LightPathAnnotationLink>( getAnnotationLinks() ); for (ome.model.annotations.LightPathAnnotationLink link : list) { removeLightPathAnnotationLink( link, true ); } }
/** * use like removeLightPathAnnotationLink */ public void removeLightPathAnnotationLinkSet(java.util.Collection<ome.model.annotations.LightPathAnnotationLink> targets ) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().removeAll( targets ); java.util.Iterator<ome.model.annotations.LightPathAnnotationLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.annotations.LightPathAnnotationLink target = it.next(); target.setParent ( null ); } }
/** * use instead of setAnnotationLinks . Makes the necessary * call on ome.model.annotations.LightPathAnnotationLink as well. */ public void addLightPathAnnotationLink(ome.model.annotations.LightPathAnnotationLink 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 ); } }
/** * use like addLightPathAnnotationLink. */ public void addLightPathAnnotationLinkSet(java.util.Collection<ome.model.annotations.LightPathAnnotationLink> targets) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().addAll( targets ); java.util.Iterator<ome.model.annotations.LightPathAnnotationLink> it = targets.iterator(); while ( it.hasNext() ) { ome.model.annotations.LightPathAnnotationLink 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 ); } } }
if ( getAnnotationLinks() == null ) { return new ome.util.EmptyIterator<ome.model.annotations.Annotation>(); final java.util.Iterator<ome.model.annotations.LightPathAnnotationLink> it = getAnnotationLinks().iterator(); return new java.util.Iterator<ome.model.annotations.Annotation>() {