perfsonar-dev - perfsonar: r2279 - in branches/XML-LS-RELEASE-1.1: ant/rrdma ant/sqlma ant/xmlls conf doc/ma/rrdTypeMA doc/ma/sqlTypeMA src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator
Subject: perfsonar development work
List archive
perfsonar: r2279 - in branches/XML-LS-RELEASE-1.1: ant/rrdma ant/sqlma ant/xmlls conf doc/ma/rrdTypeMA doc/ma/sqlTypeMA src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2279 - in branches/XML-LS-RELEASE-1.1: ant/rrdma ant/sqlma ant/xmlls conf doc/ma/rrdTypeMA doc/ma/sqlTypeMA src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator
- Date: Fri, 23 Mar 2007 11:38:01 -0400
Author: mac
Date: 2007-03-23 11:38:01 -0400 (Fri, 23 Mar 2007)
New Revision: 2279
Added:
branches/XML-LS-RELEASE-1.1/doc/ma/rrdTypeMA/ChangeLog.txt
branches/XML-LS-RELEASE-1.1/doc/ma/sqlTypeMA/ChangeLog.txt
Modified:
branches/XML-LS-RELEASE-1.1/ant/rrdma/rrdma-pre-install-targets.xml
branches/XML-LS-RELEASE-1.1/ant/sqlma/sqlma-pre-install-targets.xml
branches/XML-LS-RELEASE-1.1/ant/xmlls/deploy-targets.xml
branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml
branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml~
branches/XML-LS-RELEASE-1.1/ant/xmlls/undeploy-targets.xml
branches/XML-LS-RELEASE-1.1/conf/log4j.properties
branches/XML-LS-RELEASE-1.1/doc/ma/sqlTypeMA/Interface_Specification.doc
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
Log:
merging from trunk ("getting rid of XSLT in ant scripts" changes)
Modified: branches/XML-LS-RELEASE-1.1/ant/rrdma/rrdma-pre-install-targets.xml
===================================================================
--- branches/XML-LS-RELEASE-1.1/ant/rrdma/rrdma-pre-install-targets.xml
2007-03-23 15:31:35 UTC (rev 2278)
+++ branches/XML-LS-RELEASE-1.1/ant/rrdma/rrdma-pre-install-targets.xml
2007-03-23 15:38:01 UTC (rev 2279)
@@ -339,7 +339,7 @@
<echo message="Downloading eXist war file (please be patient, this
can take some time) ..."/>
<get src="${exist.war.download.url}"
- dest="${_exist.war.install.location}/${exist.war.file}"
+ dest="${exist.war.install.location}/${exist.war.file}"
verbose="true"
usetimestamp="true"/>
Modified: branches/XML-LS-RELEASE-1.1/ant/sqlma/sqlma-pre-install-targets.xml
===================================================================
--- branches/XML-LS-RELEASE-1.1/ant/sqlma/sqlma-pre-install-targets.xml
2007-03-23 15:31:35 UTC (rev 2278)
+++ branches/XML-LS-RELEASE-1.1/ant/sqlma/sqlma-pre-install-targets.xml
2007-03-23 15:38:01 UTC (rev 2279)
@@ -165,7 +165,7 @@
<echo message="Downloading eXist war file (please be patient, this
can take some time) ..."/>
<get src="${exist.war.download.url}"
- dest="${_exist.war.install.location}/${exist.war.file}"
+ dest="${exist.war.install.location}/${exist.war.file}"
verbose="true"
usetimestamp="true"/>
Modified: branches/XML-LS-RELEASE-1.1/ant/xmlls/deploy-targets.xml
===================================================================
--- branches/XML-LS-RELEASE-1.1/ant/xmlls/deploy-targets.xml 2007-03-23
15:31:35 UTC (rev 2278)
+++ branches/XML-LS-RELEASE-1.1/ant/xmlls/deploy-targets.xml 2007-03-23
15:38:01 UTC (rev 2279)
@@ -6,13 +6,20 @@
<!-- the main targets -->
+<!--
+ ==commented because XSLT doesn't work for some users, why?==
<target name="deploy"
depends="
copy-xmlls-jar,
copy-other-files,
add-context-listener"
description="Deploys RRD MA service">
-
+-->
+ <target name="deploy"
+ depends="
+ copy-xmlls-jar,
+ copy-other-files"
+ description="Deploys RRD MA service">
<echo>Deploying the service...</echo>
<antcall target="tomcat-start-for-xmlls" />
<!-- antcall target="xmldb-adduser-xmlls" /-->
@@ -88,7 +95,7 @@
<echo>inside existing xml tag 'Host':</echo>
<echo/>
<echo>(You may copy XML part (without [echo]): </echo>
- <echo><Context path='/${deploy.root}'
docBase='${service.home}/${service.name}'> </Context>"</echo>
+ <echo><Context path='/${deploy.root}'
docBase='${service.home}/${service.name}'> </Context></echo>
<!-- echo message="
docBase='${service.home}/${service.name}'>"/ -->
<!-- echo message=" </Context>"/ -->
<echo></echo>
@@ -121,7 +128,7 @@
<echo>inside existing xml tag 'Host':</echo>
<echo/>
<echo>(You may copy XML part (without [echo]): </echo>
- <echo><Context path='/${deploy.root}'
docBase='${service.home}/${service.name}'> </Context>"</echo>
+ <echo><Context path='/${deploy.root}'
docBase='${service.home}/${service.name}'> </Context></echo>
<echo/>
<echo>Please, do it now. I will wait for you.</echo>
<input message="Press Return key ..."/>
Modified: branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml
===================================================================
--- branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml
2007-03-23 15:31:35 UTC (rev 2278)
+++ branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml
2007-03-23 15:38:01 UTC (rev 2279)
@@ -50,7 +50,7 @@
<input message="Do you want to proceed? Just press ENTER to
continue. Otherwise CTRL-C stops the process immediately"/>
<echo>Preparing the installation of XML Lookup Service...</echo>
- <delete file="${basedir}/ant/const.properties" />
+ <delete file="ant/const.properties" />
<echo></echo>
<echo>Answer to all questions. If you go wrong, cancel (ctrl-c) and
start again.</echo>
<echo></echo>
Modified: branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml~
===================================================================
--- branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml~
2007-03-23 15:31:35 UTC (rev 2278)
+++ branches/XML-LS-RELEASE-1.1/ant/xmlls/pre-install-targets.xml~
2007-03-23 15:38:01 UTC (rev 2279)
@@ -3,31 +3,66 @@
<target name="pre-install"
- depends="init-info,
+ depends="show-info,
get-inputs,
confirm-inputs,
get-tomcat,
copy-const-properties
">
-
</target>
+ <!-- Official Tomcat -->
- <!--property name="tomcat.download.url"
-
value="http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.tar.gz"
/-->
<property name="tomcat.download.url"
-
value="http://monstera.man.poznan.pl/private/bak/apache-tomcat-5.5.20.tar.gz"
/>
+
value="http://www.perfsonar.net/download/dependencies/preinstall_download.php?product=tomcat&version=6.0.7"
/>
+
+
<!-- property name="tomcat.download.url"
+
value="http://monstera.man.poznan.pl/private/bak/apache-tomcat-5.5.20.tar.gz"
/-->
+ <!-- property name="tomcat.download.url"
value="http://monstera.man.poznan.pl/tomcat.tar.gz" /-->
- <property name="tomcat.tempdir" value="/tmp/temp" />
- <property name="tomcat.tempfile" value="apache-tomcat-5.5.20"/> <!--
without .tar.gz -->
+ <property name="tomcat.tempfile" value="apache-tomcat-6.0.7"/> <!--
without .tar.gz -->
+ <property environment="env"/> <!-- env variables -->
+
+ <target name="show-info">
+ <echo>Pre-install</echo>
+ <echo/>
+ <echo>---- Welcome in perfSONAR LookupService installation script
----</echo>
+ <echo/>
+ <echo>You're about to install LookupService that may be also called
LS during the installation process.</echo>
+ <!--
+ <echo>The installation guide is accessible on
http://wiki.perfsonar.net/jra1-wiki/index.php/Installation_LS_1.1#Lookup_service_installation
web page</echo>
+ -->
+ <echo/>
+ <echo>Requirements:</echo>
+ <echo/>
+ <echo> 1. Java 1.5.x</echo>
+ <echo> 2. Ant 1.6.x (we're sure you've already got it installed as
you run the installation process)</echo>
+ <echo> 3. eXist DB XML - see Exist DB Installation Guide for
LS:</echo>
+ <echo>
http://wiki.perfsonar.net/jra1-wiki/index.php/Exist_DB_Installation_Guide_for_LS</echo>
+ <echo> 4. JAVA_HOME environment variable set to your Java
directory</echo>
+ <echo> Now, your JAVA_HOME is [${env.JAVA_HOME}]</echo>
+ <echo/>
+
+ <input message="Do you want to proceed? Just press ENTER to
continue. Otherwise CTRL-C stops the process immediately"/>
+
+ <echo>Preparing the installation of XML Lookup Service...</echo>
+ <delete file="${basedir}/ant/const.properties" />
+ <echo></echo>
+ <echo>Answer to all questions. If you go wrong, cancel (ctrl-c) and
start again.</echo>
+ <echo></echo>
+
+
+ </target>
+
<target name="get-inputs">
<!-- tomcat -->
- <input message="Do you want to install Tomcat webserver?"
+
+ <input message="Do you want to download Tomcat webserver
automatically (say N if you've already got Tomcat)?"
addproperty="tomcat.install.answer"
validargs="y,n"
defaultvalue="n"/>
@@ -38,29 +73,51 @@
</condition>
<property name="default_tomcat.home" value="/usr/local/tomcat_ls"/>
- <input message="Enter webserver home directory
[${default_tomcat.home}]"
+ <input message="Enter webserver (Tomcat) home directory. If answered
Y for previous question, this directory will be the target directory where to
install Tomcat. If answered N, Tomcat will be installed there
[${default_tomcat.home}]"
addproperty="tomcat.home"
defaultvalue="${default_tomcat.home}" />
+ <property name="default_tomcat.tempdir" value="${basedir}/tmp"/>
+ <!--
+ <input message="Temporary directory [${default_tomcat.tempdir}]?"
+ addproperty="tomcat.tempdir"
+ defaultvalue="${default_tomcat.tempdir}"/>
+ -->
+ <property name="tomcat.tempdir" value="${default_tomcat.tempdir}"
/><!-- don't ask for tmp -->
+
+ <!--
<property name="default_hostname" value="localhost"/>
<input message="Enter webserver hostname (please type your host and
domain name - not localhost)"
addproperty="target.server"
defaultvalue="${default_hostname}" />
+ -->
+ <property name="target.server" value="127.0.0.1"/> <!-- localhost to
avoid use AdminClient on remote host; it fails if not enabled in tomcat
configuration -->
<property name="default_target.port" value="8080"/>
<input message="Enter webserver port [${default_target.port}]"
addproperty="target.port"
defaultvalue="${default_target.port}" />
- <property name="default_service.home" value="${basedir}"/>
- <input message="Enter service directory (where to be installed)
[${default_service.home}]"
+ <!-- directories -->
+
+ <dirname property="basedirUp" file="${basedir}" /> <!-- ../ -->
+ <dirname property="basedirUpUp" file="${basedirUp}" /> <!-- ../../
-->
+ <basename property="owndir" file="${basedirUp}" /> <!--
XML-LS-v.w(-RCx) -->
+
+ <property name="default_in.deploy.root" value="${owndir}"/>
+ <property name="deploy.root" value="${default_in.deploy.root}"/>
<!-- don't ask for deploy root -->
+ <!--
+ <input message="Enter service deployment name
[${default_in.deploy.root}]"
+ addproperty="deploy.root"
+ defaultvalue="${default_in.deploy.root}" />
+ -->
+
+ <property name="default_service.home"
value="${basedirUpUp}/webapps"/>
+ <input message="Service directory is suffix is [${deploy.root}].
Enter service prefix directory (where target directory ${deploy.root} will be
installed) Default is [${default_service.home}]"
addproperty="service.home"
defaultvalue="${default_service.home}" />
- <property name="default_in.deploy.root" value="LookupService"/>
- <input message="Enter service deployment name
[${default_in.deploy.root}]"
- addproperty="deploy.root"
- defaultvalue="${default_in.deploy.root}" />
+
</target>
<target name="confirm-inputs">
@@ -68,8 +125,9 @@
<echo message="Your settings: "/>
<echo
message="---------------------------------------------------------------"/>
- <echo message="Tomcat home directory [${tomcat.home}]" />
- <echo message="Service address
[http://${target.server}:${target.port}/${deploy.root}]"/>
+ <echo message="Tomcat home directory: [${tomcat.home}]" />
+ <echo message="Tomcat address:
[http://${target.server}:${target.port}/${deploy.root}]"/>
+ <echo message="Service destination directory:
[${service.home}/${deploy.root}]"/>
<input message="Proceed with these settings? "
validargs="y,n"
@@ -81,22 +139,13 @@
<fail if="do.abort">Files have not been modified. Configure the
service manually by editing configuration files, or run configurator
again.</fail>
</target>
- <target name="init-info">
- <echo>Pre-install</echo>
-
- <echo>Preparing the installation of XML Lookup Service...</echo>
-
- <echo></echo>
- <echo>Answer to all questions. If you go wrong, cancel (ctrl-c) and
start again.</echo>
- <echo></echo>
- </target>
-
-
<!-- INFO: download Tomcat if necessary -->
<target name="get-tomcat" if="tomcat.install.decision">
<echo>Download Tomcat</echo>
<property name="tomcat.tar"
value="${tomcat.tempdir}/${tomcat.tempfile}.tar.gz"/>
+
+ <mkdir dir="${tomcat.tempdir}"/>
<get src="${tomcat.download.url}"
dest="${tomcat.tar}"
verbose="true"
@@ -147,4 +196,4 @@
</target>
-</project>
\ No newline at end of file
+</project>
Modified: branches/XML-LS-RELEASE-1.1/ant/xmlls/undeploy-targets.xml
===================================================================
--- branches/XML-LS-RELEASE-1.1/ant/xmlls/undeploy-targets.xml 2007-03-23
15:31:35 UTC (rev 2278)
+++ branches/XML-LS-RELEASE-1.1/ant/xmlls/undeploy-targets.xml 2007-03-23
15:38:01 UTC (rev 2279)
@@ -7,7 +7,10 @@
<antcall target="undeploy-adminclient" />
+ <!-- XSLT doesn't work for all users
<antcall target="rem-context-listener" />
+ -->
+
<antcall target="delete-jars-for-xmlls"/>
<delete
file="${service.home}/${deploy.root}/WEB-INF/lib/perfSONAR-generic.jar"/>
Modified: branches/XML-LS-RELEASE-1.1/conf/log4j.properties
===================================================================
--- branches/XML-LS-RELEASE-1.1/conf/log4j.properties 2007-03-23 15:31:35
UTC (rev 2278)
+++ branches/XML-LS-RELEASE-1.1/conf/log4j.properties 2007-03-23 15:38:01
UTC (rev 2279)
@@ -1,50 +1,64 @@
-#This file was created by the ant script.
-#Wed Dec 06 19:54:26 CET 2006
-log4j.appender.debugAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.errorAppender.layout.ConversionPattern=%d %5p - %m%n
-log4j.appender.debugAppender.MaxBackupIndex=1000
-log4j.appender.infoAppender.MaxBackupIndex=1000
-log4j.appender.warnAppender.File=/root/Download/dev/sonar-trunk-20061206/perfsonar-20061206/log/perfsonar_warn.log
-log4j.appender.warnAppender.MaxBackupIndex=1000
-log4j.appender.debugAppender.File=/root/Download/dev/sonar-trunk-20061206/perfsonar-20061206/log/perfsonar_debug.log
+
+## $Id$
+## Project: perfSONAR
+
+
+
+# needs to be adjusted by service deployer
+logDir=/tmp/LookupService/projects/log
+
+
+log4j.rootLogger=INFO, rootAppender
+log4j.logger.sonar-debug=DEBUG, debugAppender
+log4j.logger.sonar-info=INFO, infoAppender
+log4j.logger.sonar-warn=WARN, warnAppender
+log4j.logger.sonar-error=ERROR, errorAppender
+log4j.logger.sonar-fatal=FATAL, fatalAppender
+
+
+log4j.appender.rootAppender=org.apache.log4j.RollingFileAppender
+log4j.appender.rootAppender.File=${logDir}/sonar.log
+log4j.appender.rootAppender.MaxFileSize=500KB
log4j.appender.rootAppender.MaxBackupIndex=1000
-log4j.appender.rootAppender.File=/root/Download/dev/sonar-trunk-20061206/perfsonar-20061206/log/perfsonar.log
log4j.appender.rootAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.rootAppender.layout.ConversionPattern=%p:
%m%n----------------------\n
+
+log4j.appender.debugAppender=org.apache.log4j.RollingFileAppender
+log4j.appender.debugAppender.File=${logDir}/sonar_debug.log
log4j.appender.debugAppender.MaxFileSize=500KB
-log4j.appender.debugAppender=org.apache.log4j.RollingFileAppender
-log4j.logger.sonar-warn=WARN, warnAppender
-log4j.appender.errorAppender.layout=org.apache.log4j.PatternLayout
-logDir=/root/Download/dev/sonar-trunk-20061206/perfsonar-20061206/log
-log4j.appender.fatalAppender=org.apache.log4j.RollingFileAppender
-log4j.appender.errorAppender.MaxBackupIndex=1000
-log4j.appender.errorAppender=org.apache.log4j.RollingFileAppender
-log4j.appender.rootAppender.layout.ConversionPattern=%d %5p - %m%n
+log4j.appender.debugAppender.MaxBackupIndex=100
+log4j.appender.debugAppender.layout=org.apache.log4j.PatternLayout
+## log4j.appender.debugAppender.layout.ConversionPattern=%p:
%m%n----------------------\n
+log4j.appender.debugAppender.layout.ConversionPattern=%p:
%m%n----------------------\n
+
+log4j.appender.infoAppender=org.apache.log4j.RollingFileAppender
+log4j.appender.infoAppender.File=${logDir}/sonar_info.log
+log4j.appender.infoAppender.MaxFileSize=500KB
+log4j.appender.infoAppender.MaxBackupIndex=100
+log4j.appender.infoAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.infoAppender.layout.ConversionPattern=%p:
%m%n----------------------\n
+
+log4j.appender.warnAppender=org.apache.log4j.RollingFileAppender
+log4j.appender.warnAppender.File=${logDir}/sonar_warn.log
log4j.appender.warnAppender.MaxFileSize=500KB
-log4j.rootLogger=INFO, rootAppender
-log4j.appender.rootAppender.MaxFileSize=500KB
-log4j.appender.fatalAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.warnAppender=org.apache.log4j.RollingFileAppender
-log4j.appender.fatalAppender.MaxBackupIndex=1000
+log4j.appender.warnAppender.MaxBackupIndex=100
log4j.appender.warnAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.infoAppender=org.apache.log4j.RollingFileAppender
-log4j.appender.errorAppender.File=/root/Download/dev/sonar-trunk-20061206/perfsonar-20061206/log/perfsonar_error.log
+log4j.appender.warnAppender.layout.ConversionPattern=%p:
%m%n----------------------\n
+
+log4j.appender.errorAppender=org.apache.log4j.RollingFileAppender
+log4j.appender.errorAppender.File=${logDir}/sonar_error.log
log4j.appender.errorAppender.MaxFileSize=500KB
-log4j.appender.fatalAppender.layout.ConversionPattern=%d %5p - %m%n
-log4j.logger.perfsonar-info=INFO, infoAppender
-log4j.appender.fatalAppender.File=/root/Download/dev/sonar-trunk-20061206/perfsonar-20061206/log/perfsonar_fatal.log
-log4j.appender.infoAppender.layout.ConversionPattern=%d %5p - %m%n
-log4j.appender.infoAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.errorAppender.MaxBackupIndex=100
+log4j.appender.errorAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.errorAppender.layout.ConversionPattern=%p:
%m%n----------------------\n
+
+log4j.appender.fatalAppender=org.apache.log4j.RollingFileAppender
+log4j.appender.fatalAppender.File=${logDir}/sonar_fatal.log
log4j.appender.fatalAppender.MaxFileSize=500KB
-log4j.appender.warnAppender.layout.ConversionPattern=%d %5p - %m%n
-log4j.logger.sonar-debug=DEBUG, debugAppender
-log4j.logger.perfsonar-debug=DEBUG, debugAppender
-log4j.appender.rootAppender=org.apache.log4j.RollingFileAppender
-log4j.appender.debugAppender.layout.ConversionPattern=%d %5p - %m%n
-log4j.logger.sonar-error=ERROR, errorAppender
-log4j.logger.perfsonar-error=ERROR, errorAppender
-log4j.logger.perfsonar-warn=WARN, warnAppender
-log4j.logger.sonar-info=INFO, infoAppender
-log4j.appender.infoAppender.MaxFileSize=500KB
-log4j.appender.infoAppender.File=/root/Download/dev/sonar-trunk-20061206/perfsonar-20061206/log/perfsonar_info.log
-log4j.logger.sonar-fatal=FATAL, fatalAppender
-log4j.logger.perfsonar-fatal=FATAL, fatalAppender
+log4j.appender.fatalAppender.MaxBackupIndex=100
+log4j.appender.fatalAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.fatalAppender.layout.ConversionPattern=%p:
%m%n----------------------\n
+
+
+
+
Copied: branches/XML-LS-RELEASE-1.1/doc/ma/rrdTypeMA/ChangeLog.txt (from rev
2278, trunk/perfsonar/doc/ma/rrdTypeMA/ChangeLog.txt)
Copied: branches/XML-LS-RELEASE-1.1/doc/ma/sqlTypeMA/ChangeLog.txt (from rev
2278, trunk/perfsonar/doc/ma/sqlTypeMA/ChangeLog.txt)
Modified:
branches/XML-LS-RELEASE-1.1/doc/ma/sqlTypeMA/Interface_Specification.doc
===================================================================
(Binary files differ)
Modified:
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
===================================================================
---
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-03-23 15:31:35 UTC (rev 2278)
+++
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-03-23 15:38:01 UTC (rev 2279)
@@ -98,11 +98,17 @@
String xQuery = "";
String ns = "\n"
- + "declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/'; \n"
+ + "declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
\n"
+ "declare namespace
nmwgtopo3='http://ggf.org/ns/nmwg/topology/base/3.0/'; \n"
- + "declare namespace
nmtl2='http://ggf.org/ns/nmwg/topology/l2/3.0/'; \n\n";
+ + "declare namespace
nmtl2='http://ggf.org/ns/nmwg/topology/l2/3.0/'; \n\n"
+ + "declare namespace functx = 'http://www.functx.com';
\n"
+ + "declare function functx:trim
\n"
+ + " ( $arg as xs:string? ) as xs:string {
\n"
+ + " replace(replace($arg,'\\s+$',''),'^\\s+','')
\n"
+ + "};
\n\n";
+
Subject subject = (Subject) metadata.getSubject();
// situation when only eventType is provided in the request
@@ -116,8 +122,8 @@
+ "
\n"
+ " let $linkMetadata :=
\n"
+ " for $k in //nmwg:metadata
\n"
- + " where
$k/nmwg:parameters/nmwg:parameter[(text()='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and @name='supportedEventType') \n"
- + " or
(@value='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
@name='supportedEventType')] \n"
+ + " where
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $k
\n"
+ "
\n"
+ " let $metaids :=
\n"
@@ -165,9 +171,9 @@
+ " let $linkMetadata :=
\n"
+ " if ($globalName != '') then
\n"
+ " for $m in //nmwg:metadata
\n"
- + " where
fn:lower-case($m/nmwg:subject/nmtl2:link/nmtl2:globalName) =
fn:lower-case($globalName) \n"
- + " and
$m/nmwg:parameters/nmwg:parameter[(text()='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and @name='supportedEventType') \n"
- + " or
(@value='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
@name='supportedEventType')] \n"
+ + " where
functx:trim(fn:lower-case($m/nmwg:subject/nmtl2:link/nmtl2:globalName)) =
functx:trim(fn:lower-case($globalName)) \n"
+ + " and
$m/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $m
\n"
+ " else
\n"
+ " ''
\n"
@@ -251,10 +257,10 @@
node1 = " let $node1_metadata :=
\n"
+ " for $i in //nmwg:metadata
\n"
+ " where 1
\n"
- + (node1Name != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name) =
fn:lower-case('" + node1Name + "') \n" : "")
- + (node1Country != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country) =
fn:lower-case('" + node1Country + "') \n" : "")
- + (node1City != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city) =
fn:lower-case('" + node1City + "') \n" : "")
- + (node1Institution != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution) =
fn:lower-case('" + node1Institution + "') \n" : "")
+ + (node1Name != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name))
= fn:lower-case('" + node1Name + "') \n" : "")
+ + (node1Country != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country))
= fn:lower-case('" + node1Country + "') \n" : "")
+ + (node1City != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city))
= fn:lower-case('" + node1City + "') \n" : "")
+ + (node1Institution != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution))
= fn:lower-case('" + node1Institution + "') \n" : "")
+ " return $i
\n"
+ "
\n"
+ " let $node1_id :=
\n"
@@ -272,10 +278,10 @@
node2 = " let $node2_metadata :=
\n"
+ " for $j in //nmwg:metadata
\n"
+ " where 1
\n"
- + (node2Name != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name) =
fn:lower-case('" + node2Name + "') \n" : "")
- + (node2Country != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country) =
fn:lower-case('" + node2Country + "') \n" : "")
- + (node2City != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city) =
fn:lower-case('" + node2City + "') \n" : "")
- + (node2Institution != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution) =
fn:lower-case('" + node2Institution + "') \n" : "")
+ + (node2Name != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name))
= fn:lower-case('" + node2Name + "') \n" : "")
+ + (node2Country != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country))
= fn:lower-case('" + node2Country + "') \n" : "")
+ + (node2City != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city))
= fn:lower-case('" + node2City + "') \n" : "")
+ + (node2Institution != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution))
= fn:lower-case('" + node2Institution + "') \n" : "")
+ " return $j
\n"
+ "
\n"
+ " let $node2_id :=
\n"
@@ -295,8 +301,8 @@
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node1_id
\n"
+ " and
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node2_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(text()='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and @name='supportedEventType') \n"
- + " or
(@value='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
@name='supportedEventType')] \n"
+ + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"
@@ -345,10 +351,10 @@
node = " let $node_metadata :=
\n"
+ " for $i in //nmwg:metadata
\n"
+ " where 1
\n"
- + (nodeName != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name) =
fn:lower-case('" + nodeName + "') \n" : "")
- + (nodeCountry != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country) =
fn:lower-case('" + nodeCountry + "') \n" : "")
- + (nodeCity != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city) =
fn:lower-case('" + nodeCity + "') \n" : "")
- + (nodeInstitution != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution) =
fn:lower-case('" + nodeInstitution + "') \n" : "")
+ + (nodeName != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name))
= fn:lower-case('" + nodeName + "') \n" : "")
+ + (nodeCountry != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country))
= fn:lower-case('" + nodeCountry + "') \n" : "")
+ + (nodeCity != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city))
= fn:lower-case('" + nodeCity + "') \n" : "")
+ + (nodeInstitution != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution))
= fn:lower-case('" + nodeInstitution + "') \n" : "")
+ " return $i
\n"
+ "
\n"
+ " let $node_id :=
\n"
@@ -364,8 +370,8 @@
+ " if ($node_id != '') then
\n"
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(text()='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and @name='supportedEventType') \n"
- + " or
(@value='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
@name='supportedEventType')] \n"
+ + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status'
and functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='http://ggf.org/ns/nmwg/topology/l2/3.0/link/status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"
Modified:
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
===================================================================
---
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-03-23 15:31:35 UTC (rev 2278)
+++
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-03-23 15:38:01 UTC (rev 2279)
@@ -101,11 +101,17 @@
String xQuery = "";
String ns = "\n"
- + "declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/'; \n"
+ + "declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
\n"
+ "declare namespace
nmwgtopo3='http://ggf.org/ns/nmwg/topology/base/3.0/'; \n"
- + "declare namespace
nmtl2='http://ggf.org/ns/nmwg/topology/l2/3.0/'; \n\n";
+ + "declare namespace
nmtl2='http://ggf.org/ns/nmwg/topology/l2/3.0/'; \n\n"
+ + "declare namespace functx = 'http://www.functx.com';
\n"
+ + "declare function functx:trim
\n"
+ + " ( $arg as xs:string? ) as xs:string {
\n"
+ + " replace(replace($arg,'\\s+$',''),'^\\s+','')
\n"
+ + "};
\n\n";
+
Subject subject = (Subject) metadata.getSubject();
// situation when only eventType is provided in the request
@@ -119,8 +125,8 @@
+ "
\n"
+ " let $linkMetadata :=
\n"
+ " for $k in //nmwg:metadata
\n"
- + " where
$k/nmwg:parameters/nmwg:parameter[(text()='Path.Status' and
@name='supportedEventType') \n"
- + " or
(@value='Path.Status' and @name='supportedEventType')] \n"
+ + " where
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $k
\n"
+ "
\n"
+ " let $metaids :=
\n"
@@ -168,9 +174,9 @@
+ " let $linkMetadata :=
\n"
+ " if ($globalName != '') then
\n"
+ " for $m in //nmwg:metadata
\n"
- + " where
fn:lower-case($m/nmwg:subject/nmtl2:link/nmtl2:globalName) =
fn:lower-case($globalName) \n"
- + " and
$m/nmwg:parameters/nmwg:parameter[(text()='Path.Status' and
@name='supportedEventType') \n"
- + " or
(@value='Path.Status' and @name='supportedEventType')] \n"
+ + " where
functx:trim(fn:lower-case($m/nmwg:subject/nmtl2:link/nmtl2:globalName)) =
functx:trim(fn:lower-case($globalName)) \n"
+ + " and
$m/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $m
\n"
+ " else
\n"
+ " ''
\n"
@@ -254,10 +260,10 @@
node1 = " let $node1_metadata :=
\n"
+ " for $i in //nmwg:metadata
\n"
+ " where 1
\n"
- + (node1Name != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name) =
fn:lower-case('" + node1Name + "') \n" : "")
- + (node1Country != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country) =
fn:lower-case('" + node1Country + "') \n" : "")
- + (node1City != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city) =
fn:lower-case('" + node1City + "') \n" : "")
- + (node1Institution != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution) =
fn:lower-case('" + node1Institution + "') \n" : "")
+ + (node1Name != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name))
= fn:lower-case('" + node1Name + "') \n" : "")
+ + (node1Country != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country))
= fn:lower-case('" + node1Country + "') \n" : "")
+ + (node1City != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city))
= fn:lower-case('" + node1City + "') \n" : "")
+ + (node1Institution != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution))
= fn:lower-case('" + node1Institution + "') \n" : "")
+ " return $i
\n"
+ "
\n"
+ " let $node1_id :=
\n"
@@ -275,10 +281,10 @@
node2 = " let $node2_metadata :=
\n"
+ " for $j in //nmwg:metadata
\n"
+ " where 1
\n"
- + (node2Name != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name) =
fn:lower-case('" + node2Name + "') \n" : "")
- + (node2Country != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country) =
fn:lower-case('" + node2Country + "') \n" : "")
- + (node2City != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city) =
fn:lower-case('" + node2City + "') \n" : "")
- + (node2Institution != "" ? " and
fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution) =
fn:lower-case('" + node2Institution + "') \n" : "")
+ + (node2Name != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name))
= fn:lower-case('" + node2Name + "') \n" : "")
+ + (node2Country != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country))
= fn:lower-case('" + node2Country + "') \n" : "")
+ + (node2City != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city))
= fn:lower-case('" + node2City + "') \n" : "")
+ + (node2Institution != "" ? " and
functx:trim(fn:lower-case($j/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution))
= fn:lower-case('" + node2Institution + "') \n" : "")
+ " return $j
\n"
+ "
\n"
+ " let $node2_id :=
\n"
@@ -298,8 +304,8 @@
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node1_id
\n"
+ " and
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node2_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(text()='Path.Status' and
@name='supportedEventType') \n"
- + " or
(@value='Path.Status' and @name='supportedEventType')] \n"
+ + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"
@@ -348,10 +354,10 @@
node = " let $node_metadata :=
\n"
+ " for $i in //nmwg:metadata
\n"
+ " where 1
\n"
- + (nodeName != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name) =
fn:lower-case('" + nodeName + "') \n" : "")
- + (nodeCountry != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country) =
fn:lower-case('" + nodeCountry + "') \n" : "")
- + (nodeCity != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city) =
fn:lower-case('" + nodeCity + "') \n" : "")
- + (nodeInstitution != "" ? " and
fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution) =
fn:lower-case('" + nodeInstitution + "') \n" : "")
+ + (nodeName != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:name))
= fn:lower-case('" + nodeName + "') \n" : "")
+ + (nodeCountry != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:country))
= fn:lower-case('" + nodeCountry + "') \n" : "")
+ + (nodeCity != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:city))
= fn:lower-case('" + nodeCity + "') \n" : "")
+ + (nodeInstitution != "" ? " and
functx:trim(fn:lower-case($i/nmwg:subject/nmwgtopo3:node/nmwgtopo3:institution))
= fn:lower-case('" + nodeInstitution + "') \n" : "")
+ " return $i
\n"
+ "
\n"
+ " let $node_id :=
\n"
@@ -367,8 +373,8 @@
+ " if ($node_id != '') then
\n"
+ " for $k in //nmwg:metadata
\n"
+ " where
fn:data($k/nmwg:subject/nmtl2:link/nmwgtopo3:node/@nodeIdRef) = $node_id
\n"
- + " and
$k/nmwg:parameters/nmwg:parameter[(text()='Path.Status' and
@name='supportedEventType') \n"
- + " or
(@value='Path.Status' and @name='supportedEventType')] \n"
+ + " and
$k/nmwg:parameters/nmwg:parameter[(functx:trim(text())='Path.Status' and
functx:trim(@name)='supportedEventType') \n"
+ + " or
(functx:trim(@value)='Path.Status' and
functx:trim(@name)='supportedEventType')] \n"
+ " return $k
\n"
+ " else
\n"
+ " ''
\n"
Modified:
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
===================================================================
---
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-03-23 15:31:35 UTC (rev 2278)
+++
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-03-23 15:38:01 UTC (rev 2279)
@@ -135,10 +135,17 @@
}
String xQuery = "\n"
- + "declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/'; "
- + "declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilization/2.0/'; "
- + "declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/'; \n\n";
+ + "declare namespace nmwg='http://ggf.org/ns/nmwg/base/2.0/';
\n"
+ + "declare namespace
netutil='http://ggf.org/ns/nmwg/characteristic/utilization/2.0/';\n"
+ + "declare namespace
nmwgt='http://ggf.org/ns/nmwg/topology/2.0/'; \n\n";
+ xQuery +=
+ "declare namespace functx = 'http://www.functx.com';\n"
+ + "declare function functx:trim \n"
+ + " ( $arg as xs:string? ) as xs:string { \n"
+ + " replace(replace($arg,'\\s+$',''),'^\\s+','') \n"
+ + "}; \n\n";
+
xQuery +=
" let $res := \n"
+ " for $i in //nmwg:metadata \n"
@@ -146,59 +153,59 @@
if (eventType != "")
- xQuery += "and $i/nmwg:parameters/nmwg:parameter[(text()='" +
eventType + "' and @name='supportedEventType') "
- + "or (@value='" + eventType + "' and
@name='supportedEventType')]";
+ xQuery += "and
$i/nmwg:parameters/nmwg:parameter[(functx:trim(text())='" + eventType + "'
and functx:trim(@name)='supportedEventType') "
+ + "or (functx:trim(@value)='" + eventType + "' and
functx:trim(@name)='supportedEventType')]";
if (ipAddress != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ipAddress[text()='" + ipAddress +
"']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ipAddress[functx:trim(text())='" +
ipAddress + "']";
if (hostName != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:hostName[text()='" + hostName + "']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:hostName[functx:trim(text())='" +
hostName + "']";
if (ifName != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifName[text()='" + ifName + "']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifName[functx:trim(text())='" +
ifName + "']";
if (ifDescription != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifDescription[text()='" +
ifDescription + "']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifDescription[functx:trim(text())='"
+ ifDescription + "']";
if (ifAddress != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifAddress[text()='" + ifAddress +
"']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifAddress[functx:trim(text())='" +
ifAddress + "']";
if (ifIndex != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifIndex[text()='" + ifIndex + "']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:ifIndex[functx:trim(text())='" +
ifIndex + "']";
if (type != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:type[text()='" + type + "']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:type[functx:trim(text())='" + type +
"']";
if (direction != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:direction[text()='" + direction +
"']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:direction[functx:trim(text())='" +
direction + "']";
if (authRealm != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:authRealm[text()='" + authRealm +
"']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:authRealm[functx:trim(text())='" +
authRealm + "']";
if (classOfService != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:classOfService[text()='" +
classOfService + "']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:classOfService[functx:trim(text())='"
+ classOfService + "']";
if (capacity != "")
- xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:capacity[text()='" + capacity + "']";
+ xQuery += "and
$i/netutil:subject/nmwgt:interface/nmwgt:capacity[functx:trim(text())='" +
capacity + "']";
xQuery += "\n"
- + " return $i \n"
- + " \n"
- + " let $metaids := \n"
- + " for $j in $res \n"
- + " return fn:data($j/@id) \n"
- + " \n"
- + " let $datas := \n"
- + " for $k in $metaids \n"
- + " let $d := \n"
- + " for $l in //nmwg:data \n"
- + " where fn:data($l/@metadataIdRef) = $k \n"
- + " return $l \n"
- + " return $d \n"
- + " \n"
- + " return ($res, $datas) \n";
+ + " return $i
\n"
+ + "
\n"
+ + " let $metaids :=
\n"
+ + " for $j in $res
\n"
+ + " return fn:data($j/@id)
\n"
+ + "
\n"
+ + " let $datas :=
\n"
+ + " for $k in $metaids
\n"
+ + " let $d :=
\n"
+ + " for $l in //nmwg:data
\n"
+ + " where fn:data($l/@metadataIdRef) = $k
\n"
+ + " return $l
\n"
+ + " return $d
\n"
+ + "
\n"
+ + " return ($res, $datas)
\n";
//logger.debug(
- perfsonar: r2279 - in branches/XML-LS-RELEASE-1.1: ant/rrdma ant/sqlma ant/xmlls conf doc/ma/rrdTypeMA doc/ma/sqlTypeMA src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator, svnlog, 03/23/2007
Archive powered by MHonArc 2.6.16.