Commit 1058cb4a authored by sbade's avatar sbade

updated source code for proper funciotning of old and new structured metadata xmls


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98398 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f59ef28e
...@@ -879,7 +879,7 @@ public class FilterCreator extends Composite ...@@ -879,7 +879,7 @@ public class FilterCreator extends Composite
//if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId)) //if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId))
if ("Y".equalsIgnoreCase(mandatotyFilter)) if ("Y".equalsIgnoreCase(mandatotyFilter))
{ {
Window.alert(fltrInfo.getColName() + "Can't Be Empty"); Window.alert(fltrInfo.getColDescr() + " Can't Be Empty");
Window.setTitle(windowTitle); Window.setTitle(windowTitle);
isFilterNotSelected = true; isFilterNotSelected = true;
} else } else
...@@ -906,7 +906,7 @@ public class FilterCreator extends Composite ...@@ -906,7 +906,7 @@ public class FilterCreator extends Composite
//if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId)) //if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
if ("Y".equalsIgnoreCase(mandatotyFilter)) if ("Y".equalsIgnoreCase(mandatotyFilter))
{ {
Window.alert(fltrInfo.getColName() + "Can't Be Empty"); Window.alert(fltrInfo.getColDescr() + " Can't Be Empty");
Window.setTitle(windowTitle); Window.setTitle(windowTitle);
isFilterNotSelected = true; isFilterNotSelected = true;
} else } else
...@@ -932,7 +932,7 @@ public class FilterCreator extends Composite ...@@ -932,7 +932,7 @@ public class FilterCreator extends Composite
fltrDateBox.hideDatePicker(); fltrDateBox.hideDatePicker();
} else } else
{ {
Window.alert(fltrInfo.getColName() + "Can't Be Empty"); Window.alert(fltrInfo.getColDescr() + "Can't Be Empty");
Window.setTitle(windowTitle); Window.setTitle(windowTitle);
isFilterNotSelected = true; isFilterNotSelected = true;
} }
...@@ -948,7 +948,6 @@ public class FilterCreator extends Composite ...@@ -948,7 +948,6 @@ public class FilterCreator extends Composite
{ {
if (bulletList.getWidget(j) instanceof ListItem) if (bulletList.getWidget(j) instanceof ListItem)
{ {
listItem = (ListItem) bulletList.getWidget(j); listItem = (ListItem) bulletList.getWidget(j);
if (listItem.getWidget(0) instanceof Paragraph) if (listItem.getWidget(0) instanceof Paragraph)
{ {
...@@ -963,7 +962,6 @@ public class FilterCreator extends Composite ...@@ -963,7 +962,6 @@ public class FilterCreator extends Composite
selectedChkBoxBuffer.append(paragraph.getText().trim()); selectedChkBoxBuffer.append(paragraph.getText().trim());
selectedChkBoxBufferDtl.append(paragraph.getText().trim()); selectedChkBoxBufferDtl.append(paragraph.getText().trim());
} }
} }
} }
} }
...@@ -977,7 +975,7 @@ public class FilterCreator extends Composite ...@@ -977,7 +975,7 @@ public class FilterCreator extends Composite
//if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId)) //if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
if ("Y".equalsIgnoreCase(mandatotyFilter)) if ("Y".equalsIgnoreCase(mandatotyFilter))
{ {
Window.alert(fltrInfo.getColName() + "Can't Be Empty"); Window.alert(fltrInfo.getColDescr() + "Can't Be Empty");
Window.setTitle(windowTitle); Window.setTitle(windowTitle);
isFilterNotSelected = true; isFilterNotSelected = true;
} else } else
......
...@@ -10,7 +10,6 @@ import java.util.LinkedHashMap; ...@@ -10,7 +10,6 @@ import java.util.LinkedHashMap;
import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONString; import com.google.gwt.json.client.JSONString;
import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.xml.client.Document; import com.google.gwt.xml.client.Document;
import com.google.gwt.xml.client.Node; import com.google.gwt.xml.client.Node;
import com.google.gwt.xml.client.NodeList; import com.google.gwt.xml.client.NodeList;
...@@ -31,7 +30,7 @@ public class MetaDataDtl ...@@ -31,7 +30,7 @@ public class MetaDataDtl
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public HashMap<String, HashMap> getGridNMapMetData(JSONObject jsonObjMetadata,String viewOptionSelectd,ArrayList<String> parameterList) public HashMap<String, HashMap> getGridNMapMetData(JSONObject jsonObjMetadata, String viewOptionSelectd, ArrayList<String> parameterList)
{ {
Document document = null; Document document = null;
ArrayList<String> metaDataList = null; ArrayList<String> metaDataList = null;
...@@ -96,7 +95,7 @@ public class MetaDataDtl ...@@ -96,7 +95,7 @@ public class MetaDataDtl
Node rootNode = null; Node rootNode = null;
NodeList rootNodeList = null; NodeList rootNodeList = null;
ArrayList graphDtlList = null; ArrayList graphDtlList = null;
ArrayList<String> groupCssTypeList=null; ArrayList<String> groupCssTypeList = null;
NodeList graphNodeList = null; NodeList graphNodeList = null;
String attributeName = ""; String attributeName = "";
String graphID = ""; String graphID = "";
...@@ -109,13 +108,13 @@ public class MetaDataDtl ...@@ -109,13 +108,13 @@ public class MetaDataDtl
String lineVisibleDtl = ""; String lineVisibleDtl = "";
String dotThicknessDtl = ""; String dotThicknessDtl = "";
//add on 20dec2014 by swati linkedchart //add on 20dec2014 by swati linkedchart
NodeList pupUpOptNodeList=null; NodeList pupUpOptNodeList = null;
Node popUpNode=null; Node popUpNode = null;
ArrayList<String> linkedMetadataList=null; ArrayList<String> linkedMetadataList = null;
ArrayList<String> linkTypeList=null; ArrayList<String> linkTypeList = null;
String linkedProperties=""; String linkedProperties = "";
String linkedMetadataName=""; String linkedMetadataName = "";
String linkTypeName=""; String linkTypeName = "";
//end on 20dec2014 by swati for linkedchart //end on 20dec2014 by swati for linkedchart
//add on dated 9 july 201041 //add on dated 9 july 201041
Node chartPropertyNode = null; Node chartPropertyNode = null;
...@@ -132,25 +131,25 @@ public class MetaDataDtl ...@@ -132,25 +131,25 @@ public class MetaDataDtl
NodeList columnNodeList = null; NodeList columnNodeList = null;
// ended for heat map // ended for heat map
/*Start For countrymap maxvalue dynamic pass throw query 24/04/2015*/ /* Start For countrymap maxvalue dynamic pass throw query 24/04/2015 */
ArrayList<NodeList> colorNodeList= null; ArrayList<NodeList> colorNodeList = null;
/*End For countrymap maxvalue dynamic pass throw query 24/04/2015*/ /* End For countrymap maxvalue dynamic pass throw query 24/04/2015 */
/*Add By Dhanendra On 04/06/2015*/ /* Add By Dhanendra On 04/06/2015 */
LinkedHashMap<String, String> gridGroupDataMap = null; LinkedHashMap<String, String> gridGroupDataMap = null;
LinkedHashMap<String, String> gridComponantTtlDataMap = null; LinkedHashMap<String, String> gridComponantTtlDataMap = null;
LinkedHashMap<String, String> gridGroupCSSDataMap = null; LinkedHashMap<String, String> gridGroupCSSDataMap = null;
LinkedHashMap<String, String> gridGroupIconDataMap= null; LinkedHashMap<String, String> gridGroupIconDataMap = null;
LinkedHashMap<String, ArrayList<String>> gridRefCompontDataMap = null; LinkedHashMap<String, ArrayList<String>> gridRefCompontDataMap = null;
ArrayList<String> groupTypeList=null; ArrayList<String> groupTypeList = null;
ArrayList<String> componantTitlList=null; ArrayList<String> componantTitlList = null;
ArrayList<String> componentCssList=null; ArrayList<String> componentCssList = null;
ArrayList<String> groupFltrNameList = null; ArrayList<String> groupFltrNameList = null;
NodeList groupFilterNodeList = null; NodeList groupFilterNodeList = null;
Node groupFilterNode = null; Node groupFilterNode = null;
ArrayList<String> toolTextInfoList = null; ArrayList<String> toolTextInfoList = null;
String tooltextDtl = ""; String tooltextDtl = "";
/*End By Dhanendra On 04/06/2015*/ /* End By Dhanendra On 04/06/2015 */
if (jsonObjMetadata != null) if (jsonObjMetadata != null)
{ {
...@@ -191,69 +190,73 @@ public class MetaDataDtl ...@@ -191,69 +190,73 @@ public class MetaDataDtl
} }
String columnsize = ""; String columnsize = "";
String columnAlign = ""; String columnAlign = "";
String dataSource=""; String dataSource = "";
if ("view".equals(rootNode.getNodeName())) if ("view".equals(rootNode.getNodeName()))
{ {
viewNodeList = rootNode.getChildNodes(); viewNodeList = rootNode.getChildNodes();
if(!viewOptionSelectd.equals(rootNode.getAttributes().getNamedItem("name").getNodeValue())) if (!viewOptionSelectd.equals(rootNode.getAttributes().getNamedItem("name").getNodeValue()))
{ {
} }
if( viewOptionSelectd !=null && viewOptionSelectd.equals(rootNode.getAttributes().getNamedItem("name").getNodeValue())) if (viewOptionSelectd != null && viewOptionSelectd.equals(rootNode.getAttributes().getNamedItem("name").getNodeValue()))
{ {
for (int viewCtr = 0; viewCtr < viewNodeList.getLength(); viewCtr++) for (int viewCtr = 0; viewCtr < viewNodeList.getLength(); viewCtr++)
{ {
viewNode = viewNodeList.item(viewCtr); viewNode = viewNodeList.item(viewCtr);
type= viewNode.getAttributes().getNamedItem("type").getNodeValue(); type = viewNode.getAttributes().getNamedItem("type").getNodeValue();
//if ("grid".equals(viewNode.getNodeName())) //if ("grid".equals(viewNode.getNodeName()))
/*change grid to component as per KB Sir Instruction by Dhanendra*/ /*
* change grid to component as per KB Sir
* Instruction by Dhanendra
*/
//if ("grid".equals(viewNode.getNodeName())) //if ("grid".equals(viewNode.getNodeName()))
if ("component".equals(viewNode.getNodeName()) && type.equalsIgnoreCase("T")) if (("component".equals(viewNode.getNodeName()) || "grid".equals(viewNode.getNodeName())) && type.equalsIgnoreCase("T"))
{ {
gridNameDataMap=new LinkedHashMap<String, ArrayList<String>>(); gridNameDataMap = new LinkedHashMap<String, ArrayList<String>>();
gridMeataDataMap=new LinkedHashMap<String, ArrayList<String>>(); gridMeataDataMap = new LinkedHashMap<String, ArrayList<String>>();
gridSizeDataMap=new LinkedHashMap<String, String>(); gridSizeDataMap = new LinkedHashMap<String, String>();
gridCaptionDataMap=new LinkedHashMap<String, String>(); gridCaptionDataMap = new LinkedHashMap<String, String>();
gridAlignDataMap=new LinkedHashMap<String, String>(); gridAlignDataMap = new LinkedHashMap<String, String>();
typeGridMap = new LinkedHashMap<String, String>(); typeGridMap = new LinkedHashMap<String, String>();
gridDataSourceMap= new LinkedHashMap<String, String>(); gridDataSourceMap = new LinkedHashMap<String, String>();
gridCompTypeMap = new LinkedHashMap<String, String>(); gridCompTypeMap = new LinkedHashMap<String, String>();
//Added By Prashant Chavan 09-Mar-15 [for Link On Grid] Start //Added By Prashant Chavan 09-Mar-15 [for Link On Grid] Start
gridMetaLinkDataMap = new LinkedHashMap<String, String>();; gridMetaLinkDataMap = new LinkedHashMap<String, String>();
;
//Added By Prashant Chavan 09-Mar-15 [for Link On Grid] End //Added By Prashant Chavan 09-Mar-15 [for Link On Grid] End
/*Added By Dhanendra*/ /* Added By Dhanendra */
gridRefCompontDataMap = new LinkedHashMap<String, ArrayList<String>>(); gridRefCompontDataMap = new LinkedHashMap<String, ArrayList<String>>();
/*Ended By Dhanendra*/ /* Ended By Dhanendra */
gridLinkFormatMap=new LinkedHashMap<String, String>(); gridLinkFormatMap = new LinkedHashMap<String, String>();
graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue(); graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue();
dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue(); dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue();
type= viewNode.getAttributes().getNamedItem("type").getNodeValue(); type = viewNode.getAttributes().getNamedItem("type").getNodeValue();
gridDataSourceMap.put("datasource"+graphID, dataSource); gridDataSourceMap.put("datasource" + graphID, dataSource);
typeGridMap.put("type"+graphID, type); typeGridMap.put("type" + graphID, type);
gridNodeList = viewNode.getChildNodes(); gridNodeList = viewNode.getChildNodes();
String componentType = ""; String componentType = "";
String componentCaption=""; String componentCaption = "";
//Added By Prashant Chavan 09-Mar-15 [for Link On Grid] Start //Added By Prashant Chavan 09-Mar-15 [for Link On Grid] Start
String linkMetadata=""; String linkMetadata = "";
//Added By Prashant Chavan 09-Mar-15 [for Link On Grid] End //Added By Prashant Chavan 09-Mar-15 [for Link On Grid] End
String linkFormat=""; String linkFormat = "";
String filterDisplay=""; String filterDisplay = "";
/*Add By Dhanedra for metadata change*/ /* Add By Dhanedra for metadata change */
groupFltrNameList = new ArrayList<String>(); groupFltrNameList = new ArrayList<String>();
String groupType =""; String groupType = "";
String componentCssName =""; String componentCssName = "";
String componentIconName=""; String componentIconName = "";
String componantTitl =""; String componantTitl = "";
gridGroupDataMap = new LinkedHashMap<String, String>(); gridGroupDataMap = new LinkedHashMap<String, String>();
gridComponantTtlDataMap = new LinkedHashMap<String, String>(); gridComponantTtlDataMap = new LinkedHashMap<String, String>();
gridGroupCSSDataMap = new LinkedHashMap<String, String>(); gridGroupCSSDataMap = new LinkedHashMap<String, String>();
gridGroupIconDataMap = new LinkedHashMap<String, String>(); gridGroupIconDataMap = new LinkedHashMap<String, String>();
/*End By Dhanedra for metadata change*/ /* End By Dhanedra for metadata change */
for (int gridCtr = 0; gridCtr < gridNodeList.getLength(); gridCtr++) for (int gridCtr = 0; gridCtr < gridNodeList.getLength(); gridCtr++)
{ {
...@@ -261,29 +264,28 @@ public class MetaDataDtl ...@@ -261,29 +264,28 @@ public class MetaDataDtl
if (columnGrpNode.getNodeName().equals("component_type")) if (columnGrpNode.getNodeName().equals("component_type"))
{ {
componentType = columnGrpNode.getChildNodes().item(0).getNodeValue(); componentType = columnGrpNode.getChildNodes().item(0).getNodeValue();
} } else if (columnGrpNode.getNodeName().equals("component_caption"))
else if (columnGrpNode.getNodeName().equals("component_caption"))
{ {
componentCaption = columnGrpNode.getChildNodes().item(0).getNodeValue(); componentCaption = columnGrpNode.getChildNodes().item(0).getNodeValue();
} }
/*Start Add new metadata tag for Compliance Report by Dhanendra on 25May2015 */ /*
* Start Add new metadata tag for
* Compliance Report by Dhanendra on
* 25May2015
*/
else if (columnGrpNode.getNodeName().equals("group")) else if (columnGrpNode.getNodeName().equals("group"))
{ {
groupType = (columnGrpNode.getChildNodes().item(0).getNodeValue()); groupType = (columnGrpNode.getChildNodes().item(0).getNodeValue());
} } else if (columnGrpNode.getNodeName().equals("ComponentTitle"))
else if (columnGrpNode.getNodeName().equals("ComponentTitle"))
{ {
componantTitl = (columnGrpNode.getChildNodes().item(0).getNodeValue()); componantTitl = (columnGrpNode.getChildNodes().item(0).getNodeValue());
} } else if (columnGrpNode.getNodeName().equals("component_css"))
else if (columnGrpNode.getNodeName().equals("component_css"))
{ {
componentCssName = (columnGrpNode.getChildNodes().item(0).getNodeValue()); componentCssName = (columnGrpNode.getChildNodes().item(0).getNodeValue());
} } else if (columnGrpNode.getNodeName().equals("component_icon"))
else if (columnGrpNode.getNodeName().equals("component_icon"))
{ {
componentIconName = (columnGrpNode.getChildNodes().item(0).getNodeValue()); componentIconName = (columnGrpNode.getChildNodes().item(0).getNodeValue());
} } else if (columnGrpNode.getNodeName().equals("groupFilter"))
else if (columnGrpNode.getNodeName().equals("groupFilter"))
{ {
groupFilterNodeList = columnGrpNode.getChildNodes(); groupFilterNodeList = columnGrpNode.getChildNodes();
for (int j = 0; j < groupFilterNodeList.getLength(); j++) for (int j = 0; j < groupFilterNodeList.getLength(); j++)
...@@ -305,12 +307,16 @@ public class MetaDataDtl ...@@ -305,12 +307,16 @@ public class MetaDataDtl
} }
} }
} }
/*Add By Dhanendra */ /* Add By Dhanendra */
gridRefCompontDataMap.put("refreshCompont"+graphID, groupFltrNameList); gridRefCompontDataMap.put("refreshCompont" + graphID, groupFltrNameList);
/*End By Dhanendra*/ /* End By Dhanendra */
} }
/*End Add new metadata tag for Compliance Report by Dhanendra on 25May2015 */ /*
* End Add new metadata tag for
* Compliance Report by Dhanendra on
* 25May2015
*/
else if (columnGrpNode.getNodeName().equals("link_format")) else if (columnGrpNode.getNodeName().equals("link_format"))
{ {
...@@ -318,10 +324,9 @@ public class MetaDataDtl ...@@ -318,10 +324,9 @@ public class MetaDataDtl
filterDisplay = columnGrpNode.getAttributes().getNamedItem("filterdisplay").getNodeValue(); filterDisplay = columnGrpNode.getAttributes().getNamedItem("filterdisplay").getNodeValue();
//if(linkFormat.trim().length()>0 && filterDisplay.trim().length()>0) //if(linkFormat.trim().length()>0 && filterDisplay.trim().length()>0)
//{ //{
linkFormat = linkFormat+"@"+filterDisplay; linkFormat = linkFormat + "@" + filterDisplay;
//} //}
} } else
else
{ {
columnGrpId = columnGrpNode.getAttributes().getNamedItem("id").getNodeValue(); columnGrpId = columnGrpNode.getAttributes().getNamedItem("id").getNodeValue();
columnGrpNodeList = columnGrpNode.getChildNodes(); columnGrpNodeList = columnGrpNode.getChildNodes();
...@@ -374,48 +379,57 @@ public class MetaDataDtl ...@@ -374,48 +379,57 @@ public class MetaDataDtl
} }
} }
gridCaptionDataMap.put("componentCaption"+graphID,componentCaption ); gridCaptionDataMap.put("componentCaption" + graphID, componentCaption);
gridCompTypeMap.put("buildComponent"+graphID, componentType); gridCompTypeMap.put("buildComponent" + graphID, componentType);
gridNGraphMeataDataMap.put("componentType"+graphID, gridCompTypeMap); gridNGraphMeataDataMap.put("componentType" + graphID, gridCompTypeMap);
gridNGraphMeataDataMap.put(graphID, gridMeataDataMap); gridNGraphMeataDataMap.put(graphID, gridMeataDataMap);
gridNGraphMeataDataMap.put("columnName"+graphID, gridNameDataMap); gridNGraphMeataDataMap.put("columnName" + graphID, gridNameDataMap);
gridNGraphMeataDataMap.put("columnSize"+graphID, gridSizeDataMap); gridNGraphMeataDataMap.put("columnSize" + graphID, gridSizeDataMap);
gridNGraphMeataDataMap.put("componentCaption"+graphID, gridCaptionDataMap); gridNGraphMeataDataMap.put("componentCaption" + graphID, gridCaptionDataMap);
gridNGraphMeataDataMap.put("columnAlign"+graphID, gridAlignDataMap); gridNGraphMeataDataMap.put("columnAlign" + graphID, gridAlignDataMap);
gridNGraphMeataDataMap.put("type"+graphID, typeGridMap); gridNGraphMeataDataMap.put("type" + graphID, typeGridMap);
gridNGraphMeataDataMap.put("datasource"+graphID, gridDataSourceMap); gridNGraphMeataDataMap.put("datasource" + graphID, gridDataSourceMap);
//Added By Prashant Chavan on 09-Mar-15 [Link Metadata for Grid] Start //Added By Prashant Chavan on 09-Mar-15 [Link Metadata for Grid] Start
gridNGraphMeataDataMap.put("linkFormatType"+graphID, gridLinkFormatMap); gridNGraphMeataDataMap.put("linkFormatType" + graphID, gridLinkFormatMap);
gridNGraphMeataDataMap.put("metadataNameLink"+graphID, gridMetaLinkDataMap); gridNGraphMeataDataMap.put("metadataNameLink" + graphID, gridMetaLinkDataMap);
//Added By Prashant Chavan on 09-Mar-15 [Link Metadata for Grid] Start //Added By Prashant Chavan on 09-Mar-15 [Link Metadata for Grid] Start
/*Add By Dhanendra on 04/06/2015 for metadata add new tag*/ /*
gridGroupDataMap.put("groupName"+graphID, groupType); * Add By Dhanendra on 04/06/2015 for
gridComponantTtlDataMap.put("componantTitle"+graphID, componantTitl); * metadata add new tag
gridGroupCSSDataMap.put("cssName"+graphID, componentCssName); */
gridGroupIconDataMap.put("iconName"+graphID, componentIconName); gridGroupDataMap.put("groupName" + graphID, groupType);
gridNGraphMeataDataMap.put("groupName"+graphID, gridGroupDataMap); gridComponantTtlDataMap.put("componantTitle" + graphID, componantTitl);
gridNGraphMeataDataMap.put("componantTitle"+graphID, gridComponantTtlDataMap); gridGroupCSSDataMap.put("cssName" + graphID, componentCssName);
gridNGraphMeataDataMap.put("cssName"+graphID, gridGroupCSSDataMap); gridGroupIconDataMap.put("iconName" + graphID, componentIconName);
gridNGraphMeataDataMap.put("iconName"+graphID, gridGroupIconDataMap); gridNGraphMeataDataMap.put("groupName" + graphID, gridGroupDataMap);
gridNGraphMeataDataMap.put("refreshCompont"+graphID, gridRefCompontDataMap); gridNGraphMeataDataMap.put("componantTitle" + graphID, gridComponantTtlDataMap);
/*End By Dhanendra on 04/06/2015 for metadata add new tag*/ gridNGraphMeataDataMap.put("cssName" + graphID, gridGroupCSSDataMap);
gridNGraphMeataDataMap.put("iconName" + graphID, gridGroupIconDataMap);
gridNGraphMeataDataMap.put("refreshCompont" + graphID, gridRefCompontDataMap);
/*
* End By Dhanendra on 04/06/2015 for
* metadata add new tag
*/
columnIDList = new ArrayList<String>(); columnIDList = new ArrayList<String>();
columnNameList= new ArrayList<String>(); columnNameList = new ArrayList<String>();
} }
/*change Graph to component as per KB Sir Instruction by Dhanendra*/ /*
* change Graph to component as per KB Sir
* Instruction by Dhanendra
*/
//if ("component".equals(viewNode.getNodeName())) //if ("component".equals(viewNode.getNodeName()))
if ("component".equals(viewNode.getNodeName()) && type.equalsIgnoreCase("G")) if (("component".equals(viewNode.getNodeName()) || "graph".equals(viewNode.getNodeName())) && type.equalsIgnoreCase("G"))
{ {
typeGraphMap= new LinkedHashMap<String, String>(); typeGraphMap = new LinkedHashMap<String, String>();
graphDataSourceMap= new LinkedHashMap<String, String>(); graphDataSourceMap = new LinkedHashMap<String, String>();
graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue(); graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue();
type= viewNode.getAttributes().getNamedItem("type").getNodeValue(); type = viewNode.getAttributes().getNamedItem("type").getNodeValue();
dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue(); dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue();
graphDataSourceMap.put("datasource"+graphID, dataSource); graphDataSourceMap.put("datasource" + graphID, dataSource);
typeGraphMap.put("type"+graphID, type); typeGraphMap.put("type" + graphID, type);
graphDtlList = new ArrayList<String>(); graphDtlList = new ArrayList<String>();
xAxisColunList = new ArrayList<String>(); xAxisColunList = new ArrayList<String>();
yAxisColunList = new ArrayList<String>(); yAxisColunList = new ArrayList<String>();
...@@ -430,18 +444,18 @@ public class MetaDataDtl ...@@ -430,18 +444,18 @@ public class MetaDataDtl
graphMeataDataMap = new HashMap<String, ArrayList<Object>>(); graphMeataDataMap = new HashMap<String, ArrayList<Object>>();
graphNodeList = viewNode.getChildNodes(); graphNodeList = viewNode.getChildNodes();
//added by swati 20dec2014 for linked chart //added by swati 20dec2014 for linked chart
linkedMetadataList= new ArrayList<String>(); linkedMetadataList = new ArrayList<String>();
linkTypeList = new ArrayList<String>(); linkTypeList = new ArrayList<String>();
//ended by swati 20dec2014 for linked chart //ended by swati 20dec2014 for linked chart
/*Add By Dhanedra for metadata change*/ /* Add By Dhanedra for metadata change */
groupTypeList = new ArrayList<String>(); groupTypeList = new ArrayList<String>();
componentCssList = new ArrayList<String>(); componentCssList = new ArrayList<String>();
componantTitlList = new ArrayList<String>(); componantTitlList = new ArrayList<String>();
groupTypeList = new ArrayList<String>(); groupTypeList = new ArrayList<String>();
groupFltrNameList = new ArrayList<String>(); groupFltrNameList = new ArrayList<String>();
String componentIconName = ""; String componentIconName = "";
/*End By Dhanedra for metadata change*/ /* End By Dhanedra for metadata change */
toolTextInfoList = new ArrayList<String>(); toolTextInfoList = new ArrayList<String>();
...@@ -449,9 +463,11 @@ public class MetaDataDtl ...@@ -449,9 +463,11 @@ public class MetaDataDtl
{ {
graphDataNode = graphNodeList.item(i); graphDataNode = graphNodeList.item(i);
childNodeName = graphDataNode.getNodeName(); childNodeName = graphDataNode.getNodeName();
if ("column_group".equalsIgnoreCase(childNodeName)) if ("column_group".equalsIgnoreCase(childNodeName))
{ {
attributeName = graphDataNode.getAttributes().getNamedItem("id").getNodeValue(); attributeName = graphDataNode.getAttributes().getNamedItem("id").getNodeValue();
if ("x_axis".equalsIgnoreCase(attributeName)) if ("x_axis".equalsIgnoreCase(attributeName))
{ {
xAxsisNodeList = graphDataNode.getChildNodes(); xAxsisNodeList = graphDataNode.getChildNodes();
...@@ -508,19 +524,31 @@ public class MetaDataDtl ...@@ -508,19 +524,31 @@ public class MetaDataDtl
colorDtl = columnNode.getAttributes().getNamedItem("color").getNodeValue(); colorDtl = columnNode.getAttributes().getNamedItem("color").getNodeValue();
colorInfoList.add(colorDtl); colorInfoList.add(colorDtl);
/*add code for Tooltext by Dhanendra On 30-06-15*/ /*
if(columnNode.getAttributes().getNamedItem("tooltext")!=null) * add code for
* Tooltext by
* Dhanendra On
* 30-06-15
*/
if (columnNode.getAttributes().getNamedItem("tooltext") != null)
{ {
tooltextDtl = columnNode.getAttributes().getNamedItem("tooltext").getNodeValue(); tooltextDtl = columnNode.getAttributes().getNamedItem("tooltext").getNodeValue();
toolTextInfoList.add(tooltextDtl); toolTextInfoList.add(tooltextDtl);
} }
/*End code for Tooltext by Dhanendra On 30-06-15*/ /*
* End code for
* Tooltext by
* Dhanendra On
* 30-06-15
*/
if (columnNode.getAttributes().getNamedItem("linevisibility") != null) if (columnNode.getAttributes().getNamedItem("linevisibility") != null)
{ {
lineVisibleDtl = columnNode.getAttributes().getNamedItem("linevisibility").getNodeValue(); lineVisibleDtl = columnNode.getAttributes().getNamedItem("linevisibility").getNodeValue();
if (!lineVisibleDtl.trim().equals("0")) if (lineVisibleDtl.trim().equals("0"))
{ {
flag = "true"; flag = "true";
metaDataMap.put(new JSONString("lineAlpha"), new JSONString("1"));
metaDataMap.put(new JSONString("anchorBorderThickness"), new JSONString("3"));
} }
lineVisibleList.add(lineVisibleDtl); lineVisibleList.add(lineVisibleDtl);
} }
...@@ -537,12 +565,13 @@ public class MetaDataDtl ...@@ -537,12 +565,13 @@ public class MetaDataDtl
linkTypeList.add(linkTypeName); linkTypeList.add(linkTypeName);
//added linked chart metadata name to graphdetail list by swati on 24 Dec 2014 //added linked chart metadata name to graphdetail list by swati on 24 Dec 2014
} }
if (flag.equals("false")) /*if (flag.equals("false"))
{ {
metaDataMap.put(new JSONString("lineAlpha"), new JSONString("1")); metaDataMap.put(new JSONString("lineAlpha"), new JSONString("1"));
metaDataMap.put(new JSONString("anchorBorderThickness"), new JSONString("3")); metaDataMap.put(new JSONString("anchorBorderThickness"), new JSONString("3"));
}*/
} }
} Window.alert("metaDataMap: "+metaDataMap);
//added by swati "placevaluesinside": "1",rotatevalues //added by swati "placevaluesinside": "1",rotatevalues
if ("left_yaxis_title".equals(yAxsisNode.getNodeName())) if ("left_yaxis_title".equals(yAxsisNode.getNodeName()))
{ {
...@@ -572,21 +601,20 @@ public class MetaDataDtl ...@@ -572,21 +601,20 @@ public class MetaDataDtl
{ {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()); dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue());
jsnStringKey = new JSONString("caption"); jsnStringKey = new JSONString("caption");
if(metDtName=="halolmfgmonth") if (metDtName == "halolmfgmonth")
{ {
String temp = parameterList.get(2); String temp = parameterList.get(2);
dataStringValue = new JSONString(temp+" "+chartPropertyNode.getChildNodes().item(0).getNodeValue()+" ("+getCurrentDate()+")"); dataStringValue = new JSONString(temp + " " + chartPropertyNode.getChildNodes().item(0).getNodeValue() + " (" + getCurrentDate() + ")");
} }
metaDataMap.put(jsnStringKey, dataStringValue); metaDataMap.put(jsnStringKey, dataStringValue);
} }
if ("slantlabels".equals(chartPropertyNode.getNodeName())) if ("slantlabels".equals(chartPropertyNode.getNodeName()))
{ {
if(("0").equals(chartPropertyNode.getChildNodes().item(0).getNodeValue())) if (("0").equals(chartPropertyNode.getChildNodes().item(0).getNodeValue()))
{ {
metaDataMap.put(new JSONString("labelDisplay"), new JSONString("")); metaDataMap.put(new JSONString("labelDisplay"), new JSONString(""));
} } else if (("1").equals(chartPropertyNode.getChildNodes().item(0).getNodeValue()))
else if(("1").equals(chartPropertyNode.getChildNodes().item(0).getNodeValue()))
{ {
metaDataMap.put(new JSONString("labelDisplay"), new JSONString("Rotate")); metaDataMap.put(new JSONString("labelDisplay"), new JSONString("Rotate"));
} }
...@@ -688,7 +716,10 @@ public class MetaDataDtl ...@@ -688,7 +716,10 @@ public class MetaDataDtl
jsnStringKey = new JSONString("exportAction"); jsnStringKey = new JSONString("exportAction");
metaDataMap.put(jsnStringKey, dataStringValue); metaDataMap.put(jsnStringKey, dataStringValue);
} }
/* add tag for chart by Dhanendra on 16Jun2015*/ /*
* add tag for chart by
* Dhanendra on 16Jun2015
*/
if ("pieradius".equals(chartPropertyNode.getNodeName())) if ("pieradius".equals(chartPropertyNode.getNodeName()))
{ {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()); dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue());
...@@ -707,11 +738,18 @@ public class MetaDataDtl ...@@ -707,11 +738,18 @@ public class MetaDataDtl
jsnStringKey = new JSONString("showPercentValues"); jsnStringKey = new JSONString("showPercentValues");
metaDataMap.put(jsnStringKey, dataStringValue); metaDataMap.put(jsnStringKey, dataStringValue);
} }
/* End tag for chart by Dhanendra on 16Jun2015*/ /*
* End tag for chart by
* Dhanendra on 16Jun2015
*/
} }
} }
//end swati for chart properties //end swati for chart properties
/*Start Add new metadata tag for Compliance Report by Dhanendra on 25May2015 */ /*
* Start Add new metadata tag for
* Compliance Report by Dhanendra on
* 25May2015
*/
if ("group".equalsIgnoreCase(childNodeName)) if ("group".equalsIgnoreCase(childNodeName))
{ {
groupTypeList.add(graphDataNode.getChildNodes().item(0).getNodeValue()); groupTypeList.add(graphDataNode.getChildNodes().item(0).getNodeValue());
...@@ -750,14 +788,24 @@ public class MetaDataDtl ...@@ -750,14 +788,24 @@ public class MetaDataDtl
} }
} }
} }
/*End Add new metadata tag for Compliance Report by Dhanendra on 25May2015 */ /*
* End Add new metadata tag for
* Compliance Report by Dhanendra on
* 25May2015
*/
/*Add componentIcon tag in metadata by Dhanendra on 01-07-2015*/ /*
* Add componentIcon tag in metadata
* by Dhanendra on 01-07-2015
*/
if ("component_icon".equalsIgnoreCase(childNodeName)) if ("component_icon".equalsIgnoreCase(childNodeName))
{ {
componentIconName = (graphDataNode.getChildNodes().item(0).getNodeValue()); componentIconName = (graphDataNode.getChildNodes().item(0).getNodeValue());
} }
/*End componentIcon tag in metadata by Dhanendra on 01-07-2015*/ /*
* End componentIcon tag in metadata
* by Dhanendra on 01-07-2015
*/
} }
metaDataList.add(metaDataMap.toString().replace('=', ':')); metaDataList.add(metaDataMap.toString().replace('=', ':'));
...@@ -777,48 +825,59 @@ public class MetaDataDtl ...@@ -777,48 +825,59 @@ public class MetaDataDtl
graphDtlList.add(linkedProperties); graphDtlList.add(linkedProperties);
graphDtlList.add(linkTypeList); graphDtlList.add(linkTypeList);
//ended linked chart metadata name to graphdetail list by swati on 22 Dec 2014 //ended linked chart metadata name to graphdetail list by swati on 22 Dec 2014
/*Add Group to graphdetail list by Dhanendra on 25 May 2015 */ /*
* Add Group to graphdetail list by
* Dhanendra on 25 May 2015
*/
graphDtlList.add(groupTypeList); graphDtlList.add(groupTypeList);
graphDtlList.add(componantTitlList); graphDtlList.add(componantTitlList);
graphDtlList.add(componentCssList); graphDtlList.add(componentCssList);
graphDtlList.add(groupFltrNameList); graphDtlList.add(groupFltrNameList);
/*Ended Group to graphdetail list by Dhanendra on 25 May 2015 */ /*
/*Add For ToolText By Dhanendra*/ * Ended Group to graphdetail list by
* Dhanendra on 25 May 2015
*/
/* Add For ToolText By Dhanendra */
graphDtlList.add(toolTextInfoList); graphDtlList.add(toolTextInfoList);
/*End For ToolText By Dhanendra*/ /* End For ToolText By Dhanendra */
/*Add For componentIcon By Dhanendra on 01-07-15*/ /*
* Add For componentIcon By Dhanendra on
* 01-07-15
*/
graphDtlList.add(componentIconName); graphDtlList.add(componentIconName);
/*End For componentIcon By Dhanendra on 01-07-15*/ /*
* End For componentIcon By Dhanendra on
* 01-07-15
*/
conuter++; conuter++;
gridNGraphMeataDataMap.put("type"+graphID, typeGraphMap); gridNGraphMeataDataMap.put("type" + graphID, typeGraphMap);
graphMeataDataMap.put("graph" + conuter, graphDtlList); graphMeataDataMap.put("graph" + conuter, graphDtlList);
gridNGraphMeataDataMap.put(graphID, graphMeataDataMap); gridNGraphMeataDataMap.put(graphID, graphMeataDataMap);
gridNGraphMeataDataMap.put("datasource"+graphID, graphDataSourceMap); gridNGraphMeataDataMap.put("datasource" + graphID, graphDataSourceMap);
} }
if ("heatmap".equals(viewNode.getNodeName())) if ("heatmap".equals(viewNode.getNodeName()))
{ {
typeGraphMap= new LinkedHashMap<String, String>(); typeGraphMap = new LinkedHashMap<String, String>();
graphDataSourceMap= new LinkedHashMap<String, String>(); graphDataSourceMap = new LinkedHashMap<String, String>();
graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue(); graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue();
type= viewNode.getAttributes().getNamedItem("type").getNodeValue(); type = viewNode.getAttributes().getNamedItem("type").getNodeValue();
dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue(); dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue();
graphDataSourceMap.put("datasource"+graphID, dataSource); graphDataSourceMap.put("datasource" + graphID, dataSource);
typeGraphMap.put("type"+graphID, type); typeGraphMap.put("type" + graphID, type);
graphDtlList = new ArrayList<String>(); graphDtlList = new ArrayList<String>();
rowIdList = new ArrayList<String>(); rowIdList = new ArrayList<String>();
rowNameList = new ArrayList<String>(); rowNameList = new ArrayList<String>();
columnIdList = new ArrayList<String>(); columnIdList = new ArrayList<String>();
ArrayList<String> showValueList= new ArrayList<String>(); ArrayList<String> showValueList = new ArrayList<String>();
ArrayList<String> tlLabelList= new ArrayList<String>(); ArrayList<String> tlLabelList = new ArrayList<String>();
ArrayList<String> trLabelList= new ArrayList<String>(); ArrayList<String> trLabelList = new ArrayList<String>();
ArrayList<String> blLabelList= new ArrayList<String>(); ArrayList<String> blLabelList = new ArrayList<String>();
ArrayList<String> brLabelList= new ArrayList<String>(); ArrayList<String> brLabelList = new ArrayList<String>();
linkedMetadataList= new ArrayList<String>(); linkedMetadataList = new ArrayList<String>();
colorRangeList = new ArrayList<String>(); colorRangeList = new ArrayList<String>();
columnNameList = new ArrayList<String>(); columnNameList = new ArrayList<String>();
metaDataList = new ArrayList<String>(); metaDataList = new ArrayList<String>();
...@@ -916,12 +975,22 @@ public class MetaDataDtl ...@@ -916,12 +975,22 @@ public class MetaDataDtl
metaDataMap.put(jsnStringKey, dataStringValue); metaDataMap.put(jsnStringKey, dataStringValue);
} }
/* /*
if ("legendpadding".equals(chartPropertyNode.getNodeName())) * if
{ * ("legendpadding".equals
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()); * (chartPropertyNode
jsnStringKey = new JSONString("legendpadding"); * .getNodeName())) {
metaDataMap.put(jsnStringKey, dataStringValue); * dataStringValue = new
} */ * JSONString
* (chartPropertyNode
* .getChildNodes
* ().item(0).getNodeValue
* ()); jsnStringKey = new
* JSONString
* ("legendpadding");
* metaDataMap
* .put(jsnStringKey,
* dataStringValue); }
*/
if ("canvasborderalpha".equals(chartPropertyNode.getNodeName())) if ("canvasborderalpha".equals(chartPropertyNode.getNodeName()))
{ {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()); dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue());
...@@ -961,7 +1030,6 @@ public class MetaDataDtl ...@@ -961,7 +1030,6 @@ public class MetaDataDtl
metaDataMap.put(jsnStringKey, dataStringValue); metaDataMap.put(jsnStringKey, dataStringValue);
} }
if ("xAxisLabelsOnTop".equals(chartPropertyNode.getNodeName())) if ("xAxisLabelsOnTop".equals(chartPropertyNode.getNodeName()))
{ {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()); dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue());
...@@ -969,7 +1037,6 @@ public class MetaDataDtl ...@@ -969,7 +1037,6 @@ public class MetaDataDtl
metaDataMap.put(jsnStringKey, dataStringValue); metaDataMap.put(jsnStringKey, dataStringValue);
} }
if ("showplotborder".equals(chartPropertyNode.getNodeName())) if ("showplotborder".equals(chartPropertyNode.getNodeName()))
{ {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()); dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue());
...@@ -1106,32 +1173,35 @@ public class MetaDataDtl ...@@ -1106,32 +1173,35 @@ public class MetaDataDtl
graphDtlList.add(blLabelList); graphDtlList.add(blLabelList);
graphDtlList.add(linkedMetadataList); graphDtlList.add(linkedMetadataList);
conuter++; conuter++;
gridNGraphMeataDataMap.put("type"+graphID, typeGraphMap); gridNGraphMeataDataMap.put("type" + graphID, typeGraphMap);
graphMeataDataMap.put("graph" + conuter, graphDtlList); graphMeataDataMap.put("graph" + conuter, graphDtlList);
gridNGraphMeataDataMap.put(graphID, graphMeataDataMap); gridNGraphMeataDataMap.put(graphID, graphMeataDataMap);
gridNGraphMeataDataMap.put("datasource"+graphID, graphDataSourceMap); gridNGraphMeataDataMap.put("datasource" + graphID, graphDataSourceMap);
} }
/**Start of build metadata for country map chart by swati 16 April 2015**/ /**
* Start of build metadata for country map
* chart by swati 16 April 2015
**/
if ("countrymap".equals(viewNode.getNodeName())) if ("countrymap".equals(viewNode.getNodeName()))
{ {
typeGraphMap= new LinkedHashMap<String, String>(); typeGraphMap = new LinkedHashMap<String, String>();
graphDataSourceMap= new LinkedHashMap<String, String>(); graphDataSourceMap = new LinkedHashMap<String, String>();
graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue(); graphID = viewNode.getAttributes().getNamedItem("id").getNodeValue();
type= viewNode.getAttributes().getNamedItem("type").getNodeValue(); type = viewNode.getAttributes().getNamedItem("type").getNodeValue();
dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue(); dataSource = viewNode.getAttributes().getNamedItem("datasource").getNodeValue();
graphDataSourceMap.put("datasource"+graphID, dataSource); graphDataSourceMap.put("datasource" + graphID, dataSource);
typeGraphMap.put("type"+graphID, type); typeGraphMap.put("type" + graphID, type);
graphDtlList = new ArrayList<String>(); graphDtlList = new ArrayList<String>();
columnIdList = new ArrayList<String>(); columnIdList = new ArrayList<String>();
columnNameList = new ArrayList<String>(); columnNameList = new ArrayList<String>();
linkedMetadataList= new ArrayList<String>(); linkedMetadataList = new ArrayList<String>();
linkTypeList = new ArrayList<String>(); linkTypeList = new ArrayList<String>();
ArrayList<String> toptoolTipList= new ArrayList<String>(); ArrayList<String> toptoolTipList = new ArrayList<String>();
ArrayList<String> bottomToolTipList= new ArrayList<String>(); ArrayList<String> bottomToolTipList = new ArrayList<String>();
ArrayList<String> showLabelList= new ArrayList<String>(); ArrayList<String> showLabelList = new ArrayList<String>();
ArrayList<String> hovercolorList= new ArrayList<String>(); ArrayList<String> hovercolorList = new ArrayList<String>();
ArrayList<String> tooltextList= new ArrayList<String>(); ArrayList<String> tooltextList = new ArrayList<String>();
colorRangeList = new ArrayList<String>(); colorRangeList = new ArrayList<String>();
metaDataList = new ArrayList<String>(); metaDataList = new ArrayList<String>();
graphMeataDataMap = new HashMap<String, ArrayList<Object>>(); graphMeataDataMap = new HashMap<String, ArrayList<Object>>();
...@@ -1176,67 +1246,78 @@ public class MetaDataDtl ...@@ -1176,67 +1246,78 @@ public class MetaDataDtl
{ {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()); dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue());
jsnStringKey = new JSONString("caption"); jsnStringKey = new JSONString("caption");
/*Start add code for india map Dhanendra 06/05/2015*/ /*
if(metDtName=="indiamap") * Start add code for
* india map Dhanendra
* 06/05/2015
*/
if (metDtName == "indiamap")
{ {
brandName = FilterCreator.parameterListDtl.get(2); brandName = FilterCreator.parameterListDtl.get(2);
divisionName = FilterCreator.parameterListDtl.get(3); divisionName = FilterCreator.parameterListDtl.get(3);
if(brandName.length()==0 && brandName.equals("")) if (brandName.length() == 0 && brandName.equals(""))
{ {
brandName = "All"; brandName = "All";
} }
if(divisionName.length()==0 && divisionName.equals("")) if (divisionName.length() == 0 && divisionName.equals(""))
{ {
divisionName = "All"; divisionName = "All";
} }
brandNameArr = brandName.split(","); brandNameArr = brandName.split(",");
divisionNameArr = divisionName.split(","); divisionNameArr = divisionName.split(",");
for(int cnt=0; cnt<brandNameArr.length; cnt++) for (int cnt = 0; cnt < brandNameArr.length; cnt++)
{ {
if(cnt<2) if (cnt < 2)
{ {
if(cnt==0) if (cnt == 0)
{ {
brandNameStr.append(brandNameArr[cnt]); brandNameStr.append(brandNameArr[cnt]);
}else{ } else
{
brandNameStr.append(","); brandNameStr.append(",");
brandNameStr.append(brandNameArr[cnt]); brandNameStr.append(brandNameArr[cnt]);
} }
} }
} }
if(brandNameArr.length>2) if (brandNameArr.length > 2)
{ {
brandNameStr.append("..."); brandNameStr.append("...");
} }
for(int cnt=0; cnt<divisionNameArr.length; cnt++) for (int cnt = 0; cnt < divisionNameArr.length; cnt++)
{ {
if(cnt<2) if (cnt < 2)
{ {
if(cnt==0) if (cnt == 0)
{ {
divisionNameStr.append(divisionNameArr[cnt]); divisionNameStr.append(divisionNameArr[cnt]);
}else{ } else
{
divisionNameStr.append(","); divisionNameStr.append(",");
divisionNameStr.append(divisionNameArr[cnt]); divisionNameStr.append(divisionNameArr[cnt]);
} }
} }
} }
if(divisionNameArr.length>2) if (divisionNameArr.length > 2)
{ {
divisionNameStr.append("..."); divisionNameStr.append("...");
} }
} }
if(brandName.length()==0 && divisionName.length()==0) if (brandName.length() == 0 && divisionName.length() == 0)
{ {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()+" Brand : "+brandName + " And Division : "+ divisionName); dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue() + " Brand : " + brandName + " And Division : " + divisionName);
}else{ } else
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue()+" Brand : "+brandNameStr + " And Division : "+ divisionNameStr); {
dataStringValue = new JSONString(chartPropertyNode.getChildNodes().item(0).getNodeValue() + " Brand : " + brandNameStr + " And Division : " + divisionNameStr);
} }
/*End add code for india map Dhanendra 06/05/2015*/ /*
* End add code for
* india map Dhanendra
* 06/05/2015
*/
metaDataMap.put(jsnStringKey, dataStringValue); metaDataMap.put(jsnStringKey, dataStringValue);
} }
if ("bgcolor".equals(chartPropertyNode.getNodeName())) if ("bgcolor".equals(chartPropertyNode.getNodeName()))
...@@ -1397,33 +1478,69 @@ public class MetaDataDtl ...@@ -1397,33 +1478,69 @@ public class MetaDataDtl
colorNodeList = new ArrayList<NodeList>(); colorNodeList = new ArrayList<NodeList>();
columnNodeList = graphDataNode.getChildNodes(); columnNodeList = graphDataNode.getChildNodes();
colorNodeList.add(columnNodeList); colorNodeList.add(columnNodeList);
/*Start This code is write in Chart Creator for max value set from sql by dhanendra on 24/04/2015*/ /*
/*for (int j = 0; j < columnNodeList.getLength(); j++) * Start This code is write in
{ * Chart Creator for max value
colorDataMap = new LinkedHashMap<JSONString, JSONString>(); * set from sql by dhanendra on
columnNode = columnNodeList.item(j); * 24/04/2015
if (columnNode.getAttributes().getNamedItem("code") != null) */
{ /*
dataStringValue = new JSONString(columnNode.getAttributes().getNamedItem("code").getNodeValue()); * for (int j = 0; j <
jsnStringKey = new JSONString("code"); * columnNodeList.getLength();
colorDataMap.put(jsnStringKey, dataStringValue); * j++) { colorDataMap = new
} * LinkedHashMap<JSONString,
if (columnNode.getAttributes().getNamedItem("maxvalue") != null) * JSONString>(); columnNode =
{ * columnNodeList.item(j); if
dataStringValue = new JSONString(columnNode.getAttributes().getNamedItem("maxvalue").getNodeValue()); * (columnNode
jsnStringKey = new JSONString("maxvalue"); * .getAttributes().getNamedItem
colorDataMap.put(jsnStringKey, dataStringValue); * ("code") != null) {
} * dataStringValue = new
if (columnNode.getAttributes().getNamedItem("label") != null) * JSONString
{ * (columnNode.getAttributes
dataStringValue = new JSONString(columnNode.getAttributes().getNamedItem("label").getNodeValue()); * ().getNamedItem
jsnStringKey = new JSONString("displayvalue"); * ("code").getNodeValue());
colorDataMap.put(jsnStringKey, dataStringValue); * jsnStringKey = new
} * JSONString("code");
colorList.add(colorDataMap.toString().replace('=', ':')); * colorDataMap
}*/ * .put(jsnStringKey,
* dataStringValue); } if
* (columnNode
* .getAttributes().getNamedItem
* ("maxvalue") != null) {
* dataStringValue = new
* JSONString
* (columnNode.getAttributes
* ().getNamedItem
* ("maxvalue").getNodeValue());
* jsnStringKey = new
* JSONString("maxvalue");
* colorDataMap
* .put(jsnStringKey,
* dataStringValue); } if
* (columnNode
* .getAttributes().getNamedItem
* ("label") != null) {
* dataStringValue = new
* JSONString
* (columnNode.getAttributes
* ().getNamedItem
* ("label").getNodeValue());
* jsnStringKey = new
* JSONString("displayvalue");
* colorDataMap
* .put(jsnStringKey,
* dataStringValue); }
* colorList.
* add(colorDataMap.toString
* ().replace('=', ':')); }
*/
/*End This code is write in Chart Creator for max value set from sql by dhanendra on 24/04/2015*/ /*
* End This code is write in
* Chart Creator for max value
* set from sql by dhanendra on
* 24/04/2015
*/
} }
} }
metaDataList.add(metaDataMap.toString().replace('=', ':')); metaDataList.add(metaDataMap.toString().replace('=', ':'));
...@@ -1431,7 +1548,7 @@ public class MetaDataDtl ...@@ -1431,7 +1548,7 @@ public class MetaDataDtl
graphDtlList.add(columnIdList); graphDtlList.add(columnIdList);
graphDtlList.add(columnNameList); graphDtlList.add(columnNameList);
graphDtlList.add(colorRangeList); graphDtlList.add(colorRangeList);
/*graphDtlList.add(colorList);*/ /* graphDtlList.add(colorList); */
graphDtlList.add(colorNodeList); graphDtlList.add(colorNodeList);
graphDtlList.add(toptoolTipList); graphDtlList.add(toptoolTipList);
graphDtlList.add(bottomToolTipList); graphDtlList.add(bottomToolTipList);
...@@ -1441,12 +1558,15 @@ public class MetaDataDtl ...@@ -1441,12 +1558,15 @@ public class MetaDataDtl
graphDtlList.add(hovercolorList); graphDtlList.add(hovercolorList);
graphDtlList.add(tooltextList); graphDtlList.add(tooltextList);
conuter++; conuter++;
gridNGraphMeataDataMap.put("type"+graphID, typeGraphMap); gridNGraphMeataDataMap.put("type" + graphID, typeGraphMap);
graphMeataDataMap.put("graph" + conuter, graphDtlList); graphMeataDataMap.put("graph" + conuter, graphDtlList);
gridNGraphMeataDataMap.put(graphID, graphMeataDataMap); gridNGraphMeataDataMap.put(graphID, graphMeataDataMap);
gridNGraphMeataDataMap.put("datasource"+graphID, graphDataSourceMap); gridNGraphMeataDataMap.put("datasource" + graphID, graphDataSourceMap);
} }
/**End of build metadata for country mao by swati 16 April 2015**/ /**
* End of build metadata for country mao by
* swati 16 April 2015
**/
//***Start Code for Card (Added by sachin on 1/june/2015)*****\\ //***Start Code for Card (Added by sachin on 1/june/2015)*****\\
...@@ -1463,7 +1583,7 @@ public class MetaDataDtl ...@@ -1463,7 +1583,7 @@ public class MetaDataDtl
typeGraphMap.put("type" + graphID, type); typeGraphMap.put("type" + graphID, type);
graphNodeList = viewNode.getChildNodes(); graphNodeList = viewNode.getChildNodes();
metaDataMap=new LinkedHashMap<JSONString, JSONString>(); metaDataMap = new LinkedHashMap<JSONString, JSONString>();
ArrayList<String> heightList = new ArrayList<String>(); ArrayList<String> heightList = new ArrayList<String>();
ArrayList<String> widthList = new ArrayList<String>(); ArrayList<String> widthList = new ArrayList<String>();
...@@ -1521,40 +1641,52 @@ public class MetaDataDtl ...@@ -1521,40 +1641,52 @@ public class MetaDataDtl
} }
} }
} }
/*Add componentIcon tag in metadata by Dhanendra on 01-07-2015*/ /*
* Add componentIcon tag in metadata
* by Dhanendra on 01-07-2015
*/
if ("component_icon".equalsIgnoreCase(childNodeName)) if ("component_icon".equalsIgnoreCase(childNodeName))
{ {
componentIconName = (graphDataNode.getChildNodes().item(0).getNodeValue()); componentIconName = (graphDataNode.getChildNodes().item(0).getNodeValue());
} }
/*End componentIcon tag in metadata by Dhanendra on 01-07-2015*/ /*
* End componentIcon tag in metadata
* by Dhanendra on 01-07-2015
*/
} }
if ("groupFilter".equalsIgnoreCase(childNodeName)) if ("groupFilter".equalsIgnoreCase(childNodeName))
{/* {/*
groupFilterNodeList = graphDataNode.getChildNodes(); * groupFilterNodeList =
for (int j = 0; j < groupFilterNodeList.getLength(); j++) * graphDataNode.getChildNodes(); for
{ * (int j = 0; j <
groupFilterNode = groupFilterNodeList.item(j); * groupFilterNodeList.getLength(); j++)
if ("autoFilter".equals(groupFilterNode.getNodeName())) * { groupFilterNode =
{ * groupFilterNodeList.item(j); if
dataStringValue = new JSONString(groupFilterNode.getChildNodes().item(0).getNodeValue()); * ("autoFilter"
jsnStringKey = new JSONString("autoFilter"); * .equals(groupFilterNode.getNodeName
metaDataMap.put(jsnStringKey, dataStringValue); * ())) { dataStringValue = new
} * JSONString
if ("refreshComponents".equals(groupFilterNode.getNodeName())) * (groupFilterNode.getChildNodes
{ * ().item(0).getNodeValue());
groupFilterNodeList = groupFilterNode.getChildNodes(); * jsnStringKey = new
for (int colCtr = 0; colCtr < groupFilterNodeList.getLength(); colCtr++) * JSONString("autoFilter");
{ * metaDataMap.put(jsnStringKey,
columnNode = groupFilterNodeList.item(colCtr); * dataStringValue); } if
groupFltrNameList.add(columnNode.getChildNodes().item(0).getNodeValue()); * ("refreshComponents"
} * .equals(groupFilterNode
* .getNodeName())) {
* groupFilterNodeList =
* groupFilterNode.getChildNodes(); for
* (int colCtr = 0; colCtr <
* groupFilterNodeList.getLength();
* colCtr++) { columnNode =
* groupFilterNodeList.item(colCtr);
* groupFltrNameList
* .add(columnNode.getChildNodes
* ().item(0).getNodeValue()); } } }
*/
} }
}*/
}
//metaDataList.add(metaDataMap.toString().replace('=', ':')); //metaDataList.add(metaDataMap.toString().replace('=', ':'));
graphDtlList.add(groupTypeList); graphDtlList.add(groupTypeList);
...@@ -1584,11 +1716,63 @@ public class MetaDataDtl ...@@ -1584,11 +1716,63 @@ public class MetaDataDtl
} }
} }
gridNGraphMeataDataMap.put("datSrc", datsSourceDtlMap); gridNGraphMeataDataMap.put("datSrc", datsSourceDtlMap);
//Window.alert("gridNGraphMeataDataMap:"+gridNGraphMeataDataMap);
return gridNGraphMeataDataMap; return gridNGraphMeataDataMap;
} }
/*public ArrayList<FilterInfo> getFilters(JSONObject jsonObjMetadata) /*
* public ArrayList<FilterInfo> getFilters(JSONObject jsonObjMetadata) {
* Document document = null; String xmlMetadata = null; Node rootNode =
* null; NodeList rootNodeList = null; NodeList filtrNodeList = null;
* NodeList fltrDtlNodeList = null; Node columNode = null;
* ArrayList<FilterInfo> fltrDtlList = new ArrayList<FilterInfo>(); ;
* FilterInfo filterInfo = null;
*
* if (jsonObjMetadata != null) { xmlMetadata =
* jsonObjMetadata.get("metaData").toString(); xmlMetadata =
* jsonObjMetadata.get("metaData").toString().replace("\\", "").trim();
* xmlMetadata = xmlMetadata.replace('"', ' ').trim(); try { document =
* XMLParser.parse(xmlMetadata); XMLParser.removeWhitespace(document); if
* (document != null) { rootNodeList =
* document.getElementsByTagName("Root").item(0).getChildNodes(); for (int
* rootCtr = 0; rootCtr < rootNodeList.getLength(); rootCtr++) { rootNode =
* rootNodeList.item(rootCtr); if ("filters".equals(rootNode.getNodeName()))
* { filtrNodeList = rootNode.getChildNodes(); for (int fltrCtr = 0; fltrCtr
* < filtrNodeList.getLength(); fltrCtr++) { fltrDtlNodeList =
* filtrNodeList.item(fltrCtr).getChildNodes(); filterInfo = new
* FilterInfo();
*
* filterInfo.setFiltertype(filtrNodeList.item(fltrCtr).getAttributes().
* getNamedItem("type").getNodeValue()); for (int dtlCnt = 0; dtlCnt <
* fltrDtlNodeList.getLength(); dtlCnt++) { columNode =
* fltrDtlNodeList.item(dtlCnt); if
* ("col_title".equals(columNode.getNodeName())) { //
* fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
* filterInfo.setColTitle(columNode.getChildNodes().item(0).getNodeValue());
* } if ("col_name".equals(columNode.getNodeName())) { //
* fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
*
* filterInfo.setColName(columNode.getChildNodes().item(0).getNodeValue());
* filterInfo
* .setColNameId(columNode.getAttributes().getNamedItem("id").getNodeValue
* ()); filterInfo.setColModuleName(columNode.getAttributes().getNamedItem(
* "moduleName").getNodeValue()); Add Dhanendra For 2 Attribute in Metaxml
* 8Dec2014
* filterInfo.setName(columNode.getAttributes().getNamedItem("name")
* .getNodeValue());
* filterInfo.setMandatory(columNode.getAttributes().getNamedItem
* ("mandatory").getNodeValue()); End Dhanendra For 2 Attribute in Metaxml
* 8Dec2014
* if(columNode.getAttributes().getNamedItem("headingDisplay")!=null) {
* filterInfo
* .setHeadingDisplay(columNode.getAttributes().getNamedItem("headingDisplay"
* ).getNodeValue()); } } if ("col_descr".equals(columNode.getNodeName())) {
* filterInfo.setColDescr(columNode.getChildNodes().item(0).getNodeValue());
* // fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue()); } }
* fltrDtlList.add(filterInfo); } } } } } catch (Exception e) {
* Window.alert(" Exception :: :: getFilters() :: MetaDataDtl [" +
* e.getMessage() + "]"); } } return fltrDtlList; }
*/
public ArrayList<FilterInfo> getFilters(JSONObject jsonObjMetadata)
{ {
Document document = null; Document document = null;
String xmlMetadata = null; String xmlMetadata = null;
...@@ -1597,7 +1781,7 @@ public class MetaDataDtl ...@@ -1597,7 +1781,7 @@ public class MetaDataDtl
NodeList filtrNodeList = null; NodeList filtrNodeList = null;
NodeList fltrDtlNodeList = null; NodeList fltrDtlNodeList = null;
Node columNode = null; Node columNode = null;
ArrayList<FilterInfo> fltrDtlList = new ArrayList<FilterInfo>(); ; ArrayList<FilterInfo> fltrDtlList = new ArrayList<FilterInfo>();
FilterInfo filterInfo = null; FilterInfo filterInfo = null;
if (jsonObjMetadata != null) if (jsonObjMetadata != null)
...@@ -1618,148 +1802,94 @@ public class MetaDataDtl ...@@ -1618,148 +1802,94 @@ public class MetaDataDtl
if ("filters".equals(rootNode.getNodeName())) if ("filters".equals(rootNode.getNodeName()))
{ {
filtrNodeList = rootNode.getChildNodes(); filtrNodeList = rootNode.getChildNodes();
for (int fltrCtr = 0; fltrCtr < filtrNodeList.getLength(); fltrCtr++) for (int fltrCtr = 0; fltrCtr < filtrNodeList.getLength(); fltrCtr++)
{ {
fltrDtlNodeList = filtrNodeList.item(fltrCtr).getChildNodes(); fltrDtlNodeList = filtrNodeList.item(fltrCtr).getChildNodes();
filterInfo = new FilterInfo(); filterInfo = new FilterInfo();
filterInfo.setFiltertype(filtrNodeList.item(fltrCtr).getAttributes().getNamedItem("type").getNodeValue()); filterInfo.setFiltrType(filtrNodeList.item(fltrCtr).getAttributes().getNamedItem("type").getNodeValue());
if (fltrDtlNodeList.getLength() == 3)
{
for (int dtlCnt = 0; dtlCnt < fltrDtlNodeList.getLength(); dtlCnt++) for (int dtlCnt = 0; dtlCnt < fltrDtlNodeList.getLength(); dtlCnt++)
{ {
columNode = fltrDtlNodeList.item(dtlCnt); columNode = fltrDtlNodeList.item(dtlCnt);
if ("col_title".equals(columNode.getNodeName()))
{
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
filterInfo.setColTitle(columNode.getChildNodes().item(0).getNodeValue());
}
if ("col_name".equals(columNode.getNodeName())) if ("col_name".equals(columNode.getNodeName()))
{ {
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setColDescr(columNode.getChildNodes().item(0).getNodeValue());
filterInfo.setDefaultValue("");
filterInfo.setColId("");
filterInfo.setColName(columNode.getChildNodes().item(0).getNodeValue()); if (columNode.getAttributes().getNamedItem("name") != null)
filterInfo.setColNameId(columNode.getAttributes().getNamedItem("id").getNodeValue());
filterInfo.setColModuleName(columNode.getAttributes().getNamedItem("moduleName").getNodeValue());
Add Dhanendra For 2 Attribute in Metaxml 8Dec2014
filterInfo.setName(columNode.getAttributes().getNamedItem("name").getNodeValue());
filterInfo.setMandatory(columNode.getAttributes().getNamedItem("mandatory").getNodeValue());
End Dhanendra For 2 Attribute in Metaxml 8Dec2014
if(columNode.getAttributes().getNamedItem("headingDisplay")!=null)
{ {
filterInfo.setHeadingDisplay(columNode.getAttributes().getNamedItem("headingDisplay").getNodeValue()); filterInfo.setColName(columNode.getAttributes().getNamedItem("name").getNodeValue());
}
} }
if ("col_descr".equals(columNode.getNodeName()))
if (columNode.getAttributes().getNamedItem("id") != null)
{ {
filterInfo.setColDescr(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setFieldName(columNode.getAttributes().getNamedItem("id").getNodeValue());
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
}
} }
fltrDtlList.add(filterInfo);
if (columNode.getAttributes().getNamedItem("moduleName") != null)
{
filterInfo.setModName(columNode.getAttributes().getNamedItem("moduleName").getNodeValue());
} }
if (columNode.getAttributes().getNamedItem("headingDisplay") != null)
{
filterInfo.setShowOnTitle(columNode.getAttributes().getNamedItem("headingDisplay").getNodeValue());
} }
if (columNode.getAttributes().getNamedItem("mandatory") != null)
{
filterInfo.setMandatory(columNode.getAttributes().getNamedItem("mandatory").getNodeValue());
} }
} }
} catch (Exception e)
{
Window.alert(" Exception :: :: getFilters() :: MetaDataDtl [" + e.getMessage() + "]");
} }
} }
return fltrDtlList; else
}*/
public ArrayList<FilterInfo> getFilters(JSONObject jsonObjMetadata)
{
Document document = null;
String xmlMetadata = null;
Node rootNode = null;
NodeList rootNodeList = null;
NodeList filtrNodeList = null;
NodeList fltrDtlNodeList = null;
Node columNode = null;
ArrayList<FilterInfo> fltrDtlList = new ArrayList<FilterInfo>(); ;
FilterInfo filterInfo = null;
if (jsonObjMetadata != null)
{
xmlMetadata = jsonObjMetadata.get("metaData").toString();
xmlMetadata = jsonObjMetadata.get("metaData").toString().replace("\\", "").trim();
xmlMetadata = xmlMetadata.replace('"', ' ').trim();
try
{
document = XMLParser.parse(xmlMetadata);
XMLParser.removeWhitespace(document);
if (document != null)
{
rootNodeList = document.getElementsByTagName("Root").item(0).getChildNodes();
for (int rootCtr = 0; rootCtr < rootNodeList.getLength(); rootCtr++)
{
rootNode = rootNodeList.item(rootCtr);
if ("filters".equals(rootNode.getNodeName()))
{
filtrNodeList = rootNode.getChildNodes();
for (int fltrCtr = 0; fltrCtr < filtrNodeList.getLength(); fltrCtr++)
{ {
fltrDtlNodeList = filtrNodeList.item(fltrCtr).getChildNodes();
filterInfo = new FilterInfo();
filterInfo.setFiltrType(filtrNodeList.item(fltrCtr).getAttributes().getNamedItem("type").getNodeValue());
for (int dtlCnt = 0; dtlCnt < fltrDtlNodeList.getLength(); dtlCnt++) for (int dtlCnt = 0; dtlCnt < fltrDtlNodeList.getLength(); dtlCnt++)
{ {
columNode = fltrDtlNodeList.item(dtlCnt); columNode = fltrDtlNodeList.item(dtlCnt);
if ("default_value".equals(columNode.getNodeName())) if ("default_value".equals(columNode.getNodeName()))
{ {
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
filterInfo.setDefaultValue(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setDefaultValue(columNode.getChildNodes().item(0).getNodeValue());
} }
if ("col_name".equals(columNode.getNodeName())) if ("col_name".equals(columNode.getNodeName()))
{ {
filterInfo.setColName(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setColName(columNode.getChildNodes().item(0).getNodeValue());
/*// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
filterInfo.setColName(columNode.getChildNodes().item(0).getNodeValue());
filterInfo.setColNameId(columNode.getAttributes().getNamedItem("id").getNodeValue());
filterInfo.setColModuleName(columNode.getAttributes().getNamedItem("moduleName").getNodeValue());
Add Dhanendra For 2 Attribute in Metaxml 8Dec2014
filterInfo.setName(columNode.getAttributes().getNamedItem("name").getNodeValue());
filterInfo.setMandatory(columNode.getAttributes().getNamedItem("mandatory").getNodeValue());
End Dhanendra For 2 Attribute in Metaxml 8Dec2014*/
} }
if ("col_descr".equals(columNode.getNodeName())) if ("col_descr".equals(columNode.getNodeName()))
{ {
filterInfo.setColDescr(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setColDescr(columNode.getChildNodes().item(0).getNodeValue());
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
} }
if ("col_id".equals(columNode.getNodeName())) if ("col_id".equals(columNode.getNodeName()))
{ {
filterInfo.setColId(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setColId(columNode.getChildNodes().item(0).getNodeValue());
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
} }
if ("field_name".equals(columNode.getNodeName())) if ("field_name".equals(columNode.getNodeName()))
{ {
filterInfo.setFieldName(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setFieldName(columNode.getChildNodes().item(0).getNodeValue());
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
} }
if ("mod_name".equals(columNode.getNodeName())) if ("mod_name".equals(columNode.getNodeName()))
{ {
filterInfo.setModName(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setModName(columNode.getChildNodes().item(0).getNodeValue());
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
} }
if ("show_ontitle".equals(columNode.getNodeName())) if ("show_ontitle".equals(columNode.getNodeName()))
{ {
filterInfo.setShowOnTitle(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setShowOnTitle(columNode.getChildNodes().item(0).getNodeValue());
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue());
} }
if ("mandatory".equals(columNode.getNodeName())) if ("mandatory".equals(columNode.getNodeName()))
{ {
filterInfo.setMandatory(columNode.getChildNodes().item(0).getNodeValue()); filterInfo.setMandatory(columNode.getChildNodes().item(0).getNodeValue());
// fltrDtlList.add(columNode.getChildNodes().item(0).getNodeValue()); }
} }
} }
fltrDtlList.add(filterInfo); fltrDtlList.add(filterInfo);
...@@ -1801,10 +1931,12 @@ public class MetaDataDtl ...@@ -1801,10 +1931,12 @@ public class MetaDataDtl
if ("page_title".equals(rootNode.getNodeName())) if ("page_title".equals(rootNode.getNodeName()))
{ {
pageTitle.add(rootNode.getChildNodes().item(0).getNodeValue()); pageTitle.add(rootNode.getChildNodes().item(0).getNodeValue());
/*if(rootNode.getAttributes().getNamedItem("titleparam").getNodeValue()!=null) /*
{ * if(rootNode.getAttributes().getNamedItem("titleparam"
pageTitle.add(rootNode.getAttributes().getNamedItem("titleparam").getNodeValue()); * ).getNodeValue()!=null) {
}*/ * pageTitle.add(rootNode.getAttributes
* ().getNamedItem("titleparam").getNodeValue()); }
*/
} }
if ("sub_title".equals(rootNode.getNodeName())) if ("sub_title".equals(rootNode.getNodeName()))
{ {
...@@ -1818,16 +1950,17 @@ public class MetaDataDtl ...@@ -1818,16 +1950,17 @@ public class MetaDataDtl
} }
} }
return pageTitle; return pageTitle;
} }
public boolean isFiltrHide(JSONObject jsonObjMetadata) public boolean isFiltrHide(JSONObject jsonObjMetadata)
{ {
boolean showFilter=false; boolean showFilter = false;
Document document = null; Document document = null;
String xmlMetadata = null; String xmlMetadata = null;
Node rootNode = null; Node rootNode = null;
NodeList rootNodeList = null; NodeList rootNodeList = null;
String fiterValue=""; String fiterValue = "";
if (jsonObjMetadata != null) if (jsonObjMetadata != null)
{ {
xmlMetadata = jsonObjMetadata.get("metaData").toString(); xmlMetadata = jsonObjMetadata.get("metaData").toString();
...@@ -1845,7 +1978,10 @@ public class MetaDataDtl ...@@ -1845,7 +1978,10 @@ public class MetaDataDtl
rootNode = rootNodeList.item(rootCtr); rootNode = rootNodeList.item(rootCtr);
if ("filters".equals(rootNode.getNodeName())) if ("filters".equals(rootNode.getNodeName()))
{ {
fiterValue=rootNode.getAttributes().getNamedItem("display").getNodeValue(); if (rootNode.getAttributes().getNamedItem("display") != null)
{
fiterValue = rootNode.getAttributes().getNamedItem("display").getNodeValue();
}
} }
} }
} }
...@@ -1854,16 +1990,16 @@ public class MetaDataDtl ...@@ -1854,16 +1990,16 @@ public class MetaDataDtl
Window.alert(" Exception :: :: isFiltrHide() :: MetaDataDtl [" + e.getMessage() + "]"); Window.alert(" Exception :: :: isFiltrHide() :: MetaDataDtl [" + e.getMessage() + "]");
} }
} }
if("Y".equalsIgnoreCase(fiterValue)) if ("Y".equalsIgnoreCase(fiterValue))
{ {
showFilter=true; showFilter = true;
} }
return showFilter; return showFilter;
} }
public String getCurrentDate() public String getCurrentDate()
{ {
String currDate=""; String currDate = "";
DateFormat dateFor = new SimpleDateFormat("dd/MM/yyyy"); DateFormat dateFor = new SimpleDateFormat("dd/MM/yyyy");
Date date = new Date(); Date date = new Date();
currDate = dateFor.format(date); currDate = dateFor.format(date);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment