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.ensembl.driver
Interface FeatureAdaptor

All Superinterfaces:
  Adaptor, java.rmi.Remote

All Known Subinterfaces:
  DnaDnaAlignmentAdaptor, DnaProteinAlignmentAdaptor, ExonAdaptor, GeneAdaptor, LDFeatureAdaptor, LockableGeneAdaptor, MiscFeatureAdaptor, OligoFeatureAdaptor, PredictionExonAdaptor, PredictionTranscriptAdaptor, QtlFeatureAdaptor, RepeatFeatureAdaptor, SimpleFeatureAdaptor, TranscriptAdaptor, VariationFeatureAdaptor, VariationGroupFeatureAdaptor

public interface FeatureAdaptor
extends Adaptor

Provides access to a datatype that is Locatable so can be fetched by location.

Method Summary
`java.util.List` | `convertLocations(java.util.List features, CoordinateSystem coordinateSystem)` Converts all feature.location to coordinateSystem.
`java.util.List` | `fetch(Location location)` Fetches features that overlap with location.
`java.util.List` | `fetch(Location location, boolean loadChildren)` Fetches features, optionally including child data, that overlap with location.
`java.util.List` | `fetch(long[] internalIDs)` Fetch zero or more Features with the specified internalIDs.
`java.util.List` | `fetch(long[] internalIDs, boolean loadChildren)` Fetch zero or more Features with the specified internalIDs.
`java.util.List` | `fetchAll()` Retrieves all features from the datasase.
`java.util.List` | `fetchAll(boolean includeChildren)` Retrieves all features from the datasase and if includeChildren is true it might preload it's child data.
`long` | `fetchCount()` Fetch the number of features in the database.
`long[]` | `fetchInternalIDs()` Fetch the internalIDs for all features of this type in the database.
`long[]` | `fetchInternalIDs(Location location)` Fetch internalIDs for features in the specified location.
`java.util.Iterator` | `fetchIterator()` Returns a low memory footprint iterator over all Features of this type in the database.
`java.util.Iterator` | `fetchIterator(boolean loadChildren)` Returns a low memory footprint iterator over all Features of this type in the database.
`java.util.Iterator` | `fetchIterator(boolean loadChildren, int bufferSize)` Returns a low memory footprint iterator over all Features of this type in the database.
`java.util.Iterator` | `fetchIterator(Location location)` Returns a low memory footprint iterator over all Features in the specified location.
`java.util.Iterator` | `fetchIterator(Location location, boolean loadChildren)` Returns a low memory footprint iterator over all Features in the specified location with or without child data preloaded.
`java.util.Iterator` | `fetchIterator(Location location, boolean loadChildren, int chunkSize)` Returns a low memory footprint iterator over all Features in the specified location with or without child data preloaded.
`java.util.Iterator` | `fetchIterator(long[] internalIDs)` Returns a low memory iterator over Features matching the internalIDs.
`java.util.Iterator` | `fetchIterator(long[] internalIDs, boolean loadChildren)` Returns a low memory iterator over Features matching the internalIDs.
`java.util.Iterator` | `fetchIterator(long[] internalIDs, boolean loadChildren, int bufferSize)` Returns a low memory iterator over Features matching the internalIDs.

Methods inherited from interface org.ensembl.driver.Adaptor
`clearCache, closeAllConnections, getType`

Method Detail

### convertLocations

    public java.util.List convertLocations(java.util.List features,
                                           CoordinateSystem coordinateSystem)
                                    throws AdaptorException

  Converts all feature.location to coordinateSystem.

  Parameters:
    `features` - zero or more features
    `coordinateSystem` - target coordinate system.
  Returns:
    features
  Throws:
    `AdaptorException`

### fetch

    public java.util.List fetch(long[] internalIDs)
                         throws AdaptorException

  Fetch zero or more Features with the specified internalIDs. Any internalIDs that do not correspond to Features in the database will be ignored.

  Parameters:
    `internalIDs` - internal IDs. The ids should be unique.
  Returns:
    zero or more Features with internalIDs specified in internalIDs and in the same order.
  Throws:
    `AdaptorException`

### fetch

    public java.util.List fetch(long[] internalIDs,
                                boolean loadChildren)
                         throws AdaptorException

  Fetch zero or more Features with the specified internalIDs. Any internalIDs that do not correspond to Features in the database will be ignored.

  Parameters:
    `internalIDs` - internal IDs. The ids should be unique.
    `loadChildren` - hint to prefetch child data.
  Returns:
    zero or more Features with internalIDs specified in internalIDs and in the same order.
  Throws:
    `AdaptorException`

### fetchIterator

    public java.util.Iterator fetchIterator(long[] internalIDs)
                                     throws AdaptorException

  Returns a low memory iterator over Features matching the internalIDs. Any internalIDs that do not correspond to Features in the database will be ignored.

  Parameters:
    `internalIDs` - internal IDs. The ids should be unique.
  Returns:
    iterator over zero or more Features with internalIDs specified in internalIDs, order is unspecified.
  Throws:
    `AdaptorException`

### fetchIterator

    public java.util.Iterator fetchIterator(long[] internalIDs,
                                            boolean loadChildren)
                                     throws AdaptorException

  Returns a low memory iterator over Features matching the internalIDs. Any internalIDs that do not correspond to Features in the database will be ignored.

  Parameters:
    `internalIDs` - internal IDs. The ids should be unique.
    `loadChildren` - hint to prefetch child data.
  Returns:
    iterator over zero or more Features with internalIDs specified in internalIDs, order is unspecified.
  Throws:
    `AdaptorException`

