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.
material.h File Reference
#include "dfw_field_trial_service_data.h"
#include "dfw_field_trial_service_library.h"
#include "jansson.h"
#include "typedefs.h"
#include "study.h"
#include "gene_bank.h"
Include dependency graph for material.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MaterialStudyDetails
 
struct  MaterialStudyDetailsNode
 
struct  Material
 

Functions

const MATERIAL_PREFIX char *MA_ID_S MATERIAL_VAL ("id")
 
const MATERIAL_PREFIX char *MA_ACCESSION_S MATERIAL_VAL ("accession")
 
const MATERIAL_PREFIX char *MA_BARCODE_S MATERIAL_VAL ("barcode")
 
const MATERIAL_PREFIX char *MA_PEDIGREE_S MATERIAL_VAL ("pedigree")
 
const MATERIAL_PREFIX char *MA_GENE_BANK_ID_S MATERIAL_VAL ("gene_bank_id")
 
const MATERIAL_PREFIX char *MA_GENE_BANK_S MATERIAL_VAL ("gene_bank")
 
const MATERIAL_PREFIX char *MA_EXPERIMENTAL_AREA_ID_S MATERIAL_VAL ("area_id")
 
const MATERIAL_PREFIX char *MA_GERMPLASM_ID_S MATERIAL_VAL ("germplasm_id")
 
const MATERIAL_PREFIX char *MA_SPECIES_S MATERIAL_VAL ("http://purl.obolibrary.org/obo/NCIT_C45293")
 
const MATERIAL_PREFIX char *MA_TYPE_S MATERIAL_VAL ("type")
 
const MATERIAL_PREFIX char *MA_SELECTION_REASON_S MATERIAL_VAL ("selection_reason")
 
const MATERIAL_PREFIX char *MA_GENERATION_S MATERIAL_VAL ("generation")
 
const MATERIAL_PREFIX char *MA_SEED_SUPPLIER_S MATERIAL_VAL ("seed_supplier")
 
const MATERIAL_PREFIX char *MA_SEED_SOURCE_S MATERIAL_VAL ("seed_source")
 
const MATERIAL_PREFIX char *MA_GERMPLASM_ORIGIN_S MATERIAL_VAL ("germplasm_origin")
 
const MATERIAL_PREFIX char *MA_IN_GRU_S MATERIAL_VAL ("in_gru")
 
const MATERIAL_PREFIX char *MA_TGW_S MATERIAL_VAL ("tgw")
 
const MATERIAL_PREFIX char *MA_SEED_TREATMENT_S MATERIAL_VAL ("seed_treatment")
 
const MATERIAL_PREFIX char *MA_PRIMARY_NAME_S MATERIAL_VAL ("primary_name")
 
const MATERIAL_PREFIX char *MA_SECONDARY_NAME_S MATERIAL_VAL ("secondary_name")
 
const MATERIAL_PREFIX char *MA_TERTIARY_NAME_S MATERIAL_VAL ("tertiary_name")
 
const MATERIAL_PREFIX char *MA_STODE_CODE_S MATERIAL_VAL ("store_code")
 
const MATERIAL_PREFIX char *MA_CLEANED_NAME_S MATERIAL_VAL ("cleaned")
 
MaterialAllocateMaterial (bson_oid_t *id_p, const char *accession_s, const char *species_s, const char *type_s, const char *selection_reason_s, const char *generation_s, const char *supplier_s, const char *source_s, const char *germplasm_origin_s, const char *treatment_s, bool gru_flag, bool cleaned_flag, uint32 tgw, const Study *area_p, const bson_oid_t *gene_bank_id_p, const FieldTrialServiceData *data_p)
 
MaterialAllocateMaterialByGermplasmID (bson_oid_t *id_p, const char *germplasm_id_s, const Study *area_p, const FieldTrialServiceData *data_p)
 
MaterialAllocateMaterialByAccession (bson_oid_t *id_p, const char *accession_s, bson_oid_t *gene_bank_id_p, const FieldTrialServiceData *data_p)
 
bool SetMaterialAccession (Material *material_p, const char *const accession_s)
 
