|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.annodb.IndexedAnnotationDB
public class IndexedAnnotationDB
A database of Annotation instances backed by an indexed file set.
Nested Class Summary | |
---|---|
static interface |
IndexedAnnotationDB.ParserListenerFactory
A factory for retrieving parsers and listeners. |
static class |
IndexedAnnotationDB.StaticMethodRPFactory
An implementation of ParserListenerFactory that uses a static method. |
Field Summary |
---|
Fields inherited from interface org.biojava.bio.annodb.AnnotationDB |
---|
EMPTY |
Constructor Summary | |
---|---|
IndexedAnnotationDB(BioStore store)
Initialise the db from a store. |
|
IndexedAnnotationDB(java.lang.String dbName,
java.io.File storeLoc,
Index2Model model,
java.util.List toIndex,
int maxKeyLen,
AnnotationType schema,
IndexedAnnotationDB.ParserListenerFactory plFactory)
Create a new IndexedAnnotationDB. |
Method Summary | |
---|---|
AnnotationDB |
filter(AnnotationType at)
Find all Annotation instances in this DB that are of a particular type. |
java.lang.String |
getName()
The name of this AnnotationDB. |
IndexedAnnotationDB.ParserListenerFactory |
getParserListenerFactory()
Get the ParserListenerFactory used by this IndexedAnnotationDB. |
AnnotationType |
getSchema()
Get an AnnotationType that accepts all Annotation instances in this DB. |
java.util.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexedAnnotationDB(java.lang.String dbName, java.io.File storeLoc, Index2Model model, java.util.List toIndex, int maxKeyLen, AnnotationType schema, IndexedAnnotationDB.ParserListenerFactory plFactory) throws BioException, CommitFailure, java.io.IOException, ParserException
dbName
- storeLoc
- model
- toIndex
- maxKeyLen
- schema
- plFactory
-
BioException
CommitFailure
java.io.IOException
ParserException
public IndexedAnnotationDB(BioStore store) throws java.io.IOException, org.xml.sax.SAXException
store
- the BioStore to initalise from
java.io.IOException
- if there was an IO fault accessing the store
org.xml.sax.SAXException
- if the XML configuration file is corruptedMethod Detail |
---|
public java.lang.String getName()
AnnotationDB
The name of this AnnotationDB.
getName
in interface AnnotationDB
public AnnotationType getSchema()
AnnotationDB
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.
getSchema
in interface AnnotationDB
public java.util.Iterator iterator()
AnnotationDB
iterator
in interface AnnotationDB
public int size()
AnnotationDB
size
in interface AnnotationDB
public AnnotationDB filter(AnnotationType at)
AnnotationDB
filter
in interface AnnotationDB
at
- the AnnotationType to match
public AnnotationDB search(AnnotationType at)
AnnotationDB
search
in interface AnnotationDB
at
- the AnnotationType to search with
public IndexedAnnotationDB.ParserListenerFactory getParserListenerFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |