SMILA (incubation) API documentation

org.eclipse.smila.datamodel.record
Interface Annotation

All Superinterfaces:
Annotatable
All Known Implementing Classes:
AnnotationImpl

public interface Annotation
extends Annotatable

Interface of annotation objects. Annotations are "annotatable" themselves which means that they can have sub-annotations. This makes it possible to create very big, structured annotations. Annotations can have a set of "anonymous values" and a set of "named values", where single values are associated to value names (like in a Java Map). Annotations values are always strings currently. This may be extended in a later version.

Author:
jschumacher

Method Summary
 void addAnonValue(java.lang.String value)
          add another value.
 int anonValuesSize()
          get number of anonymous values.
 java.util.Collection<java.lang.String> getAnonValues()
          get the anonymous values set in this annotaton.
 java.lang.String getNamedValue(java.lang.String name)
          get named value for specified.
 java.util.Iterator<java.lang.String> getValueNames()
          get an iterator on the names of named values.
 boolean hasAnonValues()
          check if this annotation has anonymous values.
 boolean hasNamedValues()
          check if this annotation has named values.
 boolean hasValues()
          check if this annotation has anonymous or named values.
 int namedValuesSize()
          get number of named values.
 void removeAnonValue(java.lang.String value)
          remove the given anonymous value from this annotation.
 void removeAnonValues()
          remove all anonymous values from this annotation.
 void removeNamedValue(java.lang.String name)
          remove a named value.
 void removeNamedValues()
          remove all named values.
 void removeValues()
          remove all named and anonymous values from this annotation.
 void setAnonValues(java.util.Collection<java.lang.String> value)
          set a new set of anonymous values.
 void setNamedValue(java.lang.String name, java.lang.String value)
          set a named value.
 
Methods inherited from interface org.eclipse.smila.datamodel.record.Annotatable
addAnnotation, annotationsSize, getAnnotation, getAnnotationNames, getAnnotations, hasAnnotation, hasAnnotations, removeAnnotations, removeAnnotations, setAnnotation, setAnnotations
 

Method Detail

hasValues

boolean hasValues()
check if this annotation has anonymous or named values.

Returns:
true if anonymous values are set, else false.

hasAnonValues

boolean hasAnonValues()
check if this annotation has anonymous values.

Returns:
true if anonymous values are set, else false.

anonValuesSize

int anonValuesSize()
get number of anonymous values.

Returns:
number of anonymous values

getAnonValues

java.util.Collection<java.lang.String> getAnonValues()
get the anonymous values set in this annotaton.

Returns:
the list of values of this annotation. Yields null, if no values are set,

setAnonValues

void setAnonValues(java.util.Collection<java.lang.String> value)
set a new set of anonymous values. Existing anonymous values are replaced.

Parameters:
value - new list of values.

addAnonValue

void addAnonValue(java.lang.String value)
add another value. The value is appended to the current anonymous values.

Parameters:
value - an additional value

removeAnonValue

void removeAnonValue(java.lang.String value)
remove the given anonymous value from this annotation.

Parameters:
value - the value to remove

removeAnonValues

void removeAnonValues()
remove all anonymous values from this annotation.


hasNamedValues

boolean hasNamedValues()
check if this annotation has named values.

Returns:
true if named values are set, else false.

namedValuesSize

int namedValuesSize()
get number of named values.

Returns:
number of named values

getValueNames

java.util.Iterator<java.lang.String> getValueNames()
get an iterator on the names of named values.

Returns:
iterator on named value names.

getNamedValue

java.lang.String getNamedValue(java.lang.String name)
get named value for specified.

Parameters:
name - named value name
Returns:
named value

setNamedValue

void setNamedValue(java.lang.String name,
                   java.lang.String value)
set a named value.

Parameters:
name - named value name
value - named value

removeNamedValue

void removeNamedValue(java.lang.String name)
remove a named value.

Parameters:
name - named value name

removeNamedValues

void removeNamedValues()
remove all named values.


removeValues

void removeValues()
remove all named and anonymous values from this annotation.


SMILA (incubation) API documentation