JAL-2344: Refactor file format options as interfaces instead of text strings
CR-JAL-8 13
- Details
- Objectives
- General Comments 2
- Unresolved
- Resolved
- Number of files included: 46
-
jalview
0
-
Folder
examples/groovy
0
- File fileFormat.groovy 0 Remove
-
Folder
src
0
-
Folder
MCview
0
- File PDBViewer.java 0 Remove
-
Folder
jalview
0
-
Folder
appletgui
0
- File APopupMenu.java 0 Remove
- File AlignFrame.java 0 Remove
- File CutAndPasteTransfer.java 0 Remove
-
Folder
bin
0
- File JalviewLite.java 0 Remove
- File JalviewLiteURLRetrieve.java 0 Remove
-
Folder
datamodel
0
- File PDBEntry.java 1 Remove
-
Folder
gui
0
- File AlignFrame.java 0 Remove
- File CutAndPasteTransfer.java 0 Remove
- File Desktop.java 0 Remove
- File FeatureSettings.java 0 Remove
- File PopupMenu.java 0 Remove
- File Preferences.java 0 Remove
- File TreePanel.java 0 Remove
- File UserDefinedColours.java 0 Remove
- File WsParamSetManager.java 0 Remove
-
Folder
io
0
- File AlignFile.java 0 Remove
- File AlignmentFileI.java 0 Remove
- File AlignmentFileReaderI.java 0 Remove
- File AlignmentFileWriterI.java 0 Remove
- File AppletFormatAdapter.java 0 Remove
- File FileFormat.java 0 Remove
- File FileFormatI.java 0 Remove
- File FileFormats.java 0 Remove
- File FileLoader.java 0 Remove
- File FormatAdapter.java 0 Remove
- File HTMLOutput.java 0 Remove
- File HtmlSvgOutput.java 0 Remove
- File IdentifyFile.java 0 Remove
- File JalviewFileChooser.java 4 Remove
- File JalviewFileView.java 0 Remove
- File StructureFile.java 0 Remove
-
Folder
jbgui
0
- File GAlignFrame.java 0 Remove
-
Folder
util
0
- File ImageMaker.java 0 Remove
-
Folder
ws
0
-
Folder
dbsources
0
- File EmblXmlSource.java 0 Remove
- File Pdb.java 2 Remove
- File Uniprot.java 0 Remove
-
Folder
ebi
0
- File EBIFetchClient.java 0 Remove
-
Folder
jws1
0
- File JPredThread.java 0 Remove
-
Folder
rest/params
0
- File Alignment.java 2 Remove
-
Folder
dbsources
0
-
Folder
appletgui
0
-
Folder
MCview
0
-
Folder
test/jalview
0
-
Folder
io
0
- File FileFormatsTest.java 2 Remove
- File FormatAdapterTest.java 0 Remove
-
Folder
ws/jabaws
0
- File DisorderAnnotExportImport.java 0 Remove
- File JpredJabaStructExportImport.java 0 Remove
- File RNAStructExportImport.java 0 Remove
-
Folder
io
0
-
Folder
examples/groovy
0
-
Filter
- Only show me content:
- Unfiltered files: dynamically added content
- Filtered files: dynamically added content
- Clear filters
Summarize the review outcomes (optional)
Details
Participant | Role | Time Spent | Comments | Latest Comment |
---|---|---|---|---|
Author | 48m | 6 | 1) AlignFrame.outputFeatures() - format parameter here is... | |
Reviewer - Complete | 2m | 7 | Needs to be resolved | |
Total | 50m | 13 |
- Linked Issue:
-
Objectives
Currently, supported file formats are handled as text strings (constants in AppletFormatAdapter).
This is fragile (updates needed in several places for a new format), verbose (if-then-else statements), not type safe, does not support plug-in of additional formats.
Enhance the code to use interfaces that describe file formats, with file format types as implementors of these interfaces.
Branches in review
Repository | Branch to review | Branched from |
---|
General Comments
Mungo Carstairs
1) AlignFrame.outputFeatures() - format parameter here is a choice of Jalview...1) AlignFrame.outputFeatures() - format parameter here is a choice of Jalview or GFF, not a FileFormat in our sense - leave as is
2) PDBEntry$Type.format - part of raised issue JAL-2391
3) gui.AlignFrame.saveAs_actionPerformed: this uses FileFormatI where it can, or the string representation in user preferences, not sure what more can be done here
4) EBIFetchClient - format here is to specify format of returned data, and service dependent (and could change!)
- e.g. something like "display=xml" or "pdb" or "mmcif" or "uniprotxml" or "xml"
- sometimes relate to a Jalview FileFormatI but strictly should be decoupled from it - covered in JAL-2391 also
5) AnnotationFile.format is a choice of "JalviewAnnotation" or "CsvAnnotationRow" - I think out of scope of the current changes
6) JalviewLiteJsApi provides a Javascript-to-Java bridge - see jalviewLiteJs.html and the 'Jalview Lite embedded' launch configuration / embedded.html - has to work in strings
There are a few places in the code where I think strings could have been replaced with IFileFormat. See:
jalview.appletgui.AlignFrame::outputFeatures
jalview.datamodel.PDBEntry::format
jalview.gui.AlignFrame::saveAs_actionPerformed
jalview.ws.ebi.EbiFetchClient::fetch*, buildUrl
jalview.ws.rest.params.AnnotationFile::formatForInput
Also jalview.bin.JalviewLite and jalview.javascript.JalviewLiteJsApi but not sure if these are used?
Mungo Carstairs marked as Resolved 07 Feb 17