Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4653 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . demo flowsa flowsa/components ippm ippm/ui/panels ls test test/ls

Subject: perfsonar development work

List archive

perfsonar: r4653 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . demo flowsa flowsa/components ippm ippm/ui/panels ls test test/ls


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4653 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . demo flowsa flowsa/components ippm ippm/ui/panels ls test test/ls
  • Date: Wed, 22 Oct 2008 09:42:46 -0400

Author: michael.bischoff
Date: 2008-10-22 09:42:45 -0400 (Wed, 22 Oct 2008)
New Revision: 4653

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/demo/Lesson1.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultPanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultTable.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMUserData.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSDiscoveryQuery.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryMetadata.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryServicesEvents.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSXQuery.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/LSRequestTest.java

branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryServicesEventsTest.java
Log:
- removed some use of deprecated api

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
2008-10-22 13:37:11 UTC (rev 4652)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/AbstractUserData.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -94,15 +94,17 @@
return endpoints;
}
/**
- * return
{@link
MAEndpoint} of the query.
- * @deprecated use
{@link
#getEndpoints()}
+ * @return
{@link
MAEndpoint} of the query.
+ * @deprecated use
{@link
#getFirstEndpoint()}
*/
public MAEndpoint getEndpoint() {
- if (endpoints.size() == 0)
- return null;
- else return endpoints.get(0);
+ return getFirstEndpoint();
}

