Service.java
6.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
/*
* This file is a part of EpnTAPClient.
* This program aims to provide EPN-TAP support for software clients, like CASSIS spectrum analyzer.
* See draft specifications: https://voparis-confluence.obspm.fr/pages/viewpage.action?pageId=559861
* Copyright (C) 2016 Institut de Recherche en Astrophysique et Planétologie.
*
* This program is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details. You should have received a copy of
* the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
package eu.omp.irap.vespa.epntapclient.service;
/**
* @author N. Jourdane
*/
public class Service {
/**
* The ivoid of the service: <br/>
* <em>Unambiguous reference to the resource conforming to the IVOA
* standard for identifiers.</em>
*/
private String ivoid;
/**
* The title of the service: <br/>
* <em>The full name given to the resource.</em>
*/
private String title;
/**
* The short_name of the service: <br/>
* <em> A short name or abbreviation given to something. This name will be used where brief
* annotations for the re- source name are required. Applications may use it to refer to the
* resource in a compact display. One word or a few letters is recommended. No more than sixteen
* characters are allowed.</em>
*/
private String shortName;
/**
* The type of the service: <br/>
* <em>Resource type (something like vs:datacollection, vs:catalogservice, etc).</em>
*/
private String type;
/**
* The description of the service: <br/>
* <em>An account of the nature of the resource.</em>
*/
private String description;
/**
* The creator of the service: <br/>
* <em>The creator(s) of the resource in the order given by the resource record author, separated by
* semicolons.</em>
*/
private String creator;
/**
* The content_level of the service: <br/>
* <em> A hash-separated list of content levels specifying the intended audience.</em>
*/
private String contentLevel;
/**
* The reference_rul of the service: <br/>
* <em>URL pointing to a human-readable document describing this resource.</em>
*/
private String referenceURL;
/**
* The created date of the service, as a string: <br/>
* <em>The UTC date and time this resource metadata de- scription was created. This timestamp must
* not be in the future. This time is not required to be accurate; it should be at least
* accurate to the day. Any insignificant time elds should be set to zero.</em>
*/
private String created;
/**
* The updated date of the service, as a string: <br/>
* <em> The UTC date this resource metadata description was last updated. This timestamp must not be
* in the future. This time is not required to be accurate; it should be at least accurate to
* the day. Any insignificant time elds should be set to zero.</em>
*/
private String updated;
/**
* Constructor of Service
*
* @param ivoid The ivoID of the service.
*/
public Service(String ivoid) {
this.ivoid = ivoid;
}
/**
* @return true if all parameter of the service are not null.
*/
public boolean isValid() {
boolean isValid = ivoid != null && title != null && shortName != null;
isValid = isValid && type != null && description != null && creator != null;
isValid = isValid && contentLevel != null && referenceURL != null && created != null;
return isValid && updated != null;
}
/**
* Get the service {@link #title}.
*
* @return The service {@link #title}.
*/
public String getTitle() {
return title;
}
/**
* Set the service {@link #title}.
*
* @param title The service {@link #title}
*/
public void setTitle(String title) {
this.title = title;
}
/**
* Get the service {@link #shortName}.
*
* @return The service {@link #shortName}.
*/
public String getShortName() {
return shortName;
}
/**
* Set the service {@link #shortName}.
*
* @param shortName The service {@link #shortName}
*/
public void setShortName(String shortName) {
this.shortName = shortName;
}
/**
* Get the service {@link #type}.
*
* @return The service {@link #type}.
*/
public String getType() {
return type;
}
/**
* Set the service {@link #type}.
*
* @param type The service {@link #type}
*/
public void setType(String type) {
this.type = type;
}
/**
* Get the service {@link #description}.
*
* @return The service {@link #description}.
*/
public String getDescription() {
return description;
}
/**
* Set the service {@link #description}.
*
* @param description The service {@link #description}
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Get the service {@link #creator}.
*
* @return The service {@link #creator}.
*/
public String getCreator() {
return creator;
}
/**
* Set the service {@link #creator}.
*
* @param creator The service {@link #creator}
*/
public void setCreator(String creator) {
this.creator = creator;
}
/**
* Get the service {@link #contentLevel}.
*
* @return The service {@link #contentLevel}.
*/
public String getContentLevel() {
return contentLevel;
}
/**
* Set the service {@link #contentLevel}.
*
* @param contentLevel The service {@link #contentLevel}
*/
public void setContentLevel(String contentLevel) {
this.contentLevel = contentLevel;
}
/**
* Get the service {@link #referenceURL}.
*
* @return The service {@link #referenceURL}.
*/
public String getReferenceURL() {
return referenceURL;
}
/**
* Set the service {@link #referenceURL}.
*
* @param referenceURL The service {@link #referenceURL}
*/
public void setReferenceURL(String referenceURL) {
this.referenceURL = referenceURL;
}
/**
* Get the service {@link #created} date.
*
* @return The service {@link #created} date.
*/
public String getCreated() {
return created;
}
/**
* Set the service {@link #created}.
*
* @param created The service {@link #created}
*/
public void setCreated(String created) {
this.created = created;
}
/**
* Get the service {@link #updated} date.
*
* @return The service {@link #updated} date.
*/
public String getUpdated() {
return updated;
}
/**
* Set the service {@link #updated}.
*
* @param updated The service {@link #updated}
*/
public void setUpdated(String updated) {
this.updated = updated;
}
/**
* Get the service {@link #ivoid}.
*
* @return The service {@link #ivoid}.
*/
public String getIvoid() {
return ivoid;
}
}