Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.annodb
Class LazySearchedAnnotationDB

    java.lang.Object
      org.biojava.bio.annodb.LazySearchedAnnotationDB

All Implemented Interfaces:
  AnnotationDB

    public class LazySearchedAnnotationDB

extends Object
implements AnnotationDB

An implementation of AnnotationDB that does a JIT search on another set.

Since:
  1.3
Author:
  Matthew Pocock

Field Summary

Fields inherited from interface org.biojava.bio.annodb.AnnotationDB
`EMPTY`

Constructor Summary
`LazySearchedAnnotationDB(String name, AnnotationDB source, AnnotationType schema)` Create a new DB from an old one by applying a schema.

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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LazySearchedAnnotationDB

    public LazySearchedAnnotationDB(String name,
                                    AnnotationDB source,
                                    AnnotationType schema)

  Create a new DB from an old one by applying a schema.

  Parameters:
    `name` - the name of this DB
    `source` - the original DB to search
    `schema` - the schema AnnotationType to apply

Method Detail

### getName

    public String getName()

  Description copied from interface: `AnnotationDB`

  The name of this AnnotationDB.

  Specified by:
    `getName` in interface `AnnotationDB`
  Returns:
    the name of this AnnotationDB

### getSchema

    public AnnotationType getSchema()

  Description copied from interface: `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.

  Specified by:
    `getSchema` in interface `AnnotationDB`
  Returns:
    the schema AnnotationType

### iterator

    public Iterator iterator()

  Description copied from interface: `AnnotationDB`
  Loop over each Annotation in this db.

  Specified by:
    `iterator` in interface `AnnotationDB`
  Returns:
    an Iterator over each item in the DB

### size

    public int size()

  Description copied from interface: `AnnotationDB`
  The number of Annotation instances in the DB.

  Specified by:
    `size` in interface `AnnotationDB`
  Returns:
    the size of this DB

### filter

    public AnnotationDB filter(AnnotationType at)

  Description copied from interface: `AnnotationDB`
  Find all Annotation instances in this DB that are of a particular type.

  Specified by:
    `filter` in interface `AnnotationDB`
  Parameters:
    `at` - the AnnotationType to match
  Returns:
    an AnnotationDB with all matching Annotation instances

### search

    public AnnotationDB search(AnnotationType at)

  Description copied from interface: `AnnotationDB`
  Find all Annotation instances in this DB and any Annotations that are child properties of these that match an AnnotationType.

  Specified by:
    `search` in interface `AnnotationDB`
  Parameters:
    `at` - the AnnotationType to search with
  Returns:
    an AnnotationDB with all matching Annotation instances, irregardless of how deep in the hieracy they are

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD