Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r5310 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml

Subject: perfsonar development work

List archive

perfsonar: r5310 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r5310 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml
  • Date: Wed, 14 Oct 2009 07:38:23 -0400

Author: trzaszcz
Date: 2009-10-14 07:38:22 -0400 (Wed, 14 Oct 2009)
New Revision: 5310

Modified:

branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/AXIOMCreator.java

branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/Element.java

branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
Log:
code refactoring

Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/AXIOMCreator.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/AXIOMCreator.java
2009-10-14 08:20:19 UTC (rev 5309)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/AXIOMCreator.java
2009-10-14 11:38:22 UTC (rev 5310)
@@ -40,11 +40,11 @@

//attributes
boolean isId = false;
- Iterator i = e.getAttributes().entrySet().iterator();
+ Iterator<Map.Entry<String, String>> i =
e.getAttributes().entrySet().iterator();
while (i.hasNext()) {
- Map.Entry attr = (Map.Entry)i.next();
- String name = (String)attr.getKey();
- String value = (String)attr.getValue();
+ Map.Entry<String,String> attr = i.next();
+ String name = attr.getKey();
+ String value = attr.getValue();
OMAttribute omAttribute = fac.createOMAttribute(name, null,
value);
omElement.addAttribute(omAttribute);
if (name.equals("id")) isId = true;

Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/Element.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/Element.java
2009-10-14 08:20:19 UTC (rev 5309)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/Element.java
2009-10-14 11:38:22 UTC (rev 5310)
@@ -216,7 +216,7 @@

}

- public Map getAttributes() {
+ public Map<String,String> getAttributes() {

return attributes;
}
@@ -280,9 +280,9 @@
sb.append("\n" + indent + "attributes:");

// attributes
- Iterator i = parent.getAttributes().entrySet().iterator();
+ Iterator<Map.Entry<String, String>> i =
parent.getAttributes().entrySet().iterator();
while (i.hasNext()) {
- Map.Entry attr = (Map.Entry) i.next();
+ Map.Entry<String,String> attr = i.next();
String name1 = (String) attr.getKey();
String value1 = (String) attr.getValue();
sb.append("\n " + indent + "" +name1 + "=");

Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
2009-10-14 08:20:19 UTC (rev 5309)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml/ElementSerializer.java
2009-10-14 11:38:22 UTC (rev 5310)
@@ -62,11 +62,11 @@

//attributes
boolean isId = false;
- Iterator i = e.getAttributes().entrySet().iterator();
+ Iterator<Map.Entry<String, String>> i =
e.getAttributes().entrySet().iterator();
while (i.hasNext()) {
- Map.Entry attr = (Map.Entry)i.next();
- String name = (String)attr.getKey();
- String value = (String)attr.getValue();
+ Map.Entry<String, String> attr = i.next();
+ String name = attr.getKey();
+ String value = attr.getValue();
writer.writeAttribute(name, value);
if (name.equals("id")) isId = true;
}



  • perfsonar: r5310 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/xml, svnlog, 10/14/2009

Archive powered by MHonArc 2.6.16.

Top of Page