|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.annodb.MergingAnnotationDB
public class MergingAnnotationDB
An AnnotationDB that provides a merged view of a list of underlying DBs.
| Field Summary |
|---|
| Fields inherited from interface org.biojava.bio.annodb.AnnotationDB |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
MergingAnnotationDB(String name)
Create a new MergingAnnotationDB with a name and no DBs to merge. |
|
MergingAnnotationDB(String name,
List merged)
Create a new MergingAnnotationDB with a name and a list of DBs to merge. |
|
| Method Summary | |
|---|---|
void |
addAnnotationDB(AnnotationDB toAdd)
Add a DB to be merged in this view. |
AnnotationDB |
filter(AnnotationType at)
Find all Annotation instances in this DB that are of a particular type. |
List |
getMerged()
Return a list of merged DBs. |
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. |
void |
removeAnnotationDB(AnnotationDB toRemove)
Remove a DB from this view. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MergingAnnotationDB(String name)
name - the name of this DB
public MergingAnnotationDB(String name,
List merged)
name - the name of this DBmerged - a list of DBs to merge| Method Detail |
|---|
public void addAnnotationDB(AnnotationDB toAdd)
toAdd - the AnnotationDB to addpublic void removeAnnotationDB(AnnotationDB toRemove)
toRemove - the AnnotationDB to removepublic List getMerged()
public String getName()
AnnotationDBThe name of this AnnotationDB.
getName 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()
AnnotationDB
iterator in interface AnnotationDBpublic int size()
AnnotationDB
size in interface AnnotationDBpublic AnnotationDB filter(AnnotationType at)
AnnotationDB
filter in interface AnnotationDBat - the AnnotationType to match
public AnnotationDB search(AnnotationType at)
AnnotationDB
search in interface AnnotationDBat - the AnnotationType to search with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||