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 CoordinateSystemAdaptor

All Superinterfaces:
  Adaptor, java.rmi.Remote

public interface CoordinateSystemAdaptor
extends Adaptor

Provides access to coordinate system and meta data in the datasource(s). By default meta data is only read from the datasource returned by getDataSource(). Meta tables from additional datasources will also be read if they are added via addDataSource(DataSource).

Field Summary
`static java.lang.String` | `TYPE` Name of the default CoordinateSystemAdaptor available from a driver.

Method Summary
`void` | `addEnsemblDriver(EnsemblDriver driver)` Add an additional driver to retrieve meta information from.
`CoordinateSystem` | `fetch(long internalID)` Fetch a CoordinateSystem by its internalID.
`CoordinateSystem` | `fetch(java.lang.String name, java.lang.String version)` Fetch a CoordinateSystem by name and version.
`CoordinateSystem[]` | `fetchAll()` Fetch all the coordinate systems defined for this species.
`CoordinateSystem[]` | `fetchAllByFeatureTable(java.lang.String featureTableName)` Retrieve a list of the coordinate systems in which features in a particular table are stored.
`CoordinateSystem` | `fetchByMap(java.lang.String map)` This function supports old style Locations with Maps.
`CoordinateSystem` | `fetchComplete(CoordinateSystem cs)` Returns a complete CoordinateSystem maching _cs_.name and _cs_.version.
`CoordinateSystem` | `fetchSequenceLevel()` Fetch the co-ordinate system that represents the sequence level for this species.
`java.util.List` | `fetchTopLevelLocations()` There is one top level location for each sequence region in the highest ranked coordinate system.
`java.util.List` | `getEnsemblDrivers()` All drivers that coordinate systems will be loaded from.
`CoordinateSystem[]` | `getMappingPath(CoordinateSystem cs1, CoordinateSystem cs2)` Get the mapping path between two co-ordinate systems, as defined in the meta table.
`boolean` | `removeEnsemblDriver(EnsemblDriver driver)` Removes additional datasource.
`long` | `store(CoordinateSystem cs)` Store the CoordinateSystem in the approriate data source and set the internalID.

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

Field Detail

### TYPE

    public static final java.lang.String TYPE

  Name of the default CoordinateSystemAdaptor available from a driver.

  See Also:
    Constant Field Values

Method Detail

### store

    public long store(CoordinateSystem cs)
               throws AdaptorException

  Store the CoordinateSystem in the approriate data source and set the internalID.

  Returns:
    internalID of the stored CoordinateSystem.
  Throws:
    `AdaptorException`

### fetch

    public CoordinateSystem fetch(long internalID)
                           throws AdaptorException

  Fetch a CoordinateSystem by its internalID.

  Returns:
    A CoordinateSystem matching the internalID, or null if non found.
  Throws:
    `AdaptorException`

### fetch

    public CoordinateSystem fetch(java.lang.String name,
                                  java.lang.String version)
                           throws AdaptorException

  Fetch a CoordinateSystem by name and version. If version==null then the returned CoordinateSystem will be the "default" coordinate system with the specified name unless there is another one in the db with the specified name and version set to NULL.

  Parameters:
    `name` - name of the coordinate system.
    `version` - version of the coordinate system. Can be null.
  Returns:
    The coordinate system object represented by name and version, or null.
  Throws:
    `AdaptorException`
  See Also:
    `CoordinateSystem.isDefault()`

### fetchComplete

    public CoordinateSystem fetchComplete(CoordinateSystem cs)
                                   throws AdaptorException

  Returns a complete CoordinateSystem maching _cs_.name and _cs_.version.

  Parameters:
    `cs` - partial or complete CoordinateSystem.
  Returns:
    a complete CoordinateSystem maching _cs_.name and _cs_.version, if available otherwise null.
  Throws:
    `AdaptorException`

### fetchAll

    public CoordinateSystem[] fetchAll()
                                throws AdaptorException

  Fetch all the coordinate systems defined for this species.

  Returns:
    An array of CoordinateSystem objects representing all the coordinate systems defined for this species.
  Throws:
    `AdaptorException`

### fetchSequenceLevel

    public CoordinateSystem fetchSequenceLevel()
                                        throws AdaptorException

  Fetch the co-ordinate system that represents the sequence level for this species. If more than one co-ordinate system is defined as being the top level, this will return the one which is defined as being the default. Only one co-ordinate system should be defined as being default and top level.

  Returns:
    The coordinate system that represents sequence for this species.
  Throws:
    `AdaptorException`

### getMappingPath

    public CoordinateSystem[] getMappingPath(CoordinateSystem cs1,
                                             CoordinateSystem cs2)
                                      throws AdaptorException

  Get the mapping path between two co-ordinate systems, as defined in the meta table.

  Parameters:
    `cs1` - The first co-ordinate system.
    `cs2` - The second co-ordinate system.
  Returns:
    Array of CoordinateSystems in order from assembled to smaller component co-ordinate systems.
  Throws:
    `AdaptorException`

### fetchByMap

    public CoordinateSystem fetchByMap(java.lang.String map)
                                throws AdaptorException

  This function supports old style Locations with Maps. Maps are essentially CoordinateSystems so we retrieve one by mapname

  Parameters:
    `map` - a Map identifier
  Returns:
    the equivalent CoordinateSystem object
  Throws:
    `AdaptorException`

### fetchAllByFeatureTable

    public CoordinateSystem[] fetchAllByFeatureTable(java.lang.String featureTableName)
                                              throws AdaptorException

  Retrieve a list of the coordinate systems in which features in a particular table are stored.

  Parameters:
    `featureTableName` - The name of the feature table to query.
  Returns:
    An array of the co-ordinate systems used in this feature table.
  Throws:
    `AdaptorException` - if there is a problem communicating with the database, or if featureTableName does not refer to an existing feature table.

### fetchTopLevelLocations

    public java.util.List fetchTopLevelLocations()
                                          throws AdaptorException

  There is one top level location for each sequence region in the highest ranked coordinate system.

  Returns:
    zero or more top level locations.
  Throws:
    `AdaptorException`

### addEnsemblDriver

    public void addEnsemblDriver(EnsemblDriver driver)

  Add an additional driver to retrieve meta information from.

  Parameters:
    `driver` - source of additional information.

### removeEnsemblDriver

    public boolean removeEnsemblDriver(EnsemblDriver driver)

  Removes additional datasource.

  Parameters:
    `driver` - source to be removed.
  Returns:
    true of driver was removed, otherwise false.

### getEnsemblDrivers

    public java.util.List getEnsemblDrivers()
                                     throws AdaptorException

  All drivers that coordinate systems will be loaded from. The returned list contains this instance plus those added via addEnsemblDriver().

  Returns:
    zero or more EnsemblDrivers.
  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