apollo.dataadapter
Interface ApolloDataAdapterI

All Superinterfaces:
org.bdgp.io.DataAdapter, org.bdgp.io.VisualDataAdapter
All Known Implementing Classes:
AbstractApolloAdapter, AnalysisAdapter, AnnotationEnsJAdapter, BaseGFFAdapter, BuilderAdapter, ChadoAdapter, ChadoXmlAdapter, DAS2Adapter, DummySequenceAdapter, EfetchSequenceAdapter, EnsCGIAdapter, EnsJAdapter, EnsJAdapter, FlyChadoXmlAdapter, FlyGAMEAdapter, GAMEAdapter, GbrowseAdapter, GenbankAdapter, GFF3Adapter, GFFAdapter, GraphAdapter, OtterAdapter, OtterXMLAdapter, SampleAdapter, SerialDiskAdapter, SimpleDASAdapter, SyntenyAdapter, SyntenyComparaAdapter, SyntenyGFFAdapter

public interface ApolloDataAdapterI
extends org.bdgp.io.VisualDataAdapter

DataAdapterI interface Used to load annotated and non-annotated data from whatever datasource Could this implement org.bdgp.io.VisualDataAdapter or are there apollo adapters with no UI?


Field Summary
static org.bdgp.io.IOOperation OP_APPEND_DATA
           
static org.bdgp.io.IOOperation OP_READ_DATA
           
static org.bdgp.io.IOOperation OP_READ_RAW_ANALYSIS
           
static org.bdgp.io.IOOperation OP_READ_SEQUENCE
           
