org.biojava.bio
Class AnnotationChanger
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.AbstractAnnotation
org.biojava.bio.AnnotationChanger
- All Implemented Interfaces:
- Serializable, Annotation, Changeable
public class AnnotationChanger
- extends AbstractAnnotation
AnnotationChanger remaps the values of an
Annotation to new values specified by a
ValueChanger. This will modify the values
associated with properties, but not the property names.
- Since:
- 1.3
- Author:
- Matthew Pocock
- See Also:
- Serialized Form
- For advanced users:
- For writing light-weigth adaptors to project one type of
Annotation to another using a ChangeTable.
|
Method Summary |
ChangeTable |
getChanger()
getMapper returns the ValueChanger being
used to remap the Annotation. |
Map |
getProperties()
getProperties returns the mapped contents of the
underlying Annotation as a Map. |
Annotation |
getWrapped()
getWrapped returns the Annotation
being remapped. |
boolean |
propertiesAllocated()
propertiesAllocated is a convenience method to see
if we have allocated the properties Map. |
AnnotationChanger
public AnnotationChanger(Annotation wrapped,
ChangeTable changer)
- Creates a new
AnnotationChanger using the
specified ValueChanger to remap its values.
- Parameters:
wrapped - an Annotation.changer - a ValueChanger.
getWrapped
public Annotation getWrapped()
getWrapped returns the Annotation
being remapped.
- Returns:
- an
Annotation.
getChanger
public ChangeTable getChanger()
getMapper returns the ValueChanger being
used to remap the Annotation.
- Returns:
- a
ValueChanger.
getProperties
public Map getProperties()
getProperties returns the mapped contents of the
underlying Annotation as a Map.
- Specified by:
getProperties in class AbstractAnnotation
- Returns:
- a
Map.
propertiesAllocated
public boolean propertiesAllocated()
propertiesAllocated is a convenience method to see
if we have allocated the properties Map.
- Specified by:
propertiesAllocated in class AbstractAnnotation
- Returns:
- a
boolean true if the properties have been
allocated, false otherwise.