+package jalview.json.binding.v1;
+
+import jalview.schemes.Blosum62ColourScheme;
+import jalview.schemes.BuriedColourScheme;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.HelixColourScheme;
+import jalview.schemes.HydrophobicColourScheme;
+import jalview.schemes.NucleotideColourScheme;
+import jalview.schemes.PIDColourScheme;
+import jalview.schemes.PurinePyrimidineColourScheme;
+import jalview.schemes.RNAInteractionColourScheme;
+import jalview.schemes.StrandColourScheme;
+import jalview.schemes.TaylorColourScheme;
+import jalview.schemes.TurnColourScheme;
+import jalview.schemes.ZappoColourScheme;
+
+public class JalviewSettingsPojo
+{
+ private String globalColorScheme = "none";
+
+ private String jalviewVersion;
+
+ private String webStartUrl;
+
+ private boolean showSeqFeatures;
+
+ private boolean wrapModeEnabled;
+
+ public JalviewSettingsPojo()
+ {
+
+ }
+
+ public String getGlobalColorScheme()
+ {
+ return globalColorScheme;
+ }
+
+ public void setGlobalColorScheme(String globalColorScheme)
+ {
+ for (JalviewBioJsColorSchemeMapper cs : JalviewBioJsColorSchemeMapper
+ .values())
+ {
+ if (cs.getJalviewName().equals(globalColorScheme))
+ {
+ this.globalColorScheme = cs.getBioJsName();
+ break;
+ }
+ }
+ }
+
+ public String getJalviewVersion()
+ {
+ return jalviewVersion;
+ }
+
+ public void setJalviewVersion(String jalviewVersion)
+ {
+ this.jalviewVersion = jalviewVersion;
+ }
+
+ public String getWebStartUrl()
+ {
+ return webStartUrl;
+ }
+
+ public void setWebStartUrl(String webStartUrl)
+ {
+ this.webStartUrl = webStartUrl;
+ }
+
+ public boolean isShowSeqFeatures()
+ {
+ return showSeqFeatures;
+ }
+
+ public void setShowSeqFeatures(boolean showSeqFeatures)
+ {
+ this.showSeqFeatures = showSeqFeatures;
+ }
+
+ public boolean isWrapModeEnabled()
+ {
+ return wrapModeEnabled;
+ }
+
+ public void setWrapModeEnabled(boolean wrapModeEnabled)
+ {
+ this.wrapModeEnabled = wrapModeEnabled;
+ }
+
+ public enum JalviewBioJsColorSchemeMapper
+ {
+ USER_DEFINED("User Defined", "user defined", null), NONE("None", "foo",
+ null), CLUSTAL("Clustal", "clustal", null), ZAPPO("Zappo",
+ "zappo", new ZappoColourScheme()), TAYLOR("Taylor", "taylor",
+ new TaylorColourScheme()), NUCLEOTIDE("Nucleotide",
+ "nucleotide", new NucleotideColourScheme()), PURINE_PYRIMIDINE(
+ "Purine/Pyrimidine", "purine",
+ new PurinePyrimidineColourScheme()), HELIX_PROPENCITY(
+ "Helix Propensity", "helix", new HelixColourScheme()), TURN_PROPENSITY(
+ "Turn Propensity", "turn", new TurnColourScheme()), STRAND_PROPENSITY(
+ "Strand Propensity", "strand", new StrandColourScheme()), BURIED_INDEX(
+ "Buried Index", "buried", new BuriedColourScheme()), HYDROPHOBIC(
+ "Hydrophobic", "hydro", new HydrophobicColourScheme()),
+
+ // The color types below are not yet supported by BioJs MSA viewer
+ T_COFFE_SCORES("T-Coffee Scores", "T-Coffee Scores", null), RNA_INT_TYPE(
+ "RNA Interaction type", "RNA Interaction type",
+ new RNAInteractionColourScheme()), BLOSUM62("Blosum62",
+ "Blosum62", new Blosum62ColourScheme()), RNA_HELICES(
+ "RNA Helices", "RNA Helices", null), PERCENTAGE_IDENTITY(
+ "% Identity", "pid", new PIDColourScheme());
+
+ private String jalviewName;
+
+ private String bioJsName;
+
+ private ColourSchemeI jvColourScheme;
+
+ private JalviewBioJsColorSchemeMapper(String jalviewName,
+ String bioJsName, ColourSchemeI jvColourScheme)
+ {
+ this.jalviewName = jalviewName;
+ this.bioJsName = bioJsName;
+ this.setJvColourScheme(jvColourScheme);
+ }
+
+ public String getJalviewName()
+ {
+ return jalviewName;
+ }
+
+ public String getBioJsName()
+ {
+ return bioJsName;
+ }
+
+ public ColourSchemeI getJvColourScheme()
+ {
+ return jvColourScheme;
+ }
+
+ public void setJvColourScheme(ColourSchemeI jvColourScheme)
+ {
+ this.jvColourScheme = jvColourScheme;
+ }
+
+ }
+}