### fetchIterator

    public java.util.Iterator fetchIterator(long[] internalIDs,
                                            boolean loadChildren,
                                            int bufferSize)
                                     throws AdaptorException

  Returns a low memory iterator over Features matching the internalIDs. Any internalIDs that do not correspond to Features in the database will be ignored.

  Parameters:
    `internalIDs` - internal IDs. The ids should be unique.
    `loadChildren` - hint to prefetch child data.
    `bufferSize` - maximum number of fatures loaded by the iterator at any moment.
  Returns:
    iterator over zero or more Features with internalIDs specified in internalIDs, order is unspecified.
  Throws:
    `AdaptorException`

### fetch

    public java.util.List fetch(Location location)
                         throws AdaptorException

  Fetches features that overlap with location.

  Parameters:
    `location` - location filter.
  Returns:
    List containing zero or more items overlaping the location.
  Throws:
    `AdaptorException`
  See Also:
    `if you want to include child data.`

### fetch

    public java.util.List fetch(Location location,
                                boolean loadChildren)
                         throws AdaptorException

  Fetches features, optionally including child data, that overlap with location. Including child data may be more efficient than having the data lazy loaded later.

  Parameters:
    `location` - location filter.
    `loadChildren` - hint to prefetch child data.
  Returns:
    List containing zero or more items overlaping the location.
  Throws:
    `AdaptorException`

### fetchIterator

    public java.util.Iterator fetchIterator()
                                     throws AdaptorException

  Returns a low memory footprint iterator over all Features of this type in the database.

  Returns:
    iterator over all Features of this type in the database.
  Throws:
    `AdaptorException`
  See Also:
    `an alternative way of getting all the features.`

### fetchIterator

    public java.util.Iterator fetchIterator(boolean loadChildren)
                                     throws AdaptorException

  Returns a low memory footprint iterator over all Features of this type in the database.

  Parameters:
    `loadChildren` - hint to preload child data if supported.
  Returns:
    iterator over all Features of this type in the database.
  Throws:
    `AdaptorException`
  See Also:
    `an alternative way of getting all the features.`

### fetchIterator

    public java.util.Iterator fetchIterator(boolean loadChildren,
                                            int bufferSize)
                                     throws AdaptorException

  Returns a low memory footprint iterator over all Features of this type in the database.

  Parameters:
    `loadChildren` - hint to preload child data if supported.
    `bufferSize` - maximum number of features loaded by the iterator at any time.
  Returns:
    iterator over all Features of this type in the database.
  Throws:
    `AdaptorException`
  See Also:
    `an alternative way of getting all the features.`

### fetchIterator

    public java.util.Iterator fetchIterator(Location location)
                                     throws AdaptorException

  Returns a low memory footprint iterator over all Features in the specified location.

  Parameters:
    `location` - location filter.
  Returns:
    iterator over all Features that fall in the specified location.
  Throws:
    `AdaptorException`
  See Also:
    `an alternative way of getting all the features.`, `for a possibly more efficient retrieval mechanism.`

### fetchIterator

    public java.util.Iterator fetchIterator(Location location,
                                            boolean loadChildren)
                                     throws AdaptorException

  Returns a low memory footprint iterator over all Features in the specified location with or without child data preloaded.

  Parameters:
    `location` - location filter.
    `loadChildren` - whether to include children. Setting to true may produce faster overall retrieval if child data is also accessed.
  Returns:
    iterator over all Features that fall in the specified location.
  Throws:
    `AdaptorException`
  See Also:
    `an alternative way of getting all the features.`

### fetchIterator

    public java.util.Iterator fetchIterator(Location location,
                                            boolean loadChildren,
                                            int chunkSize)
                                     throws AdaptorException

  Returns a low memory footprint iterator over all Features in the specified location with or without child data preloaded.

  Parameters:
    `location` - location filter.
    `loadChildren` - whether to include children. Setting to true may produce faster overall retrieval if child data is also accessed.
    `chunkSize` - maximum length of a "chunk" of sequence from which features are retrieved.
  Returns:
    iterator over all Features that fall in the specified location.
  Throws:
    `AdaptorException`
  See Also:
    `an alternative way of getting all the features.`

### fetchAll

    public java.util.List fetchAll()
                            throws AdaptorException

  Retrieves all features from the datasase.

  Returns:
    all features in the database.
  Throws:
    `AdaptorException`
  See Also:
    `alternative way of getting all features using less memory.`

### fetchAll

    public java.util.List fetchAll(boolean includeChildren)
                            throws AdaptorException

  Retrieves all features from the datasase and if includeChildren is true it might preload it's child data.

  Parameters:
    `includeChildren` - hint to preload child data.
  Returns:
    all features in the database.
  Throws:
    `AdaptorException`
  See Also:
    `alternative way of getting all features using less memory.`

### fetchInternalIDs

    public long[] fetchInternalIDs()
                            throws AdaptorException

  Fetch the internalIDs for all features of this type in the database.

  Returns:
    zero or more internal ids for this type
  Throws:
    `AdaptorException`

### fetchInternalIDs

    public long[] fetchInternalIDs(Location location)
                            throws AdaptorException

  Fetch internalIDs for features in the specified location.

  Parameters:
    `location` - location filter.
  Returns:
    zero or more internal ids for this type
  Throws:
    `AdaptorException`

### fetchCount

    public long fetchCount()
                    throws AdaptorException

  Fetch the number of features in the database.

  Returns:
    number of features in the database, >=0.
  Throws:
    `AdaptorException`

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