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.
SchemaTerm Struct Reference

A datatype for specifying ontological terms as a way to describe the data that each of the Services consumes and produces. More...

#include <schema_term.h>

Public Member Functions

SchemaTermAllocateExtendedSchemaTerm (const char *url_s, const char *name_s, const char *description_s, const char *abbreviation_s)
 Allocate a SchemaTerm with an abbreviation. More...
 
SchemaTermAllocateSchemaTerm (const char *url_s, const char *name_s, const char *description_s)
 Allocate a SchemaTerm. More...
 
void FreeSchemaTerm (SchemaTerm *term_p)
 Free a SchemaTerm. More...
 
void ClearSchemaTerm (SchemaTerm *term_p)
 Clear all of the data within a SchemaTerm. More...
 
json_t * GetSchemaTermAsJSON (const SchemaTerm *term_p)
 Get the JSON fragment for a given SchemaTerm. More...
 
bool AddSchemaTermToJSON (const SchemaTerm *term_p, json_t *root_p)
 Populate a JSON fragment with the details for a given SchemaTerm. More...
 
SchemaTermGetSchemaTermFromJSON (const json_t *term_json_p)
 Get the JSON fragment for a given SchemaTerm. More...
 

Data Fields

char * st_url_s
 The URL for this SchemaTerm. More...
 
char * st_name_s
 The user-friendly name for the term that should be displayed to the user. More...
 
char * st_description_s
 A more-verbose description of this SchemaTerm to display to the user. More...
 
char * st_abbreviation_s
 An optional abbreviation of this term. More...
 

Detailed Description

A datatype for specifying ontological terms as a way to describe the data that each of the Services consumes and produces.

They are also used to categorise each of the Services.

Member Function Documentation

◆ AllocateExtendedSchemaTerm()

SchemaTerm * AllocateExtendedSchemaTerm ( const char *  url_s,
const char *  name_s,
const char *  description_s,
const char *  abbreviation_s 
)

Allocate a SchemaTerm with an abbreviation.

Parameters
url_sThe url for the SchemaTerm.
name_sThe name to give to the SchemaTerm.
description_sThe description to give to the SchemaTerm.
abbreviation_sThe abbreviation to give to the SchemaTerm.
Returns
The new SchemaTerm or NULL upon error.

◆ AllocateSchemaTerm()

SchemaTerm * AllocateSchemaTerm ( const char *  url_s,
const char *  name_s,
const char *  description_s 
)

Allocate a SchemaTerm.

Parameters
url_sThe url for the SchemaTerm.
name_sThe name to give to the SchemaTerm.
description_sThe description to give to the SchemaTerm.
Returns
The new SchemaTerm or NULL upon error.

◆ FreeSchemaTerm()

void FreeSchemaTerm ( SchemaTerm term_p)

Free a SchemaTerm.

Parameters
term_pThe SchemaTerm to free.

◆ ClearSchemaTerm()

void ClearSchemaTerm ( SchemaTerm term_p)

Clear all of the data within a SchemaTerm.

Parameters
term_pThe SchemaTerm to clear.

◆ GetSchemaTermAsJSON()

json_t * GetSchemaTermAsJSON ( const SchemaTerm term_p)

Get the JSON fragment for a given SchemaTerm.

Parameters
term_pThe SchemaTerm to get the JSON for.
Returns
The JSON fragment or NULL upon error.

◆ AddSchemaTermToJSON()

bool AddSchemaTermToJSON ( const SchemaTerm term_p,
json_t *  root_p 
)

Populate a JSON fragment with the details for a given SchemaTerm.

Parameters
term_pThe SchemaTerm to get the JSON for.
TheJSON fragment to populate.
Returns
true upon success, false upon failure.

◆ GetSchemaTermFromJSON()

SchemaTerm * GetSchemaTermFromJSON ( const json_t *  term_json_p)

Get the JSON fragment for a given SchemaTerm.

Parameters
term_json_pThe JSON fragment for a given SchemaTerm.
Returns
The new SchemaTerm or NULL upon error.

Field Documentation

◆ st_url_s

char* st_url_s

The URL for this SchemaTerm.

◆ st_name_s

char* st_name_s

The user-friendly name for the term that should be displayed to the user.

◆ st_description_s

char* st_description_s

A more-verbose description of this SchemaTerm to display to the user.

◆ st_abbreviation_s

char* st_abbreviation_s

An optional abbreviation of this term.


The documentation for this struct was generated from the following file: