ZOO-Project: service_json.c File Reference
ZOO-Project
service_json.c File Reference
#include "service_json.h"
#include "json.h"
#include <errno.h>
#include "json_tokener.h"
#include "stdlib.h"
#include "mimetypes.h"
#include "server_internal.h"
#include "service_internal.h"
#include <dirent.h>

Functions

json_object * mapToJson (map *myMap)
 Convert a map to a json object. More...
 
json_object * mapsToJson (maps *myMap)
 Convert a maps to a json object. More...
 
json_object * elementsToJson (elements *myElements)
 Convert an elements to a json object. More...
 
json_object * serviceToJson (service *myService)
 Convert an service to a json object. More...
 
void printAllowedRangesJ (maps *m, iotype *iot, json_object *prop)
 Add Allowed Range properties to a json_object. More...
 
void printLiteralDataJ (maps *m, elements *in, json_object *input)
 Add literalDataDomains property to a json_object. More...
 
void printFormatJ (maps *m, iotype *iot, json_object *res, bool isDefault, map *maxSize)
 Add Format properties to a json_object. More...
 
void printJAdditionalParameters (maps *conf, map *meta, json_object *doc)
 Add additionalParameters property to a json_object. More...
 
void printJMetadata (maps *conf, map *meta, json_object *doc)
 Add metadata property to a json_object. More...
 
void printIOTypeJ (maps *m, const char *io, elements *in, json_object *inputs, service *serv)
 Add metadata properties to a json_object. More...
 
void printGetCapabilitiesForProcessJ (registry *reg, maps *m, void *doc0, void *nc0, service *serv)
 Add all the capabilities properties to a json_object. More...
 
void printExceptionReportResponseJ (maps *m, map *s)
 Print an OWS ExceptionReport Document and HTTP headers (when required) depending on the code. More...
 
void parseJLiteral (maps *conf, json_object *req, elements *element, maps *output)
 Parse LiteralData value. More...
 
void parseJComplex (maps *conf, json_object *req, elements *element, maps *output, const char *name)
 Parse ComplexData value. More...
 
void parseJBoundingBox (maps *conf, json_object *req, elements *element, maps *output)
 Parse BoundingBox value. More...
 
void _parseJIOSingle (maps *conf, elements *cio, maps **ioMaps, const char *ioType, const char *key, json_object *val, maps *cMaps)
 Parse a single input / output entity. More...
 
void parseJIOSingle (maps *conf, elements *ioElements, maps **ioMaps, const char *ioType, const char *key, json_object *val)
 Parse a single input / output entity that can be an array. More...
 
void parseJIO (maps *conf, json_object *req, elements *ioElements, maps **ioMaps, const char *ioType)
 Parse all the inputs / outputs entities. More...
 
void parseJRequest (maps *conf, service *s, json_object *req, map *request_inputs, maps **inputs, maps **outputs)
 Parse Json Request. More...
 
json_object * printJobStatus (maps *pmsConf, char *pcJobId)
 Print the jobs status info cf. More...
 
json_object * printJobList (maps *conf)
 Print the jobs list. More...
 
json_object * printJResult (maps *conf, service *s, maps *result, int res)
 Print the result of an execution. More...
 
int createStatusLinks (maps *conf, int result, json_object *obj)
 Create the status links. More...
 
char * json_getStatusFilePath (maps *conf)
 Get the status file path. More...
 
char * getResultPath (maps *conf, char *jobId)
 
json_object * parseJson (maps *conf, char *myString)
 
json_object * json_readFile (maps *conf, char *filePath)
 
json_object * createStatus (maps *conf, int status)
 
int createStatusFile (maps *conf, int status)
 Create the status file. More...
 
int json_getStatusFile (maps *conf)
 Create the status file. More...
 
void produceApiInfo (maps *conf, json_object *res, json_object *res5)
 Produce the JSON object for api info object. More...
 
void addResponse (const map *useContent, json_object *res, const map *pmSchema, const map *pmType, const char *code, const char *msg)
 
void addParameter (maps *conf, const char *oName, const char *fName, const char *in, json_object *res)
 
void produceApiParameters (maps *conf, json_object *res)
 Produce the JSON object for api parameter. More...
 
void produceApiComponents (maps *conf, json_object *res)
 
void produceApi (maps *conf, json_object *res)
 Produce the JSON object for /api. More...
 

Variables

const char * rangeCorrespondances [4][2]
 Equivalent range keywords for WPS version 1 and 2. More...
 

Function Documentation

void _parseJIOSingle ( maps conf,
elements cio,
maps **  ioMaps,
const char *  ioType,
const char *  key,
json_object *  val,
maps cMaps 
)

Parse a single input / output entity.

Parameters
confthe maps containing the settings of the main.cfg file
ioElementsthe elements extrac

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png