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...
 
json_t * GetSchemaTermAsJSON (const SchemaTerm *term_p)
 Get the JSON fragment 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.

Examples
long_running_service.c.

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.
Examples
long_running_service.c.

◆ FreeSchemaTerm()

void FreeSchemaTerm ( SchemaTerm term_p)

Free a SchemaTerm.

Parameters
term_pThe SchemaTerm to free.
Examples
long_running_service.c.

◆ 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.

◆ 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: