Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r5265 - in trunk/ps-mdm-lsclient-impl: . src/main/java/org/perfsonar/ri/lsclient src/main/java/org/perfsonar/ri/lsclient/data/topology src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers src/main/java/org/perfsonar/ri/lsclient/level0 src/main/java/org/perfsonar/ri/lsclient/level1 src/main/java/org/perfsonar/ri/lsclient/lsinfo

Subject: perfsonar development work

List archive

perfsonar: r5265 - in trunk/ps-mdm-lsclient-impl: . src/main/java/org/perfsonar/ri/lsclient src/main/java/org/perfsonar/ri/lsclient/data/topology src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers src/main/java/org/perfsonar/ri/lsclient/level0 src/main/java/org/perfsonar/ri/lsclient/level1 src/main/java/org/perfsonar/ri/lsclient/lsinfo


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r5265 - in trunk/ps-mdm-lsclient-impl: . src/main/java/org/perfsonar/ri/lsclient src/main/java/org/perfsonar/ri/lsclient/data/topology src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers src/main/java/org/perfsonar/ri/lsclient/level0 src/main/java/org/perfsonar/ri/lsclient/level1 src/main/java/org/perfsonar/ri/lsclient/lsinfo
  • Date: Wed, 26 Aug 2009 03:54:13 -0400

Author: krzjed
Date: 2009-08-26 03:54:10 -0400 (Wed, 26 Aug 2009)
New Revision: 5265

Added:

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/EndPointPairTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/EndPointTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkInterfaceTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkInterfaceTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NodeTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NodeTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/ServicePSTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/ServiceTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/ServiceTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/Subnet.java
Removed:

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/EndPointPairTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/EndPointTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkInterfaceTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkInterfaceTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NodeTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NodeTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/ServicePSTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/ServiceTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/ServiceTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Subnet.java
Modified:
trunk/ps-mdm-lsclient-impl/pom.xml

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/LsClientImpl.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/GenericTopologyElement.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Handler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/HandlersManager.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Port.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/SpecificTopologyElementHandler.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/TopologyElementHandlerFactory.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level0/Level0Impl.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/Level1Impl.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/LsTopologyQuery.java

trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/lsinfo/Namespaces.java
Log:
Added throw declaration to getLSQueryContent method
Refactoring

Modified: trunk/ps-mdm-lsclient-impl/pom.xml
===================================================================
--- trunk/ps-mdm-lsclient-impl/pom.xml 2009-08-26 07:40:06 UTC (rev 5264)
+++ trunk/ps-mdm-lsclient-impl/pom.xml 2009-08-26 07:54:10 UTC (rev 5265)
@@ -6,7 +6,7 @@
<groupId>nl.surfnet.perfsonar</groupId>
<artifactId>LSclient-Implementation</artifactId>
<name>LS client Implementation</name>
- <version>1.0-BETA2</version>
+ <version>1.1</version>
<packaging>jar</packaging>
<description>The implementation for LS client from Perfsonar. This is
the evolved version of the initial version developed at
Surfnet(www.surfnet.nl).</description>
<inceptionYear>2008</inceptionYear>
@@ -94,7 +94,7 @@
<dependency>
<groupId>perfsonar</groupId>
<artifactId>LS-client-api</artifactId>
- <version>1.0RC2</version>
+ <version>1.1</version>
<optional>true</optional>
</dependency>
</dependencies>

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/LsClientImpl.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/LsClientImpl.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/LsClientImpl.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -1,15 +1,10 @@
package org.perfsonar.ri.lsclient;

-import java.util.Set;
-
import org.apache.log4j.Logger;
import org.perfsonar.lsclient.Level0LsClientInterface;
import org.perfsonar.lsclient.Level1LsClientInterface;
import org.perfsonar.lsclient.Level2LsClientInterface;
import org.perfsonar.lsclient.LsClient;
-import org.perfsonar.lsclient.data.AuthorativeLookupservice;
-import org.perfsonar.lsclient.data.Service;
-import org.perfsonar.lsclient.data.ServiceMeasurementMetadata;
import org.perfsonar.lsclient.helpers.AbstractLsClient;
import org.perfsonar.ri.lsclient.level0.Level0Impl;
import org.perfsonar.ri.lsclient.level1.Level1Impl;
@@ -66,9 +61,4 @@
protected Level2LsClientInterface getLevel2() {
return level2;
}
-
- public Set<ServiceMeasurementMetadata> getLSQueryContent(
- AuthorativeLookupservice arg0, Service arg1) {
- return this.getLevel1().getLSQueryContent(arg0, arg1);
- }
}

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/EndPointPairTopologyElementHandler.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/EndPointTopologyElement.java

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/GenericTopologyElement.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/GenericTopologyElement.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/GenericTopologyElement.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -22,13 +22,17 @@
*
{@link
Set} of event types
*/
private Set<EventType> eventTypes = new HashSet<EventType>();
-
+
protected final Logger logger = Logger.getLogger(getClass());

