Clover icon

Coverage Report

  1. Project Clover database Thu Dec 4 2025 16:11:35 GMT
  2. Package jalview.ws.api

File UIinfo.java

 

Coverage histogram

../../../img/srcFileCovDistChart7.png
30% of files have more coverage

Code metrics

10
24
17
1
164
103
23
0.96
1.41
17
1.35

Classes

Class Line # Actions
UIinfo 9 24 23
0.686274568.6%
 

Contributing tests

This file is covered by 352 tests. .

Source view

1    package jalview.ws.api;
2   
3    import jalview.ws.params.ParamDatastoreI;
4   
5    /**
6    * Service UI Info { Action, Specific Name of Service, Brief Description }
7    */
8   
 
9    public class UIinfo
10    {
11    private String ServiceType;
12   
 
13  8714 toggle public UIinfo(String serviceType, String action, String name,
14    String description, String hosturl)
15    {
16  8714 this.setServiceType(serviceType == null ? "" : serviceType);
17  8714 this.Action = action == null ? "" : action;
18  8714 this.description = description == null ? "" : description;
19  8714 this.Name = name == null ? "" : name;
20  8714 this.hostURL = hosturl;
21    }
22   
23    /**
24    * The type of analysis the service performs
25    */
 
26  3182 toggle public String getServiceType()
27    {
28  3182 return ServiceType;
29    }
30   
 
31  8714 toggle public void setServiceType(String serviceType)
32    {
33  8714 ServiceType = serviceType;
34    }
35   
36    /**
37    * The action when the service performs the analysis
38    */
 
39  82334 toggle public String getAction()
40    {
41  82334 return Action;
42    }
43   
 
44  0 toggle public void setAction(String action)
45    {
46  0 Action = action;
47    }
48   
49    /**
50    * name shown to user
51    *
52    * @return
53    */
 
54  117549 toggle public String getName()
55    {
56  117549 return Name;
57    }
58   
 
59  0 toggle public void setName(String name)
60    {
61  0 Name = name;
62    }
63   
64    /**
65    * Detailed description (may include references, URLs, html,etc)
66    *
67    * @return
68    */
 
69  2190 toggle public String getDescription()
70    {
71  2190 return description;
72    }
73   
 
74  0 toggle public void setDescription(String description)
75    {
76  0 this.description = description;
77    }
78   
 
79  1058 toggle @Override
80    public boolean equals(Object object)
81    {
82  1058 if (object == null || !(object instanceof UIinfo))
83    {
84  0 return false;
85    }
86  1058 UIinfo other = (UIinfo) object;
87   
88  1058 return (ServiceType == null && other.getServiceType() == null
89    || ServiceType != null && other.getServiceType() != null
90    && ServiceType.equals(other.getServiceType()))
91    && (hostURL == null && other.getHostURL() == null
92    || hostURL != null && other.getHostURL() != null
93    && hostURL.equals(other.getHostURL()))
94    && (Name == null && other.getName() == null
95    || Name != null && other.getName() != null
96    && Name.equals(other.getName()))
97    && (Action == null && other.getAction() == null
98    || Action != null && other.getAction() != null
99    && Action.equals(other.getAction()))
100    && (description == null && other.getDescription() == null
101    || description != null && other.getDescription() != null
102    && description.equals(other.getDescription()));
103    }
104   
105    /**
106    * @return short description of what the service will do
107    */
 
108  31158 toggle public String getActionText()
109    {
110  31158 return getAction() + " with " + getName();
111    }
112   
113    String Action;
114   
115    String Name;
116   
117    String description;
118   
119    String hostURL;
120   
 
121  31772 toggle public String getHostURL()
122    {
123  31772 return hostURL;
124    }
125   
 
126  0 toggle public ParamDatastoreI getParamStore()
127    {
128    // TODO Auto-generated method stub
129  0 return null;
130    }
131   
132    /**
133    *
134    * @return true if the service has parameters (ie is instance of
135    * jalview.ws.api.ServiceWithParameters)
136    */
 
137  0 toggle public boolean hasParameters()
138    {
139    // TODO Auto-generated method stub
140  0 return false;
141    }
142   
143    private String docUrl = null;
144   
145    /**
146    * set the URL that will be offered to show documentation for the service
147    *
148    * @param url
149    */
 
150  570 toggle public void setDocumentationUrl(String url)
151    {
152  570 docUrl = url;
153    }
154   
 
155  1563 toggle public boolean hasDocumentationUrl()
156    {
157  1563 return docUrl != null && docUrl.length() > 7;
158    }
159   
 
160  3126 toggle public String getDocumentationUrl()
161    {
162  3126 return docUrl;
163    }
164    }