X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FStructureFile.java;h=6b623a1e2d43e31c55256097388ed7117b6f7728;hb=17b7d054cf7faa5ee57ad8c8c4c9daa495d8cb35;hp=778c68340e61c60fce1b2c604219ef152a48a5ca;hpb=c945c9641de88cad01b09b3db19e45667dfe751e;p=jalview.git diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index 778c683..6b623a1 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 { @@ -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) { @@ -342,7 +343,14 @@ 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()