/**
* Map containing paramters
*/
private Map<String, String> parameters = new HashMap<String, String>();
+
+ /**
+ * Namespace of subject element
+ */
private String subjectNamespace;

/**
@@ -50,7 +54,6 @@
return Collections.unmodifiableSet(eventTypes);
}

-
/**
* Getter for parameter
*
@@ -80,11 +83,15 @@
return Collections.unmodifiableMap(parameters);
}

+ /**
+ * Getter for subject namespace
+ *
+ * @return subject namespace
+ */
public String getSubjectNamespace() {
return subjectNamespace;
}

-
/**
* Setter for event types
{@link
Set}
*
@@ -95,7 +102,6 @@
this.eventTypes = eventTypes;
}

-
/**
* Setter for parameter
*
@@ -118,6 +124,12 @@
this.parameters = parameters;
}

+ /**
+ * Setter for subject namespace
+ *
+ * @param subjectNamespace
+ * subject namespace to set
+ */
void setSubjectNamespace(String subjectNamespace) {
this.subjectNamespace = subjectNamespace;
}

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Handler.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Handler.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Handler.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -1,13 +1,22 @@
package org.perfsonar.ri.lsclient.data.topology;

+import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
+ *
{@link
Annotation} required by
{@link
HandlersManager} to register handler <br>
+ * Parameters:
+ * <ul>
+ * <li>uri - Namespace URI of element
+ * <li>name - Name of element
+ * <li>(optional) priority - Priority of handler. Previously added handler
for
+ * same uri and name will be overridden if given priority will not be lesser
+ * than that of handler actually in use
+ * </ul>
*
- *
* @author krzjed (PSNC)
*/
@Retention(RetentionPolicy.RUNTIME)
@@ -25,7 +34,7 @@

/**
* Will override previously added handler for same uri and name if
priority
- * is not less than
+ * is not less than that of handler actually in use
*/
int priority() default 0;
}

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/HandlersManager.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/HandlersManager.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/HandlersManager.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -3,6 +3,8 @@
import java.util.HashMap;
import java.util.Map;

+import org.apache.log4j.Logger;
+
public class HandlersManager {
private class ClassContainer {
private Class<? extends SpecificTopologyElementHandler> handlerClass;
@@ -62,16 +64,32 @@
result = prime * result + ((uri == null) ? 0 : uri.hashCode());
return result;
}
+
+ @Override
+ public String toString() {
+ return "[" + uri + ":" + name + "]";
+ }
}

private static HandlersManager manager = new HandlersManager();

+ public static void addHandlerClass(
+ Class<? extends SpecificTopologyElementHandler> handlerClass) {
+ getInstance().addHandlerClassToMap(handlerClass);
+ }
+
+ public static void clearHandlers() {
+ getInstance().clearHandlersMap();
+ }
+
static HandlersManager getInstance() {
return manager;
}

private Map<UriNameContainer, ClassContainer> handlerMap = new
HashMap<UriNameContainer, ClassContainer>();

+ protected Logger logger = Logger.getLogger(this.getClass());
+
private HandlersManager() {
}

@@ -95,13 +113,16 @@
ClassContainer newClassContainer = new
ClassContainer(priority,
handlerClass);
handlerMap.put(uriNameContainer, newClassContainer);
+ logger.info("Handler for " + uriNameContainer + " ("
+ + handlerClass + ")added.");
}
}
}

