public ome.model.meta.Namespace newInstance() { return new ome.model.meta.Namespace(); }
/** * Adds a ome.model.annotations.NamespaceAnnotationLink to annotationLinks, allowing for recursion -- whether * or not addNamespaceAnnotationLink will be called on the addition <b>if it is loaded</b> */ public void addNamespaceAnnotationLink (ome.model.annotations.NamespaceAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().add( link ); }
/** * 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.NamespaceAnnotationLink> toRemove = findNamespaceAnnotationLink( removal ); java.util.Iterator<ome.model.annotations.NamespaceAnnotationLink> it = toRemove.iterator(); while ( it.hasNext() ) { removeNamespaceAnnotationLink( it.next(), true ); } }
/** * clears the set. */ public void clearAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); java.util.List<ome.model.annotations.NamespaceAnnotationLink> list = new java.util.ArrayList<ome.model.annotations.NamespaceAnnotationLink>( getAnnotationLinks() ); for (ome.model.annotations.NamespaceAnnotationLink link : list) { removeNamespaceAnnotationLink( link, true ); } }
/** * Returns an unmodifiable collection-view */ public java.util.Collection<ome.model.annotations.NamespaceAnnotationLink> unmodifiableAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return java.util.Collections.emptyList(); } return java.util.Collections.unmodifiableCollection( getAnnotationLinks() ); }
return null; } else if (field.equals(ID)) { return getId(); } else if (field.equals(VERSION)) { return getVersion(); } else if (field.equals(KEYWORDS)) { return getKeywords(); } else if (field.equals(MULTIVALUED)) { return getMultivalued(); } else if (field.equals(DISPLAY)) { return getDisplay(); } else if (field.equals(DISPLAYNAME)) { return getDisplayName(); } else if (field.equals(ANNOTATIONLINKSCOUNTPEROWNER)) { return getAnnotationLinksCountPerOwner(); } else if (field.equals(ANNOTATIONLINKS)) { return getAnnotationLinks(); } else if (field.equals(NAME)) { return getName(); } else if (field.equals(DESCRIPTION)) { return getDescription(); } else if (field.equals(DETAILS)) { return getDetails(); } else { if (_dynamicFields != null) {
public void setKeywords(java.util.List<String> keywords) { if (! _loaded ) errorIfUnloaded(); this.keywords = (java.util.List<String>) keywords; } protected java.lang.Boolean multivalued = null;
/** * Main constructor. */ public Namespace (Long id, boolean loaded) { setId(id); if (loaded) { getDetails().setContext(this); } else { if (this.id == null) { throw new ApiUsageException("Id cannot be null for a proxy"); } unload(); } }
/** * produces a {@link java.util.List}-copy of the underlying collection. Unlike, * {@link #linkedAnnotationIterator()}, 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.annotations.Annotation> linkedAnnotationList() { if (! _loaded ) errorIfUnloaded(); java.util.Iterator<ome.model.annotations.Annotation> it = linkedAnnotationIterator(); java.util.List<ome.model.annotations.Annotation> list = new java.util.ArrayList<ome.model.annotations.Annotation>(); while ( it.hasNext() ) { list.add( it.next() ); } return list; }
/** * find all ome.model.annotations.NamespaceAnnotationLink which have the argument as their child. */ public java.util.Set<ome.model.annotations.NamespaceAnnotationLink> findNamespaceAnnotationLink( ome.model.annotations.Annotation target ) { if (! _loaded ) errorIfUnloaded(); final java.util.Iterator<ome.model.annotations.NamespaceAnnotationLink> it = iterateAnnotationLinks(); final java.util.Set<ome.model.annotations.NamespaceAnnotationLink> result = new java.util.HashSet<ome.model.annotations.NamespaceAnnotationLink>(); while ( it.hasNext() ) { ome.model.annotations.NamespaceAnnotationLink link = it.next(); if ( link.child() == target ) { result.add( link ); } } return result; }
/** * Adds a ome.model.annotations.NamespaceAnnotationLink to annotationLinks . This entails changing our annotationLinks Set, * creating a new ome.model.annotations.NamespaceAnnotationLink and calling linkAnnotation on the ome.model.annotations.Annotation. */ public ome.model.annotations.NamespaceAnnotationLink linkAnnotation (ome.model.annotations.Annotation addition) { if (! _loaded ) errorIfUnloaded(); // Setup link ome.model.annotations.NamespaceAnnotationLink link = new ome.model.annotations.NamespaceAnnotationLink(); link.link( this, addition ); // Add it to us and possibly the other side. addNamespaceAnnotationLink( link, true ); return link; }
public void setDescription(java.lang.String description) { if (! _loaded ) errorIfUnloaded(); this.description = (java.lang.String) description; } protected ome.model.internal.Details details = new Details();
/** * 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.NamespaceAnnotationLink> iterateAnnotationLinks() { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return new ome.util.EmptyIterator<ome.model.annotations.NamespaceAnnotationLink>(); } return getAnnotationLinks().iterator(); // TODO should this be direct access }
/** * takes a CBlock and calls the block once for each ome.model.annotations.Annotation while * collecting the results. If <code>block == null</code>, then the * iterator values themselves are collected. */ @SuppressWarnings("unchecked") public <E> java.util.List<E> eachLinkedAnnotation(ome.util.CBlock<E> block) { if (! _loaded ) errorIfUnloaded(); java.util.List<E> result = new java.util.ArrayList<E>(); java.util.Iterator<ome.model.annotations.Annotation> it = linkedAnnotationIterator(); while ( it.hasNext() ) { ome.model.annotations.Annotation obj = it.next(); if ( block != null ) { result.add( block.call( obj ) ); } else { result.add( (E) obj ); } } return result; }
/** * takes a CBlock and calls the block once for each ome.model.annotations.NamespaceAnnotationLink while * collecting the results. If <code>block == null</code>, then the * iterator values themselves are collected. This method uses * {@link #iterateAnnotationLinks} internally and so will return a value * even if the underlying collection is null. */ @SuppressWarnings("unchecked") public <E> java.util.List<E> collectAnnotationLinks(ome.util.CBlock<E> block) { if (! _loaded ) errorIfUnloaded(); java.util.List<E> result = new java.util.ArrayList<E>(); java.util.Iterator<ome.model.annotations.NamespaceAnnotationLink> it = iterateAnnotationLinks(); while ( it.hasNext() ) { IObject obj = (IObject) it.next(); if ( block != null ) { result.add( block.call( obj ) ); } else { result.add( (E) obj ); } } return result; }
/** * removes the given NamespaceAnnotationLink from annotationLinks, allowing for recursion -- whether * or not the removal will call unlinkNamespace again <b>if loaded</b>. */ public void removeNamespaceAnnotationLink (ome.model.annotations.NamespaceAnnotationLink link, boolean bothSides) { if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( link ); }
public void setMultivalued(java.lang.Boolean multivalued) { if (! _loaded ) errorIfUnloaded(); this.multivalued = (java.lang.Boolean) multivalued; } protected java.lang.Boolean display = null;
if (! _loaded ) errorIfUnloaded(); if ( getAnnotationLinks() == null ) { return new ome.util.EmptyIterator<ome.model.annotations.Annotation>(); final java.util.Iterator<ome.model.annotations.NamespaceAnnotationLink> it = getAnnotationLinks().iterator(); return new java.util.Iterator<ome.model.annotations.Annotation>() {
public ome.model.meta.Namespace proxy() { return new ome.model.meta.Namespace(this.id, false); }
/** * removes a single element from this set and makes the inverse call on ome.model.annotations.NamespaceAnnotationLink */ public void removeNamespaceAnnotationLink(ome.model.annotations.NamespaceAnnotationLink target) { if (! _loaded ) errorIfUnloaded(); if (getAnnotationLinks() == null) { throwNullCollectionException("AnnotationLinks"); } getAnnotationLinks().remove( target ); target.setParent ( null ); }