Merge branch 'ohd_14.3.1' of ssh://vlab.ncep.noaa.gov:29418/AWIPS2_Dev_Baseline into master_14.3.1
Conflicts: cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveBestEstimate.java Former-commit-id:326ded8d5d
[formerly 2b65d7a2e76d9d07f10fd6068e7c83b2a0b63975] Former-commit-id:551098ba35
This commit is contained in:
commit
296a0f3e7a
2 changed files with 40 additions and 3 deletions
|
@ -23,6 +23,7 @@
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
|
* Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts.
|
||||||
|
* Feb 4, 2015 17094 cgobs Fix for fieldType being too long for mapx_field_type column in RWResult table.
|
||||||
* </pre>
|
* </pre>
|
||||||
**/
|
**/
|
||||||
package com.raytheon.viz.mpe.ui.actions;
|
package com.raytheon.viz.mpe.ui.actions;
|
||||||
|
@ -33,8 +34,10 @@ import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.imageio.ImageWriter;
|
import javax.imageio.ImageWriter;
|
||||||
|
@ -337,6 +340,9 @@ public class SaveBestEstimate {
|
||||||
Rwresult pRWResultNode = pRWResultHead.get(0);
|
Rwresult pRWResultNode = pRWResultHead.get(0);
|
||||||
|
|
||||||
/* Update the elements in the RWResult node. */
|
/* Update the elements in the RWResult node. */
|
||||||
|
|
||||||
|
fldtype = checkAndModifyMapxFieldType(fldtype);
|
||||||
|
|
||||||
pRWResultNode.setMapxFieldType(fldtype.toLowerCase());
|
pRWResultNode.setMapxFieldType(fldtype.toLowerCase());
|
||||||
pRWResultNode.setAutoSave(asave);
|
pRWResultNode.setAutoSave(asave);
|
||||||
pRWResultNode.setDrawPrecip(drpr);
|
pRWResultNode.setDrawPrecip(drpr);
|
||||||
|
@ -359,4 +365,32 @@ public class SaveBestEstimate {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String checkAndModifyMapxFieldType(String fieldType) {
|
||||||
|
|
||||||
|
// This method changes fieldType to lowercase.
|
||||||
|
// It also shortens fieldTypes as needed to fit into the mapx_field_type column in the RWResult table.
|
||||||
|
// Note: the mapx_field_type column is informational only. It is not used by the code
|
||||||
|
// other than reading and writing from and to the database.
|
||||||
|
|
||||||
|
String newFieldType = null;
|
||||||
|
String lowerCaseFieldType = fieldType.toLowerCase();
|
||||||
|
|
||||||
|
final Map<String,String> conversionTable = new HashMap<String , String>();
|
||||||
|
|
||||||
|
conversionTable.put("localfield1", "localfld1");
|
||||||
|
conversionTable.put("localfield2", "localfld2");
|
||||||
|
conversionTable.put("localfield3", "localfld3");
|
||||||
|
|
||||||
|
conversionTable.put("avgrdmosaic", "avgrdmos");
|
||||||
|
conversionTable.put("maxrdmosaic", "maxrdmos");
|
||||||
|
|
||||||
|
|
||||||
|
newFieldType = conversionTable.get(lowerCaseFieldType);
|
||||||
|
if (newFieldType == null)
|
||||||
|
{
|
||||||
|
newFieldType = lowerCaseFieldType;
|
||||||
|
}
|
||||||
|
return newFieldType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
* new local fields to
|
* new local fields to
|
||||||
* mpe_qpe_fields and
|
* mpe_qpe_fields and
|
||||||
* mpe_qpe_dependencies
|
* mpe_qpe_dependencies
|
||||||
|
* 2/4/2015 C Gobs DR 17069 - mpe_generate_list - token value too short
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -130,6 +131,7 @@ const static char * mpe_qpe_dependencies [ NUM_BEST_PRODUCTS ] =
|
||||||
/* GageOnly Generation rule in case mpe_del_gage_zeros token is OFF. */
|
/* GageOnly Generation rule in case mpe_del_gage_zeros token is OFF. */
|
||||||
const static char * gageonly_del_gages_off = "" ;
|
const static char * gageonly_del_gages_off = "" ;
|
||||||
|
|
||||||
|
#define MPE_GENERATE_LIST_REPLY_LEN 512
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* MODULE NUMBER: 1
|
* MODULE NUMBER: 1
|
||||||
|
@ -514,7 +516,7 @@ void get_mpe_product_state ( const char * product , const int * product_len ,
|
||||||
char mpe_del_gage_zeros_reply [ MPE_PRODUCT_REPLY_LEN ] = { '\0' } ;
|
char mpe_del_gage_zeros_reply [ MPE_PRODUCT_REPLY_LEN ] = { '\0' } ;
|
||||||
char mpe_generate_areal_qpe_reply [ MPE_PRODUCT_REPLY_LEN ] = {'\0'};
|
char mpe_generate_areal_qpe_reply [ MPE_PRODUCT_REPLY_LEN ] = {'\0'};
|
||||||
static char * mpe_generate_list_token = MPE_GENERATE_LIST_TOKEN ;
|
static char * mpe_generate_list_token = MPE_GENERATE_LIST_TOKEN ;
|
||||||
char mpe_generate_list_reply [ MPE_PRODUCT_REPLY_LEN ] = { '\0' } ;
|
char mpe_generate_list_reply [ MPE_GENERATE_LIST_REPLY_LEN ] = { '\0' } ;
|
||||||
static char mpe_qpe_fieldtype [ BESTFIELD_LEN] = { '\0' } ;
|
static char mpe_qpe_fieldtype [ BESTFIELD_LEN] = { '\0' } ;
|
||||||
char * pChar = NULL ;
|
char * pChar = NULL ;
|
||||||
char * pString = NULL ;
|
char * pString = NULL ;
|
||||||
|
@ -598,9 +600,10 @@ void get_mpe_product_state ( const char * product , const int * product_len ,
|
||||||
"empty.\n" , mpe_generate_list_token ) ;
|
"empty.\n" , mpe_generate_list_token ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset ( mpe_generate_list_reply , '\0' , MPE_PRODUCT_REPLY_LEN ) ;
|
memset ( mpe_generate_list_reply , '\0' , MPE_GENERATE_LIST_REPLY_LEN ) ;
|
||||||
}
|
}
|
||||||
printf("get_mpe_product_state(): mpe_generate_list_reply = :%s: \n", mpe_generate_list_reply);
|
printf("get_mpe_product_state(): mpe_generate_list_reply = :%s: characters in mpe_generate_list_reply = %d max = %d\n", mpe_generate_list_reply,
|
||||||
|
strlen(mpe_generate_list_reply), MPE_GENERATE_LIST_REPLY_LEN);
|
||||||
|
|
||||||
/* Get the value of the mpe_del_gage_zeros token. */
|
/* Get the value of the mpe_del_gage_zeros token. */
|
||||||
request_len = strlen ( mpe_del_gage_zeros_token ) ;
|
request_len = strlen ( mpe_del_gage_zeros_token ) ;
|
||||||
|
|
Loading…
Add table
Reference in a new issue