Changeset 873 for branches/prototype-v0/zoo-project/zoo-kernel
- Timestamp:
- Mar 19, 2018, 3:53:31 PM (7 years ago)
- Location:
- branches/prototype-v0/zoo-project/zoo-kernel
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/Makefile.in
r861 r873 78 78 g++ ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c service_internal_python.c 79 79 80 service_internal_r.o: service_internal_r.c service.h 81 g++ ${XML2CFLAGS} ${RCFLAGS} ${CFLAGS} -c service_internal_r.c 82 80 83 service_internal_otb.o: service_internal_otb.c service_internal_otb.h service.h 81 84 g++ ${XML2CFLAGS} ${OTBCFLAGS} ${CFLAGS} -c service_internal_otb.c … … 114 117 g++ -c ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} service_loader.c 115 118 116 zoo_service_loader.o: zoo_service_loader.c service.h version.h ${MS_FILE} ${ PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE}117 g++ -g -O2 ${JSON_CFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${CFLAGS} ${MONO_CFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${ PYTHONCFLAGS} ${JAVACFLAGS} ${JSCFLAGS} ${PERLCFLAGS} ${PHPCFLAGS} ${SAGA_ENABLED} ${OTB_ENABLED} ${HPC_ENABLED} ${PYTHON_ENABLED} ${JS_ENABLED} ${PHP_ENABLED} ${PERL_ENABLED} ${JAVA_ENABLED} ${MONO_ENABLED} ${METADB_ENABLED} -c zoo_service_loader.c -fno-common -DPIC -o zoo_service_loader.o119 zoo_service_loader.o: zoo_service_loader.c service.h version.h ${MS_FILE} ${R_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE} 120 g++ -g -O2 ${JSON_CFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${CFLAGS} ${MONO_CFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${RCFLAGS} ${PYTHONCFLAGS} ${JAVACFLAGS} ${JSCFLAGS} ${PERLCFLAGS} ${PHPCFLAGS} ${SAGA_ENABLED} ${OTB_ENABLED} ${HPC_ENABLED} ${PYTHON_ENABLED} ${R_ENABLED} ${JS_ENABLED} ${PHP_ENABLED} ${PERL_ENABLED} ${JAVA_ENABLED} ${MONO_ENABLED} ${METADB_ENABLED} -c zoo_service_loader.c -fno-common -DPIC -o zoo_service_loader.o 118 121 119 122 libzoo_service.${EXT}: version.h service_internal.o service.o sqlapi.o 120 123 gcc -shared ${GDAL_CFLAGS} ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS} service_internal.o service.o sqlapi.o ${FCGI_LDFLAGS} ${GDAL_LIBS} ${ZOO_LDFLAGS} 121 124 122 zoo_loader.cgi: version.h libzoo_service.${EXT} zoo_loader.c zoo_service_loader.o ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o request_parser.o response_print.o server_internal.o caching.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${ SAGA_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} service_callback.o125 zoo_loader.cgi: version.h libzoo_service.${EXT} zoo_loader.c zoo_service_loader.o ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o request_parser.o response_print.o server_internal.o caching.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${R_FILE} ${SAGA_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} service_callback.o 123 126 g++ -g -O2 ${JSON_CFLAGS} ${JSCFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${RUBYCFLAGS} ${JAVACFLAGS} ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c zoo_loader.c -fno-common -DPIC -o zoo_loader.o 124 g++ ${JSON_CFLAGS} ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE} ${PERL_FILE} ${PHP_FILE} ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} service_callback.o response_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS}127 g++ ${JSON_CFLAGS} ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE} ${PERL_FILE} ${PHP_FILE} ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} ${R_FILE} service_callback.o response_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS} 125 128 126 129 zcfg2yaml: zcfg2yaml.c service.h lex.sr.o service_conf.tab.o service_conf.y main_conf_read.tab.o lex.cr.o response_print.o server_internal.o service_internal.o ${MS_FILE} ${YAML_FILE} -
branches/prototype-v0/zoo-project/zoo-kernel/ZOOMakefile.opts.in
r854 r873 58 58 PYTHON_FILE=@PYTHON_FILE@ 59 59 60 RCFLAGS=@R_CPPFLAGS@ 61 RLDFLAGS=@R_LDFLAGS@ 62 R_ENABLED=@R_ENABLED@ 63 R_FILE=@R_FILE@ 64 60 65 RUBYCFLAGS=@RUBY_CPPFLAGS@ 61 66 RUBYLDFLAGS=@RUBY_LDFLAGS@ … … 115 120 116 121 CFLAGS=@SSH2_CPPFLAGS@ @GETTEXT_CFLAGS@ @PROJ_CPPFLAGS@ @RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ @UUID_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF 117 LDFLAGS=-lzoo_service @SSH2_LDFLAGS@ @PROJ_LDFLAGS@ @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS} ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ @UUID_LDFLAGS@ ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS} ${MONO_LDFLAGS} @GETTEXT_LDFLAGS@ @JSON_LDFLAGS@ @XSLT_LDFLAGS@122 LDFLAGS=-lzoo_service @SSH2_LDFLAGS@ @PROJ_LDFLAGS@ @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS} ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ @UUID_LDFLAGS@ ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS} ${MONO_LDFLAGS} ${RLDFLAGS} @GETTEXT_LDFLAGS@ @JSON_LDFLAGS@ @XSLT_LDFLAGS@ 118 123 119 124 DATAROOTDIR=@datarootdir@/zoo-project -
branches/prototype-v0/zoo-project/zoo-kernel/configure.ac
r867 r873 523 523 AC_SUBST([MS_FILE]) 524 524 AC_SUBST([MS_VERSION]) 525 526 # =========================================================================== 527 # Detect if R is installed 528 # =========================================================================== 529 530 AC_ARG_WITH([r], 531 [AS_HELP_STRING([--with-r=PATH], [To enable python support or Specifies an alternative directory for R installation, disabled by default])], 532 [R_PATH="$withval"; R_ENABLED="-DUSE_R"], [R_ENABLED=""]) 533 534 if test -z "$R_ENABLED" 535 then 536 R_FILE="" 537 else 538 R_FILE="service_internal_r.o" 539 # Extract the linker and include flags 540 R_LDFLAGS="-L$R_PATH/lib/ -lR" 541 R_CPPFLAGS="-I$R_PATH/include/" 542 543 # Check headers file 544 CPPFLAGS_SAVE="$CPPFLAGS" 545 CPPFLAGS="$R_CPPFLAGS" 546 AC_CHECK_HEADERS([RInternals.h], 547 [], [AC_MSG_ERROR([could not find headers include related to R])]) 548 549 # Ensure we can link against libphp 550 #LIBS_SAVE="$LIBS" 551 #LIBS="$R_LDFLAGS" 552 #AC_CHECK_LIB([$LIBS], [R_tryEval], [], [AC_MSG_ERROR([could not find libR])], []) 553 #LIBS="$LIBS_SAVE" 554 fi 555 556 AC_SUBST([R_CPPFLAGS]) 557 AC_SUBST([R_LDFLAGS]) 558 AC_SUBST([R_ENABLED]) 559 AC_SUBST([R_FILE]) 560 525 561 526 562 # =========================================================================== -
branches/prototype-v0/zoo-project/zoo-kernel/service.c
r871 r873 190 190 * Count number of map in a map 191 191 * 192 * @param m the map sto count192 * @param m the map to count 193 193 * @return number of map in a map 194 194 */ 195 195 int count(map* m){ 196 196 map* tmp=m; 197 int c=0; 198 while(tmp!=NULL){ 199 c++; 200 tmp=tmp->next; 201 } 202 return c; 203 } 204 205 /** 206 * Count number of maps in a maps 207 * 208 * @param m the maps to count 209 * @return number of maps in a maps 210 */ 211 int maps_length(maps* m){ 212 maps* tmp=m; 197 213 int c=0; 198 214 while(tmp!=NULL){ -
branches/prototype-v0/zoo-project/zoo-kernel/service_json.c
r845 r873 89 89 } 90 90 91 json_object* elementsToJson(elements* myElements){ 92 json_object *res=json_object_new_object(); 93 elements* cur=myElements; 94 while(cur!=NULL){ 95 json_object *cres=json_object_new_object(); 96 json_object_object_add(cres,"content",mapToJson(cur->content)); 97 json_object_object_add(cres,"metadata",mapToJson(cur->metadata)); 98 json_object_object_add(cres,"additional_parameters",mapToJson(cur->additional_parameters)); 99 if(cur->format!=NULL){ 100 json_object_object_add(cres,"format",json_object_new_string(cur->format)); 101 } 102 if(cur->child==NULL){ 103 if(cur->defaults!=NULL) 104 json_object_object_add(cres,"defaults",mapToJson(cur->defaults->content)); 105 else 106 json_object_object_add(cres,"defaults",mapToJson(NULL)); 107 iotype* scur=cur->supported; 108 json_object *resi=json_object_new_array(); 109 while(scur!=NULL){ 110 json_object_array_add(resi,mapToJson(scur->content)); 111 scur=scur->next; 112 } 113 json_object_object_add(cres,"supported",resi); 114 fprintf(stderr,"%s %d\n",__FILE__,__LINE__); 115 fflush(stderr); 116 } 117 118 dumpElements(cur->child); 119 json_object_object_add(cres,"child",elementsToJson(cur->child)); 120 fprintf(stderr,"%s %d\n",__FILE__,__LINE__); 121 fflush(stderr); 122 123 json_object_object_add(res,cur->name,cres); 124 cur=cur->next; 125 } 126 return res; 127 } 128 129 json_object* serviceToJson(service* myService){ 130 json_object *res=json_object_new_object(); 131 json_object_object_add(res,"name",json_object_new_string(myService->name)); 132 json_object_object_add(res,"content",mapToJson(myService->content)); 133 json_object_object_add(res,"metadata",mapToJson(myService->metadata)); 134 json_object_object_add(res,"additional_parameters",mapToJson(myService->additional_parameters)); 135 json_object_object_add(res,"inputs",elementsToJson(myService->inputs)); 136 json_object_object_add(res,"outputs",elementsToJson(myService->outputs)); 137 return res; 138 } 139 140 91 141 #ifdef __cplusplus 92 142 } -
branches/prototype-v0/zoo-project/zoo-kernel/service_json.h
r845 r873 38 38 json_object* mapToJson(map*); 39 39 json_object* mapsToJson(maps*); 40 json_object* serviceToJson(service*); 40 41 #ifdef __cplusplus 41 42 } -
branches/prototype-v0/zoo-project/zoo-kernel/zoo_service_loader.c
r865 r873 35 35 #ifdef USE_OTB 36 36 #include "service_internal_otb.h" 37 #endif 38 39 #ifdef USE_R 40 #include "service_internal_r.h" 37 41 #endif 38 42 … … 706 710 #endif 707 711 712 #ifdef USE_R 713 if (strncasecmp (r_inputs->value, "R", 6) == 0) 714 { 715 *eres = 716 zoo_r_support (&m, request_inputs, s1, 717 &request_input_real_format, 718 &request_output_real_format); 719 } 720 else 721 #endif 722 708 723 #ifdef USE_JAVA 709 724 if (strncasecmp (r_inputs->value, "JAVA", 4) == 0) … … 1711 1726 addNestedOutputs(&s1); 1712 1727 #endif 1728 json_object* jobj=serviceToJson(s1); 1729 const char* jsonStr=json_object_to_json_string_ext(jobj,JSON_C_TO_STRING_PLAIN); 1730 fprintf(stderr,"*** %s %d %s \n",__FILE__,__LINE__,jsonStr); 1731 1713 1732 printDescribeProcessForProcess (zooRegistry,m, doc, n, s1); 1714 1733 freeService (&s1); … … 2548 2567 rewind(stdout); 2549 2568 2569 fprintf(stderr,"%s %d %d\n",__FILE__,__LINE__,eres); 2570 2550 2571 if (eres != -1) 2551 2572 outputResponse (s1, request_input_real_format,
Note: See TracChangeset
for help on using the changeset viewer.