org.gcube.contentmanagement.gcubemodellibrary.elements
Class AnnotationElements

java.lang.Object
  extended by org.gcube.contentmanagement.gcubemodellibrary.elements.InnerElements<GCubeAnnotation>
      extended by org.gcube.contentmanagement.gcubemodellibrary.elements.AnnotationElements
All Implemented Interfaces:
java.lang.Iterable<GCubeAnnotation>

public class AnnotationElements
extends InnerElements<GCubeAnnotation>

Author:
Fabio Simeoni (University of Strathclyde)

Method Summary
 void removeFromThread(GCubeAnnotation a)
          Removes an annotation and the annotation that follow it in the thread, if any.
 GCubeAnnotation removeFromThread(java.lang.String id)
          Removes an annotation and the annotation that follow it in the thread, if any.
 java.util.List<AnnotationThread> threads()
          Returns the annotation threads in the document.
 
Methods inherited from class org.gcube.contentmanagement.gcubemodellibrary.elements.InnerElements
add, contains, get, iterator, remove, remove, size, toList, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

removeFromThread

public void removeFromThread(GCubeAnnotation a)
                      throws java.lang.IllegalStateException
Removes an annotation and the annotation that follow it in the thread, if any.

Parameters:
a - the annotation.
Throws:
java.lang.IllegalStateException - if an annotation with the given identifier does not exist.

removeFromThread

public GCubeAnnotation removeFromThread(java.lang.String id)
                                 throws java.lang.IllegalStateException
Removes an annotation and the annotation that follow it in the thread, if any.

Parameters:
a - the annotation identifier.
Returns:
the removed annotation.
Throws:
java.lang.IllegalStateException - if an annotation with the given identifier does not exist.

threads

public java.util.List<AnnotationThread> threads()
Returns the annotation threads in the document.

Returns:
the threads.