apollo.dataadapter.ensj19
Class AnnotationEnsJAdapter

java.lang.Object
  extended by org.bdgp.io.AbstractDataAdapter
      extended by apollo.dataadapter.AbstractApolloAdapter
          extended by apollo.dataadapter.ensj19.EnsJAdapter
              extended by apollo.dataadapter.ensj19.AnnotationEnsJAdapter
All Implemented Interfaces:
ApolloDataAdapterI, org.bdgp.io.DataAdapter, org.bdgp.io.VisualDataAdapter

public class AnnotationEnsJAdapter
extends EnsJAdapter


Field Summary
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class apollo.dataadapter.ensj19.EnsJAdapter
STABLE_ID_PREFIX, stateInformation, tend, tstart
 
Fields inherited from class apollo.dataadapter.AbstractApolloAdapter
curation_set, 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
AnnotationEnsJAdapter()
           
 
Method Summary
 java.lang.Boolean addToCurationSet()
           
 void clearStateInformation()
          This SHOULD reset all the contents of the stateInformation being held by an adapter: with setStateInformation, this is not guaranteed.
 void commitChanges(CurationSet curationSet)
          Write the (now edited) curation set back to the otter server or file, depending on what was nominated.
 CurationSet getExistingCurationSet()
           
 java.io.InputStream getInputStream()
           
 DataInputType getInputType()
          This is an arcane requirement to get the File->Save menu to light up.
 java.lang.String getName()
          Name label for use in Data Adapter Chooser.
 java.io.OutputStream getOutputStream()
           
 SequenceI getSequence(DbXref dbxref)
          We will either draw our sequence from the main database, or from another sequence database, if it was passed in.
 org.bdgp.io.IOOperation[] getSupportedOperations()
          Returns a list of all operations supported by this data adapter
 org.bdgp.io.DataAdapterUI getUI(org.bdgp.io.IOOperation op)
          need to cache guis.
protected  boolean rollbackAnnotations(CurationSet curationSet)
          Overridden by AnnotationEnsJAdapter and EfeatchSequenceAdapter
 void setInputStream(java.io.InputStream newValue)
           
 void setOutputStream(java.io.OutputStream newValue)
           
 void setStateInformation(java.util.Properties stateInformation)
          In addition to superclass processing, We will be passed otter-i/o file names.
 void setWritingStateInformation(java.util.Properties stateInformation)
           
 
Methods inherited from class apollo.dataadapter.ensj19.EnsJAdapter
getAnnotatedRegion, getCurationSet, getCurationSetWithoutClearingData, getDriver, getDriverConf, getInput, getLocation, getLoggingFile, getMode, getOrganism, getRawAnalysisResults, getReferenceSequence, getRegion, getSequence, getSequence, getSequences, getSequences, getStateInformation, getType, init, main, printTime, setDriverConf, setLoggingFile, setRegion, validateRegionSpecified
 
Methods inherited from class apollo.dataadapter.AbstractApolloAdapter
cacheUI, canWriteData, clearOldData, commitChanges, commitChanges, commitChanges, commitChanges, commitChanges, getAdapters, getCachedUI, getChildAdapter, getChildAdapter, getCurationState, getDatabase, getDataInput, getDefaultStyle, getFilename, getNameAdapter, getNumberOfChildAdapters, getSpecies, getStyle, hasLinkData, isComposite, loadNewSpeciesFromLink, operationIsSupported, rollbackAnnotations, setCuration, setCurationNumber, setCurationState, setDatabase, setDataInput, setDataLoadListener, setInput, setInputType, setLocation, setName, setPadLeft, setPadRight, setSpecies, setStyle
 
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, removeProgressListener
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

AnnotationEnsJAdapter

public AnnotationEnsJAdapter()
Method Detail

getSupportedOperations

public org.bdgp.io.IOOperation[] getSupportedOperations()
Description copied from interface: org.bdgp.io.DataAdapter
Returns a list of all operations supported by this data adapter

Specified by:
getSupportedOperations in interface org.bdgp.io.DataAdapter
Overrides:
getSupportedOperations in class EnsJAdapter

getInputType

public DataInputType getInputType()
This is an arcane requirement to get the File->Save menu to light up.

Specified by:
getInputType in interface ApolloDataAdapterI
Overrides:
getInputType in class EnsJAdapter
See Also:
Should this go into org.bdgp.io.DataAdapter?

getName

public java.lang.String getName()
Description copied from class: AbstractApolloAdapter
Name label for use in Data Adapter Chooser. Don't override this method--call setName from your constructor.

Specified by:
getName in interface org.bdgp.io.DataAdapter
Overrides:
getName in class EnsJAdapter

getInputStream

public java.io.InputStream getInputStream()

setInputStream

public void setInputStream(java.io.InputStream newValue)

getOutputStream

public java.io.OutputStream getOutputStream()

setOutputStream

public void setOutputStream(java.io.OutputStream newValue)

getSequence

public SequenceI getSequence(DbXref dbxref)
                      throws ApolloAdapterException
We will either draw our sequence from the main database, or from another sequence database, if it was passed in.

Specified by:
getSequence in interface ApolloDataAdapterI
Overrides:
getSequence in class AbstractApolloAdapter
Throws:
ApolloAdapterException

getUI

public org.bdgp.io.DataAdapterUI getUI(org.bdgp.io.IOOperation op)
need to cache guis. getUI called 6 times by the chooser (who knows why) for each load - that means if its not cached the gui gets recreated 6 times inefficient! so its now cached


commitChanges

public void commitChanges(CurationSet curationSet)
                   throws ApolloAdapterException
Write the (now edited) curation set back to the otter server or file, depending on what was nominated.

Specified by:
commitChanges in interface ApolloDataAdapterI
Overrides:
commitChanges in class EnsJAdapter
Throws:
ApolloAdapterException

setStateInformation

public void setStateInformation(java.util.Properties stateInformation)
In addition to superclass processing, We will be passed otter-i/o file names. Create file handles from these.

Specified by:
setStateInformation in interface ApolloDataAdapterI
Overrides:
setStateInformation in class EnsJAdapter

setWritingStateInformation

public void setWritingStateInformation(java.util.Properties stateInformation)

clearStateInformation

public void clearStateInformation()
Description copied from class: AbstractApolloAdapter
This SHOULD reset all the contents of the stateInformation being held by an adapter: with setStateInformation, this is not guaranteed.

Overrides:
clearStateInformation in class EnsJAdapter

rollbackAnnotations

protected boolean rollbackAnnotations(CurationSet curationSet)
Description copied from class: AbstractApolloAdapter
Overridden by AnnotationEnsJAdapter and EfeatchSequenceAdapter

Overrides:
rollbackAnnotations in class AbstractApolloAdapter

addToCurationSet

public java.lang.Boolean addToCurationSet()
                                   throws ApolloAdapterException
Specified by:
addToCurationSet in interface ApolloDataAdapterI
Overrides:
addToCurationSet in class AbstractApolloAdapter
Throws:
ApolloAdapterException

getExistingCurationSet

public CurationSet getExistingCurationSet()