// originating file's format
// TODO: work out how to recover feature settings for correct view(s) when
// file is reloaded.
- if (currentFileFormat == FileFormat.Jalview)
+ if (FileFormat.Jalview.equals(currentFileFormat))
{
JInternalFrame[] frames = Desktop.desktop.getAllFrames();
for (int i = 0; i < frames.length; i++)
{
boolean success = true;
- if (format == FileFormat.Jalview)
+ if (FileFormat.Jalview.equals(format))
{
String shortName = title;
}
if (type != null)
{
- if (type == FileFormat.PDB)
+ if (FileFormat.PDB.equals(type))
{
filesmatched.add(new Object[] { file, protocol, mtch });
continue;
// if the file isn't identified, or not positively identified as some
// other filetype (PFAM is default unidentified alignment file type) then
// try to parse as annotation.
- boolean isAnnotation = (format == null || format == FileFormat.Pfam) ? new AnnotationFile()
+ boolean isAnnotation = (format == null || FileFormat.Pfam
+ .equals(format)) ? new AnnotationFile()
.annotateAlignmentView(viewport, file, sourceType) : false;
if (!isAnnotation)
{
format = new IdentifyFile().identify(file, sourceType);
}
- if (format == FileFormat.Jnet)
+ if (FileFormat.Jnet.equals(format))
{
JPredFile predictions = new JPredFile(
file, sourceType);
isAnnotation = true;
}
// else if (IdentifyFile.FeaturesFile.equals(format))
- else if (format == FileFormat.Features)
+ else if (FileFormat.Features.equals(format))
{
if (parseFeaturesFile(file, sourceType))
{
.getSelectedFile().getParent());
FileFormatI format = null;
- if (chooser.getSelectedFormat() != null
- && chooser.getSelectedFormat() == FileFormat.Jalview)
+ FileFormatI selectedFormat = chooser.getSelectedFormat();
+ if (FileFormat.Jalview.equals(selectedFormat))
{
format = FileFormat.Jalview;
}
this.inFile = file;
try
{
- if (fileFormat == FileFormat.PDB || fileFormat == FileFormat.MMCif)
+ if (FileFormat.PDB.equals(fileFormat)
+ || FileFormat.MMCif.equals(fileFormat))
{
- // TODO obtain config value from preference settings.
- // Set value to 'true' to test PDB processing with Jmol: JAL-1213
boolean isParseWithJMOL = StructureImportSettings
.getDefaultPDBFileParser().equalsIgnoreCase(
StructureImportSettings.StructureParser.JMOL_PARSER
localSecondaryStruct, serviceSecondaryStruct, inFile,
sourceType);
}
- ((StructureFile) alignFile)
- .setDbRefType(fileFormat == FileFormat.PDB ? Type.PDB
- : Type.MMCIF);
+ ((StructureFile) alignFile).setDbRefType(FileFormat.PDB
+ .equals(fileFormat) ? Type.PDB : Type.MMCIF);
}
else
{
ex.printStackTrace();
}
}
- if (fileFormat == FileFormat.Html)
+ if (FileFormat.Html.equals(fileFormat))
{
throw new IOException(e.getMessage());
}
DataSourceType type = source.dataSourceType;
try
{
- if (format == FileFormat.PDB || format == FileFormat.MMCif)
+ if (FileFormat.PDB.equals(format) || FileFormat.MMCif.equals(format))
{
// TODO obtain config value from preference settings
boolean isParseWithJMOL = false;