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.
|
Go to the documentation of this file.
23 #ifndef SERVICES_FIELD_TRIALS_INCLUDE_CROP_H_
24 #define SERVICES_FIELD_TRIALS_INCLUDE_CROP_H_
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55 #ifdef ALLOCATE_CROP_TAGS
56 #define CROP_PREFIX DFW_FIELD_TRIAL_SERVICE_LOCAL
57 #define CROP_VAL(x) = x
58 #define CROP_CONCAT_VAL(x,y) = x y
60 #define CROP_PREFIX extern
62 #define CROP_CONCAT_VAL(x,y)
72 CROP_PREFIX
const char *CR_AGROVOC_PREFERRED_TERM_S
CROP_VAL (
"preferred_term");
74 CROP_PREFIX
const char *CR_SYNONYMS_S
CROP_VAL (
"synonyms");
Crop * GetCropFromJSON(const json_t *crop_json_p, const FieldTrialServiceData *data_p)
void FreeCrop(Crop *crop_p)
bson_oid_t * cr_id_p
Definition: crop.h:36
bool SaveCrop(Crop *crop_p, const FieldTrialServiceData *data_p)
const CROP_PREFIX char *CR_AGROVOC_PREFERRED_TERM_S CROP_VAL("preferred_term")
const CROP_PREFIX char *CR_NAME_S CROP_CONCAT_VAL(CONTEXT_PREFIX_SCHEMA_ORG_S, "name")
Crop * AllocateCrop(bson_oid_t *id_p, const char *name_s, const char *argovoc_preferred_term_s, const char *agrovoc_uri_s, char **synonyms_ss)
#define DFW_FIELD_TRIAL_SERVICE_LOCAL
Definition: dfw_field_trial_service_library.h:43
#define CONTEXT_PREFIX_SCHEMA_ORG_S
Definition: schema_keys.h:103
Crop * GetCropByIdString(const char *id_s, const FieldTrialServiceData *data_p)
json_t * GetCropAsJSON(Crop *crop_p, const ViewFormat format, const FieldTrialServiceData *data_p)
char * cr_name_s
Definition: crop.h:38
char * cr_agrovoc_uri_s
Definition: crop.h:42
Crop * GetCropById(const bson_oid_t *id_p, const FieldTrialServiceData *data_p)
char * cr_argovoc_preferred_term_s
Definition: crop.h:40
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
char ** cr_synonyms_ss
Definition: crop.h:48