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_STUDY_H_
24 #define SERVICES_FIELD_TRIALS_INCLUDE_STUDY_H_
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 #ifdef ALLOCATE_STUDY_TAGS
47 #define STUDY_PREFIX DFW_FIELD_TRIAL_SERVICE_LOCAL
48 #define STUDY_VAL(x) = x
49 #define STUDY_CONCAT_VAL(x,y) = x y
50 #define STUDY_KEY_VALUE_PAIR_VAL(x,y) = {x, y}
52 #define STUDY_PREFIX extern
54 #define STUDY_CONCAT_VAL(x,y)
55 #define STUDY_KEY_VALUE_PAIR_VAL(x,y)
62 STUDY_PREFIX
const char *ST_LOCATION_ID_S
STUDY_VAL (
"address_id");
64 STUDY_PREFIX
const char *ST_LOCATION_S
STUDY_VAL (
"address");
67 STUDY_PREFIX
const char *ST_CONTACT_S
STUDY_VAL (
"contact");
69 STUDY_PREFIX
const char *ST_CURATOR_S
STUDY_VAL (
"curator");
72 STUDY_PREFIX
const char *ST_CONTRIBUTORS_S
STUDY_VAL (
"contributors");
80 STUDY_PREFIX
const char *ST_PARENT_FIELD_TRIAL_S
STUDY_VAL (
"parent_field_trial");
82 STUDY_PREFIX
const char *ST_PLOTS_S
STUDY_VAL (
"plots");
84 STUDY_PREFIX
const char *ST_NUMBER_OF_PLOTS_S
STUDY_VAL (
"number_of_plots");
92 STUDY_PREFIX
const char *ST_HANDBOOK_DATA_LINK_S
STUDY_VAL (
"handbook");
95 STUDY_PREFIX
const char *ST_CURRENT_CROP_S
STUDY_VAL (
"current_crop");
97 STUDY_PREFIX
const char *ST_PREVIOUS_CROP_S
STUDY_VAL (
"previous_crop");
102 STUDY_PREFIX
const char *ST_DESIGN_S
STUDY_VAL (
"study_design");
104 STUDY_PREFIX
const char *ST_GROWING_CONDITIONS_S
STUDY_VAL (
"growing_conditions");
106 STUDY_PREFIX
const char *ST_PHENOTYPE_GATHERING_NOTES_S
STUDY_VAL (
"phenotype_gathering_notes");
109 STUDY_PREFIX
const char *ST_NUMBER_OF_PLOT_ROWS_S
STUDY_VAL (
"num_rows");
111 STUDY_PREFIX
const char *ST_NUMBER_OF_PLOT_COLUMN_S
STUDY_VAL (
"num_columns");
113 STUDY_PREFIX
const char *ST_NUMBER_OF_REPLICATES_S
STUDY_VAL (
"num_replicates");
116 STUDY_PREFIX
const char *ST_PLOT_LENGTH_S
STUDY_VAL (
"plot_length");
118 STUDY_PREFIX
const char *ST_PLOT_WIDTH_S
STUDY_VAL (
"plot_width");
121 STUDY_PREFIX
const char *ST_WEATHER_S
STUDY_VAL (
"weather");
123 STUDY_PREFIX
const char *ST_SHAPE_S
STUDY_VAL (
"shape_data");
125 STUDY_PREFIX
const char *ST_HAS_SHAPE_S
STUDY_VAL (
"has_shape_data");
127 STUDY_PREFIX
const char *ST_SHAPE_NOTES_S
STUDY_VAL (
"shape_data_notes");
130 STUDY_PREFIX
const char *ST_PLOT_H_GAP_S
STUDY_VAL (
"plot_horizontal_gap");
132 STUDY_PREFIX
const char *ST_PLOT_V_GAP_S
STUDY_VAL (
"plot_vertical_gap");
134 STUDY_PREFIX
const char *ST_PLOT_BLOCK_H_GAP_S
STUDY_VAL (
"plot_block_horizontal_gap");
136 STUDY_PREFIX
const char *ST_PLOT_BLOCK_V_GAP_S
STUDY_VAL (
"plot_block_vertical_gap");
138 STUDY_PREFIX
const char *ST_PLOT_ROWS_PER_BLOCK_S
STUDY_VAL (
"plot_block_rows");
140 STUDY_PREFIX
const char *ST_PLOT_COLS_PER_BLOCK_S
STUDY_VAL (
"plot_block_columns");
143 STUDY_PREFIX
const char *ST_TREATMENTS_S
STUDY_VAL (
"treatment_factors");
146 STUDY_PREFIX
const char *ST_PHENOTYPES_S
STUDY_VAL (
"phenotypes");
148 STUDY_PREFIX
const char *ST_ACCESSIONS_S
STUDY_VAL (
"accessions");
151 STUDY_PREFIX
const char *ST_PHENOTYPE_STATISTICS_S
STUDY_VAL (
"statistics");
153 STUDY_PREFIX
const char *ST_PHENOTYPE_DEFINITION_S
STUDY_VAL (
"definition");
156 STUDY_PREFIX
const char *ST_HARVEST_YEAR_S
STUDY_VAL (
"harvest_year");
158 STUDY_PREFIX
const char *ST_SOWING_YEAR_S
STUDY_VAL (
"sowing_year");
161 STUDY_PREFIX
const char *ST_PLAN_CHANGES_S
STUDY_VAL (
"plan_changes");
163 STUDY_PREFIX
const char *ST_PHYSICAL_SAMPLES_COLLECTED_S
STUDY_VAL (
"physical_samples_collected");
165 STUDY_PREFIX
const char *ST_DATA_NOT_INCLUDED_S
STUDY_VAL (
"data_not_included");
169 STUDY_PREFIX
const char *ST_IMAGE_COLLECTION_NOTE_S
STUDY_VAL (
"image_collection_notes");
171 STUDY_PREFIX int32 ST_UNSET_PH
STUDY_VAL (-1);
177 #define ST_UNKNOWN_DIRECTION_S "Unknown"
320 MEM_FLAG parent_field_trial_mem,
Crop *current_crop_p,
Crop *previous_crop_p,
const char *description_s,
321 const char *design_s,
const char *growing_conditions_s,
const char *phenotype_gathering_notes_s,
322 const uint32 *num_rows_p,
const uint32 *num_cols_p,
const uint32 *num_replicates_p,
const double64 *plot_width_p,
const double64 *plot_length_p,
323 const char *weather_s,
const json_t *shape_p,
const double64 *plot_horizontal_gap_p,
const double64 *plot_vertical_gap_p,
324 const uint32 *plot_rows_per_block_p,
const uint32 *plot_columns_per_block_p,
const double64 *plot_block_horizontal_gap_p,
325 const double64 *plot_block_vertical_gap_p,
327 const uint32 *sowing_year_p,
const uint32 *harvest_year_p,
328 const char *plan_changes_s,
const char *physical_samples_collected_s,
const char *data_not_included_s,
329 const char *photo_url_s,
const char *image_collection_notes_s,
330 const char *gps_notes_s,
uint32 * st_num_columns_p
Definition: study.h:242
uint32 * st_plots_rows_per_block_p
Definition: study.h:263
uint32 * st_plots_columns_per_block_p
Definition: study.h:265
Definition: statistics.h:21
char * st_phenotype_gathering_notes_s
Definition: study.h:234
MEM_FLAG
An enum specifying the particular status of a piece of dynamically allocated memory for a particular ...
Definition: memory_allocations.h:38
LinkedList * st_contributors_p
A LinkedList of PersonNodes of people who have contributed to this Study.
Definition: study.h:291
char * st_photo_url_s
Definition: study.h:281
A datatype to represent a running task.
Definition: service_job.h:72
uint32 * st_predicted_sowing_year_p
Definition: study.h:277
LinkedList * st_treatments_p
Definition: study.h:271
double64 * st_default_plot_length_p
Definition: study.h:238
Person * st_curator_p
Definition: study.h:273
OperationStatus SaveStudy(Study *study_p, ServiceJob *job_p, FieldTrialServiceData *data_p, const char *url_key_s)
Definition: json_processor.h:21
OperationStatus IndexStudy(Study *study_p, ServiceJob *job_p, const char *job_name_s, FieldTrialServiceData *data_p)
void FreeStudy(Study *study_p)
char * st_description_s
Definition: study.h:213
char * st_design_s
Definition: study.h:215
const STUDY_PREFIX char *ST_LOCATION_ID_S STUDY_VAL("address_id")
char * st_slope_s
Definition: study.h:200
json_t * st_shape_p
The GeoJSON data for the shape of the plots.
Definition: study.h:251
char * st_data_not_included_s
Data collected but not currently stored within Grassroots.
Definition: study.h:230
double64 * st_default_plot_width_p
Definition: study.h:236
Study * stn_study_p
Definition: study.h:301
Study * GetStudyByIdString(const char *study_id_s, const ViewFormat format, const FieldTrialServiceData *data_p)
Crop * st_previous_crop_p
Definition: study.h:211
bool AddStudyContributor(Study *study_p, Person *person_p, MEM_FLAG mf)
double64 * st_plot_horizontal_gap_p
Definition: study.h:258
char * st_timestamp_s
Definition: study.h:186
#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
double64 * st_plot_block_horizontal_gap_p
Definition: study.h:267
A datatype that represents a Field Trial that can contain one or more Studies.
Definition: field_trial.h:50
ListItem stn_node
Definition: study.h:299
uint32 * st_num_rows_p
Definition: study.h:240
char * st_growing_conditions_s
Definition: study.h:232
#define CONTEXT_PREFIX_ENVIRONMENT_ONTOLOGY_S
Definition: schema_keys.h:118
json_t * GetStudyAsJSON(Study *study_p, const ViewFormat format, JSONProcessor *processor_p, FieldTrialServiceData *data_p)
char * st_aspect_s
Definition: study.h:198
char * st_image_collection_notes_s
Definition: study.h:283
Person * st_contact_p
Definition: study.h:275
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
Study * GetStudyFromJSON(const json_t *json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
char * st_data_url_s
Definition: study.h:196
OperationStatus
The current status of an Operation.
Definition: operation.h:96
#define CONTEXT_PREFIX_NCI_THESAUSUS_ONTOLOGY_S
Definition: schema_keys.h:124
void FreeStudyNode(ListItem *node_p)
Study * GetStudyById(bson_oid_t *st_id_p, const ViewFormat format, const FieldTrialServiceData *data_p)
Study * GetStudyWithParentTrialFromJSON(const json_t *json_p, FieldTrial *parent_trial_p, const ViewFormat format, const FieldTrialServiceData *data_p)
bson_oid_t * st_id_p
Definition: study.h:184
StudyNode * AllocateStudyNode(Study *study_p)
uint32 * st_predicted_harvest_year_p
Definition: study.h:279
bool AddPlotToStudy(Study *study_p, struct Plot *plot_p)
bool AddPhenotypesToJSON(const Study *study_p, json_t *study_json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
uint32 * st_num_replicates_p
Definition: study.h:244
struct Location * st_location_p
Definition: study.h:192
char * st_weather_link_s
Definition: study.h:246
LinkedList * st_plots_p
A LinkedList of PlotNodes for all of the Plots in this Study.
Definition: study.h:207
char * st_name_s
Definition: study.h:194
char * st_physical_samples_collected_s
Details about plant, soil or other samples collected.
Definition: study.h:225
LinkedList * st_phenotypes_p
Definition: study.h:285
char * st_shape_notes_s
Any notes about the GeoJSON data.
Definition: study.h:256
MEM_FLAG st_parent_field_trial_mem
Definition: study.h:190
The configuration data used by the DFW Field Trial Service.
Definition: dfw_field_trial_service_data.h:118
double64 * st_plot_vertical_gap_p
Definition: study.h:260
int64 GetNumberOfPlotsInStudy(const Study *study_p, const FieldTrialServiceData *data_p)
FieldTrial * st_parent_p
Definition: study.h:188
Study * AllocateStudy(bson_oid_t *id_p, const char *name_s, const char *data_url_s, const char *aspect_s, const char *slope_s, struct Location *location_p, FieldTrial *parent_field_trial_p, MEM_FLAG parent_field_trial_mem, Crop *current_crop_p, Crop *previous_crop_p, const char *description_s, const char *design_s, const char *growing_conditions_s, const char *phenotype_gathering_notes_s, const uint32 *num_rows_p, const uint32 *num_cols_p, const uint32 *num_replicates_p, const double64 *plot_width_p, const double64 *plot_length_p, const char *weather_s, const json_t *shape_p, const double64 *plot_horizontal_gap_p, const double64 *plot_vertical_gap_p, const uint32 *plot_rows_per_block_p, const uint32 *plot_columns_per_block_p, const double64 *plot_block_horizontal_gap_p, const double64 *plot_block_vertical_gap_p, Person *curator_p, Person *contact_p, const uint32 *sowing_year_p, const uint32 *harvest_year_p, const char *plan_changes_s, const char *physical_samples_collected_s, const char *data_not_included_s, const char *photo_url_s, const char *image_collection_notes_s, const char *gps_notes_s, const FieldTrialServiceData *data_p)
bool HasStudyGotPlotLayoutDetails(const Study *study_p)
char * st_plan_changes_s
Changes to the Study field experiment plan.
Definition: study.h:220
const STUDY_PREFIX char *ST_NAME_S STUDY_CONCAT_VAL(CONTEXT_PREFIX_SCHEMA_ORG_S, "name")
Definition: location.h:45
bool IsMeasuredVariableOnStudy(const Study *const study_p, const char *mv_s)
Crop * st_current_crop_p
Definition: study.h:209
double64 * st_plot_block_vertical_gap_p
Definition: study.h:269
bool GetStudyPlots(Study *study_p, const ViewFormat format, FieldTrialServiceData *data_p)
bool AddPhenotypeStatisticsToStudy(Study *const study_p, const char *mv_s, const Statistics *stats_p)
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43