X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FPDBEntry.java;h=97fb08ddae8428f89008b165fe6909ad99d369c4;hb=7d67fb613ec026dc9a265e351e7fab542e3f1d61;hp=6a6ccd0f7d1904425a7e9dc0476d4f4d088da187;hpb=37de9310bec3501cbc6381e0c3dcb282fcaad812;p=jalview.git diff --git a/src/jalview/datamodel/PDBEntry.java b/src/jalview/datamodel/PDBEntry.java index 6a6ccd0..97fb08d 100755 --- a/src/jalview/datamodel/PDBEntry.java +++ b/src/jalview/datamodel/PDBEntry.java @@ -46,7 +46,28 @@ public class PDBEntry public enum Type { - PDB, MMCIF, FILE; + // TODO is FILE needed; if not is this needed or can we + // use FileFormatI for PDB, MMCIF? + PDB("pdb", "xml"), MMCIF("mmcif", "mmcif"), FILE("?", "?"); + String ext; + + String format; + + private Type(String fmt, String ex) + { + format = fmt; + ext = ex; + } + + public String getFormat() + { + return format; + } + public String getExtension() + { + return ext; + } + /** * case insensitive matching for Type enum * @@ -77,7 +98,6 @@ public class PDBEntry } } - /** * Answers true if obj is a PDBEntry with the same id and chain code (both * ignoring case), file, type and properties @@ -121,16 +141,6 @@ public class PDBEntry { } - /** - * Constructor given file path and PDB id. - * - * @param filePath - */ - // public PDBEntry(String filePath, String pdbId) - // { - // this.file = filePath; - // this.id = pdbId; - // } public PDBEntry(String pdbId, String chain, PDBEntry.Type type, String filePath)