SMILA (incubation) API documentation

org.eclipse.smila.datamodel.record.impl
Class AnnotationImpl

java.lang.Object
  extended by org.eclipse.smila.datamodel.record.impl.AnnotatableImpl
      extended by org.eclipse.smila.datamodel.record.impl.AnnotationImpl
All Implemented Interfaces:
java.io.Serializable, Annotatable, Annotation

public class AnnotationImpl
extends AnnotatableImpl
implements Annotation

Default implementation of SMILA Annotations.

Author:
jschumacher
See Also:
Serialized Form

Constructor Summary
AnnotationImpl()
           
 
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> values)
          set a new set of anonymous values.
 void setNamedValue(java.lang.String name, java.lang.String value)
          set a named value.
 
Methods inherited from class org.eclipse.smila.datamodel.record.impl.AnnotatableImpl
addAnnotation, annotationsSize, getAnnotation, getAnnotationNames, getAnnotations, hasAnnotation, hasAnnotations, removeAnnotations, removeAnnotations, setAnnotation, setAnnotations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.smila.datamodel.record.Annotatable
addAnnotation, annotationsSize, getAnnotation, getAnnotationNames, getAnnotations, hasAnnotation, hasAnnotations, removeAnnotations, removeAnnotations, setAnnotation, setAnnotations
 

Constructor Detail

AnnotationImpl

public AnnotationImpl()
Method Detail

addAnonValue

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

Specified by:
addAnonValue in interface Annotation
Parameters:
value - an additional value
See Also:
Annotation.addAnonValue(java.lang.String)

anonValuesSize

public int anonValuesSize()
get number of anonymous values.

Specified by:
anonValuesSize in interface Annotation
Returns:
number of anonymous values
See Also:
Annotation.anonValuesSize()

getAnonValues

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

Specified by:
getAnonValues in interface Annotation
Returns:
the list of values of this annotation. Yields null, if no values are set,
See Also:
Annotation.getAnonValues()

getNamedValue

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

Specified by:
getNamedValue in interface Annotation
Parameters:
name - named value name
Returns:
named value
See Also:
Annotation.getNamedValue(java.lang.String)

getValueNames

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

Specified by:
getValueNames in interface Annotation
Returns:
iterator on named value names.
See Also:
Annotation.getValueNames()

hasAnonValues

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

Specified by:
hasAnonValues in interface Annotation
Returns:
true if anonymous values are set, else false.
See Also:
Annotation.hasAnonValues()

hasNamedValues

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

Specified by:
hasNamedValues in interface Annotation
Returns:
true if named values are set, else false.
See Also:
Annotation.hasNamedValues()

hasValues

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

Specified by:
hasValues in interface Annotation
Returns:
true if anonymous values are set, else false.
See Also:
Annotation.hasValues()

namedValuesSize

public int namedValuesSize()
get number of named values.

Specified by:
namedValuesSize in interface Annotation
Returns:
number of named values
See Also:
Annotation.namedValuesSize()

removeAnonValue

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

Specified by:
removeAnonValue in interface Annotation
Parameters:
value - the value to remove
See Also:
Annotation.removeAnonValue(java.lang.String)

removeAnonValues

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

Specified by:
removeAnonValues in interface Annotation
See Also:
Annotation.removeAnonValues()

removeNamedValue

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

Specified by:
removeNamedValue in interface Annotation
Parameters:
name - named value name
See Also:
Annotation.removeNamedValue(java.lang.String)

removeNamedValues

public void removeNamedValues()
remove all named values.

Specified by:
removeNamedValues in interface Annotation
See Also:
Annotation.removeNamedValues()

removeValues

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

Specified by:
removeValues in interface Annotation
See Also:
Annotation.removeValues()

setAnonValues

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

Specified by:
setAnonValues in interface Annotation
Parameters:
values - new list of values.
See Also:
Annotation.setAnonValues(java.util.Collection)

setNamedValue

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

Specified by:
setNamedValue in interface Annotation
Parameters:
name - named value name
value - named value
See Also:
Annotation.setNamedValue(java.lang.String, java.lang.String)

SMILA (incubation) API documentation