- public static void addHandlerClass(
- Class<? extends SpecificTopologyElementHandler> handlerClass) {
- getInstance().addHandlerClassToMap(handlerClass);
+ void clearHandlersMap() {
+ synchronized (this) {
+ handlerMap.clear();
+ }
}

Class<? extends SpecificTopologyElementHandler> getHandlerClass(String
uri,

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkInterfaceTopologyElement.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkInterfaceTopologyElementHandler.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkTopologyElement.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NetworkTopologyElementHandler.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NodeTopologyElement.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/NodeTopologyElementHandler.java

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Port.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Port.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Port.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -75,7 +75,7 @@
return type;
}

- void setAddress(String address) {
+ public void setAddress(String address) {
this.address = address;
}

@@ -87,7 +87,7 @@
this.protocol = protocol;
}

- void setType(String type) {
+ public void setType(String type) {
this.type = type;
}


Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/ServicePSTopologyElementHandler.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/ServiceTopologyElement.java

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/ServiceTopologyElementHandler.java

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/SpecificTopologyElementHandler.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/SpecificTopologyElementHandler.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/SpecificTopologyElementHandler.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -10,6 +10,14 @@
* Generic handler for parsing part of xml from metadata representing
topology
* elements
*
+ * <br>
+ * <br>
+ * To register it in
{@link
HandlersManager} class have to:
+ * <ul>
+ * <li>Inherit this class
+ * <li>Have annotation
{@link
Handler}
+ * </ul>
+ *
* @author krzjed (PSNC)
*
*/

Deleted:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/Subnet.java

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/TopologyElementHandlerFactory.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/TopologyElementHandlerFactory.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/TopologyElementHandlerFactory.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -16,19 +16,11 @@
public class TopologyElementHandlerFactory {
protected final static Logger logger = Logger
.getLogger(TopologyElementHandlerFactory.class);
- static {
- HandlersManager
- .addHandlerClass(EndPointPairTopologyElementHandler.class);
- HandlersManager
-
.addHandlerClass(NetworkInterfaceTopologyElementHandler.class);
- HandlersManager.addHandlerClass(NodeTopologyElementHandler.class);
- HandlersManager.addHandlerClass(ServiceTopologyElementHandler.class);
-
HandlersManager.addHandlerClass(ServicePSTopologyElementHandler.class);
- HandlersManager.addHandlerClass(NetworkTopologyElementHandler.class);
- }

/**
- * Creates concrete
{@link
SpecificTopologyElementHandler} for given tag
+ * Creates concrete
{@link
SpecificTopologyElementHandler} for given tag.
+ * Implementation of
{@link
SpecificTopologyElementHandler} has to be
+ * registered in
{@link
HandlersManager}
*
* @param uri
* namespace uri of tag
@@ -70,19 +62,23 @@
try {
return constructor.newInstance(attributes);
} catch (IllegalArgumentException e) {
- logger.error(e);
+ logger.error("Class needs to have public constructor with "
+ + "a parameter of type org.xml.sax.Attributes", e);
return new UnknownTopologyElementHandler(uri, name, qName,
attributes, namespaces);
} catch (InstantiationException e) {
- logger.error(e);
+ logger.error("Class needs to have public constructor with "
+ + "a parameter of type org.xml.sax.Attributes", e);
return new UnknownTopologyElementHandler(uri, name, qName,
attributes, namespaces);
} catch (IllegalAccessException e) {
- logger.error(e);
+ logger.error("Class needs to have public constructor with "
+ + "a parameter of type org.xml.sax.Attributes", e);
return new UnknownTopologyElementHandler(uri, name, qName,
attributes, namespaces);
} catch (InvocationTargetException e) {
- logger.error(e);
+ logger.error("Class needs to have public constructor with "
+ + "a parameter of type org.xml.sax.Attributes", e);
return new UnknownTopologyElementHandler(uri, name, qName,
attributes, namespaces);
}

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/EndPointPairTopologyElementHandler.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/EndPointTopologyElement.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkInterfaceTopologyElement.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkInterfaceTopologyElementHandler.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkTopologyElement.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NetworkTopologyElementHandler.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NodeTopologyElement.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/NodeTopologyElementHandler.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/ServicePSTopologyElementHandler.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/ServiceTopologyElement.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/ServiceTopologyElementHandler.java

Added:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers/Subnet.java

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level0/Level0Impl.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level0/Level0Impl.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level0/Level0Impl.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -141,7 +141,7 @@
"<nmwg:message type=\"LSQueryRequest\" "
+ "id=\"msg1\" "
+
"xmlns:nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\"; "
- +
"xmlns:xquery=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/2.0/\";>")
+ +
"xmlns:xquery=\"http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/\";>")
.append("<nmwg:metadata id=\"meta1\">")
.append(subjectOpenTag)
.append(subject)
@@ -152,7 +152,8 @@
.append("<xquery:parameters id=\"param.1\">")
.append(
"<nmwg:parameter
name=\"lsOutput\">escaped</nmwg:parameter>")
- .append("</xquery:parameters>").append("</nmwg:metadata>")
+ .append("</xquery:parameters>")
+ .append("</nmwg:metadata>")
.append("<nmwg:data metadataIdRef=\"meta1\" id=\"d1\"/>")
.append("</nmwg:message>");


Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/Level1Impl.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/Level1Impl.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/Level1Impl.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -119,10 +119,13 @@
service.setAuthorativeLookupservice(hls);
return null;
} catch (JAXBException e) {
+ logger.error(e);
return null; // TODO
} catch (XMLStreamException e) {
+ logger.error(e);
return null; // TODO
} catch (LsQueryException e) {
+ logger.error(e);
return null; // TODO
}
}
@@ -176,6 +179,13 @@
}
}

+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.perfsonar.lsclient.Level1LsClientInterface#setKnownLookupServices
+ * (java.util.Set)
+ */
public void setKnownLookupServices(Set<LookupService> rootServices) {
if (rootServices == null)
throw new IllegalArgumentException(
@@ -187,19 +197,37 @@
rootGlses.replace(rootServices);
}

+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.perfsonar.lsclient.Level1LsClientInterface#getLSQueryContent(org.
+ * perfsonar.lsclient.data.AuthorativeLookupservice,
+ * org.perfsonar.lsclient.data.Service)
+ */
public Set<ServiceMeasurementMetadata> getLSQueryContent(
- AuthorativeLookupservice hls, Service service) {
+ AuthorativeLookupservice hls, Service service)
+ throws LsQueryException {
ServiceMeasurementMetadataCollectionHandler handler = new
ServiceMeasurementMetadataCollectionHandler();
- try {
- this.processLSQueryContent(hls, service, handler);
- return handler.getMetadataSet();
- } catch (LsQueryException e) {
- // TODO change to throws in API
- logger.error("Problems with LSQueryContent occured.", e);
- return null;
- }
+ this.processLSQueryContent(hls, service, handler);
+ return handler.getMetadataSet();
}

+ /**
+ * Prepares and sends query, parses XML response and invokes
+ *
{@link
ServiceMeasurementMetadataHandler#metadataParsed(ServiceMeasurementMetadata)}
+ * when each
{@link
ServiceMeasurementMetadata} is parsed.
+ *
+ * @param hls
+ *
{@link
LookupService} that has to be queried
+ * @param service
+ * service that query concerns
+ * @param handler
+ *
{@link
ServiceMeasurementMetadataHandler} that handles parsed
+ *
{@link
ServiceMeasurementMetadata}
+ * @throws LsQueryException
+ * when problems with communication or parsing occur
+ */
public void processLSQueryContent(LookupService hls, Service service,
ServiceMeasurementMetadataHandler handler) throws
LsQueryException {
LSMeasuredTopologyQuery query = new LSMeasuredTopologyQuery(service);
@@ -208,7 +236,8 @@
InputStream stream;
stream = level0.getRawQueryResult(hls, queryString);
try {
- ResponseParser.parseServiceMeasurementMetadata(stream, handler);
+ ResponseParser.parseServiceMeasurementMetadata(new
UnescapedStream(
+ stream), handler);
} catch (ParserConfigurationException e) {
throw new LsQueryException(e);
} catch (SAXException e) {

Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/LsTopologyQuery.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/LsTopologyQuery.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/level1/LsTopologyQuery.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -21,7 +21,7 @@
return "true()";
}

- // TODO Auto-generated method stub
+ // TODO ??
return "true()";
}


Modified:
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/lsinfo/Namespaces.java
===================================================================
---
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/lsinfo/Namespaces.java
2009-08-26 07:40:06 UTC (rev 5264)
+++
trunk/ps-mdm-lsclient-impl/src/main/java/org/perfsonar/ri/lsclient/lsinfo/Namespaces.java
2009-08-26 07:54:10 UTC (rev 5265)
@@ -15,7 +15,6 @@
public static final String ERRORS =
"http://ggf.org/ns/nmwg/characteristic/errors/2.0/";;
public static final String DISCARD =
"http://ggf.org/ns/nmwg/characteristic/discards/2.0/";;
public static final String NMTB =
"http://ogf.org/schema/network/topology/base/20070828/";;
- //TODO why is are two prefixes ntmb with differen URIs
public static final String __NMTB =
"http://ogf.org/schema/network/base/20070828/";;
public static final String NMTL3 =
"http://ogf.org/schema/network/topology/l3/20070828/";;
public static final String IPERF =
"http://ggf.org/ns/nmwg/tools/iperf/2.0/";;



  • perfsonar: r5265 - in trunk/ps-mdm-lsclient-impl: . src/main/java/org/perfsonar/ri/lsclient src/main/java/org/perfsonar/ri/lsclient/data/topology src/main/java/org/perfsonar/ri/lsclient/data/topology/handlers src/main/java/org/perfsonar/ri/lsclient/level0 src/main/java/org/perfsonar/ri/lsclient/level1 src/main/java/org/perfsonar/ri/lsclient/lsinfo, svnlog, 08/26/2009

Archive powered by MHonArc 2.6.16.

Top of Page