Clover icon

Coverage Report

  1. Project Clover database Fri Dec 6 2024 13:47:14 GMT
  2. Package jalview.util

File Constants.java

 

Coverage histogram

../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
14
3
1
86
40
3
0.21
4.67
3
1

Classes

Class Line # Actions
Constants 30 14 3
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.util;
22   
23    import java.awt.Color;
24    import java.util.HashMap;
25    import java.util.Map;
26   
27    /**
28    * A class to hold constants relating to Url links used in Jalview
29    */
 
30    public class Constants
31    {
32   
33    // character used to represent secondary structures
34    public static final char HELIX = 'H';
35   
36    public static final char SHEET = 'E';
37   
38    public static final char COIL = 'C';
39   
40    // label in secondary structure annotation data model from 3d structures
41    public static final String SS_ANNOTATION_LABEL = "Secondary Structure";
42   
43    // label in secondary structure annotation data model from JPred
44    public static final String SS_ANNOTATION_FROM_JPRED_LABEL = "jnetpred";
45   
46    public static final Map<String, String> SECONDARY_STRUCTURE_LABELS = new HashMap<>();
 
47  50 toggle static
48    {
49  50 SECONDARY_STRUCTURE_LABELS.put(SS_ANNOTATION_LABEL, "3D Structures");
50  50 SECONDARY_STRUCTURE_LABELS.put(SS_ANNOTATION_FROM_JPRED_LABEL, "JPred");
51    // Add other secondary structure labels here if needed
52    }
53   
54    public static final String SS_PROVIDER_PROPERTY = "SS_PROVIDER";
55   
56    // generic secondary structure provider options
57    public static final String SS_ALL_PROVIDERS = "All";
58   
59    public static final String SS_NONE_PROVIDER = "None";
60   
61    // Secondary structure consensus label
62    public static final String SECONDARY_STRUCTURE_CONSENSUS_LABEL = "Secondary Structure Consensus";
63   
64    //A map that stores abbreviations of structure providers as keys and their full names as values.
65    public static final Map<String, String> STRUCTURE_PROVIDERS = new HashMap<>();
66   
 
67  50 toggle static {
68  50 STRUCTURE_PROVIDERS.put("None", "No Secondary Structure");
69  50 STRUCTURE_PROVIDERS.put("AF", "AlphaFold DB");
70  50 STRUCTURE_PROVIDERS.put("SM", "SWISS-MODEL");
71  50 STRUCTURE_PROVIDERS.put("PDB", "PDB");
72  50 STRUCTURE_PROVIDERS.put("JP", "JPred");
73  50 STRUCTURE_PROVIDERS.put("AFill", "AlphaFill");
74    }
75   
76    public static final Map<String, Color> STRUCTURE_PROVIDERS_COLOR = new HashMap<>();
77   
 
78  50 toggle static {
79  50 STRUCTURE_PROVIDERS_COLOR.put("No Secondary Structure", Color.GRAY);
80  50 STRUCTURE_PROVIDERS_COLOR.put("AlphaFold DB", new Color(255, 0, 0));
81  50 STRUCTURE_PROVIDERS_COLOR.put("SWISS-MODEL", new Color(255, 165, 0));
82  50 STRUCTURE_PROVIDERS_COLOR.put("PDB", new Color(0, 128, 0));
83  50 STRUCTURE_PROVIDERS_COLOR.put("JPred", new Color(0, 0, 255));
84  50 STRUCTURE_PROVIDERS_COLOR.put("AlphaFill", Color.CYAN);
85    }
86    }