void FreeMaterial (Material *material_p)
 
json_t * GetMaterialAsJSON (const Material *material_p, const ViewFormat format, const FieldTrialServiceData *data_p)
 
MaterialGetMaterialFromJSON (const json_t *json_p, const ViewFormat format, const FieldTrialServiceData *data_p)
 
bool SaveMaterial (Material *material_p, const FieldTrialServiceData *data_p)
 
MaterialLoadMaterial (const int32 material_id, FieldTrialServiceData *data_p)
 
MaterialGetOrCreateMaterialByInternalName (const char *material_s, Study *area_p, const FieldTrialServiceData *data_p)
 
MaterialGetOrCreateMaterialByAccession (const char *accession_s, GeneBank *gene_bank_p, const FieldTrialServiceData *data_p)
 
MaterialGetMaterialByGermplasmID (const char *material_s, Study *area_p, const FieldTrialServiceData *data_p)
 
MaterialGetMaterialById (const bson_oid_t *material_id_p, const FieldTrialServiceData *data_p)
 
MaterialGetMaterialByAccession (const char *accession_s, GeneBank *gene_bank_p, const bool case_sensitive_flag, const FieldTrialServiceData *data_p)
 
bool IsMaterialComplete (const Material *const material_p)
 

Function Documentation

◆ MATERIAL_VAL() [1/23]

const MATERIAL_PREFIX char* MA_ID_S MATERIAL_VAL ( "id"  )

◆ MATERIAL_VAL() [2/23]

const MATERIAL_PREFIX char* MA_ACCESSION_S MATERIAL_VAL ( "accession"  )

◆ MATERIAL_VAL() [3/23]

const MATERIAL_PREFIX char* MA_BARCODE_S MATERIAL_VAL ( "barcode"  )

◆ MATERIAL_VAL() [4/23]

const MATERIAL_PREFIX char* MA_PEDIGREE_S MATERIAL_VAL ( "pedigree"  )

◆ MATERIAL_VAL() [5/23]

const MATERIAL_PREFIX char* MA_GENE_BANK_ID_S MATERIAL_VAL ( "gene_bank_id"  )

◆ MATERIAL_VAL() [6/23]

const MATERIAL_PREFIX char* MA_GENE_BANK_S MATERIAL_VAL ( "gene_bank"  )

◆ MATERIAL_VAL() [7/23]

const MATERIAL_PREFIX char* MA_EXPERIMENTAL_AREA_ID_S MATERIAL_VAL ( "area_id"  )

◆ MATERIAL_VAL() [8/23]

const MATERIAL_PREFIX char* MA_GERMPLASM_ID_S MATERIAL_VAL ( "germplasm_id"  )

◆ MATERIAL_VAL() [9/23]

const MATERIAL_PREFIX char* MA_SPECIES_S MATERIAL_VAL ( "http://purl.obolibrary.org/obo/NCIT_C45293"  )

◆ MATERIAL_VAL() [10/23]

const MATERIAL_PREFIX char* MA_TYPE_S MATERIAL_VAL ( "type"  )

◆ MATERIAL_VAL() [11/23]

const MATERIAL_PREFIX char* MA_SELECTION_REASON_S MATERIAL_VAL ( "selection_reason"  )

◆ MATERIAL_VAL() [12/23]

const MATERIAL_PREFIX char* MA_GENERATION_S MATERIAL_VAL ( "generation"  )

◆ MATERIAL_VAL() [13/23]

const MATERIAL_PREFIX char* MA_SEED_SUPPLIER_S MATERIAL_VAL ( "seed_supplier"  )

◆ MATERIAL_VAL() [14/23]

const MATERIAL_PREFIX char* MA_SEED_SOURCE_S MATERIAL_VAL ( "seed_source"  )

◆ MATERIAL_VAL() [15/23]

const MATERIAL_PREFIX char* MA_GERMPLASM_ORIGIN_S MATERIAL_VAL ( "germplasm_origin"  )

◆ MATERIAL_VAL() [16/23]

const MATERIAL_PREFIX char* MA_IN_GRU_S MATERIAL_VAL ( "in_gru"  )

