JAL-1720 renamed Structure Chooser filters according to suggestions from Jim. Also...
[jalview.git] / src / jalview / ws / dbsources / PDBRestClient.java
index 2c05acd..8e08c84 100644 (file)
@@ -333,6 +333,19 @@ public class PDBRestClient
     return pdbFieldIndexCounter;
   }
 
+  public static PDBDocField getPDBDocFieldByCode(String fieldCode)
+          throws Exception
+  {
+    for (PDBDocField curPDBDocField : PDBDocField.values())
+    {
+      if (curPDBDocField.getCode().equalsIgnoreCase(fieldCode))
+      {
+        return curPDBDocField;
+      }
+    }
+    throw new Exception("PDB doc Field not found!");
+  }
+
   /**
    * This enum represents the fields available in the PDB JSON response
    *