+ public MAEndpoint getFirstEndpoint() {
+ if (endpoints.size() == 0) return null;
+ return endpoints.get(0);
+ }
/**
* Clears the list of endpoints and adds the argument as the only
element
* See
{@link
IUserData#setEndpoint(MAEndpoint)}

Modified: branches/perfsonarui/src/org/perfsonar/perfsonarui/demo/Lesson1.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/demo/Lesson1.java
2008-10-22 13:37:11 UTC (rev 4652)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/demo/Lesson1.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -70,8 +70,8 @@
System.out.println(endpoint.getTitle());
System.out.println(endpoint.getEndpoint());
System.out.println(endpoint.getSchema());
- System.out.println(endpoint.getEvent(0));
- System.out.println(endpoint.getEvent(1));
+ System.out.println(endpoint.getEvent());
+ System.out.println(endpoint.getEvent());
System.out.println(endpoint.getAuthRealm());

}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/AbstractSetupDataRequestAction.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -29,7 +29,8 @@
*/
public abstract class AbstractSetupDataRequestAction extends
PerfsonarRequestAction {

- private IPerfsonarResponse responseProcessor;
+ private static final long serialVersionUID = 1L;
+ private IPerfsonarResponse responseProcessor;

/**
* @param request

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultPanel.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultPanel.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -60,7 +60,7 @@
* @param resultInformationPanel
* @param controllBar
* @param resultComponent
- * @return
+ * @return a layout
*/
protected LayoutManager createLayoutManager(JComponent
resultInformationPanel, JComponent controllBar, JComponent resultComponent) {
GroupLayout layout = new GroupLayout(this);

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultTable.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultTable.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/ResultTable.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -122,7 +122,7 @@
if(this.table != table) {
this.table = table;
normalColor = getBackground();
- alternateColor = foo(normalColor);
+ alternateColor = alternate(normalColor);
}
if(!isSelected) {
if(row % 2 == 0) {
@@ -134,7 +134,7 @@
return component;
}

- private Color foo(Color normalColor) {
+ private Color alternate(Color normalColor) {
return new
Color(addDelta(normalColor.getRed()),addDelta(normalColor.getGreen()),addDelta(normalColor.getBlue()));
}


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/flowsa/components/RouterPanel.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -14,8 +14,8 @@
import javax.swing.ScrollPaneConstants;

import org.jdesktop.layout.GroupLayout;
+import org.perfsonar.perfsonarui.flowsa.Exporter;
import org.perfsonar.perfsonarui.flowsa.FlowsaMAUserData;
-import org.perfsonar.perfsonarui.flowsa.Exporter;
import org.perfsonar.perfsonarui.plugins.MAEndpoint;
import org.perfsonar.perfsonarui.ui.panels.CheckListModel;
import org.perfsonar.perfsonarui.ui.panels.CheckListSelectionListener;
@@ -63,7 +63,8 @@
private String oldEndPoint;

public void update(Observable o, Object arg) {
- MAEndpoint newEndpoint = model.getEndpoint();
+ MAEndpoint newEndpoint =
model.getFirstEndpoint();
+
if(newEndpoint==null) {
checkListModel.clear();
return;

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMUserData.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMUserData.java
2008-10-22 13:37:11 UTC (rev 4652)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/IPPMUserData.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -94,7 +94,7 @@
public void clear() {
super.clear();
setQuery("mid","0");
- getEndpoint().clear();
+ getFirstEndpoint().clear();
setChanged();
notifyObservers();


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMPairsTablePanel.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -169,7 +169,7 @@
query.setQuery(IPPMUserData.IFNAME_DST,
pair.getResponse(IPPMUserData.IFNAME_DST));
if (timeAction != null) {
pair.makeQueryFromResponse();
- pair.setEndpoint(query.getEndpoint());
+ pair.setEndpoint(query.getFirstEndpoint());
((SetupDataRequestAction)timeAction).setUserData(pair);
timeAction.actionPerformed(null);


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ippm/ui/panels/IPPMResponseChartPanel.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -25,6 +25,7 @@
import java.text.SimpleDateFormat;
import java.util.Enumeration;
import java.util.Hashtable;
+import java.util.Locale;
import java.util.TimeZone;

import org.jfree.chart.ChartColor;
@@ -106,7 +107,7 @@

}
protected void preparePlots() {
- dateAxis = new DateAxis("", TimeZone.getDefault());
+ dateAxis = new DateAxis("", TimeZone.getDefault(),
Locale.getDefault());
dateAxis.setAutoRange(true);
dateAxis.setDateFormatOverride(new SimpleDateFormat("d MMM yy
HH:mm:ss"));

@@ -200,7 +201,7 @@
plot.setInsets(new RectangleInsets(20,50,20,20));
XYPlot subplot = null;
int n = 0;
- Enumeration keys = datasets.keys();
+ Enumeration<String> keys = datasets.keys();
while (keys.hasMoreElements()) {
Object type = keys.nextElement();
Integer plotType = lookup.get(type);
@@ -216,7 +217,7 @@

//subplot = (XYPlot)lookup.get(type);

- PerfsonarTimeSeries series = (PerfsonarTimeSeries)
datasets.get(type);
+ PerfsonarTimeSeries series = datasets.get(type);
int seriesN = 0;
if (subplot.getDataset() == null) {
subplot.setDataset(series);
@@ -227,7 +228,7 @@

XYItemRenderer renderer;
renderer = new XYLineAndShapeRenderer(true,false);
- Color clr = (Color)colorLookup.get(type);
+ Color clr = colorLookup.get(type);
renderer.setSeriesPaint(0,clr);
subplot.setRenderer(seriesN,renderer);


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSDiscoveryQuery.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSDiscoveryQuery.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSDiscoveryQuery.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -193,8 +193,8 @@
if (psservice.item(j).getNodeType()
== Node.ELEMENT_NODE) {
endpoint =
getEndpoint((Element)psservice.item(j));

endpoint.setSchema(PerfsonarSchema.getInstance("hls"));
- endpoint.setEvent("ls",0);
- endpoint.setEvent("ls",1);

+ endpoint.setEvent("ls");
+ endpoint.setEvent("ls");

}
//eventtypes
if (endpoint == null) continue;

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryMetadata.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryMetadata.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryMetadata.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -233,12 +233,12 @@
if
(eventtypes.item(j).getNodeType() == Node.ELEMENT_NODE) {
String event =
XML.getTextFrom(eventtypes.item(j));

endpoint.setSchema(event);
-
endpoint.setEvent(event, 0);
-
endpoint.setEvent(event, 1);
+
endpoint.setEvent(event);
+
endpoint.setEvent(event); //TODO remove?
}

//TODO support for multiple events!
- String namespace =
endpoint.getEvent(0).toString() + '/';
+ String namespace =
endpoint.getEvent().toString() + '/';

NodeList metadata =
((Element)topo.item(i)).getElementsByTagNameNS(AbstractMARequest.NMWG2,AbstractMARequest.E_METADATA);
for (int j=0; j <
metadata.getLength(); j++)

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryServicesEvents.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryServicesEvents.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSQueryServicesEvents.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -86,8 +86,8 @@
NodeList events =
((Element)eventTypes.item(j)).getElementsByTagNameNS(AbstractMARequest.NMWG2,"eventType");
for (int k=0; k <
events.getLength(); k++) {
String eventType =
XML.getTextFrom(events.item(k));
-
endpoint.setEvent(eventType,0);
-
endpoint.setEvent(eventType,1);
+
endpoint.setEvent(eventType);
+
endpoint.setEvent(eventType); //TODO remove

endpoint.setSchema(eventType);
}
}

Modified: branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSXQuery.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSXQuery.java
2008-10-22 13:37:11 UTC (rev 4652)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ls/LSXQuery.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -1,11 +1,6 @@
package org.perfsonar.perfsonarui.ls;


-import static org.perfsonar.perfsonarui.ls.LSXQuery.URI_SOAP;
-import static org.perfsonar.perfsonarui.ls.LSXQuery.XML_FIRST_PART;
-import static org.perfsonar.perfsonarui.ls.LSXQuery.XML_LAST_PART;
-import static org.perfsonar.perfsonarui.ls.LSXQuery.executor;
-
import java.io.ByteArrayInputStream;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
@@ -227,8 +222,8 @@

endpoint.setContact(nodes.item(0).getTextContent());


endpoint.setSchema(PerfsonarSchema.getInstance("Unknown"));
- endpoint.setEvent("Unknown",0);
- endpoint.setEvent("Unknown",1);

+ endpoint.setEvent("Unknown");
+ endpoint.setEvent("Unknown"); //TODO remove

return endpoint;
} else return null;


Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/LSRequestTest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/LSRequestTest.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/LSRequestTest.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -116,8 +116,8 @@
assertEquals(1,endpoints.size());

assertEquals("http://rrdma.perfsonar.pionier.net.pl:8080/geant2-java-rrd-ma/services/MeasurementArchiveService",endpoints.get(0).getEndpoint());
System.out.println(endpoints.get(0).getTitle());
- System.out.println(endpoints.get(0).getEvent(0));
- System.out.println(endpoints.get(0).getEvent(1));

+ System.out.println(endpoints.get(0).getEvent());
+ System.out.println(endpoints.get(0).getEvent()); //TODO
remove
System.out.println(endpoints.get(0).getSchema());
}
}

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryServicesEventsTest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryServicesEventsTest.java
2008-10-22 13:37:11 UTC (rev 4652)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/LSQueryServicesEventsTest.java
2008-10-22 13:42:45 UTC (rev 4653)
@@ -65,8 +65,8 @@
assertEquals("ma",endpoints.get(0).getServiceType());
assertEquals("3.0",endpoints.get(0).getServiceVersion());
assertEquals("perfSONAR PIONIER RRD
MA",endpoints.get(0).getServiceName());
-
assertEquals("http://ggf.org/ns/nmwg/characteristic/utilization/2.0",endpoints.get(0).getEvent(0));
-
assertEquals("http://ggf.org/ns/nmwg/characteristic/utilization/2.0",endpoints.get(0).getEvent(1));
+
assertEquals("http://ggf.org/ns/nmwg/characteristic/utilization/2.0",endpoints.get(0).getEvent());
+
assertEquals("http://ggf.org/ns/nmwg/characteristic/utilization/2.0",endpoints.get(0).getEvent());
//TODO remove?

assertEquals(PerfsonarSchema.getInstance("http://schemas.perfsonar.net/2.0";),endpoints.get(0).getSchema());

}
}



  • perfsonar: r4653 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: . demo flowsa flowsa/components ippm ippm/ui/panels ls test test/ls, svnlog, 10/22/2008

Archive powered by MHonArc 2.6.16.

Top of Page