|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A database of Annotation instances.
It is often a pain to provide explicit API for a particular file format, but it is still necisary to present it as some collection of structured objects. Annotation, together with AnnotationType are capable of representing structured data and the tag-value parser API is uniquely suited to creating these from structured text files. AnnotationDB is provided as a way to wrap up a whole collection of Annotation instances so that they can be queried and handled as a unit.
| Field Summary | |
static AnnotationDB |
EMPTY
An AnnotationDB that is always empty. |
| Method Summary | |
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. |
| Field Detail |
public static final AnnotationDB EMPTY
| Method Detail |
public String getName()
The name of this AnnotationDB.
public AnnotationType getSchema()
Get 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.
public Iterator iterator()
public int size()
public AnnotationDB filter(AnnotationType at)
at - the AnnotationType to match
public AnnotationDB search(AnnotationType at)
at - the AnnotationType to search with
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||