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.
service_metadata.h
Go to the documentation of this file.
1 /*
2  ** Copyright 2014-2017 The Earlham Institute
3  **
4  ** Licensed under the Apache License, Version 2.0 (the "License");
5  ** you may not use this file except in compliance with the License.
6  ** You may obtain a copy of the License at
7  **
8  ** http://www.apache.org/licenses/LICENSE-2.0
9  **
10  ** Unless required by applicable law or agreed to in writing, software
11  ** distributed under the License is distributed on an "AS IS" BASIS,
12  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  ** See the License for the specific language governing permissions and
14  ** limitations under the License.
15  */
16 /*
17  * service_metadata.h
18  *
19  * Created on: 10 Nov 2017
20  * Author: billy
21  */
22 
23 #ifndef CORE_SHARED_SERVICES_INCLUDE_SERVICE_METADATA_H_
24 #define CORE_SHARED_SERVICES_INCLUDE_SERVICE_METADATA_H_
25 
27 #include "typedefs.h"
28 #include "schema_term.h"
29 
30 #include "jansson.h"
31 
32 
33 
34 
39 typedef struct ServiceMetadata
40 {
46 
52 
58 
64 
65 
67 
68 
69 
70 #ifdef __cplusplus
71 extern "C"
72 {
73 #endif
74 
75 
85 
86 
94 
95 
103 
104 
113 GRASSROOTS_SERVICE_API void SetServiceMetadataValues (ServiceMetadata *metadata_p, SchemaTerm *category_p, SchemaTerm *subcategory_p);
114 
115 
116 
125 GRASSROOTS_SERVICE_API bool AddServiceMetadataToJSON (const ServiceMetadata *metadata_p, json_t *service_json_p);
126 
127 
137 
138 
148 
149 
158 
159 
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 
165 #endif /* CORE_SHARED_SERVICES_INCLUDE_SERVICE_METADATA_H_ */
grassroots_service_library.h
GRASSROOTS_SERVICE_API
#define GRASSROOTS_SERVICE_API
Definition: grassroots_service_library.h:49
ServiceMetadata::FreeServiceMetadata
void FreeServiceMetadata(ServiceMetadata *metadata_p)
Free a ServiceMetadata object.
ServiceMetadata::SetServiceMetadataValues
void SetServiceMetadataValues(ServiceMetadata *metadata_p, SchemaTerm *category_p, SchemaTerm *subcategory_p)
Set the values of a ServiceMetadata object.
ServiceMetadata::ClearServiceMetadata
void ClearServiceMetadata(ServiceMetadata *metadata_p)
Clear any data within a ServiceMetadata object.
ServiceMetadata::sm_input_types_p
LinkedList * sm_input_types_p
A LinkedList of SchemaTermNodes defining the types of input that the Service can take.
Definition: service_metadata.h:57
ServiceMetadata
A datatype for describing the type of application that a Service provides.
Definition: service_metadata.h:39
ServiceMetadata::sm_application_subcategory_p
SchemaTerm * sm_application_subcategory_p
This is the value used for defining the sub-category of the Service.
Definition: service_metadata.h:51
typedefs.h
ServiceMetadata::GetServiceMetadataFromJSON
ServiceMetadata * GetServiceMetadataFromJSON(const json_t *service_json_p)
Get a ServiceMetadata object from a JSON fragment.
LinkedList
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
ServiceMetadata::sm_application_category_p
SchemaTerm * sm_application_category_p
This is the value used for defining the category of the Service.
Definition: service_metadata.h:45
ServiceMetadata::AddServiceMetadataToJSON
bool AddServiceMetadataToJSON(const ServiceMetadata *metadata_p, json_t *service_json_p)
Add the information from a ServiceMetadata object to a JSON fragment describing a Service.
schema_term.h
AddSchemaTermToServiceMetadataOutput
bool AddSchemaTermToServiceMetadataOutput(ServiceMetadata *metadata_p, SchemaTerm *term_p)
Add a SchemaTerm to the list of output types stored in this ServiceMetadata.
ServiceMetadata::AllocateServiceMetadata
ServiceMetadata * AllocateServiceMetadata(SchemaTerm *category_p, SchemaTerm *subcategory_p)
Allocate a ServiceMetadata object.
AddSchemaTermToServiceMetadataInput
bool AddSchemaTermToServiceMetadataInput(ServiceMetadata *metadata_p, SchemaTerm *term_p)
Add a SchemaTerm to the list of input types stored in this ServiceMetadata.
SchemaTerm
A datatype for specifying ontological terms as a way to describe the data that each of the Services c...
Definition: schema_term.h:38
ServiceMetadata::sm_output_types_p
LinkedList * sm_output_types_p
A LinkedList of SchemaTermNodes defining the types of output that the Service can generate.
Definition: service_metadata.h:63