JAL-2009 added programmatic custom feature setting to show insertion position for...
[jalview.git] / src / jalview / ws / dbsources / Pdb.java
index 358c838..2421b82 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.ws.dbsources;
 
+import jalview.api.FeatureSettingsModelI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefEntry;
@@ -27,6 +28,7 @@ import jalview.datamodel.DBRefSource;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
 import jalview.io.FormatAdapter;
+import jalview.io.PDBFeatureSettings;
 import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
 
@@ -47,6 +49,10 @@ public class Pdb extends EbiFileRetrievedProxy
     super();
   }
 
+  public static final String FEATURE_INSERTION = "INSERTION";
+
+  public static final String FEATURE_RES_NUM = "RESNUM";
+
   private static String currentDefaultFomart = DBRefSource.MMCIF;
 
   /*
@@ -266,4 +272,19 @@ public class Pdb extends EbiFileRetrievedProxy
   {
     Pdb.currentDefaultFomart = currentDefaultFomart;
   }
+
+  /**
+   * Returns a descriptor for suitable feature display settings with
+   * <ul>
+   * <li>ResNums or insertions features visible</li>
+   * <li>insertions features coloured red</li>
+   * <li>ResNum features coloured by label</li>
+   * <li>Insertions displayed above (on top of) ResNums</li>
+   * </ul>
+   */
+  @Override
+  public FeatureSettingsModelI getFeatureColourScheme()
+  {
+    return new PDBFeatureSettings();
+  }
 }