|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bdgp.io.AbstractDataAdapter
apollo.dataadapter.AbstractApolloAdapter
public abstract class AbstractApolloAdapter
All the dataadapters now subclass AbstractApolloAdapter, which new data adapters should do as well. In AbstractApolloAdapter.getCurationSet() apollo.config.Config.newDataAdapter(this) is called. This sets up the new style before the data loads. So all the subclasses have to call super.getCurationSet() at the start of their getCurationSet() method. A data adapter has to subclass AbstactApolloAdapter and call super.getCurationSet(). (AAA.getCS() also clears out all the old data that is still lingering). I know this is a bit of an awkward requirement and is easy to miss on coding a new data adapter. I am certainly open to other suggestions on how to get the notification out before the data loads. The problem is that org.bdgp.swing.widget.DataAdapterChooser is a bit of a black box and the first point of control one gets in apollo is in data adapters with DataAdapterGUI.doOperation which then calls DataAdapter.getCurationSet. One idea I had was to have DataAdapterChooser send out some sort of notification of whether its going to do a load or cancel. I've ran this by John Richter who is more or less in charge of org.bdgp utilities but I havent heard back yet. - MG
| Field Summary | |
|---|---|
protected CurationSet |
curation_set
|
protected static org.apache.log4j.Logger |
logger
|
protected java.lang.String |
region
|
protected Style |
style
|
| Fields inherited from class org.bdgp.io.AbstractDataAdapter |
|---|
listeners |
| Fields inherited from interface apollo.dataadapter.ApolloDataAdapterI |
|---|
OP_APPEND_DATA, OP_READ_DATA, OP_READ_RAW_ANALYSIS, OP_READ_SEQUENCE, OP_WRITE_DATA |
| Constructor Summary | |
|---|---|
AbstractApolloAdapter()
|
|
| Method Summary | |
|---|---|
java.lang.Boolean |
addToCurationSet()
|
protected void |
cacheUI(org.bdgp.io.IOOperation op,
org.bdgp.io.DataAdapterUI ui)
|
boolean |
canWriteData()
Whether write operation is supported by data adapter |
protected void |
clearOldData()
This has to be called in the subclass.getCurationSet (super.clearOldData()) to do the new data notification(clears old features) - also it notifies Config of style change. |
void |
clearStateInformation()
This SHOULD reset all the contents of the stateInformation being held by an adapter: with setStateInformation, this is not guaranteed. |
void |
commitChanges(CompositeDataHolder cdh)
SyntenyAdapter and SerialDiskAdapter override this |
void |
commitChanges(CompositeDataHolder cdh,
boolean saveAnnots,
boolean saveResults)
|
void |
commitChanges(CurationSet curation)
writes the changes from a featureChangeLog to a writeable datasource. |
void |
commitChanges(CurationSet curation,
boolean saveAnnots,
boolean saveResults)
|
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()
|
protected org.bdgp.io.DataAdapterUI |
getCachedUI(org.bdgp.io.IOOperation op)
|
ApolloDataAdapterI |
getChildAdapter(int i)
Throws not implemented exception as by default data adapter dont have species adapter (isComposite()=false). |
ApolloDataAdapterI |
getChildAdapter(java.lang.String species)
Throws not implemented exception as by default data adapter dont have species adapter (isComposite()=false). |
CurationSet |
getCurationSet()
returns a saved CurationSet. |
CurationState |
getCurationState()
Get CurationState associated with data adapter. |
java.lang.String |
getDatabase()
|
DataInput |
getDataInput()
|
protected Style |
getDefaultStyle()
Return style to use if no db (file) or db is not listed. |
protected java.lang.String |
getFilename()
Returns null if not file |
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...) |
java.lang.String |
getName()
Name label for use in Data Adapter Chooser. |
ApolloNameAdapterI |
getNameAdapter(AnnotatedFeatureI annot)
|
int |
getNumberOfChildAdapters()
Returns 0 by default. |
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()
By default return style associated with the adapter in apollo.cfg. |
java.lang.String |
getType()
From org.bdgp.io.DataAdapter. |
boolean |
hasLinkData()
Whether data adapter contains link data used for synteny, returns false by default override if otherwise |
void |
init()
From org.bdgp.io.DataAdapter interface. |
boolean |
isComposite()
By default return false - data adapter is not composite. |
void |
loadNewSpeciesFromLink(SeqFeatureI link,
CompositeDataHolder c)
Bring up the link as a species in synteny. |
protected boolean |
operationIsSupported(org.bdgp.io.IOOperation op)
I think this should be taken out to force a data adapter to implement it. |
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. |
protected boolean |
rollbackAnnotations(CurationSet curationSet)
Overridden by AnnotationEnsJAdapter and EfeatchSequenceAdapter |
void |
setCuration(CurationSet curation)
This region is used for overlay onto this existing curation |
void |
setCurationNumber(int curationNumber)
|
void |
setCurationState(CurationState curationState)
|
void |
setDatabase(java.lang.String database)
Presently only game adapter uses this |
void |
setDataInput(DataInput dataInput)
This should replace setInput. |
void |
setDataLoadListener(DataLoadListener l)
We currently only need one DataLoadListener(curSet controller) if we need more than one change this to addDataLoadListener |
void |
setInput(java.lang.String input)
Input string that corresponds with the input type (eg gene name for gene input type) |
void |
setInputType(DataInputType type)
DataInputType describes the type of input (gene,cytology,scaffold...) does this belong in the abstract class? |
void |
setLocation(GenomicRange chromosomeLocation)
GenomicRange is a convenient object to carry chromosome, start and end. |
void |
setName(java.lang.String n)
|
void |
setPadLeft(int padLeft)
Request to "pad" the input padLeft basepairs to the left(5' forward strand) - default noop - presently only used by game adapter in synteny context |
void |
setPadRight(int padRight)
Request to "pad" the input padRight basepairs to the right(3' forward strand) |
void |
setRegion(java.lang.String region)
This region doesnt seem to be used anywhere? |
void |
setSpecies(java.lang.String species)
|
void |
setStateInformation(java.util.Properties p)
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 class org.bdgp.io.AbstractDataAdapter |
|---|
addProgressListener, fireProgressEvent, removeProgressListener, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.bdgp.io.VisualDataAdapter |
|---|
addProgressListener, fireProgressEvent, getUI, removeProgressListener |
| Methods inherited from interface org.bdgp.io.DataAdapter |
|---|
getSupportedOperations |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger logger
protected java.lang.String region
protected CurationSet curation_set
protected Style style
| Constructor Detail |
|---|
public AbstractApolloAdapter()
| Method Detail |
|---|
public void init()
init in interface org.bdgp.io.DataAdapterpublic java.lang.String getName()
getName in interface org.bdgp.io.DataAdapterpublic void setName(java.lang.String n)
public java.lang.String getType()
getType in interface org.bdgp.io.DataAdapterpublic void setCurationNumber(int curationNumber)
public void setCurationState(CurationState curationState)
public CurationState getCurationState()
ApolloDataAdapterI
getCurationState in interface ApolloDataAdapterIpublic ApolloNameAdapterI getNameAdapter(AnnotatedFeatureI annot)
public void setDataInput(DataInput dataInput)
ApolloDataAdapterI
setDataInput in interface ApolloDataAdapterIpublic DataInput getDataInput()
protected java.lang.String getFilename()
public void setInputType(DataInputType type)
setInputType in interface ApolloDataAdapterIpublic DataInputType getInputType()
getInputType in interface ApolloDataAdapterIShould this go into org.bdgp.io.DataAdapter?public java.lang.String getInput()
getInput in interface ApolloDataAdapterIpublic void setInput(java.lang.String input)
setInput in interface ApolloDataAdapterI
protected void clearOldData()
throws ApolloAdapterException
ApolloAdapterExceptionpublic boolean rollbackAnnotations(CompositeDataHolder cdh)
rollbackAnnotations in interface ApolloDataAdapterIprotected boolean rollbackAnnotations(CurationSet curationSet)
public SequenceI getSequence(java.lang.String id)
throws ApolloAdapterException
ApolloDataAdapterI
getSequence in interface ApolloDataAdapterIApolloAdapterException
public SequenceI getSequence(DbXref dbxref)
throws ApolloAdapterException
getSequence in interface ApolloDataAdapterIApolloAdapterException
public SequenceI getSequence(DbXref dbxref,
int start,
int end)
throws ApolloAdapterException
getSequence in interface ApolloDataAdapterIApolloAdapterException
public java.util.Vector getSequences(DbXref[] dbxref)
throws ApolloAdapterException
getSequences in interface ApolloDataAdapterIApolloAdapterException
public java.util.Vector getSequences(DbXref[] dbxref,
int[] start,
int[] end)
throws ApolloAdapterException
getSequences in interface ApolloDataAdapterIApolloAdapterException
public java.lang.String getRawAnalysisResults(java.lang.String id)
throws ApolloAdapterException
getRawAnalysisResults in interface ApolloDataAdapterIApolloAdapterException
public void setRegion(java.lang.String region)
throws ApolloAdapterException
setRegion in interface ApolloDataAdapterIApolloAdapterException
public void setCuration(CurationSet curation)
throws ApolloAdapterException
setCuration in interface ApolloDataAdapterIApolloAdapterException
public void commitChanges(CurationSet curation)
throws ApolloAdapterException
ApolloDataAdapterI
commitChanges in interface ApolloDataAdapterIApolloAdapterException
public void commitChanges(CompositeDataHolder cdh)
throws ApolloAdapterException
commitChanges in interface ApolloDataAdapterIApolloAdapterException
public void commitChanges(java.lang.Object values)
throws ApolloAdapterException
ApolloDataAdapterI
commitChanges in interface ApolloDataAdapterIApolloAdapterException
public void commitChanges(java.lang.Object values,
boolean saveAnnots,
boolean saveResults)
throws ApolloAdapterException
commitChanges in interface ApolloDataAdapterIApolloAdapterException
public void commitChanges(CurationSet curation,
boolean saveAnnots,
boolean saveResults)
throws ApolloAdapterException
ApolloAdapterException
public void commitChanges(CompositeDataHolder cdh,
boolean saveAnnots,
boolean saveResults)
throws ApolloAdapterException
ApolloAdapterException
public CurationSet getCurationSet()
throws ApolloAdapterException
ApolloDataAdapterI
getCurationSet in interface ApolloDataAdapterIApolloAdapterExceptionpublic java.util.Properties getStateInformation()
ApolloDataAdapterI
getStateInformation in interface ApolloDataAdapterIpublic void setStateInformation(java.util.Properties p)
ApolloDataAdapterI
setStateInformation in interface ApolloDataAdapterIpublic void setLocation(GenomicRange chromosomeLocation)
public void clearStateInformation()
public java.lang.Boolean addToCurationSet()
throws ApolloAdapterException
addToCurationSet in interface ApolloDataAdapterIApolloAdapterExceptionprotected boolean operationIsSupported(org.bdgp.io.IOOperation op)
public boolean canWriteData()
canWriteData in interface ApolloDataAdapterI
protected void cacheUI(org.bdgp.io.IOOperation op,
org.bdgp.io.DataAdapterUI ui)
protected org.bdgp.io.DataAdapterUI getCachedUI(org.bdgp.io.IOOperation op)
public boolean hasLinkData()
hasLinkData in interface ApolloDataAdapterIpublic boolean isComposite()
isComposite in interface ApolloDataAdapterIpublic ApolloDataAdapterI getChildAdapter(java.lang.String species)
getChildAdapter in interface ApolloDataAdapterIpublic ApolloDataAdapterI getChildAdapter(int i)
getChildAdapter in interface ApolloDataAdapterIpublic int getNumberOfChildAdapters()
getNumberOfChildAdapters in interface ApolloDataAdapterIpublic java.util.Map getAdapters()
getAdapters in interface ApolloDataAdapterIpublic void setSpecies(java.lang.String species)
public java.lang.String getSpecies()
ApolloDataAdapterI
getSpecies in interface ApolloDataAdapterIpublic Style getStyle()
getStyle in interface ApolloDataAdapterIprotected Style getDefaultStyle()
public void setDatabase(java.lang.String database)
setDatabase in interface ApolloDataAdapterIpublic java.lang.String getDatabase()
public void loadNewSpeciesFromLink(SeqFeatureI link,
CompositeDataHolder c)
throws org.bdgp.io.DataAdapterException
loadNewSpeciesFromLink in interface ApolloDataAdapterIorg.bdgp.io.DataAdapterExceptionpublic void setPadLeft(int padLeft)
setPadLeft in interface ApolloDataAdapterIpublic void setPadRight(int padRight)
setPadRight in interface ApolloDataAdapterIpublic void setStyle(Style style)
setStyle in interface ApolloDataAdapterIpublic void setDataLoadListener(DataLoadListener l)
setDataLoadListener in interface ApolloDataAdapterI
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||