Ignore:
Timestamp:
Aug 7, 2017, 2:56:24 PM (7 years ago)
Author:
djay
Message:

Update the source code for HPC support. Automatically adding nested outputs for the HPC support (should this be available for every support?). Add capability to store the metadata in the Collection DataBase?. Addition of the zcfg2sql to import any existing ZCFG file into the Collection DB. Add the support to invoke a callback (for history purpose) in case a [callback] section contains at least one parameter defined (url). Add support to convert maps and map to JSON (for callback use only by now). Fix some memory leaks (some are still there).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-kernel/service_conf.y

    r790 r839  
    3333static bool wait_maincontent=true;
    3434static bool wait_mainmetadata=false;
     35static bool wait_mainap=false;
    3536static bool wait_metadata=false;
     37static bool wait_ap=false;
    3638static bool wait_nested=false;
    3739static bool wait_inputs=false;
     
    156158    current_content=NULL;
    157159    my_service->metadata=NULL;
     160    my_service->additional_parameters=NULL;
    158161    wait_maincontent=false;
    159162  }
    160163  if(strncasecmp($2,"EndNested",9)==0){
    161164#ifdef DEBUG_SERVICE_CONF
    162       fprintf(stderr,"(ENDNESTED - %d) \n",__LINE__);
    163       fflush(stderr);
    164 #endif
    165       nested_level-=1;
    166       if(nested_level==0){
    167         wait_nested=false;
    168       }
     165    fprintf(stderr,"(ENDNESTED - %d) \n",__LINE__);
     166    fflush(stderr);
     167#endif
     168    nested_level-=1;
     169    if(nested_level==0){
     170      wait_nested=false;
     171    }
    169172  }
    170173
     
    229232    }
    230233    else
    231       if(strncasecmp($2,"MetaData",8)==0){
    232         previous_data=current_data;
    233         current_data=3;
    234         if(current_element!=NULL){
    235 #ifdef DEBUG_SERVICE_CONF
    236           fprintf(stderr,"add current_content to current_element->content\n");
    237           fprintf(stderr,"LINE %d",__LINE__);
    238 #endif
    239           addMapToMap(&current_element->content,current_content);
    240           freeMap(&current_content);
    241           free(current_content);
    242           if(previous_data==1 || previous_data==2)
    243             wait_metadata=true;
    244           else
    245             wait_mainmetadata=true;
    246         }
    247         else{
    248           if(previous_data==1 || previous_data==2)
    249             wait_metadata=true;
    250           else
    251             wait_mainmetadata=true;
     234      if(strncasecmp($2,"MetaData",8)==0 ||
     235         strncasecmp($2,"AdditionalParameters",8)==0){
     236        if(strncasecmp($2,"AdditionalParameters",8)==0){
     237          previous_data=current_data;
     238          current_data=4;
     239          if(current_element!=NULL){
     240#ifdef DEBUG_SERVICE_CONF
     241            fprintf(stderr,"add current_content to current_element->content\n");
     242            fprintf(stderr,"LINE %d",__LINE__);
     243#endif
     244            if(wait_mainmetadata)
     245              addMapToMap(&my_service->metadata,current_content);
     246            else
     247              if(wait_metadata)
     248                addMapToMap(&current_element->metadata,current_content);
     249              else
     250                addMapToMap(&current_element->content,current_content);         
     251            freeMap(&current_content);
     252            free(current_content);
     253            if(previous_data==1 || previous_data==2)
     254              wait_ap=true;
     255            else
     256              wait_mainap=true;
     257          }
     258          else{
     259            if(previous_data==1 || previous_data==2)
     260              wait_ap=true;
     261            else
     262              wait_mainap=true;
     263          }
     264        }else{
     265          previous_data=current_data;
     266          current_data=3;
     267          if(current_element!=NULL){
     268#ifdef DEBUG_SERVICE_CONF
     269            fprintf(stderr,"add current_content to current_element->content\n");
     270            fprintf(stderr,"LINE %d",__LINE__);
     271#endif
     272            addMapToMap(&current_element->content,current_content);
     273            freeMap(&current_content);
     274            free(current_content);
     275            if(previous_data==1 || previous_data==2)
     276              wait_metadata=true;
     277            else
     278              wait_mainmetadata=true;
     279          }
     280          else{
     281            if(previous_data==1 || previous_data==2)
     282              wait_metadata=true;
     283            else
     284              wait_mainmetadata=true;
     285          }
    252286        }
    253287        current_content=NULL;
     
    425459  if(strcmp($3,"DataOutputs")==0){
    426460    current_data=2;
     461  } 
     462  if(strcmp($3,"AdditionalParameters")==0){
     463    if(current_content!=NULL){
     464#ifdef DEBUG_SERVICE_CONF
     465      fprintf(stderr,"add current_content to current_element->content\n");
     466      fprintf(stderr,"LINE %d",__LINE__);
     467#endif
     468      if(wait_ap){
     469        current_element->additional_parameters=NULL;
     470        addMapToMap(&current_element->additional_parameters,current_content);
     471        current_element->next=NULL;
     472        current_element->defaults=NULL;
     473        current_element->supported=NULL;
     474        current_element->child=NULL;
     475      }else{
     476        if(wait_mainap){
     477          addMapToMap(&my_service->additional_parameters,current_content);
     478        }
     479      }
     480
     481      freeMap(&current_content);
     482      free(current_content);
     483      current_content=NULL;
     484    }
     485    current_data=previous_data;
     486    wait_mainap=false;
     487    wait_ap=false;
    427488  }
    428489  if(strcmp($3,"MetaData")==0){
     
    866927  wait_mainmetadata=false;
    867928  wait_metadata=false;
     929  wait_mainap=false;
     930  wait_ap=false;
    868931  wait_inputs=false;
    869932  wait_defaults=false;
Note: See TracChangeset for help on using the changeset viewer.

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