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.
crop_ontology_tool.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2018 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 /*
17  * crop_ontology_tool.h
18  *
19  * Created on: 27 Oct 2018
20  * Author: billy
21  */
22 
23 #ifndef SERVICES_FIELD_TRIALS_INCLUDE_CROP_ONTOLOGY_TOOL_H_
24 #define SERVICES_FIELD_TRIALS_INCLUDE_CROP_ONTOLOGY_TOOL_H_
25 
26 
27 
28 #include "schema_term.h"
30 #include "mongodb_tool.h"
31 #include "parameter.h"
32 
33 #include "operation.h"
35 #include "curl_tools.h"
36 
37 
38 typedef enum
39 {
45 } TermType;
46 
47 
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
54 
55 DFW_FIELD_TRIAL_SERVICE_API SchemaTerm *GetCropOnotologySchemaTerm (const char *crop_ontology_term_s, TermType expected_type, TermType *found_type_p, MongoTool *mongo_p);
56 
57 
59 
60 
61 DFW_FIELD_TRIAL_SERVICE_API json_t *GetScaleClassAsEmbeddedJSON (const ScaleClass *class_p, const char *key_s);
62 
63 
64 DFW_FIELD_TRIAL_SERVICE_API const ScaleClass *GetScaleClassFromJSON (const json_t *class_json_p);
65 
66 
68 
69 
70 
71 DFW_FIELD_TRIAL_SERVICE_LOCAL const ScaleClass *GetScaleClassByName (const char * const name_s);
72 
73 
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 
80 
81 #endif /* SERVICES_FIELD_TRIALS_INCLUDE_CROP_ONTOLOGY_TOOL_H_ */
GetScaleClassByName
const ScaleClass * GetScaleClassByName(const char *const name_s)
TermType
TermType
Definition: crop_ontology_tool.h:38
operation.h
parameter.h
GetCropOnotologySchemaTerm
SchemaTerm * GetCropOnotologySchemaTerm(const char *crop_ontology_term_s, TermType expected_type, TermType *found_type_p, MongoTool *mongo_p)
TT_METHOD
Definition: crop_ontology_tool.h:41
dfw_field_trial_service_library.h
TT_UNIT
Definition: crop_ontology_tool.h:42
MongoTool
A MongoTool is a datatype that allows access to the data stored within a MongoDB instance.
Definition: mongodb_tool.h:159
GetScaleClassAsEmbeddedJSON
json_t * GetScaleClassAsEmbeddedJSON(const ScaleClass *class_p, const char *key_s)
DFW_FIELD_TRIAL_SERVICE_LOCAL
#define DFW_FIELD_TRIAL_SERVICE_LOCAL
Definition: dfw_field_trial_service_library.h:43
TT_NUM_TYPES
Definition: crop_ontology_tool.h:44
StoreAllScaleUnits
OperationStatus StoreAllScaleUnits(FieldTrialServiceData *data_p)
GetScaleClassAsJSON
json_t * GetScaleClassAsJSON(const ScaleClass *class_p)
DFW_FIELD_TRIAL_SERVICE_API
#define DFW_FIELD_TRIAL_SERVICE_API
Definition: dfw_field_trial_service_library.h:42
TT_VARIABLE
Definition: crop_ontology_tool.h:43
OperationStatus
OperationStatus
The current status of an Operation.
Definition: operation.h:96
schema_term.h
TT_TRAIT
Definition: crop_ontology_tool.h:40
dfw_field_trial_service_data.h
GetScaleClassFromJSON
const ScaleClass * GetScaleClassFromJSON(const json_t *class_json_p)
curl_tools.h
ScaleClass
Definition: dfw_field_trial_service_data.h:105
FieldTrialServiceData
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
SchemaTerm
A datatype for specifying ontological terms as a way to describe the data that each of the Services c...
Definition: schema_term.h:38
mongodb_tool.h