public class SimpleAnnotationDB extends Object implements AnnotationDB
A no-frills implementation of AnnotationDB.
EMPTY| Constructor and Description |
|---|
SimpleAnnotationDB(String name,
Set anns,
AnnotationType schema)
Create a no-frills AnnotationDB instancec.
|
| Modifier and Type | Method and Description |
|---|---|
AnnotationDB |
filter(AnnotationType at)
Find all Annotation instances in this DB that are of a particular type.
|
String |
getName()
The name of this AnnotationDB.
|
AnnotationType |
getSchema()
Get an AnnotationType that accepts all Annotation instances in this DB.
|
Iterator |
iterator()
Loop over each Annotation in this db.
|
AnnotationDB |
search(AnnotationType at)
Find all Annotation instances in this DB and any Annotations that are child
properties of these that match an AnnotationType.
|
int |
size()
The number of Annotation instances in the DB.
|
public SimpleAnnotationDB(String name, Set anns, AnnotationType schema)
name - the name of this Annotation DBanns - a Set of Annotation instances it containsschema - an AnnotationType schema that applies to thempublic String getName()
AnnotationDBThe name of this AnnotationDB.
getName in interface AnnotationDBpublic int size()
AnnotationDBsize in interface AnnotationDBpublic AnnotationType getSchema()
AnnotationDBGet an AnnotationType that accepts all Annotation instances in this DB.
The schema should accept all Annotations in the DB. However, it may hit other Annotations. So, AnnotationType.ALL is always a valid schema. Obviously, the more retrictive it is, the more usefull it becomes for introspection.
getSchema in interface AnnotationDBpublic Iterator iterator()
AnnotationDBiterator in interface AnnotationDBpublic AnnotationDB filter(AnnotationType at)
AnnotationDBfilter in interface AnnotationDBat - the AnnotationType to matchpublic AnnotationDB search(AnnotationType at)
AnnotationDBsearch in interface AnnotationDBat - the AnnotationType to search withCopyright © 2014 BioJava. All rights reserved.