Package 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
AnnotationRenamer remaps the keys of an
Annotation to new keys specified by a
TagMapper. This will rename properties, but not alter their
values.
For writing light-weigth adaptors to project one type of
Annotation to another using a TagMapper.- Since:
- 1.3
- Author:
- Matthew Pocock, Keith James (docs)
- See Also:
-
Field Summary
Fields inherited from interface org.biojava.bio.Annotation
EMPTY_ANNOTATION, PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationRenamer(Annotation wrapped, PropertyChanger mapper) Creates a newAnnotationRenamerusing the specifiedTagMapperto remap its keys. -
Method Summary
Modifier and TypeMethodDescriptiongetMapperreturns theTagMapperbeing used to remap theAnnotation.getPropertiesreturns the mapped contents of the underlyingAnnotationas aMap.getWrappedreturns theAnnotationbeing remapped.booleanpropertiesAllocatedJavadoc 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, toStringMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
AnnotationRenamer
Creates a newAnnotationRenamerusing the specifiedTagMapperto remap its keys.- Parameters:
wrapped- anAnnotation.mapper- aTagMapper.
-
-
Method Details
-
getWrapped
getWrappedreturns theAnnotationbeing remapped.- Returns:
- an
Annotation.
-
getMapper
getMapperreturns theTagMapperbeing used to remap theAnnotation.- Returns:
- a
TagMapper.
-
getProperties
getPropertiesreturns the mapped contents of the underlyingAnnotationas aMap.- Specified by:
getPropertiesin classAbstractAnnotation- Returns:
- a
Map.
-
propertiesAllocated
propertiesAllocatedJavadoc FIXME - this overrides a protected method and I'm not sure why (KJ).- Specified by:
propertiesAllocatedin classAbstractAnnotation- Returns:
- a
boolean.
-