◆ MATERIAL_VAL() [17/23]

const MATERIAL_PREFIX char* MA_TGW_S MATERIAL_VAL ( "tgw"  )

◆ MATERIAL_VAL() [18/23]

const MATERIAL_PREFIX char* MA_SEED_TREATMENT_S MATERIAL_VAL ( "seed_treatment"  )

◆ MATERIAL_VAL() [19/23]

const MATERIAL_PREFIX char* MA_PRIMARY_NAME_S MATERIAL_VAL ( "primary_name"  )

◆ MATERIAL_VAL() [20/23]

const MATERIAL_PREFIX char* MA_SECONDARY_NAME_S MATERIAL_VAL ( "secondary_name"  )

◆ MATERIAL_VAL() [21/23]

const MATERIAL_PREFIX char* MA_TERTIARY_NAME_S MATERIAL_VAL ( "tertiary_name"  )

◆ MATERIAL_VAL() [22/23]

const MATERIAL_PREFIX char* MA_STODE_CODE_S MATERIAL_VAL ( "store_code"  )

◆ MATERIAL_VAL() [23/23]

const MATERIAL_PREFIX char* MA_CLEANED_NAME_S MATERIAL_VAL ( "cleaned"  )

◆ AllocateMaterial()

Material* AllocateMaterial ( bson_oid_t *  id_p,
const char *  accession_s,
const char *  species_s,
const char *  type_s,
const char *  selection_reason_s,
const char *  generation_s,
const char *  supplier_s,
const char *  source_s,
const char *  germplasm_origin_s,
const char *  treatment_s,
bool  gru_flag,
bool  cleaned_flag,
uint32  tgw,
const Study area_p,
const bson_oid_t *  gene_bank_id_p,
const FieldTrialServiceData data_p 
)

◆ AllocateMaterialByGermplasmID()

Material* AllocateMaterialByGermplasmID ( bson_oid_t *  id_p,
const char *  germplasm_id_s,
const Study area_p,
const FieldTrialServiceData data_p 
)

◆ AllocateMaterialByAccession()

Material* AllocateMaterialByAccession ( bson_oid_t *  id_p,
const char *  accession_s,
bson_oid_t *  gene_bank_id_p,
const FieldTrialServiceData data_p 
)

◆ SetMaterialAccession()

bool SetMaterialAccession ( Material material_p,
const char *const  accession_s 
)

◆ FreeMaterial()

void FreeMaterial ( Material material_p)

◆ GetMaterialAsJSON()

json_t* GetMaterialAsJSON ( const Material material_p,
const ViewFormat  format,
const FieldTrialServiceData data_p 
)

◆ GetMaterialFromJSON()

Material* GetMaterialFromJSON ( const json_t *  json_p,
const ViewFormat  format,
const FieldTrialServiceData data_p 
)

◆ SaveMaterial()

bool SaveMaterial ( Material material_p,
const FieldTrialServiceData data_p 
)

◆ LoadMaterial()

Material* LoadMaterial ( const int32  material_id,
FieldTrialServiceData data_p 
)

◆ GetOrCreateMaterialByInternalName()

Material* GetOrCreateMaterialByInternalName ( const char *  material_s,
Study area_p,
const FieldTrialServiceData data_p 
)

◆ GetOrCreateMaterialByAccession()

Material* GetOrCreateMaterialByAccession ( const char *  accession_s,
GeneBank gene_bank_p,
const FieldTrialServiceData data_p 
)

◆ GetMaterialByGermplasmID()

Material* GetMaterialByGermplasmID ( const char *  material_s,
Study area_p,
const FieldTrialServiceData data_p 
)

◆ GetMaterialById()

Material* GetMaterialById ( const bson_oid_t *  material_id_p,
const FieldTrialServiceData data_p 
)

◆ GetMaterialByAccession()

Material* GetMaterialByAccession ( const char *  accession_s,
GeneBank gene_bank_p,
const bool  case_sensitive_flag,
const FieldTrialServiceData data_p 
)

◆ IsMaterialComplete()

bool IsMaterialComplete ( const Material *const  material_p)