Changeset 7014 in main
- Timestamp:
- 09/29/14 23:23:37 (9 years ago)
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ibisph-view/src/main/webapp/xslt/html/Graphic.xslt
r6992 r7014 90 90 exists(/QUERY_MODULE/REQUEST/SELECTED_GROUP_BY[starts-with(COLUMN_DIMENSION_NAME, $Graphic.datasetMappablePrefix)]) 91 91 or 92 exists(/QUERY_MODULE/REQUEST/SELECTED_GROUP_BY[starts-with( SELECTED_GROUP_BY, $Graphic.datasetMappablePrefix)])92 exists(/QUERY_MODULE/REQUEST/SELECTED_GROUP_BY[starts-with(OTHER_GROUP_BY, $Graphic.datasetMappablePrefix)]) 93 93 ) 94 94 ) -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/Page.xslt
r7005 r7014 91 91 > 92 92 <!-- really vars but implemented as params - just in case... --> 93 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/ROW_DIMENSION_NAME"/>94 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/COLUMN_DIMENSION_NAME"/>95 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/OTHER_DIMENSION_NAME"/>93 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/ROW_DIMENSION_NAME"/> 94 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/COLUMN_DIMENSION_NAME"/> 95 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/OTHER_DIMENSION_NAME"/> 96 96 <xsl:param name="rowDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$rowDimensionName]/TITLE"/> 97 97 <xsl:param name="colDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$colDimensionName]/TITLE"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/SiteSpecific.xslt
r6826 r7014 169 169 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TEMPLATES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> 170 170 <xsl:template name="Page.specificScript" ibis:doc="Provides the the wiki javascript"> 171 <xsl:variable name="geoGroupByDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/*[starts-with(text(), $Graphic.datasetMappablePrefix)]/text()"/>172 <xsl:variable name="nonGeoGroupByDimensionNames" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/*[not(starts-with(text(), $Graphic.datasetMappablePrefix))]/text()"/>171 <xsl:variable name="geoGroupByDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/*[starts-with(text(), $Graphic.datasetMappablePrefix)]/text()"/> 172 <xsl:variable name="nonGeoGroupByDimensionNames" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/*[not(starts-with(text(), $Graphic.datasetMappablePrefix))]/text()"/> 173 173 174 174 <xsl:message select="concat('geoGroupByDimensionName: ', $geoGroupByDimensionName)"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/interactive/Page.xslt
r7012 r7014 61 61 > 62 62 <!-- really vars but implemented as params - just in case... --> 63 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/ROW_DIMENSION_NAME"/>64 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/COLUMN_DIMENSION_NAME"/>65 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/OTHER_DIMENSION_NAME"/>63 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/ROW_DIMENSION_NAME"/> 64 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/COLUMN_DIMENSION_NAME"/> 65 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/OTHER_DIMENSION_NAME"/> 66 66 <xsl:param name="rowDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$rowDimensionName]/TITLE"/> 67 67 <xsl:param name="colDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$colDimensionName]/TITLE"/> … … 259 259 260 260 <xsl:template name="Page.leafletKendoScript" ibis:doc="Provides the kendo and leaflet javascript"> 261 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/ROW_DIMENSION_NAME"/>262 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/COLUMN_DIMENSION_NAME"/>263 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/OTHER_DIMENSION_NAME"/>261 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/ROW_DIMENSION_NAME"/> 262 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/COLUMN_DIMENSION_NAME"/> 263 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/OTHER_DIMENSION_NAME"/> 264 264 <xsl:param name="rowDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$rowDimensionName]/TITLE"/> 265 265 <xsl:param name="colDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$colDimensionName]/TITLE"/> … … 273 273 <xsl:variable name="hasLimit" select="$hasLowerLimit or $hasUpperLimit"/> 274 274 275 <xsl:variable name="geoGroupByDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/*[starts-with(text(), $Graphic.datasetMappablePrefix)]/text()"/>275 <xsl:variable name="geoGroupByDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/*[starts-with(text(), $Graphic.datasetMappablePrefix)]/text()"/> 276 276 277 277 <xsl:variable name="dimensions"> -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/simple/Page.xslt
r6992 r7014 80 80 section, the optional graphic, optional 2-d table, data list table." 81 81 > 82 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/ROW_DIMENSION_NAME"/>83 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/COLUMN_DIMENSION_NAME"/>84 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ RESULT_GROUP_BY/OTHER_DIMENSION_NAME"/>82 <xsl:param name="rowDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/ROW_DIMENSION_NAME"/> 83 <xsl:param name="colDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/COLUMN_DIMENSION_NAME"/> 84 <xsl:param name="otherDimensionName" select="$Result.queryModule/REQUEST/ACTUAL_GROUP_BY/OTHER_DIMENSION_NAME"/> 85 85 <xsl:param name="rowDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$rowDimensionName]/TITLE"/> 86 86 <xsl:param name="colDimensionTitle" select="$Result.queryModule/DIMENSIONS/DIMENSION[NAME=$colDimensionName]/TITLE"/> -
trunk/ibisph-view/src/main/webapp/xslt/svg/query/Map.xslt
r5462 r7014 71 71 <xsl:param name="queryResult" select="/QUERY_MODULE/IBISQ_QUERY_RESULT" ibis:doc="Convenience variable that contains the query result element."/> 72 72 73 <xsl:param name="recordAreaDimensionName" select="/QUERY_MODULE/REQUEST/ RESULT_GROUP_BY/ROW_DIMENSION_NAME"73 <xsl:param name="recordAreaDimensionName" select="/QUERY_MODULE/REQUEST/ACTUAL_GROUP_BY/ROW_DIMENSION_NAME" 74 74 ibis:doc="Type of area being displayed (county, small area, LHD) 75 75 which is the dimension associated with the '_RowGroupByDimensionName' value." -
trunk/ibisph/src/main/java/org/ibisph/querymodule/modelmap/AddHTTPRequestParametersToQueryModule.java
r7013 r7014 31 31 implements ProcessModelMapFromHTTPRequest 32 32 { 33 // HTTP Request group by parameternames.33 // HTTP Request/query module PARAM to group by names. 34 34 protected Map<String, String> groupByHTTPRequestParameterNameByGroupByElementName = new HashMap<String, String>(); 35 35 … … 84 84 setSelectedDimensions (queryModule, request); 85 85 setSelectedControls (queryModule, request); 86 setActualGroupBys(queryModule);87 86 } //-------------------------- End of Method ------------------------------ 88 87 … … 357 356 } 358 357 } 359 // not sure needed??? checkRowGroupBySetAndSetToFirstNonProxyIfNot(document);360 358 361 359 // Set specified measure name. If not specified then leave as is - default. … … 364 362 measureName = request.getParameter("MeasureName"); 365 363 if(!StrLib.isSomething(measureName)) measureName = request.getParameter("_MeasureName"); 366 if(StrLib.isSomething(measureName)) this.queryModuleService.set MeasureName(document, measureName);364 if(StrLib.isSomething(measureName)) this.queryModuleService.setRequestMeasureName(document, measureName); 367 365 } 368 366 … … 375 373 if(!StrLib.isSomething(graphicName)) graphicName = request.getParameter("graphicName"); 376 374 } 377 if(StrLib.isSomething(graphicName)) this.queryModuleService.set GraphicName(document, graphicName);375 if(StrLib.isSomething(graphicName)) this.queryModuleService.setRequestGraphicName(document, graphicName); 378 376 } 379 377 } //-------------------------- End of Method ------------------------------ … … 398 396 } //-------------------------- End of Method ------------------------------ 399 397 400 /**401 * Checks to make sure that a row group by is set and if not sets to the first402 * none proxy name.403 * @param queryModule404 * @param groupByElementName405 * @param groupByDimensionNameValue406 */407 public void checkRowGroupBySetAndSetToFirstNonProxyIfNot(Node queryModule) {408 // check to make sure that a row group by is set. If not then set to the409 // first available non proxy dimension - if exists.410 if( !StrLib.isSomething(XMLLib.getText(queryModule, "/QUERY_MODULE/REQUEST/SELECTED_GROUP_BY/ROW_DIMENSION_NAME")) ) {411 String firstNonProxyDimensionName = XMLLib.getText(queryModule, "/QUERY_MODULE/DIMENSIONS/DIMENSION[ not(PROXY_DIMENSION_NAME) ]/NAME");412 XMLLib.setText(queryModule, "/QUERY_MODULE/REQUEST/SELECTED_GROUP_BY", "ROW_DIMENSION_NAME", firstNonProxyDimensionName);413 }414 } //-------------------------- End of Method ------------------------------415 416 417 /**418 * Sets the request actual groupby dim names. This code reads the selected419 * group bys and resolves the proxy via selected dimensions to determine and420 * set the actual group by values to be passed to the query app.421 * @param document query module XML document to be manipulated.422 */423 protected void setActualGroupBys(Node document) throws Exception {424 Node requestContainer = XMLLib.getNode(document, "/QUERY_MODULE/REQUEST");425 Node actualGroupByContainer = XMLLib.newNode("ACTUAL_GROUP_BY");426 XMLLib.replaceNode(requestContainer, "ACTUAL_GROUP_BY", actualGroupByContainer);427 428 // loop for all selected group bys. If not proxy then add. Else lookup429 // the selected dimension and use that. If not found then throw...430 String groupByName;431 for(Map.Entry<String, String> entry: this.groupByHTTPRequestParameterNameByGroupByElementName.entrySet()) {432 String groupByElementName = entry.getKey();433 groupByName = XMLLib.getText(requestContainer, "SELECTED_GROUP_BY", groupByElementName);434 435 List<Node> proxiedDimensions = XMLLib.getNodes(document, "/QUERY_MODULE/DIMENSIONS/DIMENSION[PROXY_DIMENSION_NAME = '" + groupByName + "']");436 if(0 < proxiedDimensions.size()) {437 groupByName = XMLLib.getText(document, "/QUERY_MODULE/CRITERIA//SELECTED_DIMENSION[NAME = '" + groupByName + "']/VALUES/VALUE");438 }439 440 // verify that it's a dimension. If not throw.441 String verifiedDimensionName = XMLLib.getText(document, "/QUERY_MODULE/DIMENSIONS/DIMENSION[NAME = '" + groupByName + "']/NAME");442 if(!StrLib.isSomething(verifiedDimensionName)) {443 throw new Exception("Problem setting QUERY_MODULES/REQUEST/ACTUAL_GROUP_BY/" + groupByElementName + ", no matching dimensions for: " + groupByName);444 }445 446 // if here then valid dimension - add it...447 XMLLib.addNode(actualGroupByContainer, XMLLib.newNode(groupByElementName, groupByName));448 }449 } //-------------------------- End of Method ------------------------------450 451 398 } //============================ END OF CLASS ================================= 452 399 -
trunk/ibisph/src/main/java/org/ibisph/querymodule/modelmap/AddIBISQResultToQueryModule.java
r7013 r7014 98 98 (null != XMLLib.getNode(queryModule, "/QUERY_MODULE/IBISQ_QUERY_RESULT")) 99 99 ) return; 100 100 101 101 this.queryModuleService.setRequestStartedDateTimeStamp(queryModule); 102 102 String baseURL = this.queryModuleService.getBaseQueryApplicationURL(queryModule); 103 103 if(!StrLib.isSomething(baseURL)) baseURL = this.queryApplicationRequestPath; 104 105 // before building the name value pairs for the URL and running set the 106 // request's actual group by dims - the name value pairs depend on these 107 // to be set. This is almost a better fit for the AddHTTPRRquestParametersToQueryModule 108 // model map processing but that code only executes when the user submits a 109 // query. Putting that code here ensures that it is set prior to running 110 // a saved query, a default query, or a normal builder page query. 111 setActualGroupBys(queryModule); 104 112 105 113 UserDetails userDetails = null; … … 177 185 178 186 /** 187 * Sets the request's actual groupby dim names. This code reads the selected 188 * group bys (resolves any proxy via selected dimensions ) and creates the 189 * actual group by values (passed to the query app via name/value pairs). 190 * @param document query module XML document to be manipulated. 191 */ 192 public void setActualGroupBys(Node document) throws Exception { 193 Node requestContainer = XMLLib.getNode(document, "/QUERY_MODULE/REQUEST"); 194 Node actualGroupByContainer = XMLLib.newNode("ACTUAL_GROUP_BY"); 195 XMLLib.replaceNode(requestContainer, "ACTUAL_GROUP_BY", actualGroupByContainer); 196 197 // loop for all selected group bys. If not proxy then add. Else lookup 198 // the selected dimension and use that. If not found then throw... 199 String groupByName; 200 List<Node> selectedGroupBys = XMLLib.getNodes(requestContainer, "SELECTED_GROUP_BY/*"); 201 for(Node selectedGroupBy: selectedGroupBys) { 202 groupByName = XMLLib.getText(selectedGroupBy); 203 204 List<Node> proxiedDimensions = XMLLib.getNodes(document, "/QUERY_MODULE/DIMENSIONS/DIMENSION[PROXY_DIMENSION_NAME = '" + groupByName + "']"); 205 if(0 < proxiedDimensions.size()) { 206 groupByName = XMLLib.getText(document, "/QUERY_MODULE/CRITERIA//SELECTED_DIMENSION[NAME = '" + groupByName + "']/VALUES/VALUE"); 207 } 208 209 // verify that it's a dimension. If not throw. 210 String groupByElementName = XMLLib.getNodeName(selectedGroupBy); 211 String verifiedDimensionName = XMLLib.getText(document, "/QUERY_MODULE/DIMENSIONS/DIMENSION[NAME = '" + groupByName + "']/NAME"); 212 if(!StrLib.isSomething(verifiedDimensionName)) { 213 throw new Exception("Problem setting QUERY_MODULE/REQUEST/ACTUAL_GROUP_BY/" + groupByElementName + ", no matching dimensions for: " + groupByName); 214 } 215 216 // if here then valid dimension - add it... 217 XMLLib.addNode(actualGroupByContainer, XMLLib.newNode(groupByElementName, groupByName)); 218 } 219 } //-------------------------- End of Method ------------------------------ 220 221 222 /** 179 223 * Parses the query result string and puts into the query module XML document 180 224 * object. … … 216 260 if(!uniqueDimensionNames.contains(dimensionName)) { 217 261 uniqueDimensionNames.add(dimensionName); 218 String actualDimensionName = XMLLib.getText(actualGroupBy, "*[text() = \'" + dimensionName + " '\"]");262 String actualDimensionName = XMLLib.getText(actualGroupBy, "*[text() = \'" + dimensionName + "\']"); 219 263 if(!StrLib.isSomething(actualDimensionName)) { 220 264 throw new Exception("Checking result group by vs actual selected group bys. Dimension (" + dimensionName + ") not found in the requested group bys."); … … 254 298 255 299 } //============================ END OF CLASS ================================= 256 -
trunk/ibisph/src/main/java/org/ibisph/querymodule/modelmap/AddMissingQueryResultRecordsToQueryModule.java
r6283 r7014 238 238 239 239 // finally, replace the existing RECORDS element with the newly created version. 240 XMLLib.replaceNode(queryModuleConfigurationNode, "/QUERY_MODULE/IBISQ_QUERY_RESULT/RECORDS", newRecordsElement); 240 Node ibisQResultContainer = XMLLib.getNode(queryModuleConfigurationNode, "/QUERY_MODULE/IBISQ_QUERY_RESULT"); 241 XMLLib.replaceNode(ibisQResultContainer, "RECORDS", newRecordsElement); 241 242 } //-------------------------- End of Method ------------------------------ 242 243 -
trunk/ibisph/src/main/java/org/ibisph/querymodule/modelmap/UpdateDisplayOptionsFromHTTPRequest.java
r6283 r7014 54 54 // Set specified measure name. If not specified then leave as is - default. 55 55 String measureName = request.getParameter(this.measureHTTPParameterName); 56 this.queryModuleService.set MeasureName(queryModule, measureName);56 this.queryModuleService.setRequestMeasureName(queryModule, measureName); 57 57 58 58 // Do a similar thing for the graphic name. 59 59 String graphicName = request.getParameter(this.graphicHTTPParameterName); 60 60 if(!StrLib.isSomething(graphicName)) graphicName = request.getParameter("graphicName"); 61 this.queryModuleService.set GraphicName(queryModule, graphicName);61 this.queryModuleService.setRequestGraphicName(queryModule, graphicName); 62 62 } //-------------------------- End of Method ------------------------------ 63 63 -
trunk/ibisph/src/main/java/org/ibisph/querymodule/service/QueryModuleRequestNameValuePairs.java
r7013 r7014 49 49 protected String urlCharacterEncoding = null; // "UTF-8"; 50 50 51 51 protected boolean excludeNotAssociatedDimensionValues = false; 52 53 52 54 /** 53 55 * Sets the character prefix for PARAMETER elements and submitted request … … 210 212 // else nothing selected - add them all. 211 213 else { 212 List<Node> dimensionValues = XMLLib.getNodes(queryModule, "/QUERY_MODULE/DIMENSIONS/DIMENSION[NAME = '" + groupByDimensionName + "']/VALUES/VALUE[not(NOT_ASSOCIATED_FLAG)]"); 214 String xpath = "/QUERY_MODULE/DIMENSIONS/DIMENSION[NAME = '" + groupByDimensionName + "']/VALUES/VALUE"; 215 if(this.excludeNotAssociatedDimensionValues) xpath = xpath + "[not(NOT_ASSOCIATED_FLAG)]"; 216 List<Node> dimensionValues = XMLLib.getNodes(queryModule, xpath); 213 217 if(0 == dimensionValues.size()) { 214 218 throw new Exception("Problem buidling query request name value pairs for group by dimension (" + groupByDimensionName + ") - could not find any associated dimension values."); -
trunk/ibisph/src/main/java/org/ibisph/querymodule/service/QueryModuleXML.java
r7013 r7014 40 40 41 41 42 public QueryModuleXML() {}43 44 45 42 //------------------------------------------- P R O P E R T Y S E T T E R S 46 43 … … 152 149 } 153 150 151 // set a default row selected group by to the first criteria SELECTED_DIMENSION 152 // this is needed when running a query module without going to the builder 153 // or a saved query first. 154 String firstCriteriaSelectedDimensionName = XMLLib.getText(document, "/QUERY_MODULE/CRITERIA//SELECTED_DIMENSIONS/SELECTED_DIMENSION[string-length(NAME) != 0]/NAME[1]"); 155 Node selectedGroupBy = XMLLib.newNode("SELECTED_GROUP_BY"); 156 XMLLib.addNode(selectedGroupBy, XMLLib.newNode("ROW_DIMENSION_NAME", firstCriteriaSelectedDimensionName)); 157 XMLLib.addNode(request, selectedGroupBy); 158 154 159 // set the default measure and graphic names... 155 160 String measureName = XMLLib.getText(configuration, "DEFAULT_MEASURE_NAME"); 156 161 if(!StrLib.isSomething(measureName)) measureName = XMLLib.getText(configuration, "MEASURES/MEASURE[not(NO_DISPLAY_FLAG)][1]/NAME"); 157 set MeasureName(document, measureName);162 setRequestMeasureName(document, measureName); 158 163 159 164 String graphicName = XMLLib.getText(configuration, "PARAMETERS/PARAMETER[NAME='_GraphicName']/VALUE"); … … 163 168 graphicName = XMLLib.getText(document, "/QUERY_MODULE/PARAMETERS/PARAMETER[NAME='_GraphicName']/VALUE"); 164 169 } 165 set GraphicName(document, graphicName);166 } //-------------------------- End of Method ------------------------------ 167 170 setRequestGraphicName(document, graphicName); 171 172 } //-------------------------- End of Method ------------------------------ 168 173 169 174 170 175 // -------------------------------------------- G E N E R I C H E L P E R S 171 172 176 /** 173 177 * Simple static getter to access the number of modules loaded. This is used … … 192 196 193 197 /** 198 * Simple access to the CONFIGURATION/BASE_QUERY_APPLICATION_URL element. 199 * @return value of the selected configuration's BASE_QUERY_APPLICATION_URL 200 * element. 201 */ 202 public String getBaseQueryApplicationURL(Node document) { 203 return( XMLLib.getText(document, "/QUERY_MODULE/CONFIGURATIONS/CONFIGURATION[NAME=/QUERY_MODULE/REQUEST/CONFIGURATION_NAME]/BASE_QUERY_APPLICATION_URL")); 204 } //-------------------------- End of Method ------------------------------ 205 206 public String getFormattedDate(long time) { 207 String formattedDateString = this.dateFormat.format(time); 208 return(formattedDateString); 209 } //-------------------------- End of Method ------------------------------ 210 211 212 213 // ---------------------------- R E Q U E S T E L E M E N T H E L P E R S 214 /** 194 215 * Simple access to the REQUEST/CONFIGURATION_PATH element. 195 216 * @return value of the /QUERY_MODULE/REQUEST/CONFIGURATION_PATH element. … … 204 225 * @param measureName value to set. 205 226 */ 206 public void set MeasureName(Node queryModule, String measureName) {227 public void setRequestMeasureName(Node queryModule, String measureName) { 207 228 if(StrLib.isSomething(measureName)) XMLLib.setText(queryModule, "/QUERY_MODULE/REQUEST", "MEASURE_NAME", measureName); 208 229 } //-------------------------- End of Method ------------------------------ … … 213 234 * @param graphicName value to set. 214 235 */ 215 public void set GraphicName(Node queryModule, String graphicName) {236 public void setRequestGraphicName(Node queryModule, String graphicName) { 216 237 if(StrLib.isSomething(graphicName)) XMLLib.setText(queryModule, "/QUERY_MODULE/REQUEST", "GRAPHIC_NAME", graphicName); 217 238 } //-------------------------- End of Method ------------------------------ … … 221 242 * @param queryModule query module document to get text value from. 222 243 */ 223 public String get GraphicName(Node queryModule) {244 public String getRequestGraphicName(Node queryModule) { 224 245 return(XMLLib.getText(queryModule, "/QUERY_MODULE/REQUEST/GRAPHIC_NAME")); 225 } //-------------------------- End of Method ------------------------------226 227 228 /**229 * Simple access to the CONFIGURATION/BASE_QUERY_APPLICATION_URL element.230 * @return value of the selected configuration's BASE_QUERY_APPLICATION_URL231 * element.232 */233 public String getBaseQueryApplicationURL(Node document) {234 return( XMLLib.getText(document, "/QUERY_MODULE/CONFIGURATIONS/CONFIGURATION[NAME=/QUERY_MODULE/REQUEST/CONFIGURATION_NAME]/BASE_QUERY_APPLICATION_URL"));235 246 } //-------------------------- End of Method ------------------------------ 236 247 … … 271 282 } //-------------------------- End of Method ------------------------------ 272 283 273 public String getFormattedDate(long time) {274 String formattedDateString = this.dateFormat.format(time);275 return(formattedDateString);276 } //-------------------------- End of Method ------------------------------277 278 284 } //============================ END OF CLASS ================================= -
trunk/ibisph/src/main/java/org/ibisph/util/XMLLib.java
r6908 r7014 219 219 } //-------------------------- End of Method ------------------------------ 220 220 */ 221 222 223 /** 224 * Get's the node's name. 225 * @param node Document/element/node to retrieve node from. 226 * @return node's name. 227 */ 228 @SuppressWarnings("unchecked") 229 public static String getNodeName(Node node) { 230 return(node.getName()); 231 } //-------------------------- End of Method ------------------------------ 221 232 222 233 … … 509 520 public static void replaceNode(Node node, String nodeToBeReplacedXPath, Node newNode) { 510 521 Node nodeToBeReplaced = XMLLib.getNode(node, nodeToBeReplacedXPath); 511 Node containerNode = nodeToBeReplaced.getParent(); 512 XMLLib.deleteNode(nodeToBeReplaced); 513 if(null != newNode) XMLLib.addNode(containerNode, newNode); 522 if(null != nodeToBeReplaced) XMLLib.deleteNode(nodeToBeReplaced); 523 if(null != newNode) XMLLib.addNode(node, newNode); 514 524 } //-------------------------- End of Method ------------------------------ 515 525
Note: See TracChangeset
for help on using the changeset viewer.