|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RichAnnotation
An annotation collection which stores annotations as Note objects.
Note
,
RichAnnotatable
Field Summary | |
---|---|
static RichAnnotation |
EMPTY_ANNOTATION
|
Fields inherited from interface org.biojava.bio.Annotation |
---|
PROPERTY |
Method Summary | |
---|---|
void |
addNote(Note note)
Adds a note to this annotation. |
void |
clear()
Removes all notes from this annotation object. |
boolean |
contains(Note note)
Returns true if the given note exists in this annotation. |
Note |
getNote(Note note)
Uses the term and rank to lookup a note in this annotation. |
Set |
getNoteSet()
Returns an immutable set of all notes in this annotation. |
Note[] |
getProperties(Object key)
Find all the Note s with any rank that match the key. |
void |
removeNote(Note note)
Removes a note from this annotation. |
void |
setNoteSet(Set notes)
Clears the notes from this annotation and replaces them with those from the given set. |
Methods inherited from interface org.biojava.bio.Annotation |
---|
asMap, containsProperty, getProperty, keys, removeProperty, setProperty |
Methods inherited from interface org.biojava.utils.Changeable |
---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Field Detail |
---|
static final RichAnnotation EMPTY_ANNOTATION
Method Detail |
---|
void clear() throws ChangeVetoException
ChangeVetoException
- if it couldn't do it.void addNote(Note note) throws ChangeVetoException
note
- note to add
ChangeVetoException
- if it doesn't like this.void removeNote(Note note) throws ChangeVetoException
note
- note to remove
ChangeVetoException
- if it doesn't like this.Note getNote(Note note) throws NoSuchElementException
note
- note to lookup, using term and rank.
ChangeVetoException
- if it doesn't like this.
NoSuchElementException
- if it couldn't be found.boolean contains(Note note)
note
- note to lookup
Set getNoteSet()
Note
void setNoteSet(Set notes) throws ChangeVetoException
notes
- a set of Note objects to use from now on.
ChangeVetoException
- if it doesn't like any of them.Note
Note[] getProperties(Object key)
Note
s with any rank that match the key.
key
- either a String
identifier of a term from the
default onltology or a ComparableTerm
Notes
in order of rank or an
empty array if there are no matches. No implementation should ever
return null!Note
,
ComparableTerm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |