import jalview.api.AlignExportSettingI;
import jalview.api.AlignmentViewPanel;
+import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import java.io.IOException;
+
/**
* Additional formatting methods used by the application in a number of places.
*
return null;
}
- public boolean getCacheSuffixDefault(String format)
+ public boolean getCacheSuffixDefault(FileFormatI format)
{
if (isValidFormat(format))
{
- return jalview.bin.Cache.getDefault(format.toUpperCase()
+ return Cache.getDefault(format.toUpperCase()
+ "_JVSUFFIX", true);
}
return false;
}
- public String formatSequences(String format, AlignmentI alignment,
+ public String formatSequences(FileFormatI format, AlignmentI alignment,
String[] omitHidden, int[] exportRange, ColumnSelection colSel)
{
return formatSequences(format, alignment, omitHidden, exportRange,
getCacheSuffixDefault(format), colSel, null);
}
- public String formatSequences(String format, AlignmentI alignment,
+ public String formatSequences(FileFormatI format, AlignmentI alignment,
String[] omitHidden, int[] exportRange, ColumnSelection colSel,
SequenceGroup sgp)
{
* defines hidden columns that are edited out of annotation
* @return string representation of the alignment formatted as format
*/
- public String formatSequences(String format, AlignmentI alignment,
+ public String formatSequences(FileFormatI format, AlignmentI alignment,
String[] omitHidden, int[] exportRange, boolean suffix,
ColumnSelection colSel)
{
suffix, colSel, null);
}
- public String formatSequences(String format, AlignmentI alignment,
+ public String formatSequences(FileFormatI format, AlignmentI alignment,
String[] omitHidden, int[] exportRange, boolean suffix,
- ColumnSelection colSel, jalview.datamodel.SequenceGroup selgp)
+ ColumnSelection colSel, SequenceGroup selgp)
{
if (omitHidden != null)
{
return this.formatSequences(format, alignment, suffix);
}
- public AlignmentI readFile(String inFile, String type, String format)
- throws java.io.IOException
+ @Override
+ public AlignmentI readFile(String file, DataSourceType sourceType,
+ FileFormatI fileFormat) throws IOException
{
- AlignmentI al = super.readFile(inFile, type, format);
+ AlignmentI al = super.readFile(file, sourceType, fileFormat);
return al;
}
- public AlignmentI readFromFile(FileParse source, String format)
- throws java.io.IOException
+ @Override
+ public AlignmentI readFromFile(FileParse source, FileFormatI format)
+ throws IOException
{
AlignmentI al = super.readFromFile(source, format);
return al;
* alignment panel originating the view
* @return String containing flat file
*/
- public String formatSequences(String format, AlignmentViewPanel ap,
+ public String formatSequences(FileFormatI format, AlignmentViewPanel ap,
boolean selectedOnly)
{
return formatSequences(format, getCacheSuffixDefault(format), ap,