X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FStructureFile.java;h=94a832b2e7a6c1f29cae64c19b1ce529dbc47cf0;hb=7b23afe919f115205c95233af7f2b71c164fc95a;hp=3025907fe46adc023add9e13001dddebcf85dae2;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index 3025907..94a832b 100644 --- a/src/jalview/io/StructureFile.java +++ b/src/jalview/io/StructureFile.java @@ -38,7 +38,7 @@ import java.lang.reflect.Constructor; import java.util.List; import java.util.Vector; -import MCview.PDBChain; +import mc_view.PDBChain; public abstract class StructureFile extends AlignFile { @@ -68,7 +68,7 @@ public abstract class StructureFile extends AlignFile private boolean pdbIdAvailable; - public StructureFile(String inFile, DataSourceType sourceType) + public StructureFile(Object inFile, DataSourceType sourceType) throws IOException { super(inFile, sourceType); @@ -98,7 +98,7 @@ public abstract class StructureFile extends AlignFile } - public StructureFile(boolean parseImmediately, String dataObject, + public StructureFile(boolean parseImmediately, Object dataObject, DataSourceType sourceType) throws IOException { super(parseImmediately, dataObject, sourceType); @@ -119,6 +119,7 @@ public abstract class StructureFile extends AlignFile pdbSequence.setName(getId() + "|" + pdbSequence.getName()); PDBEntry entry = new PDBEntry(); entry.setId(getId()); + entry.setFakedPDBId(!isPPDBIdAvailable()); entry.setType(getStructureFileType()); if (chain.id != null) { @@ -341,8 +342,15 @@ public abstract class StructureFile extends AlignFile } StructureImportSettings.setShowSeqFeatures(true); } - - public PDBChain findChain(String id) throws Exception + + /** + * Answers the first PDBChain found matching the given id, or null if none + * is found + * + * @param id + * @return + */ + public PDBChain findChain(String id) { for (PDBChain chain : getChains()) { @@ -351,7 +359,7 @@ public abstract class StructureFile extends AlignFile return chain; } } - throw new Exception("PDB chain not Found!"); + return null; } public void makeResidueList()