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
{
StructureImportSettings.addSettings(annotFromStructure,
localSecondaryStruct, serviceSecondaryStruct);
- alignFile = new JmolParser(annotFromStructure,
- localSecondaryStruct, serviceSecondaryStruct, inFile,
- sourceType);
+ alignFile = new JmolParser(inFile, sourceType);
}
else
{
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;
{
StructureImportSettings.addSettings(annotFromStructure,
localSecondaryStruct, serviceSecondaryStruct);
- alignFile = new JmolParser(annotFromStructure,
- localSecondaryStruct, serviceSecondaryStruct, source);
+ alignFile = new JmolParser(source);
}
else
{