AnnotationRenamer (BioJava-1.5-beta API)
Keywords: org.biojava.bio.AnnotationRenamer class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio
Class AnnotationRenamer

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojava.bio.AbstractAnnotation
              org.biojava.bio.AnnotationRenamer

All Implemented Interfaces:
  Serializable, Annotation, Changeable

    public class AnnotationRenamer

extends AbstractAnnotation

`AnnotationRenamer` remaps the keys of an `Annotation` to new keys specified by a `TagMapper`. This will rename properties, but not alter their values.

Since:
  1.3
Author:
  Matthew Pocock, Keith James (docs)
See Also:
  Serialized Form
For advanced users:
  For writing light-weigth adaptors to project one type of Annotation to another using a TagMapper.

Field Summary

Fields inherited from interface org.biojava.bio.Annotation
`EMPTY_ANNOTATION, PROPERTY`

Constructor Summary
`AnnotationRenamer(Annotation wrapped, PropertyChanger mapper)` Creates a new `AnnotationRenamer` using the specified `TagMapper` to remap its keys.

Method Summary
`PropertyChanger` | `getMapper()` `getMapper` returns the `TagMapper` 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` Javadoc FIXME - this overrides a protected method and I'm not sure why (KJ).

Methods inherited from class org.biojava.bio.AbstractAnnotation
`asMap, containsProperty, equals, getProperty, hashCode, keys, removeProperty, setProperty, toString`

Methods inherited from class org.biojava.utils.AbstractChangeable
`addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Constructor Detail

### AnnotationRenamer

    public AnnotationRenamer(Annotation wrapped,
                             PropertyChanger mapper)

  Creates a new `AnnotationRenamer` using the specified `TagMapper` to remap its keys.

  Parameters:
    `wrapped` - an `Annotation`.
    `mapper` - a `TagMapper`.

Method Detail

### getWrapped

    public Annotation getWrapped()

  `getWrapped` returns the `Annotation` being remapped.

  Returns:
    an `Annotation`.

### getMapper

    public PropertyChanger getMapper()

  `getMapper` returns the `TagMapper` being used to remap the `Annotation`.

  Returns:
    a `TagMapper`.

### 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` Javadoc FIXME - this overrides a protected method and I'm not sure why (KJ).

  Specified by:
    `propertiesAllocated` in class `AbstractAnnotation`
  Returns:
    a `boolean`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD