- Timestamp:
- 11/07/12 10:25:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/test/DEBBTranslator/src/DEBB2DCWoRMSTranslator.java
r565 r566 43 43 44 44 private static final String DEFAULT_OUTPUT_FILE_NAME = "xml/DCWORMS_TEST.xml"; 45 // private static final String DEFAULT_INPUT_FILE_NAME = "xml/PLMXML_PSNCRECS.xml"; 45 46 private static final String DEFAULT_INPUT_FILE_NAME = "xml/PLMXML_HLRSSmallServerRoom.xml"; 46 47 private static DocumentBuilder xmlDocumentBuilder; … … 330 331 computingResourceElement.setAttributeNode(classAttribute); 331 332 332 if (debbHostName != null) { 333 // TODO: Where to use this hostname information? 334 Comment comment = dcwormsDocument.createComment("Host name " 335 + debbHostName.getNodeValue()); 336 computingResourceElement.appendChild(comment); 333 if (debbHostName != null) { 334 Element parameterElement =dcwormsDocument.createElement("parameter"); 335 Attr parameterNameAttribute = dcwormsDocument.createAttribute("name"); 336 parameterNameAttribute.setValue("hostname"); 337 parameterElement.setAttributeNode(parameterNameAttribute); 338 Element valueElement = dcwormsDocument.createElement("value"); 339 valueElement.appendChild(dcwormsDocument.createTextNode(debbHostName.getNodeValue())); 340 parameterElement.appendChild(valueElement); 341 computingResourceElement.appendChild(parameterElement); 337 342 } 338 343 339 344 if (debbSequence != null) { 340 345 // TODO: Sequence is described unclearly in the deliverable, not 341 // used in any example. Where to use this information if it 342 // appears? 346 // used in any example. Not sure what to do with it. 347 Element parameterElement =dcwormsDocument.createElement("parameter"); 348 Attr parameterNameAttribute = dcwormsDocument.createAttribute("name"); 349 parameterNameAttribute.setValue("sequence"); 350 parameterElement.setAttributeNode(parameterNameAttribute); 351 Element valueElement = dcwormsDocument.createElement("value"); 352 valueElement.appendChild(dcwormsDocument.createTextNode(debbSequence.getNodeValue())); 353 parameterElement.appendChild(valueElement); 354 computingResourceElement.appendChild(parameterElement); 343 355 } 344 356 debbParentElement.appendChild(computingResourceElement); 345 357 346 if (debbLabel != null) { 347 // TODO: Where to use this label information? 348 Comment comment = dcwormsDocument.createComment("Label " 349 + debbLabel.getNodeValue()); 350 computingResourceElement.appendChild(comment); 358 if (debbLabel != null) { 359 Element parameterElement =dcwormsDocument.createElement("parameter"); 360 Attr parameterNameAttribute = dcwormsDocument.createAttribute("name"); 361 parameterNameAttribute.setValue("label"); 362 parameterElement.setAttributeNode(parameterNameAttribute); 363 Element valueElement = dcwormsDocument.createElement("value"); 364 valueElement.appendChild(dcwormsDocument.createTextNode(debbLabel.getNodeValue())); 365 parameterElement.appendChild(valueElement); 366 computingResourceElement.appendChild(parameterElement); 367 351 368 } 352 369 353 370 if (debbLocation != null) { 354 // TODO: Where to use this location information? 355 Comment comment = dcwormsDocument.createComment("Location " 356 + debbLocation.getNodeValue()); 357 computingResourceElement.appendChild(comment); 371 Element parameterElement =dcwormsDocument.createElement("parameter"); 372 Attr parameterNameAttribute = dcwormsDocument.createAttribute("name"); 373 parameterNameAttribute.setValue("location"); 374 parameterElement.setAttributeNode(parameterNameAttribute); 375 Element valueElement = dcwormsDocument.createElement("value"); 376 valueElement.appendChild(dcwormsDocument.createTextNode(debbLocation.getNodeValue())); 377 parameterElement.appendChild(valueElement); 378 computingResourceElement.appendChild(parameterElement); 379 358 380 } 359 381
Note: See TracChangeset
for help on using the changeset viewer.