org.scribble.common.model
Class DefaultAnnotation

java.lang.Object
  extended by org.scribble.common.model.DefaultAnnotation
All Implemented Interfaces:
Annotation

public class DefaultAnnotation
extends Object
implements Annotation

This class represents the default implementation of the annotation interface.


Constructor Summary
DefaultAnnotation(String text)
          This is the constructor, initialized with the annotation text.
DefaultAnnotation(String id, String text)
          This is the constructor, initialized with the optional id and annotation text.
 
Method Summary
 String getId()
          Optional id for the annotation.
 void setAnnotation(String annotation)
          This method sets the annotation.
 String toString()
          This method returns the textual representation of the annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultAnnotation

public DefaultAnnotation(String text)
This is the constructor, initialized with the annotation text.

Parameters:
text - The text

DefaultAnnotation

public DefaultAnnotation(String id,
                         String text)
This is the constructor, initialized with the optional id and annotation text.

Parameters:
id - The optional id
text - The text
Method Detail

getId

public String getId()
Optional id for the annotation. If specified, it must be unique within the scope of the protocol model in which it is defined.

Specified by:
getId in interface Annotation
Returns:
The unique annotation id, or null if undefined

setAnnotation

public void setAnnotation(String annotation)
This method sets the annotation.

Parameters:
annotation - The annotation

toString

public String toString()
This method returns the textual representation of the annotation.

Specified by:
toString in interface Annotation
Overrides:
toString in class Object
Returns:
The annotation text


Copyright © 2008-Present Scribble.org. All Rights Reserved.