Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
pathogenomics_service.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
21 #ifndef PATHOGENOMICS_SERVICE_H
22 #define PATHOGENOMICS_SERVICE_H
23 
24 
26 #include "service.h"
27 
33 #define PATHOGENOMICS_DB_S ("pathogenomics")
34 
35 
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 
38 #ifdef ALLOCATE_PATHOGENOMICS_TAGS
39  #define PATHOGENOMICS_PREFIX PATHOGENOMICS_SERVICE_LOCAL
40  #define PATHOGENOMICS_VAL(x) = x
41 #else
42  #define PATHOGENOMICS_PREFIX extern
43  #define PATHOGENOMICS_VAL(x)
44 #endif
45 
46 #endif /* #ifndef DOXYGEN_SHOULD_SKIP_THIS */
47 
48 
55 PATHOGENOMICS_PREFIX const char *PG_SAMPLE_S PATHOGENOMICS_VAL ("sample");
56 
62 PATHOGENOMICS_PREFIX const char *PG_ID_S PATHOGENOMICS_VAL ("ID");
63 
69 PATHOGENOMICS_PREFIX const char *PG_UKCPVS_ID_S PATHOGENOMICS_VAL ("UKCPVS ID");
70 
77 PATHOGENOMICS_PREFIX const char *PG_GPS_S PATHOGENOMICS_VAL ("GPS");
78 
79 
86 PATHOGENOMICS_PREFIX const char *PG_POSTCODE_S PATHOGENOMICS_VAL ("Postal code");
87 
88 
95 PATHOGENOMICS_PREFIX const char *PG_TOWN_S PATHOGENOMICS_VAL ("Town");
96 
97 
104 PATHOGENOMICS_PREFIX const char *PG_COUNTY_S PATHOGENOMICS_VAL ("County");
105 
106 
113 PATHOGENOMICS_PREFIX const char *PG_COUNTRY_S PATHOGENOMICS_VAL ("Country");
114 
115 
121 PATHOGENOMICS_PREFIX const char *PG_DATE_S PATHOGENOMICS_VAL ("Date collected");
122 
123 
129 PATHOGENOMICS_PREFIX const char *PG_RAW_DATE_S PATHOGENOMICS_VAL ("Date collected (compact)");
130 
131 
137 PATHOGENOMICS_PREFIX const char *PG_RUST_S PATHOGENOMICS_VAL ("Rust (YR/SR/LR)");
138 
139 
146 PATHOGENOMICS_PREFIX const char *PG_GENOTYPE_S PATHOGENOMICS_VAL ("genotype");
147 
148 
155 PATHOGENOMICS_PREFIX const char *PG_PHENOTYPE_S PATHOGENOMICS_VAL ("phenotype");
156 
157 
163 PATHOGENOMICS_PREFIX const char *PG_FILES_S PATHOGENOMICS_VAL ("files");
164 
165 
172 PATHOGENOMICS_PREFIX const char *PG_DISEASE_S PATHOGENOMICS_VAL ("Disease");
173 
174 
180 PATHOGENOMICS_PREFIX const char *PG_VARIETY_S PATHOGENOMICS_VAL ("Variety");
181 
182 
188 PATHOGENOMICS_PREFIX const char *PG_COLLECTOR_S PATHOGENOMICS_VAL ("Name/Collector");
189 
190 
196 PATHOGENOMICS_PREFIX const char *PG_COMPANY_S PATHOGENOMICS_VAL ("Company");
197 
198 
204 PATHOGENOMICS_PREFIX const char *PG_ADDRESS_S PATHOGENOMICS_VAL ("Address");
205 
206 
207 
215 PATHOGENOMICS_PREFIX const char *PG_PRIVATE_VIEW_S PATHOGENOMICS_VAL ("ignore_live_dates");
216 
217 
229 #define PG_LIVE_DATE_SUFFIX_S "_live_date"
230 
231 
232 #ifdef __cplusplus
233 extern "C"
234 {
235 #endif
236 
237 
248 PATHOGENOMICS_SERVICE_API ServicesArray *GetServices (UserDetails *user_p, GrassrootsServer *grassroots_p);
249 
250 
259 
260 
261 PATHOGENOMICS_SERVICE_LOCAL bool AddErrorMessage (ServiceJob *job_p, const json_t *value_p, const char *error_s, const int index);
262 
263 
264 #ifdef __cplusplus
265 }
266 #endif
267 
268 
269 
270 #endif /* #ifndef PATHOGENOMICS_SERVICE_H */
PG_ADDRESS_S
const char * PG_ADDRESS_S
The key used to give the address of the person who collected the sample.
Definition: pathogenomics_service.h:204
PG_COUNTY_S
const char * PG_COUNTY_S
The key for specifying an object containing the county where the sample was collected.
Definition: pathogenomics_service.h:104
PG_RUST_S
const char * PG_RUST_S
The key used to define the pathogen that the sample was afflicted with.
Definition: pathogenomics_service.h:137
PG_COUNTRY_S
const char * PG_COUNTRY_S
The key for specifying an object containing the country where the sample was collected.
Definition: pathogenomics_service.h:113
PG_COMPANY_S
const char * PG_COMPANY_S
The key used to give the name of the company who collected the sample.
Definition: pathogenomics_service.h:196
service.h
PG_SAMPLE_S
const char * PG_SAMPLE_S
The key for specifying the object containing the sample metadata such as date collected,...
Definition: pathogenomics_service.h:55
ServiceJob
A datatype to represent a running task.
Definition: service_job.h:72
PG_DISEASE_S
const char * PG_DISEASE_S
The key used to get the object containing the disease characteristics for this sample.
Definition: pathogenomics_service.h:172
PG_GPS_S
const char * PG_GPS_S
The key for specifying an object containing the GPS coordinates where the sample was collected.
Definition: pathogenomics_service.h:77
PG_DATE_S
const char * PG_DATE_S
The key used to define the data that sample was collected in the form yyyy-mm-dd.
Definition: pathogenomics_service.h:121
PG_FILES_S
const char * PG_FILES_S
The key for specifying any associated files for the given sample.
Definition: pathogenomics_service.h:163
PG_PRIVATE_VIEW_S
const char * PG_PRIVATE_VIEW_S
The flag used to determine whether to ignore the publication date for a given sample.
Definition: pathogenomics_service.h:215
PG_UKCPVS_ID_S
const char * PG_UKCPVS_ID_S
The key for specifying the UK CPVS id of the sample.
Definition: pathogenomics_service.h:69
PG_TOWN_S
const char * PG_TOWN_S
The key for specifying an object containing the town where the sample was collected.
Definition: pathogenomics_service.h:95
ServicesArray
A datatype for having a set of Services.
Definition: service.h:422
PATHOGENOMICS_SERVICE_LOCAL
#define PATHOGENOMICS_SERVICE_LOCAL
Definition: pathogenomics_service_library.h:42
PG_POSTCODE_S
const char * PG_POSTCODE_S
The key for specifying an object containing the postal code where the sample was collected.
Definition: pathogenomics_service.h:86
GetServices
ServicesArray * GetServices(UserDetails *user_p, GrassrootsServer *grassroots_p)
Get the Service available for running the Pathogenomics Service.
GrassrootsServer
Definition: grassroots_server.h:45
PG_ID_S
const char * PG_ID_S
The key for specifying the internal id of the sample.
Definition: pathogenomics_service.h:62
PG_PHENOTYPE_S
const char * PG_PHENOTYPE_S
The key used to hold the object that contains all of the phenotyping data for a given record.
Definition: pathogenomics_service.h:155
PG_GENOTYPE_S
const char * PG_GENOTYPE_S
The key used to hold the object that contains all of the genotyping data for a given record.
Definition: pathogenomics_service.h:146
ReleaseServices
void ReleaseServices(ServicesArray *services_p)
Free the ServicesArray and its associated Pathogenomics Service.
PATHOGENOMICS_SERVICE_API
#define PATHOGENOMICS_SERVICE_API
Definition: pathogenomics_service_library.h:41
AddErrorMessage
PARENTAL_GENOTYPE_SERVICE_LOCAL bool AddErrorMessage(ServiceJob *job_p, const json_t *value_p, const char *error_s, const int index)
PG_VARIETY_S
const char * PG_VARIETY_S
The key used to give the variety of the plant for this sample.
Definition: pathogenomics_service.h:180
PG_RAW_DATE_S
const char * PG_RAW_DATE_S
The key used to define the data that sample was collected in the form yyyymmdd.
Definition: pathogenomics_service.h:129
pathogenomics_service_library.h
PG_COLLECTOR_S
const char * PG_COLLECTOR_S
The key used to give the name of the person who collected the sample.
Definition: pathogenomics_service.h:188