X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FStructureFile.java;h=97b246f25987dd0ef8e51ef98a5befd85ec69d33;hb=47fd498a6fe7d2e3350a9e87c526bf1e59d00be5;hp=2fe386b2d8ceb0071fa5e20c161522c724bb2c8f;hpb=8546ee20c998cd48567d324027d1885a771e688f;p=jalview.git diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index 2fe386b..97b246f 100644 --- a/src/jalview/io/StructureFile.java +++ b/src/jalview/io/StructureFile.java @@ -45,6 +45,11 @@ public abstract class StructureFile extends AlignFile private String id; + public enum StructureFileType + { + PDB, MMCIF, MMTF + }; + private PDBEntry.Type dbRefType; /** @@ -67,6 +72,8 @@ public abstract class StructureFile extends AlignFile private Vector chains; + private boolean pdbIdAvailable; + public StructureFile(String inFile, String type) throws IOException { super(inFile, type); @@ -467,4 +474,35 @@ public abstract class StructureFile extends AlignFile { return new PDBFeatureSettings(); } + + /** + * Answers true if the structure file has a PDBId + * + * @return + */ + public boolean isPPDBIdAvailable() + { + return pdbIdAvailable; + } + + public void setPDBIdAvailable(boolean pdbIdAvailable) + { + this.pdbIdAvailable = pdbIdAvailable; + } + + public static boolean isStructureFile(String fileType) + { + if (fileType == null) + { + return false; + } + for (StructureFileType sfType : StructureFileType.values()) + { + if (sfType.name().equalsIgnoreCase(fileType)) + { + return true; + } + } + return false; + } }