org.gcube.contentmanagement.gcubemodellibrary.elements
Class AnnotationThread

java.lang.Object
  extended by org.gcube.contentmanagement.gcubemodellibrary.elements.AnnotationThread

public class AnnotationThread
extends java.lang.Object

A tree-shaped thread of annotation.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
AnnotationThread(GCubeAnnotation a)
          Creates a thread rooted in a given annotation.
AnnotationThread(GCubeAnnotation a, java.util.List<AnnotationThread> threads)
          Creates a thread rooted in a given annotation and with zero or more response threads.
 
Method Summary
 GCubeAnnotation annotation()
           
 java.util.List<GCubeAnnotation> annotations()
          Returns the annotation in the thread.
 java.util.List<AnnotationThread> answers()
          Returns the threads that answer to the annotation of this thread.
 boolean contains(GCubeAnnotation a)
          Returns true if the thread contains a given annotation.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotationThread

public AnnotationThread(GCubeAnnotation a)
Creates a thread rooted in a given annotation.

Parameters:
a - annotation

AnnotationThread

public AnnotationThread(GCubeAnnotation a,
                        java.util.List<AnnotationThread> threads)
Creates a thread rooted in a given annotation and with zero or more response threads.

Method Detail

annotation

public GCubeAnnotation annotation()

answers

public java.util.List<AnnotationThread> answers()
Returns the threads that answer to the annotation of this thread.

Returns:

contains

public boolean contains(GCubeAnnotation a)
Returns true if the thread contains a given annotation.

Parameters:
a - the annotation.
Returns:
true if the thread contains the annotation.

annotations

public java.util.List<GCubeAnnotation> annotations()
Returns the annotation in the thread.

Returns:
the annotations.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object