*/
package jalview.ws.dbsources;
+import jalview.api.FeatureSettingsModelI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefEntry;
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;
super();
}
- private static String currentDefaultFomart = DBRefSource.MMCIF;
+ public static final String FEATURE_INSERTION = "INSERTION";
+
+ public static final String FEATURE_RES_NUM = "RESNUM";
+
+ private static String currentDefaultFormat = DBRefSource.PDB;
/*
* (non-Javadoc)
stopQuery();
return null;
}
- String ext = getCurrentDefaultFomart().equalsIgnoreCase("mmcif") ? ".cif"
+ String ext = getCurrentDefaultFormat().equalsIgnoreCase("mmcif") ? ".cif"
: ".xml";
EBIFetchClient ebi = new EBIFetchClient();
file = ebi.fetchDataAsFile("pdb:" + id,
- getCurrentDefaultFomart().toLowerCase(), "raw", ext)
+ getCurrentDefaultFormat().toLowerCase(), "raw", ext)
.getAbsolutePath();
stopQuery();
if (file == null)
pdbAlignment = new FormatAdapter().readFile(file,
jalview.io.AppletFormatAdapter.FILE,
- getCurrentDefaultFomart());
+ getCurrentDefaultFormat());
if (pdbAlignment != null)
{
List<SequenceI> toremove = new ArrayList<SequenceI>();
return 0;
}
- public static String getCurrentDefaultFomart()
+ public static String getCurrentDefaultFormat()
+ {
+ return currentDefaultFormat;
+ }
+
+ public static void setCurrentDefaultFormat(String currentDefaultFomart)
{
- return currentDefaultFomart;
+ Pdb.currentDefaultFormat = currentDefaultFomart;
}
- public static void setCurrentDefaultFomart(String 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()
{
- Pdb.currentDefaultFomart = currentDefaultFomart;
+ return new PDBFeatureSettings();
}
}