static org.bdgp.io.IOOperation OP_WRITE_DATA
           
 
Method Summary
 java.lang.Boolean addToCurationSet()
           
 boolean canWriteData()
          Whether write operation is supported by data adapter
 void commitChanges(CompositeDataHolder cdh)
          Write out composite data holder to multiple data adapters (only SyntenyAdapter actually implements this)
 void commitChanges(CurationSet curationSet)
          writes the changes from a featureChangeLog to a writeable datasource.
 void commitChanges(java.lang.Object values)
          Straight from DataAdapterGUI.doOp.
 void commitChanges(java.lang.Object values, boolean saveAnnots, boolean saveResults)
          GAMEAdapter and ChadoXMLAdapter can specify whether to save annots and whether to save results
 java.util.Map getAdapters()
           
 ApolloDataAdapterI getChildAdapter(int i)
          Returns ith child adapter if isComposite(), null otherwise
 ApolloDataAdapterI getChildAdapter(java.lang.String adapterName)
          if isComposite() then returns child adapter for string adapterName.
 CurationSet getCurationSet()
          returns a saved CurationSet.
 CurationState getCurationState()
          Get CurationState associated with data adapter.
 java.lang.String getInput()
          Returns the input String passed to the DataAdapter, the input is of course associated with the input type Should this go into org.bdgp.io.DataAdapter?
 DataInputType getInputType()
          Returns the type of input data (gene,file,band...) I believe this is now contained in the DataInput object, so this should probably be phased out eventually
 int getNumberOfChildAdapters()
          Returns number of child adapters.
 java.lang.String getRawAnalysisResults(java.lang.String id)
           
 SequenceI getSequence(DbXref dbxref)
           
 SequenceI getSequence(DbXref dbxref, int start, int end)
           
 SequenceI getSequence(java.lang.String id)
          Strings for input types
 java.util.Vector getSequences(DbXref[] dbxref)
           
 java.util.Vector getSequences(DbXref[] dbxref, int[] start, int[] end)
           
 java.lang.String getSpecies()
          Synteny gives a species to each adapter to help keep track of them
 java.util.Properties getStateInformation()
          State info Properties carries all the info needed for the adapter to do its query This is an alternative to setDataInput.
 Style getStyle()
          Return style associated with data adapter - at the moment synteny overrides all its child adapters with its own style - this may change in the future
 boolean hasLinkData()
          Whether data adapter contains link data used for synteny (e.g.
 boolean isComposite()
          returns true if the data adapter holds species adapters.
 void loadNewSpeciesFromLink(SeqFeatureI link, CompositeDataHolder cdh)
          Bring up the link as a species in synteny.
 boolean rollbackAnnotations(CompositeDataHolder cdh)
          Send any necessary signals to the server to release annotation locks or undo edits --after the user has been prompted that these will be lost.
 void setCuration(CurationSet curation)
           
 void setDatabase(java.lang.String database)
          Presently only game adapter uses this
 void setDataInput(DataInput dataInput)
          This should replace setInput.
 void setDataLoadListener(DataLoadListener l)
          Controller should be in apollo.controller package not gui
 void setInput(java.lang.String input)
          Input string that corresponds with the input type (eg gene name for gene input type) setDataInput is the better way to go.
 void setInputType(DataInputType type)
          DataInputType describes the type of input (gene,cytology,scaffold...) DataInput contains a DataInputType, so setDataInput covers this.
 void setPadLeft(int padLeft)
          Request to "pad" the input padLeft basepairs to the left(5' forward strand)
 void setPadRight(int padRight)
          Request to "pad" the input padRight basepairs to the right(3' forward strand)
 void setRegion(java.lang.String extId)
          Deprecated. use setDataInput(DataInput)
 void setStateInformation(java.util.Properties props)
          This should set StateInformation object! see StateInformation for Strings to use for keys.
 void setStyle(Style style)
          By default a data adapter uses the style listed with it in the config file.
 
Methods inherited from interface org.bdgp.io.VisualDataAdapter
addProgressListener, fireProgressEvent, getUI, removeProgressListener
 
Methods inherited from interface org.bdgp.io.DataAdapter
getName, getSupportedOperations, getType, init
 

Field Detail

OP_READ_DATA

static final org.bdgp.io.IOOperation OP_READ_DATA

OP_WRITE_DATA

static final org.bdgp.io.IOOperation OP_WRITE_DATA

OP_READ_SEQUENCE

static final org.bdgp.io.IOOperation OP_READ_SEQUENCE

OP_READ_RAW_ANALYSIS

static final org.bdgp.io.IOOperation OP_READ_RAW_ANALYSIS

OP_APPEND_DATA

static final org.bdgp.io.IOOperation OP_APPEND_DATA
Method Detail

getCurationSet

CurationSet getCurationSet()
                           throws ApolloAdapterException
returns a saved CurationSet.

Throws:
ApolloAdapterException

setCuration

void setCuration(CurationSet curation)
                 throws ApolloAdapterException
Throws:
ApolloAdapterException

addToCurationSet

java.lang.Boolean addToCurationSet()
                                   throws ApolloAdapterException
Throws:
ApolloAdapterException

commitChanges

void commitChanges(CurationSet curationSet)
                   throws ApolloAdapterException
writes the changes from a featureChangeLog to a writeable datasource. Not just a featureChangeLog - this writes out the whole curationSet

Throws:
ApolloAdapterException

commitChanges

void commitChanges(CompositeDataHolder cdh)
                   throws ApolloAdapterException
Write out composite data holder to multiple data adapters (only SyntenyAdapter actually implements this)

Throws:
ApolloAdapterException

commitChanges

void commitChanges(java.lang.Object values)
                   throws ApolloAdapterException
Straight from DataAdapterGUI.doOp. Could be cur set or comp data holder

Throws:
ApolloAdapterException

commitChanges

void commitChanges(java.lang.Object values,
                   boolean saveAnnots,
                   boolean saveResults)
                   throws ApolloAdapterException
GAMEAdapter and ChadoXMLAdapter can specify whether to save annots and whether to save results

Throws:
ApolloAdapterException

setDataInput

void setDataInput(DataInput dataInput)
This should replace setInput. setInput is limited to just a String which is awkward for locations where you have to jam several fields into one String. DataInput deals with locations much better. DataInput can complement stateInfo (hopefully?)


getInputType

DataInputType getInputType()
Returns the type of input data (gene,file,band...) I believe this is now contained in the DataInput object, so this should probably be phased out eventually

See Also:
Should this go into org.bdgp.io.DataAdapter?

getInput

java.lang.String getInput()
Returns the input String passed to the DataAdapter, the input is of course associated with the input type Should this go into org.bdgp.io.DataAdapter?


setInputType

void setInputType(DataInputType type)
DataInputType describes the type of input (gene,cytology,scaffold...) DataInput contains a DataInputType, so setDataInput covers this. Phase this method out?


setInput

void setInput(java.lang.String input)
Input string that corresponds with the input type (eg gene name for gene input type) setDataInput is the better way to go. This should be phased out.


getStateInformation

java.util.Properties getStateInformation()
State info Properties carries all the info needed for the adapter to do its query This is an alternative to setDataInput. For most cases setDataInput should be sufficient. This should return StateInformation


setStateInformation

void setStateInformation(java.util.Properties props)
This should set StateInformation object! see StateInformation for Strings to use for keys.


setRegion

void setRegion(java.lang.String extId)
               throws ApolloAdapterException
Deprecated. use setDataInput(DataInput)

Both EnsJAdapters use this and EnsCGIAdapter to pass in location string. This is a precursor to setInput & setInputType, and setStateInformation. These should all probably be collapsed, which is to say setRegion and setInput should probably be replaced by setStateInfo(?). Actually now im thinking setDataInput is the way to go. StateInfo is more generic than need be. setRegion has nothing to do with new Region object - maybe should rename Region ApolloLoc

Throws:
ApolloAdapterException

getSequence

SequenceI getSequence(java.lang.String id)
                      throws ApolloAdapterException
Strings for input types

Throws:
ApolloAdapterException

getSequence

SequenceI getSequence(DbXref dbxref)
                      throws ApolloAdapterException
Throws:
ApolloAdapterException

getSequence

SequenceI getSequence(DbXref dbxref,
                      int start,
                      int end)
                      throws ApolloAdapterException
Throws:
ApolloAdapterException

getSequences

java.util.Vector getSequences(DbXref[] dbxref)
                              throws ApolloAdapterException
Throws:
ApolloAdapterException

getSequences

java.util.Vector getSequences(DbXref[] dbxref,
                              int[] start,
                              int[] end)
                              throws ApolloAdapterException
Throws:
ApolloAdapterException

getRawAnalysisResults

java.lang.String getRawAnalysisResults(java.lang.String id)
                                       throws ApolloAdapterException
Throws:
ApolloAdapterException

rollbackAnnotations

boolean rollbackAnnotations(CompositeDataHolder cdh)
Send any necessary signals to the server to release annotation locks or undo edits --after the user has been prompted that these will be lost.


loadNewSpeciesFromLink

void loadNewSpeciesFromLink(SeqFeatureI link,
                            CompositeDataHolder cdh)
                            throws org.bdgp.io.DataAdapterException
Bring up the link as a species in synteny. Presently this can only be done in synteny mode - eventually would be nice to do from regular apollo

Throws:
org.bdgp.io.DataAdapterException

getSpecies

java.lang.String getSpecies()
Synteny gives a species to each adapter to help keep track of them


setDatabase

void setDatabase(java.lang.String database)
Presently only game adapter uses this


setPadLeft

void setPadLeft(int padLeft)
Request to "pad" the input padLeft basepairs to the left(5' forward strand)


setPadRight

void setPadRight(int padRight)
Request to "pad" the input padRight basepairs to the right(3' forward strand)


setStyle

void setStyle(Style style)
By default a data adapter uses the style listed with it in the config file. In synteny mode the childrens default style needs to be overridden by the synteny adapters style. This method os for the synteny override of its child adapters style.


getStyle

Style getStyle()
Return style associated with data adapter - at the moment synteny overrides all its child adapters with its own style - this may change in the future


isComposite

boolean isComposite()
returns true if the data adapter holds species adapters. Rename this hasSpeciesAdapters()?


getChildAdapter

ApolloDataAdapterI getChildAdapter(java.lang.String adapterName)
if isComposite() then returns child adapter for string adapterName. if not composite returns null.


getChildAdapter

ApolloDataAdapterI getChildAdapter(int i)
Returns ith child adapter if isComposite(), null otherwise


getNumberOfChildAdapters

int getNumberOfChildAdapters()
Returns number of child adapters. If isComposite() is false returns 0.


getAdapters

java.util.Map getAdapters()

canWriteData

boolean canWriteData()
Whether write operation is supported by data adapter


hasLinkData

boolean hasLinkData()
Whether data adapter contains link data used for synteny (e.g. GAME data contains link data)


setDataLoadListener

void setDataLoadListener(DataLoadListener l)
Controller should be in apollo.controller package not gui


getCurationState

CurationState getCurationState()
Get CurationState associated with data adapter.