You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(57) |
Apr
(103) |
May
(164) |
Jun
(139) |
Jul
(173) |
Aug
(196) |
Sep
(221) |
Oct
(333) |
Nov
(214) |
Dec
(88) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(163) |
Feb
(165) |
Mar
(98) |
Apr
(93) |
May
(199) |
Jun
(118) |
Jul
(200) |
Aug
(212) |
Sep
(185) |
Oct
(297) |
Nov
(437) |
Dec
(272) |
| 2006 |
Jan
(542) |
Feb
(329) |
Mar
(267) |
Apr
(332) |
May
(267) |
Jun
(130) |
Jul
(161) |
Aug
(348) |
Sep
(166) |
Oct
(305) |
Nov
(173) |
Dec
(173) |
| 2007 |
Jan
(199) |
Feb
(118) |
Mar
(133) |
Apr
(200) |
May
(208) |
Jun
(146) |
Jul
(198) |
Aug
(146) |
Sep
(187) |
Oct
(182) |
Nov
(181) |
Dec
(83) |
| 2008 |
Jan
(252) |
Feb
(124) |
Mar
(124) |
Apr
(101) |
May
(143) |
Jun
(122) |
Jul
(129) |
Aug
(60) |
Sep
(80) |
Oct
(89) |
Nov
(54) |
Dec
(112) |
| 2009 |
Jan
(88) |
Feb
(145) |
Mar
(105) |
Apr
(164) |
May
(123) |
Jun
(154) |
Jul
(374) |
Aug
(341) |
Sep
(219) |
Oct
(137) |
Nov
(373) |
Dec
(240) |
| 2010 |
Jan
(197) |
Feb
(270) |
Mar
(253) |
Apr
(150) |
May
(102) |
Jun
(51) |
Jul
(300) |
Aug
(512) |
Sep
(254) |
Oct
(258) |
Nov
(288) |
Dec
(143) |
| 2011 |
Jan
(238) |
Feb
(179) |
Mar
(253) |
Apr
(332) |
May
(248) |
Jun
(255) |
Jul
(216) |
Aug
(282) |
Sep
(146) |
Oct
(77) |
Nov
(86) |
Dec
(69) |
| 2012 |
Jan
(172) |
Feb
(234) |
Mar
(229) |
Apr
(101) |
May
(212) |
Jun
(267) |
Jul
(129) |
Aug
(210) |
Sep
(239) |
Oct
(271) |
Nov
(368) |
Dec
(220) |
| 2013 |
Jan
(179) |
Feb
(155) |
Mar
(59) |
Apr
(47) |
May
(99) |
Jun
(158) |
Jul
(185) |
Aug
(16) |
Sep
(16) |
Oct
(7) |
Nov
(20) |
Dec
(12) |
| 2014 |
Jan
(21) |
Feb
(17) |
Mar
(18) |
Apr
(13) |
May
(27) |
Jun
(15) |
Jul
(19) |
Aug
(22) |
Sep
(30) |
Oct
(16) |
Nov
(19) |
Dec
(16) |
| 2015 |
Jan
(14) |
Feb
(24) |
Mar
(33) |
Apr
(41) |
May
(14) |
Jun
(80) |
Jul
(53) |
Aug
(8) |
Sep
(7) |
Oct
(15) |
Nov
(13) |
Dec
(2) |
| 2016 |
Jan
(22) |
Feb
(12) |
Mar
(30) |
Apr
(6) |
May
(33) |
Jun
(16) |
Jul
(8) |
Aug
(20) |
Sep
(12) |
Oct
(18) |
Nov
(12) |
Dec
(11) |
| 2017 |
Jan
(24) |
Feb
(26) |
Mar
(47) |
Apr
(23) |
May
(19) |
Jun
(14) |
Jul
(28) |
Aug
(30) |
Sep
(17) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
(73) |
Mar
(90) |
Apr
(42) |
May
(116) |
Jun
(90) |
Jul
(127) |
Aug
(103) |
Sep
(56) |
Oct
(42) |
Nov
(95) |
Dec
(58) |
| 2020 |
Jan
(102) |
Feb
(31) |
Mar
(93) |
Apr
(60) |
May
(57) |
Jun
(45) |
Jul
(29) |
Aug
(32) |
Sep
(44) |
Oct
(86) |
Nov
(51) |
Dec
(71) |
| 2021 |
Jan
(44) |
Feb
(25) |
Mar
(78) |
Apr
(130) |
May
(64) |
Jun
(74) |
Jul
(21) |
Aug
(64) |
Sep
(40) |
Oct
(43) |
Nov
(21) |
Dec
(99) |
| 2022 |
Jan
(154) |
Feb
(64) |
Mar
(45) |
Apr
(95) |
May
(62) |
Jun
(48) |
Jul
(73) |
Aug
(37) |
Sep
(71) |
Oct
(27) |
Nov
(40) |
Dec
(65) |
| 2023 |
Jan
(89) |
Feb
(130) |
Mar
(124) |
Apr
(50) |
May
(93) |
Jun
(46) |
Jul
(45) |
Aug
(68) |
Sep
(62) |
Oct
(71) |
Nov
(108) |
Dec
(82) |
| 2024 |
Jan
(53) |
Feb
(76) |
Mar
(64) |
Apr
(75) |
May
(36) |
Jun
(54) |
Jul
(98) |
Aug
(137) |
Sep
(58) |
Oct
(177) |
Nov
(84) |
Dec
(52) |
| 2025 |
Jan
(70) |
Feb
(53) |
Mar
(72) |
Apr
(47) |
May
(88) |
Jun
(49) |
Jul
(86) |
Aug
(51) |
Sep
(65) |
Oct
(91) |
Nov
(18) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(3) |
2
(5) |
3
(6) |
|
4
(6) |
5
(5) |
6
(4) |
7
(3) |
8
(10) |
9
(7) |
10
|
|
11
(18) |
12
(2) |
13
(6) |
14
(4) |
15
(5) |
16
(1) |
17
|
|
18
(5) |
19
(5) |
20
(4) |
21
(1) |
22
|
23
|
24
|
|
25
(2) |
26
(7) |
27
(1) |
28
(10) |
29
(5) |
30
(6) |
31
(2) |
|
From: <wol...@us...> - 2007-03-31 14:52:09
|
Revision: 5561
http://svn.sourceforge.net/exist/?rev=5561&view=rev
Author: wolfgang_m
Date: 2007-03-31 07:52:07 -0700 (Sat, 31 Mar 2007)
Log Message:
-----------
Another small change in XmldbURI to avoid creating URIs too frequently.
Modified Paths:
--------------
trunk/eXist/src/org/exist/xmldb/FullXmldbURI.java
trunk/eXist/src/org/exist/xmldb/XmldbURI.java
Modified: trunk/eXist/src/org/exist/xmldb/FullXmldbURI.java
===================================================================
--- trunk/eXist/src/org/exist/xmldb/FullXmldbURI.java 2007-03-31 12:12:35 UTC (rev 5560)
+++ trunk/eXist/src/org/exist/xmldb/FullXmldbURI.java 2007-03-31 14:52:07 UTC (rev 5561)
@@ -234,8 +234,13 @@
contextURI = URI.create(context);
return contextURI.resolve(uri);
}
-
- /* (non-Javadoc)
+
+
+ public String toString() {
+ return XMLDB_URI_PREFIX + wrappedURI.toString();
+ }
+
+ /* (non-Javadoc)
* @see java.net.URI#getAuthority()
*/
public String getAuthority() {
Modified: trunk/eXist/src/org/exist/xmldb/XmldbURI.java
===================================================================
--- trunk/eXist/src/org/exist/xmldb/XmldbURI.java 2007-03-31 12:12:35 UTC (rev 5560)
+++ trunk/eXist/src/org/exist/xmldb/XmldbURI.java 2007-03-31 14:52:07 UTC (rev 5561)
@@ -688,9 +688,8 @@
return trimFromBeginning(XmldbURI.xmldbUriFor(string));
}
- public String toString() {
- //TODO : trim trailing slash if necessary
- return getXmldbURI().toString();
+ public String toString() {
+ return encodedCollectionPath;
}
public static String[] getPathComponents(String collectionPath) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-03-31 12:12:39
|
Revision: 5560
http://svn.sourceforge.net/exist/?rev=5560&view=rev
Author: dizzzz
Date: 2007-03-31 05:12:35 -0700 (Sat, 31 Mar 2007)
Log Message:
-----------
Updated netbeans project
Modified Paths:
--------------
trunk/eXist/nbproject/project.xml
Modified: trunk/eXist/nbproject/project.xml
===================================================================
--- trunk/eXist/nbproject/project.xml 2007-03-30 19:29:29 UTC (rev 5559)
+++ trunk/eXist/nbproject/project.xml 2007-03-31 12:12:35 UTC (rev 5560)
@@ -313,7 +313,7 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
<compilation-unit>
<package-root>src</package-root>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
+ <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/stax-api-1.0.1.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
<built-to>build/classes</built-to>
<built-to>extensions/modules/classes</built-to>
<built-to>tools/wrapper/classes</built-to>
@@ -332,7 +332,7 @@
</compilation-unit>
<compilation-unit>
<package-root>samples</package-root>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
+ <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/stax-api-1.0.1.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
<built-to>build/classes</built-to>
<built-to>extensions/modules/classes</built-to>
<built-to>tools/wrapper/classes</built-to>
@@ -341,7 +341,7 @@
</compilation-unit>
<compilation-unit>
<package-root>extensions/modules/src</package-root>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar;exist-optional.jar;exist.jar;start.jar</classpath>
+ <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/stax-api-1.0.1.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
<built-to>build/classes</built-to>
<built-to>extensions/modules/classes</built-to>
<built-to>tools/wrapper/classes</built-to>
@@ -350,7 +350,7 @@
</compilation-unit>
<compilation-unit>
<package-root>tools/requestlog/src</package-root>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
+ <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/stax-api-1.0.1.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
<built-to>build/classes</built-to>
<built-to>extensions/modules/classes</built-to>
<built-to>tools/wrapper/classes</built-to>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2007-03-30 19:29:30
|
Revision: 5559
http://svn.sourceforge.net/exist/?rev=5559&view=rev
Author: alexmilowski
Date: 2007-03-30 12:29:29 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
fixed log4j requiring empty DTD
Modified Paths:
--------------
trunk/embedded/build.xml
trunk/embedded/import/fix-log4j.xsl
Modified: trunk/embedded/build.xml
===================================================================
--- trunk/embedded/build.xml 2007-03-30 19:27:02 UTC (rev 5558)
+++ trunk/embedded/build.xml 2007-03-30 19:29:29 UTC (rev 5559)
@@ -105,6 +105,7 @@
<copy file="${exist.dir}/lib/core/commons-pool-1.2.jar" todir="lib"/>
<copy file="${exist.dir}/lib/core/resolver.jar" todir="lib"/>
<copy file="${exist.dir}/lib/core/antlr-2.7.6.jar" todir="lib"/>
+ <echo file="log4j.dtd"/>
</target>
<target name="really-clean">
<delete dir="lib" includes="*.jar"/>
Modified: trunk/embedded/import/fix-log4j.xsl
===================================================================
--- trunk/embedded/import/fix-log4j.xsl 2007-03-30 19:27:02 UTC (rev 5558)
+++ trunk/embedded/import/fix-log4j.xsl 2007-03-30 19:29:29 UTC (rev 5559)
@@ -1,5 +1,5 @@
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="xml"/>
+<xsl:output method="xml" doctype-system="log4j.dtd"/>
<xsl:template match="appender/param[@name='File']">
<param name="File" value="logs/{substring-after(@value,'logs/')}"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ale...@us...> - 2007-03-30 19:27:09
|
Revision: 5558
http://svn.sourceforge.net/exist/?rev=5558&view=rev
Author: alexmilowski
Date: 2007-03-30 12:27:02 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
Initial version of embedded distribution
Added Paths:
-----------
trunk/embedded/
trunk/embedded/build.xml
trunk/embedded/catalog.xml
trunk/embedded/data/
trunk/embedded/import/
trunk/embedded/import/fix-conf.xsl
trunk/embedded/import/fix-log4j.xsl
trunk/embedded/lib/
trunk/embedded/logs/
trunk/embedded/manifest.mf
trunk/embedded/nbproject/
trunk/embedded/nbproject/build-impl.xml
trunk/embedded/nbproject/genfiles.properties
trunk/embedded/nbproject/project.properties
trunk/embedded/nbproject/project.xml
trunk/embedded/src/
trunk/embedded/src/org/
trunk/embedded/src/org/exist/
trunk/embedded/src/org/exist/embedded/
trunk/embedded/src/org/exist/embedded/Main.java
trunk/embedded/src/org/exist/embedded/Program.java
trunk/embedded/test/
Added: trunk/embedded/build.xml
===================================================================
--- trunk/embedded/build.xml (rev 0)
+++ trunk/embedded/build.xml 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="embedded" default="default" basedir=".">
+ <description>Builds, tests, and runs the project embedded.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Another way to customize the build is by overriding existing main targets.
+ The targets of interest are:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -init-macrodef-java: defines macro for class execution
+ -do-jar-with-manifest: JAR building (if you are using a manifest)
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ run: execution of project
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="embedded-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
+ properties which you can use, check the target you are overriding in the
+ nbproject/build-impl.xml file.
+
+ -->
+ <property name="exist.dir" location="../eXist-1.0"/>
+ <target name="build-exist-jar">
+ <mkdir dir="tmp"/>
+ <unjar dest="tmp" src="${exist.dir}/exist.jar"/>
+ <delete dir="tmp/org/exist/atom"/>
+ <delete dir="tmp/org/exist/backup"/>
+ <delete dir="tmp/org/exist/cluster/cocoon"/>
+ <delete dir="tmp/org/exist/cluster/journal/test"/>
+ <delete dir="tmp/org/exist/client"/>
+ <delete dir="tmp/org/exist/http"/>
+ <delete dir="tmp/org/exist/dom/test"/>
+ <delete dir="tmp/org/exist/jsp"/>
+ <delete dir="tmp/org/exist/memtree/test"/>
+ <delete dir="tmp/org/exist/numbering/test"/>
+ <delete dir="tmp/org/exist/storage/test"/>
+ <delete dir="tmp/org/exist/storage/io/test"/>
+ <delete dir="tmp/org/exist/test"/>
+ <delete dir="tmp/org/exist/util/test"/>
+ <delete dir="tmp/org/exist/util/hashtable/test"/>
+ <delete dir="tmp/org/exist/validation/test"/>
+ <delete dir="tmp/org/exist/webstart"/>
+ <delete dir="tmp/org/exist/xmldb/test"/>
+ <delete dir="tmp/org/exist/xquery/test"/>
+ <delete dir="tmp/org/exist/xquery/value/test"/>
+ <delete dir="tmp/org/exist/xupdate/test"/>
+ <delete dir="tmp/org/exist/xmlrpc"/>
+ <jar basedir="tmp" destfile="lib/exist.jar"/>
+ <delete dir="tmp"/>
+ </target>
+ <target name="import-exist" depends="build-exist-jar">
+ <xslt in="${exist.dir}/conf.xml" out="conf.xml" style="import/fix-conf.xsl"/>
+ <copy file="${exist.dir}/LICENSE" todir="."/>
+ <xslt in="${exist.dir}/log4j.xml" out="log4j.xml" style="import/fix-log4j.xsl"/>
+ <copy file="${exist.dir}/lib/core/xmldb.jar" todir="lib"/>
+ <copy file="${exist.dir}/lib/core/xmlrpc-1.2-patched.jar" todir="lib"/>
+ <copy file="${exist.dir}/lib/core/log4j-1.2.14.jar" todir="lib"/>
+ <copy file="${exist.dir}/lib/core/commons-pool-1.2.jar" todir="lib"/>
+ <copy file="${exist.dir}/lib/core/resolver.jar" todir="lib"/>
+ <copy file="${exist.dir}/lib/core/antlr-2.7.6.jar" todir="lib"/>
+ </target>
+ <target name="really-clean">
+ <delete dir="lib" includes="*.jar"/>
+ <delete file="LICENSE"/>
+ <delete file="conf.xml"/>
+ <delete file="log4j.xml"/>
+ </target>
+</project>
Added: trunk/embedded/catalog.xml
===================================================================
--- trunk/embedded/catalog.xml (rev 0)
+++ trunk/embedded/catalog.xml 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,3 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+</catalog>
+
Added: trunk/embedded/import/fix-conf.xsl
===================================================================
--- trunk/embedded/import/fix-conf.xsl (rev 0)
+++ trunk/embedded/import/fix-conf.xsl 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,26 @@
+<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml"/>
+
+<xsl:template match="cluster/@journalDir">
+<xsl:attribute name="journalDir"><xsl:value-of select="substring-after(.,'webapp/WEB-INF/')"/></xsl:attribute>
+</xsl:template>
+
+<xsl:template match="db-connection/@files">
+<xsl:attribute name="files"><xsl:value-of select="substring-after(.,'webapp/WEB-INF/')"/></xsl:attribute>
+</xsl:template>
+
+<xsl:template match="recovery/@journal-dir">
+<xsl:attribute name="journal-dir"><xsl:value-of select="substring-after(.,'webapp/WEB-INF/')"/></xsl:attribute>
+</xsl:template>
+
+<xsl:template match="catalog/@file">
+<xsl:attribute name="file"><xsl:value-of select="substring-after(.,'webapp/WEB-INF/')"/></xsl:attribute>
+</xsl:template>
+
+<xsl:template match="*|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()|comment()"/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:transform>
Added: trunk/embedded/import/fix-log4j.xsl
===================================================================
--- trunk/embedded/import/fix-log4j.xsl (rev 0)
+++ trunk/embedded/import/fix-log4j.xsl 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,21 @@
+<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml"/>
+
+<xsl:template match="appender/param[@name='File']">
+<param name="File" value="logs/{substring-after(@value,'logs/')}"/>
+</xsl:template>
+
+<xsl:template match="appender[@name='exist.ehcache']"/>
+<xsl:template match="category[@name='net.sf.ehcache']"/>
+
+<xsl:template match="priority[@value='debug']">
+ <priority value='info'/>
+</xsl:template>
+
+<xsl:template match="*|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()|comment()"/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:transform>
Added: trunk/embedded/manifest.mf
===================================================================
--- trunk/embedded/manifest.mf (rev 0)
+++ trunk/embedded/manifest.mf 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
Added: trunk/embedded/nbproject/build-impl.xml
===================================================================
--- trunk/embedded/nbproject/build-impl.xml (rev 0)
+++ trunk/embedded/nbproject/build-impl.xml 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+-->
+<project name="embedded-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
+ <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="classpath" default="${javac.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" includes="@{includes}"/>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="stopclassname" default=""/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="dir" default="${build.classes.dir}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=none"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="deps-jar" depends="init" unless="no.deps"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac>
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target name="-pre-pre-jar" depends="init">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert property="jar.classpath" pathsep=" ">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+ <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target name="run" depends="init,compile" description="Run a main class.">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="run-single" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target name="-debug-start-debuggee" depends="init,compile">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
+ <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target name="-javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <j2seproject3:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+ <customize>
+ <arg line="${test.class}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target name="run-applet" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="deps-clean" depends="init" unless="no.deps"/>
+ <target name="-do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+</project>
Added: trunk/embedded/nbproject/genfiles.properties
===================================================================
--- trunk/embedded/nbproject/genfiles.properties (rev 0)
+++ trunk/embedded/nbproject/genfiles.properties 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=91bddf87
+build.xml.script.CRC32=00d04fd6
+build.xml.stylesheet.CRC32=240b97a2
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=91bddf87
+nbproject/build-impl.xml.script.CRC32=315d3e50
+nbproject/build-impl.xml.stylesheet.CRC32=20b9345e
Added: trunk/embedded/nbproject/project.properties
===================================================================
--- trunk/embedded/nbproject/project.properties (rev 0)
+++ trunk/embedded/nbproject/project.properties 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,70 @@
+application.args=
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/embedded.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+file.reference.antlr-2.7.6.jar=lib/antlr-2.7.6.jar
+file.reference.commons-pool-1.2.jar=lib/commons-pool-1.2.jar
+file.reference.exist.jar=lib/exist.jar
+file.reference.log4j-1.2.14.jar=lib/log4j-1.2.14.jar
+file.reference.resolver.jar=lib/resolver.jar
+file.reference.xmldb.jar=lib/xmldb.jar
+file.reference.xmlrpc-1.2-patched.jar=lib/xmlrpc-1.2-patched.jar
+jar.compress=false
+javac.classpath=\
+ ${file.reference.exist.jar}:\
+ ${file.reference.xmldb.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=org.exist.embedded.Main
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${file.reference.xmlrpc-1.2-patched.jar}:\
+ ${file.reference.resolver.jar}:\
+ ${file.reference.antlr-2.7.6.jar}:\
+ ${file.reference.commons-pool-1.2.jar}:\
+ ${file.reference.log4j-1.2.14.jar}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+src.dir=src
+test.src.dir=test
Added: trunk/embedded/nbproject/project.xml
===================================================================
--- trunk/embedded/nbproject/project.xml (rev 0)
+++ trunk/embedded/nbproject/project.xml 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>embedded</name>
+ <minimum-ant-version>1.6.5</minimum-ant-version>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir"/>
+ </test-roots>
+ </data>
+ </configuration>
+</project>
Added: trunk/embedded/src/org/exist/embedded/Main.java
===================================================================
--- trunk/embedded/src/org/exist/embedded/Main.java (rev 0)
+++ trunk/embedded/src/org/exist/embedded/Main.java 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,125 @@
+/*
+ * Main.java
+ *
+ * Created on March 29, 2007, 3:04 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.exist.embedded;
+
+import java.io.File;
+import org.exist.EXistException;
+import org.exist.storage.BrokerPool;
+import org.exist.storage.DBBroker;
+import org.exist.util.Configuration;
+import org.exist.util.DatabaseConfigurationException;
+import org.exist.xmldb.DatabaseInstanceManager;
+import org.exist.xmldb.ShutdownListener;
+import org.xmldb.api.DatabaseManager;
+import org.xmldb.api.base.Collection;
+import org.xmldb.api.base.Database;
+import org.xmldb.api.base.XMLDBException;
+
+/**
+ *
+ * @author alex
+ */
+public class Main
+{
+
+ final static String DEFAULT_URI = "xmldb:exist://" + DBBroker.ROOT_COLLECTION;
+ final static String DRIVER = "org.exist.xmldb.DatabaseImpl";
+ static class ShutdownListenerImpl implements ShutdownListener {
+
+ public void shutdown(String dbname, int remainingInstances) {
+ System.err.println("Shutdown of "+dbname+", remaining="+remainingInstances);
+ }
+ }
+
+ /** Creates a new instance of Main */
+ public Main()
+ {
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args)
+ {
+ // Setup the log4j configuration
+ String log4j = System.getProperty("log4j.configuration");
+ if (log4j == null) {
+ File lf = new File("log4j.xml");
+ if (lf.canRead()) {
+ System.setProperty("log4j.configuration", lf.toURI().toASCIIString());
+ }
+ }
+
+ Collection top = null;
+ File configFile = new File("conf.xml");
+ System.setProperty("exist.home",configFile.getAbsoluteFile().getParent());
+
+ int threads = 5;
+ try {
+ // Configure the database
+ Configuration config = new Configuration(configFile.getAbsolutePath());
+ BrokerPool.configure( 1, threads, config );
+ BrokerPool.getInstance().registerShutdownListener(new ShutdownListenerImpl());
+
+ // Load the database & initiate
+ Class cl = Class.forName(DRIVER);
+ Database database = (Database)cl.newInstance();
+ database.setProperty("create-database", "true");
+ DatabaseManager.registerDatabase(database);
+
+ top = DatabaseManager.getCollection(DEFAULT_URI, "admin", null);
+
+ } catch (DatabaseConfigurationException ex) {
+ System.err.println("Bad configuration: "+ex.getMessage());
+ } catch (EXistException ex) {
+ ex.printStackTrace();
+ } catch (XMLDBException ex) {
+ ex.printStackTrace();
+ } catch (IllegalAccessException ex) {
+ ex.printStackTrace();
+ } catch (InstantiationException ex) {
+ ex.printStackTrace();
+ } catch (ClassNotFoundException ex) {
+ ex.printStackTrace();
+ }
+
+ // Run programs
+ try {
+ for (int i=0; i<args.length; i++) {
+ System.err.println(args[i]);
+ try {
+ Class cl = Class.forName(args[i]);
+ Program p = (Program)cl.newInstance();
+ if (!p.apply(top)) {
+ break;
+ }
+ } catch (IllegalAccessException ex) {
+ ex.printStackTrace();
+ } catch (InstantiationException ex) {
+ ex.printStackTrace();
+ } catch (ClassNotFoundException ex) {
+ ex.printStackTrace();
+ }
+ }
+ } finally {
+
+ // Shutdown the database
+ try {
+ DatabaseInstanceManager manager = (DatabaseInstanceManager)top.getService("DatabaseInstanceManager","1.0");
+ manager.shutdown();
+ top.close();
+ } catch (XMLDBException ex) {
+ System.err.println("Cannot shutdown database!");
+ ex.printStackTrace();
+ }
+ }
+ }
+
+}
Added: trunk/embedded/src/org/exist/embedded/Program.java
===================================================================
--- trunk/embedded/src/org/exist/embedded/Program.java (rev 0)
+++ trunk/embedded/src/org/exist/embedded/Program.java 2007-03-30 19:27:02 UTC (rev 5558)
@@ -0,0 +1,22 @@
+/*
+ * Program.java
+ *
+ * Created on March 29, 2007, 4:11 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package org.exist.embedded;
+
+import org.xmldb.api.base.Collection;
+
+/**
+ *
+ * @author alex
+ */
+public interface Program
+{
+ boolean apply(Collection top);
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-03-30 13:00:36
|
Revision: 5557
http://svn.sourceforge.net/exist/?rev=5557&view=rev
Author: dizzzz
Date: 2007-03-30 06:00:25 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
Added testcase for
http://sourceforge.net/tracker/index.php?func=detail&aid=1691174&group_id=17691&atid=117691
Modified Paths:
--------------
trunk/eXist/test/src/org/exist/xquery/XQueryTest.java
Modified: trunk/eXist/test/src/org/exist/xquery/XQueryTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/xquery/XQueryTest.java 2007-03-30 12:53:01 UTC (rev 5556)
+++ trunk/eXist/test/src/org/exist/xquery/XQueryTest.java 2007-03-30 13:00:25 UTC (rev 5557)
@@ -1871,6 +1871,7 @@
// DWES Funny in sandbox and REST it fails ; here it is OK... sometimes
+ // http://sourceforge.net/tracker/index.php?func=detail&aid=1691112&group_id=17691&atid=117691
public void bugtestOrder_1691112(){
String query="declare namespace tt = \"http://example.com\";"+
@@ -1927,6 +1928,7 @@
}
}
+ // http://sourceforge.net/tracker/index.php?func=detail&aid=1691177&group_id=17691&atid=117691
public void bugtestAttribute_1691177(){
String query="declare namespace xmldb = \"http://exist-db.org/xquery/xmldb\"; "
@@ -1944,6 +1946,31 @@
fail(ex.toString());
}
}
+
+ // http://sourceforge.net/tracker/index.php?func=detail&aid=1691174&group_id=17691&atid=117691
+ public void bugtestAttribute_1691174(){
+ String query="declare function local:show($el1, $el2) { "
+ +" <Foobar> "
+ +" { (\"first: \", $el1, \" second: \", $el2) } "
+ +" </Foobar> "
+ +"}; "
+ +"declare function local:attrib($n as node()) { "
+ +" <Attrib>{$n}</Attrib> "
+ +"}; "
+ +"local:show( "
+ +" <Attrib name=\"value\"/>, "
+ +" local:attrib(attribute name {\"value\"}) (: Exist bug! :) "
+ +") ";
+ XPathQueryService service;
+ try {
+ service = (XPathQueryService) testCollection.getService("XPathQueryService", "1.0");
+ ResourceSet result = service.query(query);
+ assertEquals( "XQuery: " + query, 0, result.getSize() );
+ } catch (XMLDBException ex) {
+ fail(ex.toString());
+ }
+ }
+
// ======================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-03-30 12:53:16
|
Revision: 5556
http://svn.sourceforge.net/exist/?rev=5556&view=rev
Author: dizzzz
Date: 2007-03-30 05:53:01 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
Filed bug report for [ 1691177 ] Attribute insert: Error SENR0001
http://sourceforge.net/tracker/index.php?func=detail&aid=1691177&group_id=17691&atid=117691
note: previous commit yields into error on empty database?
Modified Paths:
--------------
trunk/eXist/test/src/org/exist/xquery/XQueryTest.java
Modified: trunk/eXist/test/src/org/exist/xquery/XQueryTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/xquery/XQueryTest.java 2007-03-30 10:30:12 UTC (rev 5555)
+++ trunk/eXist/test/src/org/exist/xquery/XQueryTest.java 2007-03-30 12:53:01 UTC (rev 5556)
@@ -1870,8 +1870,8 @@
}
- // DWES Funny in sandbox and REST it fails ; here it is OK
- public void testOrder_1691112(){
+ // DWES Funny in sandbox and REST it fails ; here it is OK... sometimes
+ public void bugtestOrder_1691112(){
String query="declare namespace tt = \"http://example.com\";"+
"declare function tt:function( $function as element(Function)) {"+
@@ -1913,7 +1913,7 @@
try {
- for(int i=0 ; i<10 ; i++){ // repeat a few times
+ for(int i=0 ; i<25 ; i++){ // repeat a few times
XPathQueryService service = (XPathQueryService) testCollection.getService("XPathQueryService", "1.0");
System.out.println("Attempt "+i);
ResourceSet result = service.query(query);
@@ -1926,6 +1926,24 @@
fail(ex.toString());
}
}
+
+ public void bugtestAttribute_1691177(){
+
+ String query="declare namespace xmldb = \"http://exist-db.org/xquery/xmldb\"; "
+ +"let $uri := xmldb:store(\"/db\", \"insertAttribDoc.xml\", <C/>) "
+ +"let $node := doc($uri)/element() "
+ +"let $attrib := <Value f=\"ATTRIB VALUE\"/>/@* "
+ +"return update insert $attrib into $node ";
+
+ XPathQueryService service;
+ try {
+ service = (XPathQueryService) testCollection.getService("XPathQueryService", "1.0");
+ ResourceSet result = service.query(query);
+ assertEquals( "XQuery: " + query, 0, result.getSize() );
+ } catch (XMLDBException ex) {
+ fail(ex.toString());
+ }
+ }
// ======================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-03-30 10:30:17
|
Revision: 5555
http://svn.sourceforge.net/exist/?rev=5555&view=rev
Author: dizzzz
Date: 2007-03-30 03:30:12 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
Added testcase for http://sourceforge.net/support/tracker.php?aid=1691112
In junit no error occurs, strangely
Modified Paths:
--------------
trunk/eXist/test/src/org/exist/xquery/XQueryTest.java
Modified: trunk/eXist/test/src/org/exist/xquery/XQueryTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/xquery/XQueryTest.java 2007-03-30 07:55:12 UTC (rev 5554)
+++ trunk/eXist/test/src/org/exist/xquery/XQueryTest.java 2007-03-30 10:30:12 UTC (rev 5555)
@@ -2,6 +2,7 @@
import java.io.File;
import java.io.IOException;
+import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
@@ -10,6 +11,7 @@
import javax.xml.transform.OutputKeys;
import org.custommonkey.xmlunit.DetailedDiff;
+import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLTestCase;
import org.exist.storage.DBBroker;
import org.exist.xmldb.DatabaseInstanceManager;
@@ -1867,6 +1869,66 @@
}
}
+
+ // DWES Funny in sandbox and REST it fails ; here it is OK
+ public void testOrder_1691112(){
+
+ String query="declare namespace tt = \"http://example.com\";"+
+ "declare function tt:function( $function as element(Function)) {"+
+ " let $functions :="+
+ " for $subfunction in $function/Function"+
+ " return tt:function($subfunction)"+
+ " let $unused := distinct-values($functions/NonExistingElement)"+
+ " return"+
+ " <Function>"+
+ " {"+
+ " $function/Name,"+
+ " $functions"+
+ " }"+
+ " </Function>"+
+ "};"+
+ "let $funcs :="+
+ " <Function>"+
+ " <Name>Airmount 1</Name>"+
+ " <Function>"+
+ " <Name>Position</Name>"+
+ " </Function>"+
+ " <Function>"+
+ " <Name>Velocity</Name>"+
+ " </Function>"+
+ " </Function>"+
+ "return"+
+ " tt:function($funcs)";
+
+ String expectedresult=
+ "<Function>\n"+
+ " <Name>Airmount 1</Name>\n"+
+ " <Function>\n"+
+ " <Name>Position</Name>\n"+
+ " </Function>\n"+
+ " <Function>\n"+
+ " <Name>Velocity</Name>\n"+
+ " </Function>\n"+
+ "</Function>";
+
+ try {
+
+ for(int i=0 ; i<10 ; i++){ // repeat a few times
+ XPathQueryService service = (XPathQueryService) testCollection.getService("XPathQueryService", "1.0");
+ System.out.println("Attempt "+i);
+ ResourceSet result = service.query(query);
+ assertEquals( 1, result.getSize() );
+ printResult(result);
+ assertEquals(expectedresult, result.getResource(0).getContent().toString());
+ }
+
+ } catch (Exception ex) {
+ fail(ex.toString());
+ }
+ }
+
+ // ======================================
+
/**
* @return
* @throws XMLDBException
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2007-03-30 07:55:13
|
Revision: 5554
http://svn.sourceforge.net/exist/?rev=5554&view=rev
Author: brihaye
Date: 2007-03-30 00:55:12 -0700 (Fri, 30 Mar 2007)
Log Message:
-----------
Avoid NPE when looking for (QName) fulltext index...
Untested.
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/functions/ExtFulltext.java
Modified: trunk/eXist/src/org/exist/xquery/functions/ExtFulltext.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/ExtFulltext.java 2007-03-29 21:24:48 UTC (rev 5553)
+++ trunk/eXist/src/org/exist/xquery/functions/ExtFulltext.java 2007-03-30 07:55:12 UTC (rev 5554)
@@ -32,6 +32,7 @@
import org.exist.dom.QName;
import org.exist.storage.DBBroker;
import org.exist.storage.ElementValue;
+import org.exist.storage.FulltextIndexSpec;
import org.exist.storage.analysis.Tokenizer;
import org.exist.xmldb.XmldbURI;
import org.exist.xquery.AnalyzeContextInfo;
@@ -246,7 +247,11 @@
Collection collection = (Collection) i.next();
if (collection.getURI().equals(XmldbURI.SYSTEM_COLLECTION_URI))
continue;
- hasQNameIndex = collection.getFulltextIndexConfiguration(context.getBroker()).hasQNameIndex(contextQName);
+ FulltextIndexSpec config = collection.getFulltextIndexConfiguration(context.getBroker());
+ //We have a fulltext index
+ if (config != null) {
+ hasQNameIndex = config.hasQNameIndex(contextQName);
+ }
if (!hasQNameIndex) {
if (LOG.isTraceEnabled())
LOG.trace("cannot use index on QName: " + contextQName + ". Collection " + collection.getURI() +
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2007-03-29 21:24:50
|
Revision: 5553
http://svn.sourceforge.net/exist/?rev=5553&view=rev
Author: brihaye
Date: 2007-03-29 14:24:48 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Improved virtual node set cardinality computation.
See comments : there is perhaps a margin formore improvements.
Modified Paths:
--------------
trunk/eXist/src/org/exist/dom/VirtualNodeSet.java
Modified: trunk/eXist/src/org/exist/dom/VirtualNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/VirtualNodeSet.java 2007-03-29 19:38:15 UTC (rev 5552)
+++ trunk/eXist/src/org/exist/dom/VirtualNodeSet.java 2007-03-29 21:24:48 UTC (rev 5553)
@@ -61,7 +61,9 @@
protected int contextId = Expression.NO_CONTEXT_ID;
private static final int MAX_CHILD_COUNT_FOR_OPTIMIZE = 5;
- private boolean knownCardinality = false;
+ private boolean knownIsEmptyCardinality = false;
+ private boolean knownHasOneCardinality = false;
+ private boolean knownHasManyCardinality = false;
private boolean isEmpty = true;
private boolean hasOne = false;
private boolean hasMany = false;
@@ -196,12 +198,14 @@
private void addInternal(NodeProxy p) {
if (realSet == null)
realSet = new ExtArrayNodeSet(256);
- knownCardinality = true;
- if (isEmpty) {
+ knownIsEmptyCardinality = true;
+ if (isEmpty) {
isEmpty = false;
+ knownHasOneCardinality = true;
hasOne= true;
} else if (hasOne) {
hasOne = false;
+ knownHasManyCardinality = true;
hasMany = true;
}
realSet.add(p);
@@ -212,6 +216,7 @@
int level) {
NodeProxy first = getFirstParent(proxy, null, includeSelf, directParent, 0);
if (first != null)
+ //TODO : should we set an empty cardinality here ?
addInternal(first);
return first;
}
@@ -219,6 +224,7 @@
public NodeProxy parentWithChild(DocumentImpl doc, NodeId nodeId, boolean directParent, boolean includeSelf) {
NodeProxy first = getFirstParent(new NodeProxy(doc, nodeId), null, includeSelf, directParent, 0);
if (first != null)
+ //TODO : should we set an empty cardinality here ?
addInternal(first);
return first;
}
@@ -319,7 +325,9 @@
if (realSet != null && realSetIsComplete)
return;
realSet = getNodes();
- knownCardinality = true;
+ knownIsEmptyCardinality = true;
+ knownHasOneCardinality = true;
+ knownHasManyCardinality = true;
isEmpty = realSet.isEmpty();
hasOne = realSet.hasOne();
hasMany = realSet.hasMany();
@@ -366,21 +374,21 @@
*/
public boolean isEmpty() {
- if (knownCardinality)
+ if (knownIsEmptyCardinality)
return isEmpty;
- return getItemCount() == 0;
+ return getLength() == 0;
}
public boolean hasOne() {
- if (knownCardinality)
+ if (knownHasOneCardinality)
return hasOne;
- return getItemCount() == 1;
+ return getLength() == 1;
}
public boolean hasMany() {
- if (knownCardinality)
+ if (knownHasManyCardinality)
return hasMany;
- return getItemCount() > 1;
+ return getLength() > 1;
}
public void add(DocumentImpl doc, long nodeId) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2007-03-29 19:38:18
|
Revision: 5552
http://svn.sourceforge.net/exist/?rev=5552&view=rev
Author: brihaye
Date: 2007-03-29 12:38:15 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
cosmetics
Modified Paths:
--------------
trunk/eXist/src/org/exist/dom/ElementImpl.java
trunk/eXist/src/org/exist/dom/NodeSetHelper.java
Modified: trunk/eXist/src/org/exist/dom/ElementImpl.java
===================================================================
--- trunk/eXist/src/org/exist/dom/ElementImpl.java 2007-03-29 19:37:14 UTC (rev 5551)
+++ trunk/eXist/src/org/exist/dom/ElementImpl.java 2007-03-29 19:38:15 UTC (rev 5552)
@@ -967,9 +967,8 @@
buf.append("\" ");
}
NodeList childNodes = getChildNodes();
- Node child;
for (int i = 0; i < childNodes.getLength(); i++) {
- child = childNodes.item(i);
+ Node child = childNodes.item(i);
switch (child.getNodeType()) {
case Node.ATTRIBUTE_NODE:
attributes.append(' ');
@@ -1113,10 +1112,10 @@
getBroker().getIndexController().reindex(transaction, reindexRoot, StreamListener.REMOVE_NODES);
}
- StoredNode child, last = this;
+ StoredNode last = this;
int i = nodes.getLength();
for (; i > 0; i--) {
- child = (StoredNode) nodes.item(i - 1);
+ StoredNode child = (StoredNode) nodes.item(i - 1);
if (child.getNodeType() == Node.ATTRIBUTE_NODE) {
last = child;
break;
Modified: trunk/eXist/src/org/exist/dom/NodeSetHelper.java
===================================================================
--- trunk/eXist/src/org/exist/dom/NodeSetHelper.java 2007-03-29 19:37:14 UTC (rev 5551)
+++ trunk/eXist/src/org/exist/dom/NodeSetHelper.java 2007-03-29 19:38:15 UTC (rev 5552)
@@ -551,10 +551,9 @@
public final static void copyChildren(Document new_doc, Node node,
Node new_node) {
NodeList children = node.getChildNodes();
- Node child;
Node new_child;
for (int i = 0; i < children.getLength(); i++) {
- child = children.item(i);
+ Node child = children.item(i);
if (child == null)
continue;
switch (child.getNodeType()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2007-03-29 19:37:24
|
Revision: 5551
http://svn.sourceforge.net/exist/?rev=5551&view=rev
Author: brihaye
Date: 2007-03-29 12:37:14 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Tried to improve cardinality computation in virtual node sets.
Modified Paths:
--------------
trunk/eXist/src/org/exist/dom/VirtualNodeSet.java
Modified: trunk/eXist/src/org/exist/dom/VirtualNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/VirtualNodeSet.java 2007-03-29 17:49:22 UTC (rev 5550)
+++ trunk/eXist/src/org/exist/dom/VirtualNodeSet.java 2007-03-29 19:37:14 UTC (rev 5551)
@@ -60,6 +60,11 @@
protected boolean useSelfAsContext = false;
protected int contextId = Expression.NO_CONTEXT_ID;
private static final int MAX_CHILD_COUNT_FOR_OPTIMIZE = 5;
+
+ private boolean knownCardinality = false;
+ private boolean isEmpty = true;
+ private boolean hasOne = false;
+ private boolean hasMany = false;
public VirtualNodeSet(int axis, NodeTest test, int contextId, NodeSet context) {
this.axis = axis;
@@ -191,6 +196,14 @@
private void addInternal(NodeProxy p) {
if (realSet == null)
realSet = new ExtArrayNodeSet(256);
+ knownCardinality = true;
+ if (isEmpty) {
+ isEmpty = false;
+ hasOne= true;
+ } else if (hasOne) {
+ hasOne = false;
+ hasMany = true;
+ }
realSet.add(p);
realSetIsComplete = false;
}
@@ -306,6 +319,10 @@
if (realSet != null && realSetIsComplete)
return;
realSet = getNodes();
+ knownCardinality = true;
+ isEmpty = realSet.isEmpty();
+ hasOne = realSet.hasOne();
+ hasMany = realSet.hasMany();
realSetIsComplete = true;
}
@@ -349,15 +366,23 @@
*/
public boolean isEmpty() {
- //TODO : fix this terrible performance gap !!!
- return getLength() == 0;
+ if (knownCardinality)
+ return isEmpty;
+ return getItemCount() == 0;
}
public boolean hasOne() {
- //TODO : fix this terrible performance gap !!!
- return getLength() == 1;
+ if (knownCardinality)
+ return hasOne;
+ return getItemCount() == 1;
}
+ public boolean hasMany() {
+ if (knownCardinality)
+ return hasMany;
+ return getItemCount() > 1;
+ }
+
public void add(DocumentImpl doc, long nodeId) {
}
@@ -387,7 +412,7 @@
//TODO : evaluate both semantics
public int getItemCount() {
realize();
- return realSet.getLength();
+ return realSet.getItemCount();
}
public Node item(int pos) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2007-03-29 17:49:24
|
Revision: 5550
http://svn.sourceforge.net/exist/?rev=5550&view=rev
Author: wolfgang_m
Date: 2007-03-29 10:49:22 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Better test to check if we should directly traverse the node tree to find attributes or not. If the context is a VirtualNodeSet, don't check its length unless necessary.
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/LocationStep.java
Modified: trunk/eXist/src/org/exist/xquery/LocationStep.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/LocationStep.java 2007-03-29 07:55:33 UTC (rev 5549)
+++ trunk/eXist/src/org/exist/xquery/LocationStep.java 2007-03-29 17:49:22 UTC (rev 5550)
@@ -369,10 +369,14 @@
// if there's just a single known node in the context, it is faster
// do directly search for the attribute in the parent node.
}
- boolean selectDirect = useDirectAttrSelect && axis == Constants.ATTRIBUTE_AXIS
- && contextSet.getLength() < ATTR_DIRECT_SELECT_THRESHOLD;
- if (contextSet instanceof VirtualNodeSet)
- selectDirect = selectDirect && ((VirtualNodeSet) contextSet).preferTreeTraversal();
+ boolean selectDirect = false;
+ if (useDirectAttrSelect && axis == Constants.ATTRIBUTE_AXIS) {
+ if (contextSet instanceof VirtualNodeSet)
+ selectDirect = ((VirtualNodeSet) contextSet).preferTreeTraversal()
+ && contextSet.getLength() < ATTR_DIRECT_SELECT_THRESHOLD;
+ else
+ selectDirect = contextSet.getLength() < ATTR_DIRECT_SELECT_THRESHOLD;
+ }
if (selectDirect) {
if (context.getProfiler().isEnabled())
context.getProfiler().message(this, Profiler.OPTIMIZATIONS,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2007-03-29 07:55:37
|
Revision: 5549
http://svn.sourceforge.net/exist/?rev=5549&view=rev
Author: wolfgang_m
Date: 2007-03-29 00:55:33 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
Updated XInclude example document to use correct XInclude syntax.
Modified Paths:
--------------
trunk/eXist/samples/xinclude/xinclude.xml
Modified: trunk/eXist/samples/xinclude/xinclude.xml
===================================================================
--- trunk/eXist/samples/xinclude/xinclude.xml 2007-03-28 20:03:37 UTC (rev 5548)
+++ trunk/eXist/samples/xinclude/xinclude.xml 2007-03-29 07:55:33 UTC (rev 5549)
@@ -78,10 +78,10 @@
example, the following xinclude selects the p element from file
<filename>disclaimer.xml</filename>, which has an ID attribute
with value "statement".</para>
- <synopsis><![CDATA[<xi:include href="disclaimer.xml#statement"/>]]></synopsis>
+ <synopsis><![CDATA[<xi:include href="disclaimer.xml" xpointer="statement"/>]]></synopsis>
<para>The result of the XInclude will be displayed below:</para>
<xml-source>
- <xi:include href="disclaimer.xml#statement"/>
+ <xi:include href="disclaimer.xml" xpointer="statement"/>
</xml-source>
</section>
<section>
@@ -91,18 +91,20 @@
scheme. The results of the expression will be included in place
of the <sgmltag>xi:include</sgmltag> element. The following
expression includes a section taken from Shakespeare's Macbeth:</para>
- <synopsis><xi:include href="/db/shakespeare/plays/macbeth.xml
- #xpointer(//SPEECH[SPEAKER&='witch' and near(LINE, 'fenny snake')])/></synopsis>
+ <synopsis><xi:include href="/db/shakespeare/plays/macbeth.xml"
+ xpointer="xpointer(//SPEECH[SPEAKER&='witch' and near(LINE, 'fenny snake')])"/></synopsis>
<para>As before, the results are included below:</para>
<xml-source>
- <xi:include href="/db/shakespeare/plays/macbeth.xml#xpointer(//SPEECH[SPEAKER&='witch' and near(LINE, 'fenny snake')])"/>
+ <xi:include href="/db/shakespeare/plays/macbeth.xml"
+ xpointer="xpointer(//SPEECH[SPEAKER&='witch' and near(LINE, 'fenny snake')])"/>
</xml-source>
<para>An XPath expression will be applied to the entire collection if the
path in href points to a collection and not a single document:</para>
- <synopsis><xi:include href="/db/shakespeare#xpointer(//SPEECH[near(LINE, 'cursed spite')])"/></synopsis>
+ <synopsis><xi:include href="/db/shakespeare" xpointer="xpointer(//SPEECH[near(LINE, 'cursed spite')])"/></synopsis>
<xml-source>
- <xi:include href="/db/shakespeare#xpointer(//SPEECH[near(LINE, 'cursed spite')])"/>
+ <xi:include href="/db/shakespeare"
+ xpointer="xpointer(//SPEECH[near(LINE, 'cursed spite')])"/>
</xml-source>
<para>Test namespaces: all namespace/prefix mappings declared in
@@ -110,7 +112,8 @@
Alternatively, you may declare mappings with xmlns().</para>
<xml-source>
<xi:include
- href="disclaimer.xml#xpointer(//comment:comment)xmlns(t=http://nop.com)xmlns(comment=http://test.org)"/>
+ href="disclaimer.xml"
+ xpointer="xpointer(//comment:comment)xmlns(t=http://nop.com)xmlns(comment=http://test.org)"/>
</xml-source>
</section>
<section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2007-03-28 20:03:41
|
Revision: 5548
http://svn.sourceforge.net/exist/?rev=5548&view=rev
Author: brihaye
Date: 2007-03-28 13:03:37 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Avoid Eclipse errors in SOAP build file.
Modified Paths:
--------------
trunk/eXist/build/scripts/soap.xml
Modified: trunk/eXist/build/scripts/soap.xml
===================================================================
--- trunk/eXist/build/scripts/soap.xml 2007-03-28 19:46:33 UTC (rev 5547)
+++ trunk/eXist/build/scripts/soap.xml 2007-03-28 20:03:37 UTC (rev 5548)
@@ -8,7 +8,10 @@
<description>Build Axis SOAP interface</description>
- <target name="wsdl2java">
+ <!-- import common targets -->
+ <import file="../../build.xml"/>
+
+ <target name="wsdl2java">
<mkdir dir="${build.soap}"/>
<delete failonerror="no" file="${build.soap}/org/exist/soap/AdminSoapBindingImpl.java"/>
<delete failonerror="no" file="${build.soap}/org/exist/soap/QuerySoapBindingImpl.java"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2007-03-28 19:46:36
|
Revision: 5547
http://svn.sourceforge.net/exist/?rev=5547&view=rev
Author: brihaye
Date: 2007-03-28 12:46:33 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Introduced Sequence.getItemCount() (?\195?\160 la VB) instead of getLength() that collides with some Node-related methods.
Modified Paths:
--------------
trunk/eXist/src/org/exist/dom/AVLTreeNodeSet.java
trunk/eXist/src/org/exist/dom/EmptyNodeSet.java
trunk/eXist/src/org/exist/dom/ExtArrayNodeSet.java
trunk/eXist/src/org/exist/dom/NodeProxy.java
trunk/eXist/src/org/exist/dom/SortedNodeSet.java
trunk/eXist/src/org/exist/dom/VirtualNodeSet.java
trunk/eXist/src/org/exist/http/RESTServer.java
trunk/eXist/src/org/exist/http/SOAPServer.java
trunk/eXist/src/org/exist/memtree/CDATASectionImpl.java
trunk/eXist/src/org/exist/memtree/CommentImpl.java
trunk/eXist/src/org/exist/memtree/NodeImpl.java
trunk/eXist/src/org/exist/soap/QuerySoapBindingImpl.java
trunk/eXist/src/org/exist/storage/serializers/Serializer.java
trunk/eXist/src/org/exist/storage/serializers/XIncludeFilter.java
trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java
trunk/eXist/src/org/exist/xqj/XQResultSequence.java
trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java
trunk/eXist/src/org/exist/xquery/DynamicCardinalityCheck.java
trunk/eXist/src/org/exist/xquery/ForExpr.java
trunk/eXist/src/org/exist/xquery/LetExpr.java
trunk/eXist/src/org/exist/xquery/Predicate.java
trunk/eXist/src/org/exist/xquery/Profiler.java
trunk/eXist/src/org/exist/xquery/functions/FunAvg.java
trunk/eXist/src/org/exist/xquery/functions/FunCount.java
trunk/eXist/src/org/exist/xquery/functions/FunDeepEqual.java
trunk/eXist/src/org/exist/xquery/functions/FunExactlyOne.java
trunk/eXist/src/org/exist/xquery/functions/FunInsertBefore.java
trunk/eXist/src/org/exist/xquery/functions/FunItemAt.java
trunk/eXist/src/org/exist/xquery/functions/FunLast.java
trunk/eXist/src/org/exist/xquery/functions/FunRemove.java
trunk/eXist/src/org/exist/xquery/functions/FunReverse.java
trunk/eXist/src/org/exist/xquery/functions/FunRoot.java
trunk/eXist/src/org/exist/xquery/functions/FunZeroOrOne.java
trunk/eXist/src/org/exist/xquery/functions/text/IndexTerms.java
trunk/eXist/src/org/exist/xquery/functions/util/IndexKeys.java
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateUser.java
trunk/eXist/src/org/exist/xquery/update/Insert.java
trunk/eXist/src/org/exist/xquery/value/AbstractSequence.java
trunk/eXist/src/org/exist/xquery/value/AtomicValue.java
trunk/eXist/src/org/exist/xquery/value/EmptySequence.java
trunk/eXist/src/org/exist/xquery/value/GroupedValueSequence.java
trunk/eXist/src/org/exist/xquery/value/OrderedValueSequence.java
trunk/eXist/src/org/exist/xquery/value/PreorderedValueSequence.java
trunk/eXist/src/org/exist/xquery/value/Sequence.java
trunk/eXist/src/org/exist/xquery/value/SequenceType.java
trunk/eXist/src/org/exist/xquery/value/ValueSequence.java
trunk/eXist/src/org/exist/xupdate/Modification.java
trunk/eXist/src/org/exist/xupdate/XUpdateProcessor.java
trunk/eXist/test/src/org/exist/dom/BasicNodeSetTest.java
trunk/eXist/test/src/org/exist/indexing/CustomIndexTest.java
trunk/eXist/test/src/org/exist/memtree/DOMIndexerTest.java
trunk/eXist/test/src/org/exist/numbering/DLNStorageTest.java
trunk/eXist/test/src/org/exist/storage/AbstractUpdateTest.java
trunk/eXist/test/src/org/exist/storage/RecoveryTest.java
trunk/eXist/test/src/org/exist/storage/ShutdownTest.java
trunk/eXist/test/src/org/exist/xquery/LexerTest.java
trunk/eXist/test/src/org/exist/xquery/XQueryUpdateTest.java
Modified: trunk/eXist/src/org/exist/dom/AVLTreeNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/AVLTreeNodeSet.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/dom/AVLTreeNodeSet.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -41,6 +41,11 @@
public int getLength() {
return size;
}
+
+ //TODO : evaluate both semantics
+ public int getItemCount() {
+ return size;
+ }
/* (non-Javadoc)
* @see org.exist.dom.NodeSet#item(int)
Modified: trunk/eXist/src/org/exist/dom/EmptyNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/EmptyNodeSet.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/dom/EmptyNodeSet.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -91,6 +91,11 @@
public int getLength() {
return 0;
}
+
+ //TODO : evaluate both semantics
+ public int getItemCount() {
+ return 0;
+ }
public Node item(int pos) {
return null;
Modified: trunk/eXist/src/org/exist/dom/ExtArrayNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/ExtArrayNodeSet.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/dom/ExtArrayNodeSet.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -312,6 +312,13 @@
sort(); // sort to remove duplicates
return size;
}
+
+ //TODO : evaluate both semantics
+ public int getItemCount() {
+ if (!isSorted())
+ sort(); // sort to remove duplicates
+ return size;
+ }
/*
* (non-Javadoc)
Modified: trunk/eXist/src/org/exist/dom/NodeProxy.java
===================================================================
--- trunk/eXist/src/org/exist/dom/NodeProxy.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/dom/NodeProxy.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -772,8 +772,14 @@
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#getLength()
*/
- public int getLength() {
+ public int getLength() {
+ //TODO : how to delegate to the real node implementation's getLength() ?
return 1;
+ }
+
+ //TODO : evaluate both semantics
+ public int getItemCount() {
+ return 1;
}
/* (non-Javadoc)
Modified: trunk/eXist/src/org/exist/dom/SortedNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/SortedNodeSet.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/dom/SortedNodeSet.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -152,6 +152,11 @@
return list.size();
}
+ //TODO : evaluate both semantics
+ public int getItemCount() {
+ return list.size();
+ }
+
public Node item(int pos) {
NodeProxy p = ((IteratorItem) list.get(pos)).proxy;
return p == null ? null : p.getDocument().getNode(p);
Modified: trunk/eXist/src/org/exist/dom/VirtualNodeSet.java
===================================================================
--- trunk/eXist/src/org/exist/dom/VirtualNodeSet.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/dom/VirtualNodeSet.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -32,7 +32,6 @@
import org.exist.xquery.value.SequenceIterator;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import org.w3c.dom.Element;
/**
* This node set is called virtual because it is just a placeholder for
@@ -384,6 +383,12 @@
realize();
return realSet.getLength();
}
+
+ //TODO : evaluate both semantics
+ public int getItemCount() {
+ realize();
+ return realSet.getLength();
+ }
public Node item(int pos) {
realize();
Modified: trunk/eXist/src/org/exist/http/RESTServer.java
===================================================================
--- trunk/eXist/src/org/exist/http/RESTServer.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/http/RESTServer.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -901,7 +901,7 @@
Sequence resultSequence = xquery.execute(compiled, null);
long queryTime = System.currentTimeMillis() - startTime;
if (LOG.isDebugEnabled())
- LOG.debug("Found " + resultSequence.getLength() + " in "
+ LOG.debug("Found " + resultSequence.getItemCount() + " in "
+ queryTime + "ms.");
return printResults(broker, resultSequence, howmany, start,
queryTime, outputProperties, wrap);
@@ -1160,7 +1160,7 @@
Properties outputProperties, boolean wrap)
throws BadRequestException {
if (!results.isEmpty()) {
- int rlen = results.getLength();
+ int rlen = results.getItemCount();
if ((start < 1) || (start > rlen))
throw new BadRequestException("Start parameter out of range");
// FD : correct bound evaluation
Modified: trunk/eXist/src/org/exist/http/SOAPServer.java
===================================================================
--- trunk/eXist/src/org/exist/http/SOAPServer.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/http/SOAPServer.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -1434,7 +1434,7 @@
//sequence of values
builderFunction.startElement(new QName("sequence", null, null), null);
- for(int i=0; i < functionResult.getLength(); i++)
+ for(int i=0; i < functionResult.getItemCount(); i++)
{
builderFunction.startElement(new QName("value", null, null), null);
functionResult.itemAt(i).copyTo(broker, receiver);
Modified: trunk/eXist/src/org/exist/memtree/CDATASectionImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/CDATASectionImpl.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/memtree/CDATASectionImpl.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -66,6 +66,10 @@
return getData();
}
+ public int getLength() {
+ return getData().length();
+ }
+
/* (non-Javadoc)
* @see org.w3c.dom.CharacterData#substringData(int, int)
*/
Modified: trunk/eXist/src/org/exist/memtree/CommentImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/CommentImpl.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/memtree/CommentImpl.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -59,6 +59,10 @@
return new String(document.characters, document.alpha[nodeNumber],
document.alphaLen[nodeNumber]);
}
+
+ public int getLength() {
+ return getData().length();
+ }
/* (non-Javadoc)
* @see org.w3c.dom.CharacterData#setData(java.lang.String)
Modified: trunk/eXist/src/org/exist/memtree/NodeImpl.java
===================================================================
--- trunk/eXist/src/org/exist/memtree/NodeImpl.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/memtree/NodeImpl.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -526,13 +526,17 @@
}
/* (non-Javadoc)
- * @see org.exist.xquery.value.Sequence#getLength()
+ * @see org.exist.xquery.value.Sequence#getItemCount()
*/
- public int getLength() {
+ public int getItemCount() {
return 1;
}
-
+ public int getLength() {
+ //Let the derived classes do it...
+ throw new RuntimeException("Can not call getLength() on node type " + this.getNodeType());
+ }
+
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#getCardinality()
*/
Modified: trunk/eXist/src/org/exist/soap/QuerySoapBindingImpl.java
===================================================================
--- trunk/eXist/src/org/exist/soap/QuerySoapBindingImpl.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/soap/QuerySoapBindingImpl.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -298,7 +298,7 @@
collections = collectQueryInfo(scanResults(seq));
session.addQueryResult(seq);
resp.setCollections(new QueryResponseCollections(collections));
- resp.setHits(seq.getLength());
+ resp.setHits(seq.getItemCount());
resp.setQueryTime(System.currentTimeMillis() - start);
expr.reset();
context.reset();
@@ -335,11 +335,11 @@
if (queryResult == null)
throw new RemoteException("result set unknown or timed out");
Sequence seq = (Sequence) queryResult.result;
- if (start < 1 || start > seq.getLength())
+ if (start < 1 || start > seq.getItemCount())
throw new RuntimeException(
- "index " + start + " out of bounds (" + seq.getLength() + ")");
- if (start + howmany > seq.getLength() || howmany == 0)
- howmany = seq.getLength() - start + 1;
+ "index " + start + " out of bounds (" + seq.getItemCount() + ")");
+ if (start + howmany > seq.getItemCount() || howmany == 0)
+ howmany = seq.getItemCount() - start + 1;
String xml[] = new String[howmany];
Serializer serializer = broker.getSerializer();
Modified: trunk/eXist/src/org/exist/storage/serializers/Serializer.java
===================================================================
--- trunk/eXist/src/org/exist/storage/serializers/Serializer.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/storage/serializers/Serializer.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -727,7 +727,7 @@
}
setXSLHandler();
AttrList attrs = new AttrList();
- attrs.addAttribute(ATTR_HITS_QNAME, Integer.toString(seq.getLength()));
+ attrs.addAttribute(ATTR_HITS_QNAME, Integer.toString(seq.getItemCount()));
attrs.addAttribute(ATTR_START_QNAME, Integer.toString(start));
attrs.addAttribute(ATTR_COUNT_QNAME, Integer.toString(count));
Modified: trunk/eXist/src/org/exist/storage/serializers/XIncludeFilter.java
===================================================================
--- trunk/eXist/src/org/exist/storage/serializers/XIncludeFilter.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/storage/serializers/XIncludeFilter.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -337,7 +337,7 @@
if(Type.subTypeOf(seq.getItemType(), Type.NODE)) {
if (LOG.isDebugEnabled())
- LOG.debug("xpointer found: " + seq.getLength());
+ LOG.debug("xpointer found: " + seq.getItemCount());
NodeValue node;
for (SequenceIterator i = seq.iterate(); i.hasNext();) {
@@ -346,7 +346,7 @@
}
} else {
String val;
- for (int i = 0; i < seq.getLength(); i++) {
+ for (int i = 0; i < seq.getItemCount(); i++) {
val = seq.itemAt(i).getStringValue();
characters(val);
}
Modified: trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java
===================================================================
--- trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -991,7 +991,7 @@
qr.timestamp = System.currentTimeMillis();
if (qr.result == null)
return 0;
- return qr.result.getLength();
+ return qr.result.getItemCount();
}
public Hashtable getPermissions(User user, String name)
@@ -1423,17 +1423,17 @@
return "<?xml version=\"1.0\"?>\n"
+ "<exist:result xmlns:exist=\""+ Namespaces.EXIST_NS + "\" "
+ "hitCount=\"0\"/>";
- if (howmany > resultSet.getLength() || howmany == 0)
- howmany = resultSet.getLength();
+ if (howmany > resultSet.getItemCount() || howmany == 0)
+ howmany = resultSet.getItemCount();
- if (start < 1 || start > resultSet.getLength())
+ if (start < 1 || start > resultSet.getItemCount())
throw new EXistException("start parameter out of range");
StringWriter writer = new StringWriter();
writer.write("<exist:result xmlns:exist=\"");
writer.write(Namespaces.EXIST_NS);
writer.write("\" hits=\"");
- writer.write(Integer.toString(resultSet.getLength()));
+ writer.write(Integer.toString(resultSet.getItemCount()));
writer.write("\" start=\"");
writer.write(Integer.toString(start));
writer.write("\" count=\"");
@@ -1562,7 +1562,7 @@
}
resultSeq = queryResult.result;
if (LOG.isDebugEnabled())
- LOG.debug("found " + resultSeq.getLength());
+ LOG.debug("found " + resultSeq.getItemCount());
if (sortBy != null) {
SortedNodeSet sorted = new SortedNodeSet(brokerPool, user,
@@ -1636,7 +1636,7 @@
}
resultSeq = queryResult.result;
if (LOG.isDebugEnabled())
- LOG.debug("found " + resultSeq.getLength());
+ LOG.debug("found " + resultSeq.getItemCount());
if (sortBy != null) {
SortedNodeSet sorted = new SortedNodeSet(brokerPool, user,
@@ -1852,7 +1852,7 @@
"hitCount",
"hitCount",
"CDATA",
- Integer.toString(qr.result.getLength()));
+ Integer.toString(qr.result.getItemCount()));
handler.startElement(
Namespaces.EXIST_NS,
"result",
Modified: trunk/eXist/src/org/exist/xqj/XQResultSequence.java
===================================================================
--- trunk/eXist/src/org/exist/xqj/XQResultSequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xqj/XQResultSequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -42,7 +42,7 @@
public XQResultSequence(Sequence resultSequence)
{
this.resultSequence = resultSequence;
- iLength = resultSequence.getLength(); //do this once here as getLength() is expensive
+ iLength = resultSequence.getItemCount(); //do this once here as getLength() is expensive
}
/* (non-Javadoc)
Modified: trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/DeferredFunctionCall.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -128,10 +128,10 @@
}
}
- public int getLength() {
+ public int getItemCount() {
try {
realize();
- return sequence.getLength();
+ return sequence.getItemCount();
} catch (XPathException e) {
LOG.error("Exception in deferred function: " + e.getMessage());
return 0;
Modified: trunk/eXist/src/org/exist/xquery/DynamicCardinalityCheck.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/DynamicCardinalityCheck.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/DynamicCardinalityCheck.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -76,7 +76,7 @@
else actualCardinality = Cardinality.ONE;
if (!Cardinality.checkCardinality(requiredCardinality, actualCardinality)) {
- error.addArgs(ExpressionDumper.dump(expression), Cardinality.getDescription(requiredCardinality), new Integer(seq.getLength()));
+ error.addArgs(ExpressionDumper.dump(expression), Cardinality.getDescription(requiredCardinality), new Integer(seq.getItemCount()));
throw new XPathException(getASTNode(), error.toString());
}
Modified: trunk/eXist/src/org/exist/xquery/ForExpr.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/ForExpr.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/ForExpr.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -246,7 +246,7 @@
// order expressions for every item when it is added to the result sequence.
if(resultSequence == null) {
if(orderSpecs != null && !fastOrderBy)
- resultSequence = new OrderedValueSequence(orderSpecs, in.getLength());
+ resultSequence = new OrderedValueSequence(orderSpecs, in.getItemCount());
else
resultSequence = new ValueSequence();
}
Modified: trunk/eXist/src/org/exist/xquery/LetExpr.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/LetExpr.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/LetExpr.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -185,7 +185,7 @@
// order expressions for every item when it is added to the result sequence.
if(resultSequence == null) {
if(orderSpecs != null && !fastOrderBy)
- resultSequence = new OrderedValueSequence(orderSpecs, in.getLength());
+ resultSequence = new OrderedValueSequence(orderSpecs, in.getItemCount());
}
if(groupedSequence==null){
Modified: trunk/eXist/src/org/exist/xquery/Predicate.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/Predicate.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/Predicate.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -226,7 +226,7 @@
int p;
if (contextSequence instanceof NodeSet && ((NodeSet)contextSequence).getProcessInReverseOrder()) {
//This one may be expensive...
- p = contextSequence.getLength();
+ p = contextSequence.getItemCount();
for (SequenceIterator i = contextSequence.iterate(); i.hasNext(); p--) {
//0-based
context.setContextPosition(p - 1);
@@ -343,15 +343,16 @@
NodeSet outerNodeSet;
- //Ugly and costly processing of VirtualNodeSEts
+ //Ugly and costly processing of VirtualNodeSets
//TODO : CORRECT THIS !!!
if (outerSequence instanceof VirtualNodeSet) {
outerNodeSet = new ExtArrayNodeSet();
- for (int i = 0 ; i < outerSequence.getLength() ; i++) {
+ for (int i = 0 ; i < outerSequence.getItemCount() ; i++) {
outerNodeSet.add(outerSequence.itemAt(i));
}
+
} else outerNodeSet = outerSequence.toNodeSet();
//Comment the line below if you have uncommented the lines above :-)
@@ -442,9 +443,9 @@
Sequence innerSeq = inner.eval(contextSequence);
for(SequenceIterator j = innerSeq.iterate(); j.hasNext(); ) {
NumericValue v = (NumericValue)j.nextItem().convertTo(Type.NUMBER);
- int pos = (reverseAxis ? temp.getLength() - v.getInt() : v.getInt() - 1);
+ int pos = (reverseAxis ? temp.getItemCount() - v.getInt() : v.getInt() - 1);
//Other positions are ignored
- if (pos >= 0 && pos < temp.getLength()) {
+ if (pos >= 0 && pos < temp.getItemCount()) {
NodeProxy t = (NodeProxy) temp.itemAt(pos);
// for the current context: filter out those context items
// not selected by the positional predicate
@@ -472,7 +473,7 @@
NumericValue v = (NumericValue)i.nextItem().convertTo(Type.NUMBER);
int pos = v.getInt() - 1;
//Other positions are ignored
- if(pos >= 0 && pos < contextSequence.getLength())
+ if(pos >= 0 && pos < contextSequence.getItemCount())
result.add(contextSequence.itemAt(pos));
}
return result;
Modified: trunk/eXist/src/org/exist/xquery/Profiler.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/Profiler.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/Profiler.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -234,7 +234,7 @@
else if (verbosity >= SEQUENCE_PREVIEW)
buf.append(sequencePreview(result));
else*/ if (verbosity >= ITEM_COUNT)
- buf.append(result.getLength() + " item(s)");
+ buf.append(result.getItemCount() + " item(s)");
buf.append("\t");
printPosition(e.expr);
buf.append(expr.toString());
@@ -298,7 +298,7 @@
else if (verbosity >= SEQUENCE_PREVIEW)
buf.append(sequencePreview(sequence));
else */ if (verbosity >= ITEM_COUNT)
- buf.append(sequence.getLength() + " item(s)");
+ buf.append(sequence.getItemCount() + " item(s)");
buf.append("\t");
buf.append(expr.toString());
log.debug(buf.toString());
Modified: trunk/eXist/src/org/exist/xquery/functions/FunAvg.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunAvg.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunAvg.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -116,7 +116,7 @@
throw new XPathException("FORG0006: " + e.getMessage(), e);
}
}
- result = sum.div(new IntegerValue(inner.getLength()));
+ result = sum.div(new IntegerValue(inner.getItemCount()));
}
if (!gotInfinity) {
Modified: trunk/eXist/src/org/exist/xquery/functions/FunCount.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunCount.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunCount.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -73,7 +73,7 @@
if (getArgumentCount() == 0)
result = IntegerValue.ZERO;
else
- result = new IntegerValue(getArgument(0).eval(contextSequence).getLength());
+ result = new IntegerValue(getArgument(0).eval(contextSequence).getItemCount());
if (context.getProfiler().isEnabled())
context.getProfiler().end(this, "", result);
Modified: trunk/eXist/src/org/exist/xquery/functions/FunDeepEqual.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunDeepEqual.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunDeepEqual.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -83,8 +83,8 @@
Sequence result;
Sequence[] args = getArguments(contextSequence, contextItem);
- int length = args[0].getLength();
- if (length != args[1].getLength())
+ int length = args[0].getItemCount();
+ if (length != args[1].getItemCount())
result = BooleanValue.FALSE;
else {
result = BooleanValue.TRUE;
Modified: trunk/eXist/src/org/exist/xquery/functions/FunExactlyOne.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunExactlyOne.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunExactlyOne.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -74,7 +74,7 @@
Sequence result = getArgument(0).eval(contextSequence, contextItem);
if (!result.hasOne())
- throw new XPathException("fn:exactly-one called with a sequence containing " + result.getLength() + " items");
+ throw new XPathException("fn:exactly-one called with a sequence containing " + result.getItemCount() + " items");
if (context.getProfiler().isEnabled())
context.getProfiler().end(this, "", result);
Modified: trunk/eXist/src/org/exist/xquery/functions/FunInsertBefore.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunInsertBefore.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunInsertBefore.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -64,11 +64,11 @@
if (pos <= 0) {
result.addAll(seq2);
result.addAll(seq1);
- } else if (pos >= seq1.getLength()) {
+ } else if (pos >= seq1.getItemCount()) {
result.addAll(seq1);
result.addAll(seq2);
} else {
- for (int i=0; i<seq1.getLength(); i++) {
+ for (int i=0; i<seq1.getItemCount(); i++) {
if (i == pos) result.addAll(seq2);
result.add(seq1.itemAt(i));
}
Modified: trunk/eXist/src/org/exist/xquery/functions/FunItemAt.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunItemAt.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunItemAt.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -80,14 +80,14 @@
IntegerValue posArg = (IntegerValue)
getArgument(1).eval(contextSequence, contextItem).convertTo(Type.INTEGER);
long pos = posArg.getValue();
- if (pos < 1 || pos > seq.getLength())
+ if (pos < 1 || pos > seq.getItemCount())
throw new XPathException("Invalid position: " + pos);
Item item = seq.itemAt((int)pos - 1);
Sequence result;
if(item == null) {
//TODO : throw an exception ? -pb
- LOG.debug("Item is null: " + seq.getClass().getName() + "; len = " + seq.getLength());
+ LOG.debug("Item is null: " + seq.getClass().getName() + "; len = " + seq.getItemCount());
result = Sequence.EMPTY_SEQUENCE;
}
else result = item.toSequence();
Modified: trunk/eXist/src/org/exist/xquery/functions/FunLast.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunLast.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunLast.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -84,7 +84,7 @@
else if (contextSequence.isEmpty())
result = Sequence.EMPTY_SEQUENCE;
else
- result = new IntegerValue(contextSequence.getLength());
+ result = new IntegerValue(contextSequence.getItemCount());
if (context.getProfiler().isEnabled())
context.getProfiler().end(this, "", result);
Modified: trunk/eXist/src/org/exist/xquery/functions/FunRemove.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunRemove.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunRemove.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -49,7 +49,7 @@
else {
//TODO : explain this Double conversion -pb
int pos = ((DoubleValue)getArgument(1).eval(contextSequence, contextItem).convertTo(Type.DOUBLE)).getInt();
- if (pos < 1 || pos > seq.getLength())
+ if (pos < 1 || pos > seq.getItemCount())
result= seq;
else {
pos--;
@@ -59,7 +59,7 @@
result = ((NodeSet)result).except((NodeSet) seq.itemAt(pos));
} else {
result = new ValueSequence();
- for (int i = 0; i < seq.getLength(); i++) {
+ for (int i = 0; i < seq.getItemCount(); i++) {
if (i != pos) result.add(seq.itemAt(i));
}
}
Modified: trunk/eXist/src/org/exist/xquery/functions/FunReverse.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunReverse.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunReverse.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -56,7 +56,7 @@
tmp.add(item);
}
result = new ValueSequence();
- for (int i = seq.getLength() - 1; i >= 0; i--) {
+ for (int i = seq.getItemCount() - 1; i >= 0; i--) {
result.add(tmp.itemAt(i));
}
}
Modified: trunk/eXist/src/org/exist/xquery/functions/FunRoot.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunRoot.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunRoot.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -103,7 +103,7 @@
throw new XPathException(getASTNode(), "XPDY0002: Undefined context item");
- result = new ExtArrayNodeSet(seq.getLength());
+ result = new ExtArrayNodeSet(seq.getItemCount());
int j = 0;
for (SequenceIterator i = seq.iterate(); i.hasNext(); j++) {
item = i.nextItem();
Modified: trunk/eXist/src/org/exist/xquery/functions/FunZeroOrOne.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunZeroOrOne.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/FunZeroOrOne.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -76,7 +76,7 @@
Sequence result = getArgument(0).eval(contextSequence, contextItem);
if(result.hasMany())
- throw new XPathException("fn:zero-or-one called with a sequence containing " + result.getLength() + " items");
+ throw new XPathException("fn:zero-or-one called with a sequence containing " + result.getItemCount() + " items");
if (context.getProfiler().isEnabled())
context.getProfiler().end(this, "", result);
Modified: trunk/eXist/src/org/exist/xquery/functions/text/IndexTerms.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/text/IndexTerms.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/text/IndexTerms.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -125,7 +125,7 @@
data.clear();
}
if (LOG.isDebugEnabled())
- LOG.debug("Returning: " + result.getLength());
+ LOG.debug("Returning: " + result.getItemCount());
return result;
} catch (PermissionDeniedException e) {
throw new XPathException(getASTNode(), e.getMessage(), e);
Modified: trunk/eXist/src/org/exist/xquery/functions/util/IndexKeys.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/util/IndexKeys.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/util/IndexKeys.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -107,7 +107,7 @@
data.clear();
}
if (LOG.isDebugEnabled())
- LOG.debug("Returning: " + result.getLength());
+ LOG.debug("Returning: " + result.getItemCount());
return result;
}
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateUser.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateUser.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateUser.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -86,7 +86,7 @@
// changed by wolf: the first group is always the primary group, so we don't need
// an additional argument
Sequence groups = args[2];
- int len = groups.getLength();
+ int len = groups.getItemCount();
for (int x = 0; x < len; x++)
userObj.addGroup(groups.itemAt(x).getStringValue());
Modified: trunk/eXist/src/org/exist/xquery/update/Insert.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/update/Insert.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/update/Insert.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -128,7 +128,7 @@
if (!inSeq.isEmpty()) {
if (LOG.isDebugEnabled())
- LOG.debug("Found: " + inSeq.getLength() + " nodes");
+ LOG.debug("Found: " + inSeq.getItemCount() + " nodes");
context.pushInScopeNamespaces();
contentSeq = deepCopy(contentSeq);
Modified: trunk/eXist/src/org/exist/xquery/value/AbstractSequence.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/AbstractSequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/AbstractSequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -58,7 +58,7 @@
public abstract SequenceIterator unorderedIterator();
- public abstract int getLength();
+ public abstract int getItemCount();
public int getCardinality() {
if (isEmpty())
@@ -211,7 +211,7 @@
} else if(target.isArray()) {
Class componentType = target.getComponentType();
// assume single-dimensional, then double-check that instance really matches desired type
- Object array = Array.newInstance(componentType, getLength());
+ Object array = Array.newInstance(componentType, getItemCount());
if (!target.isInstance(array)) return null;
int index = 0;
for(SequenceIterator i = iterate(); i.hasNext(); index++) {
@@ -221,7 +221,7 @@
}
return array;
} else if(target.isAssignableFrom(List.class)) {
- List l = new ArrayList(getLength());
+ List l = new ArrayList(getItemCount());
for(SequenceIterator i = iterate(); i.hasNext(); ) {
l.add(i.nextItem());
}
Modified: trunk/eXist/src/org/exist/xquery/value/AtomicValue.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/AtomicValue.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/AtomicValue.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -116,7 +116,7 @@
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#getLength()
*/
- public int getLength() {
+ public int getItemCount() {
return 1;
}
Modified: trunk/eXist/src/org/exist/xquery/value/EmptySequence.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/EmptySequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/EmptySequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -47,9 +47,9 @@
}
/* (non-Javadoc)
- * @see org.exist.xquery.value.Sequence#getLength()
+ * @see org.exist.xquery.value.Sequence#getItemCount()
*/
- public int getLength() {
+ public int getItemCount() {
return 0;
}
Modified: trunk/eXist/src/org/exist/xquery/value/GroupedValueSequence.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/GroupedValueSequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/GroupedValueSequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -61,7 +61,7 @@
this.items = new Entry[size];
this.groupKey = keySequence;
this.context = aContext;
- this.groupKeyLength = groupKey.getLength();
+ this.groupKeyLength = groupKey.getItemCount();
}
/* (non-Javadoc)
@@ -81,7 +81,7 @@
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#getLength()
*/
- public int getLength() {
+ public int getItemCount() {
return (items == null) ? 0 : count;
}
@@ -201,7 +201,7 @@
} else if(seq.hasMany())
throw new XPathException("expected a single value for group by expression " +
ExpressionDumper.dump(groupSpecs[i].getGroupExpression()) +
- " ; found: " + seq.getLength());
+ " ; found: " + seq.getItemCount());
}
}
Modified: trunk/eXist/src/org/exist/xquery/value/OrderedValueSequence.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/OrderedValueSequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/OrderedValueSequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -71,7 +71,7 @@
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#getLength()
*/
- public int getLength() {
+ public int getItemCount() {
return (items == null) ? 0 : count;
}
@@ -218,7 +218,7 @@
} else if(seq.hasMany())
throw new XPathException("expected a single value for order expression " +
ExpressionDumper.dump(orderSpecs[i].getSortExpression()) +
- " ; found: " + seq.getLength());
+ " ; found: " + seq.getItemCount());
}
}
Modified: trunk/eXist/src/org/exist/xquery/value/PreorderedValueSequence.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/PreorderedValueSequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/PreorderedValueSequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -50,7 +50,7 @@
public PreorderedValueSequence(OrderSpec specs[], Sequence input, int contextId) throws XPathException {
this.orderSpecs = specs;
- nodes = new OrderedNodeProxy[input.getLength()];
+ nodes = new OrderedNodeProxy[input.getItemCount()];
int j = 0;
for(SequenceIterator i = input.unorderedIterator(); i.hasNext(); j++) {
NodeProxy p = (NodeProxy)i.nextItem();
@@ -110,7 +110,7 @@
/* (non-Javadoc)
* @see org.exist.xquery.value.AbstractSequence#getLength()
*/
- public int getLength() {
+ public int getItemCount() {
return nodes.length;
}
Modified: trunk/eXist/src/org/exist/xquery/value/Sequence.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/Sequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/Sequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -98,9 +98,9 @@
* Call this method <strong>only</strong> when necessary,
* since it can be resource consuming.
*
- * @return The sequence's length
+ * @return The number of items in the sequence
*/
- public int getLength();
+ public int getItemCount();
/**
* Returns whether the sequence is empty or not.
Modified: trunk/eXist/src/org/exist/xquery/value/SequenceType.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/SequenceType.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/SequenceType.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -158,7 +158,7 @@
*/
public void checkCardinality(Sequence seq) throws XPathException {
if (!seq.isEmpty() && cardinality == Cardinality.EMPTY)
- throw new XPathException("Empty sequence expected; got " + seq.getLength());
+ throw new XPathException("Empty sequence expected; got " + seq.getItemCount());
if (seq.isEmpty() && (cardinality & Cardinality.ZERO) == 0)
throw new XPathException("Empty sequence is not allowed here");
else if (seq.hasMany() && (cardinality & Cardinality.MANY) == 0)
Modified: trunk/eXist/src/org/exist/xquery/value/ValueSequence.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/value/ValueSequence.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xquery/value/ValueSequence.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -69,7 +69,7 @@
}
public ValueSequence(Sequence otherSequence) throws XPathException {
- values = new Item[otherSequence.getLength()];
+ values = new Item[otherSequence.getItemCount()];
addAll(otherSequence);
}
@@ -143,7 +143,7 @@
/* (non-Javadoc)
* @see org.exist.xquery.value.Sequence#getLength()
*/
- public int getLength() {
+ public int getItemCount() {
// removeDuplicates();
return size + 1;
}
Modified: trunk/eXist/src/org/exist/xupdate/Modification.java
===================================================================
--- trunk/eXist/src/org/exist/xupdate/Modification.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xupdate/Modification.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -180,7 +180,7 @@
throw new EXistException("select expression should evaluate to a node-set; got " +
Type.getTypeName(resultSeq.getItemType()));
if (LOG.isDebugEnabled())
- LOG.debug("found " + resultSeq.getLength() + " for select: " + selectStmt);
+ LOG.debug("found " + resultSeq.getItemCount() + " for select: " + selectStmt);
return (NodeList)resultSeq.toNodeSet();
}
Modified: trunk/eXist/src/org/exist/xupdate/XUpdateProcessor.java
===================================================================
--- trunk/eXist/src/org/exist/xupdate/XUpdateProcessor.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/src/org/exist/xupdate/XUpdateProcessor.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -486,7 +486,7 @@
throw new SAXException("value-of requires a select attribute");
Sequence seq = processQuery(select);
if (LOG.isDebugEnabled())
- LOG.debug("Found " + seq.getLength() + " items for value-of");
+ LOG.debug("Found " + seq.getItemCount() + " items for value-of");
Item item;
try {
for (SequenceIterator i = seq.iterate(); i.hasNext();) {
@@ -724,7 +724,7 @@
LOG.debug("creating variable " + name + " as " + select);
Sequence result = processQuery(select);
if (LOG.isDebugEnabled())
- LOG.debug("found " + result.getLength() + " for variable " + name);
+ LOG.debug("found " + result.getItemCount() + " for variable " + name);
variables.put(name, result);
}
Modified: trunk/eXist/test/src/org/exist/dom/BasicNodeSetTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/dom/BasicNodeSetTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/dom/BasicNodeSetTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -226,7 +226,7 @@
NodeSet lines = broker.getElementIndex().findElementsByTagName(ElementValue.ELEMENT,
docs, test.getName(), null);
System.out.println("LINE: " + lines.getLength());
- System.out.println("SPEAKER: " + largeSet.getLength());
+ System.out.println("SPEAKER: " + largeSet.getItemCount());
result = ((AbstractNodeSet) lines).selectFollowingSiblings(largeSet.toNodeSet(), -1);
assertEquals(1451, result.getLength());
@@ -383,8 +383,8 @@
assertNotNull(xquery);
Sequence seq = xquery.execute(query, null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(expected, seq.getLength());
- System.out.println("Found: " + seq.getLength() + " for query:\n" + query);
+ assertEquals(expected, seq.getItemCount());
+ System.out.println("Found: " + seq.getItemCount() + " for query:\n" + query);
if (expectedResult != null) {
Item item = seq.itemAt(0);
String value = serialize(broker, item);
Modified: trunk/eXist/test/src/org/exist/indexing/CustomIndexTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/indexing/CustomIndexTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/indexing/CustomIndexTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -74,7 +74,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
assertNotNull(proc);
@@ -162,7 +162,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
assertNotNull(proc);
@@ -286,7 +286,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
assertNotNull(proc);
@@ -354,7 +354,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
assertNotNull(proc);
@@ -414,7 +414,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
assertNotNull(proc);
@@ -458,7 +458,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
transact.commit(transaction);
} catch (Exception e) {
@@ -480,7 +480,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
checkIndex(broker, docs, "cha", 1);
checkIndex(broker, docs, "le8", 1);
@@ -494,7 +494,7 @@
seq = xquery.execute("//item[text:ngram-contains(., 'cha')]", null, AccessContext.TEST);
assertNotNull(seq);
- assertEquals(0, seq.getLength());
+ assertEquals(0, seq.getItemCount());
transact.commit(transaction);
} catch (Exception e) {
Modified: trunk/eXist/test/src/org/exist/memtree/DOMIndexerTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/memtree/DOMIndexerTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/memtree/DOMIndexerTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -142,7 +142,7 @@
broker = pool.get(SecurityManager.SYSTEM_USER);
XQuery xquery = broker.getXQueryService();
Sequence result = xquery.execute(XQUERY, null, AccessContext.TEST);
- System.out.println("Found: " + result.getLength());
+ System.out.println("Found: " + result.getItemCount());
StringWriter out = new StringWriter();
Properties props = new Properties();
props.setProperty(OutputKeys.INDENT, "yes");
Modified: trunk/eXist/test/src/org/exist/numbering/DLNStorageTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/numbering/DLNStorageTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/numbering/DLNStorageTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -42,7 +42,7 @@
// test element ids
Sequence seq = xquery.execute("doc('/db/test/test_string.xml')/test/para",
null, AccessContext.TEST);
- assertEquals(3, seq.getLength());
+ assertEquals(3, seq.getItemCount());
NodeProxy comment = (NodeProxy) seq.itemAt(0);
assertEquals(comment.getNodeId().toString(), "1.1");
comment = (NodeProxy) seq.itemAt(1);
@@ -52,14 +52,14 @@
seq = xquery.execute("doc('/db/test/test_string.xml')/test//a",
null, AccessContext.TEST);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
NodeProxy a = (NodeProxy) seq.itemAt(0);
assertEquals("1.3.2", a.getNodeId().toString());
// test attribute id
seq = xquery.execute("doc('/db/test/test_string.xml')/test//a/@href",
null, AccessContext.TEST);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
NodeProxy href = (NodeProxy) seq.itemAt(0);
System.out.println(StorageAddress.toString(href.getInternalAddress()));
assertEquals("1.3.2.1", href.getNodeId().toString());
@@ -76,7 +76,7 @@
// test text node
seq = xquery.execute("doc('/db/test/test_string.xml')/test//b/text()",
null, AccessContext.TEST);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
NodeProxy text = (NodeProxy) seq.itemAt(0);
assertEquals("1.5.2.1", text.getNodeId().toString());
// test DOMFile.getNodeValue()
Modified: trunk/eXist/test/src/org/exist/storage/AbstractUpdateTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/storage/AbstractUpdateTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/storage/AbstractUpdateTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -71,7 +71,7 @@
XQuery xquery = broker.getXQueryService();
Sequence seq = xquery.execute("/products/product[last()]", null, AccessContext.TEST);
- System.out.println("Found: " + seq.getLength());
+ System.out.println("Found: " + seq.getItemCount());
for (SequenceIterator i = seq.iterate(); i.hasNext(); ) {
Item next = i.nextItem();
System.out.println(serializer.serialize((NodeValue) next));
Modified: trunk/eXist/test/src/org/exist/storage/RecoveryTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/storage/RecoveryTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/storage/RecoveryTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -207,7 +207,7 @@
assertNotNull(xquery);
Sequence seq = xquery.execute("//SPEECH[LINE &= 'king']", null, AccessContext.TEST);
assertNotNull(seq);
- System.out.println("Found: " + seq.getLength());
+ System.out.println("Found: " + seq.getItemCount());
for (SequenceIterator i = seq.iterate(); i.hasNext(); ) {
Item next = i.nextItem();
System.out.println(serializer.serialize((NodeValue) next));
Modified: trunk/eXist/test/src/org/exist/storage/ShutdownTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/storage/ShutdownTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/storage/ShutdownTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -90,7 +90,7 @@
assertNotNull(xquery);
Sequence result = xquery.execute("//SPEECH[LINE &= 'love']", Sequence.EMPTY_SEQUENCE, AccessContext.TEST);
assertNotNull(result);
- assertEquals(result.getLength(), 160);
+ assertEquals(result.getItemCount(), 160);
transact.commit(transaction);
System.out.println("Transaction commited ...");
Modified: trunk/eXist/test/src/org/exist/xquery/LexerTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/xquery/LexerTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/xquery/LexerTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -119,7 +119,7 @@
// check results
System.out.println("----------------------------------");
- System.out.println("found: " + result.getLength());
+ System.out.println("found: " + result.getItemCount());
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
Modified: trunk/eXist/test/src/org/exist/xquery/XQueryUpdateTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/xquery/XQueryUpdateTest.java 2007-03-28 15:16:22 UTC (rev 5546)
+++ trunk/eXist/test/src/org/exist/xquery/XQueryUpdateTest.java 2007-03-28 19:46:33 UTC (rev 5547)
@@ -69,16 +69,16 @@
}
Sequence seq = xquery.execute("/products", null, AccessContext.TEST);
- assertEquals(seq.getLength(), 1);
+ assertEquals(seq.getItemCount(), 1);
Serializer serializer = broker.getSerializer();
System.out.println(serializer.serialize((NodeValue) seq.itemAt(0)));
seq = xquery.execute("//product", null, AccessContext.TEST);
- assertEquals(ITEMS_TO_APPEND, seq.getLength());
+ assertEquals(ITEMS_TO_APPEND, seq.getItemCount());
seq = xquery.execute("//product[price > 0.0]", null, AccessContext.TEST);
- assertEquals(ITEMS_TO_APPEND, seq.getLength());
+ assertEquals(ITEMS_TO_APPEND, seq.getItemCount());
System.out.println("testAppend: PASS");
} catch (Exception e) {
e.printStackTrace();
@@ -109,16 +109,16 @@
}
Sequence seq = xquery.execute("/products", null, AccessContext.TEST);
- assertEquals(seq.getLength(), 1);
+ assertEquals(seq.getItemCount(), 1);
Serializer serializer = broker.getSerializer();
System.out.println(serializer.serialize((NodeValue) seq.itemAt(0)));
seq = xquery.execute("//product", null, AccessContext.TEST);
- assertEquals(ITEMS_TO_APPEND, seq.getLength());
+ assertEquals(ITEMS_TO_APPEND, seq.getItemCount());
seq = xquery.execute("//product[@name = 'n20']", null, AccessContext.TEST);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
store(broker, "attribs.xml", "<test attr1='aaa' attr2='bbb'>ccc</test>");
query = "update insert attribute attr1 { 'eee' } into /test";
@@ -127,7 +127,7 @@
xquery.execute(query, null, AccessContext.TEST);
seq = xquery.execute("document('" + TEST_COLLECTION + "/attribs.xml')/test[@attr1 = 'eee']", null, AccessContext.TEST);
- assertEquals(1, seq.getLength());
+ assertEquals(1, seq.getItemCount());
System.out.println(serializer.serialize((NodeValue) seq.itemAt(0)));
System.out.println("testAppendAttributes: PASS");
@@ -174,16 +174,16 @@
}
Sequence seq = xquery.execute("/products", null, AccessContext.TEST);
- assertEquals(seq.getLength(), 1);
+ assertEquals(seq.getItemCount(), 1);
Serializer serializer = broker.getSerializer();
System.out.println(serializer.serialize((NodeValue) seq.itemAt(0)));
seq = xquery.execute("//product", null, AccessContext.TEST);
- assertEquals(ITEMS_TO_APPEND + 1, seq.getLength());
+ assertEquals(ITEMS_TO_APPEND + 1, seq.getItemCount());
seq = xquery.execute("//product[price > 0.0]", null, AccessContext.TEST);
- assertEquals(ITEMS_TO_APPEND, seq.getLength());
+ assertEquals(ITEMS_TO_APPEND, seq.getItemCount());
System.out.println("testInsertBefore: PASS");
} catch (Exception e) {
e.printStackTrace()...
[truncated message content] |
|
From: <el...@us...> - 2007-03-28 15:16:23
|
Revision: 5546
http://svn.sourceforge.net/exist/?rev=5546&view=rev
Author: ellefj
Date: 2007-03-28 08:16:22 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Added property svn:keywords Id.
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java
Property Changed:
----------------
trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java
Modified: trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java 2007-03-28 15:11:39 UTC (rev 5545)
+++ trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java 2007-03-28 15:16:22 UTC (rev 5546)
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $Id: FunEndsWith.java 4163 2006-08-24 14:23:13Z wolfgang_m $
+ * $Id$
*/
package org.exist.xquery.functions;
Property changes on: trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java
___________________________________________________________________
Name: svn:keywords
+ Id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2007-03-28 15:11:42
|
Revision: 5545
http://svn.sourceforge.net/exist/?rev=5545&view=rev
Author: ellefj
Date: 2007-03-28 08:11:39 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Fixed the documentation f?\195?\182r fn:normalize-unicode() with one argument, uses NFC by default.
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java
Modified: trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java 2007-03-28 13:32:49 UTC (rev 5544)
+++ trunk/eXist/src/org/exist/xquery/functions/FunNormalizeUnicode.java 2007-03-28 15:11:39 UTC (rev 5545)
@@ -1,142 +1,142 @@
-/* eXist Native XML Database
- * Copyright (C) 2000-2006, The eXist team
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id: FunEndsWith.java 4163 2006-08-24 14:23:13Z wolfgang_m $
- */
-
-package org.exist.xquery.functions;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import org.exist.dom.QName;
-import org.exist.xquery.Cardinality;
-import org.exist.xquery.Dependency;
-import org.exist.xquery.Function;
-import org.exist.xquery.FunctionSignature;
-import org.exist.xquery.Profiler;
-import org.exist.xquery.XPathException;
-import org.exist.xquery.XQueryContext;
-import org.exist.xquery.value.Item;
-import org.exist.xquery.value.Sequence;
-import org.exist.xquery.value.SequenceType;
-import org.exist.xquery.value.StringValue;
-import org.exist.xquery.value.Type;
-
-public class FunNormalizeUnicode extends Function {
-
- private String normalizationForm = null;
- private Class clazz = null;
- private Field modeField = null;
- private Object modeObject = null;
- private static Integer DUMMY_INTEGER = new Integer(0);
- private Constructor constructor = null;
- private Method method = null;
-
- public final static FunctionSignature signatures [] = {
- new FunctionSignature(
- new QName("normalize-unicode", Function.BUILTIN_FUNCTION_NS),
- "Returns the value of $a normalized according to the normalization criteria for a " +
- "normalization form identified by the value of $b. ",
- new SequenceType[] {
- new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE)
- },
- new SequenceType(Type.BOOLEAN, Cardinality.ONE)
- ),
- new FunctionSignature (
- new QName("normalize-unicode", Function.BUILTIN_FUNCTION_NS),
- "Returns the value of $a normalized according to the normalization criteria for a " +
- "normalization form identified by the value of $b. ",
- new SequenceType[] {
- new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE),
- new SequenceType(Type.STRING, Cardinality.ONE)
- },
- new SequenceType(Type.BOOLEAN, Cardinality.ONE)),
- };
-
- public FunNormalizeUnicode(XQueryContext context, FunctionSignature signature) {
- super(context, signature);
- }
-
- public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {
- if (context.getProfiler().isEnabled()) {
- context.getProfiler().start(this);
- context.getProfiler().message(this, Profiler.DEPENDENCIES, "DEPENDENCIES", Dependency.getDependenciesName(this.getDependencies()));
- if (contextSequence != null)
- context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT SEQUENCE", contextSequence);
- if (contextItem != null)
- context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT ITEM", contextItem.toSequence());
- }
-
- if (contextItem != null)
- contextSequence = contextItem.toSequence();
-
- Sequence result;
-
- Sequence s1 = getArgument(0).eval(contextSequence);
- if (s1.isEmpty())
- result = StringValue.EMPTY_STRING;
- else {
- String newNormalizationForm = "NFC";
- if (getArgumentCount() > 1)
- newNormalizationForm = getArgument(1).eval(contextSequence).getStringValue().toUpperCase().trim();
- //TODO : handle the "FULLY-NORMALIZED" string...
- if ("".equals(newNormalizationForm))
- result = new StringValue(s1.getStringValue());
- else {
- Object returnedObject = null;
- try {
- if (clazz == null)
- clazz = Class.forName("com.ibm.icu.text.Normalizer");
- if (modeField == null || !normalizationForm.equals(newNormalizationForm)) {
- try {
- modeField = clazz.getField(newNormalizationForm);
- } catch (NoSuchFieldException e) {
- throw new XPathException("FOCH0003: unknown normalization form");
- }
- //com.ibm.icu.text.Normalizer.Mode
- modeObject = modeField.get(null);
- normalizationForm = newNormalizationForm;
- }
- if (constructor == null)
- //Second argument shouldn't be a problem : modeField always has the same type
- constructor = clazz.getConstructor(
- new Class[] { String.class, modeField.getType(), Integer.TYPE}
- );
- Object[] args = new Object[] { s1.getStringValue(), modeObject, DUMMY_INTEGER };
- if (method == null)
- method = clazz.getMethod("getText", null);
-
- //Normalizer n = new Normalizer(s1.getStringValue(), Normalizer.NFC, 0);
- Object instance = constructor.newInstance(args);
- //result = new StringValue(n.getText());
- returnedObject = method.invoke(instance, null);
- } catch (Exception e) {
- throw new XPathException("Can not find the ICU4J library in the classpath");
- }
- result = new StringValue((String)returnedObject);
- }
- }
-
- if (context.getProfiler().isEnabled())
- context.getProfiler().end(this, "", result);
-
- return result;
- }
-
-}
+/* eXist Native XML Database
+ * Copyright (C) 2000-2006, The eXist team
+ * http://exist-db.org/
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $Id: FunEndsWith.java 4163 2006-08-24 14:23:13Z wolfgang_m $
+ */
+
+package org.exist.xquery.functions;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import org.exist.dom.QName;
+import org.exist.xquery.Cardinality;
+import org.exist.xquery.Dependency;
+import org.exist.xquery.Function;
+import org.exist.xquery.FunctionSignature;
+import org.exist.xquery.Profiler;
+import org.exist.xquery.XPathException;
+import org.exist.xquery.XQueryContext;
+import org.exist.xquery.value.Item;
+import org.exist.xquery.value.Sequence;
+import org.exist.xquery.value.SequenceType;
+import org.exist.xquery.value.StringValue;
+import org.exist.xquery.value.Type;
+
+public class FunNormalizeUnicode extends Function {
+
+ private String normalizationForm = null;
+ private Class clazz = null;
+ private Field modeField = null;
+ private Object modeObject = null;
+ private static Integer DUMMY_INTEGER = new Integer(0);
+ private Constructor constructor = null;
+ private Method method = null;
+
+ public final static FunctionSignature signatures [] = {
+ new FunctionSignature(
+ new QName("normalize-unicode", Function.BUILTIN_FUNCTION_NS),
+ "Returns the value of $a normalized according to the normalization form NFC. ",
+ new SequenceType[] {
+ new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE)
+ },
+ new SequenceType(Type.BOOLEAN, Cardinality.ONE)
+ ),
+ new FunctionSignature (
+ new QName("normalize-unicode", Function.BUILTIN_FUNCTION_NS),
+ "Returns the value of $a normalized according to the normalization criteria for a " +
+ "normalization form identified by the value of $b. ",
+ new SequenceType[] {
+ new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE),
+ new SequenceType(Type.STRING, Cardinality.ONE)
+ },
+ new SequenceType(Type.BOOLEAN, Cardinality.ONE)),
+ };
+
+ public FunNormalizeUnicode(XQueryContext context, FunctionSignature signature) {
+ super(context, signature);
+ }
+
+ public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {
+ if (context.getProfiler().isEnabled()) {
+ context.getProfiler().start(this);
+ context.getProfiler().message(this, Profiler.DEPENDENCIES, "DEPENDENCIES", Dependency.getDependenciesName(this.getDependencies()));
+ if (contextSequence != null)
+ context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT SEQUENCE", contextSequence);
+ if (contextItem != null)
+ context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT ITEM", contextItem.toSequence());
+ }
+
+ if (contextItem != null)
+ contextSequence = contextItem.toSequence();
+
+ Sequence result;
+
+ Sequence s1 = getArgument(0).eval(contextSequence);
+ if (s1.isEmpty())
+ result = StringValue.EMPTY_STRING;
+ else {
+ String newNormalizationForm = "NFC";
+ if (getArgumentCount() > 1)
+ newNormalizationForm = getArgument(1).eval(contextSequence).getStringValue().toUpperCase().trim();
+ //TODO : handle the "FULLY-NORMALIZED" string...
+ if ("".equals(newNormalizationForm))
+ result = new StringValue(s1.getStringValue());
+ else {
+ Object returnedObject = null;
+ try {
+ if (clazz == null)
+ clazz = Class.forName("com.ibm.icu.text.Normalizer");
+ if (modeField == null || !normalizationForm.equals(newNormalizationForm)) {
+ try {
+ modeField = clazz.getField(newNormalizationForm);
+ } catch (NoSuchFieldException e) {
+ throw new XPathException("FOCH0003: unknown normalization form");
+ }
+ //com.ibm.icu.text.Normalizer.Mode
+ modeObject = modeField.get(null);
+ normalizationForm = newNormalizationForm;
+ }
+ if (constructor == null)
+ //Second argument shouldn't be a problem : modeField always has the same type
+ constructor = clazz.getConstructor(
+ new Class[] { String.class, modeField.getType(), Integer.TYPE}
+ );
+ Object[] args = new Object[] { s1.getStringValue(), modeObject, DUMMY_INTEGER };
+ if (method == null)
+ method = clazz.getMethod("getText", null);
+
+ //Normalizer n = new Normalizer(s1.getStringValue(), Normalizer.NFC, 0);
+ Object instance = constructor.newInstance(args);
+ //result = new StringValue(n.getText());
+ returnedObject = method.invoke(instance, null);
+ } catch (Exception e) {
+ throw new XPathException("Can not find the ICU4J library in the classpath");
+ }
+ result = new StringValue((String)returnedObject);
+ }
+ }
+
+ if (context.getProfiler().isEnabled())
+ context.getProfiler().end(this, "", result);
+
+ return result;
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2007-03-28 13:32:51
|
Revision: 5544
http://svn.sourceforge.net/exist/?rev=5544&view=rev
Author: ellefj
Date: 2007-03-28 06:32:49 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Changed contentType in test testRequestGetParameterFromModule() for org.exist.http.RESTServer.java.
Modified Paths:
--------------
trunk/eXist/test/src/org/exist/http/RESTServiceTest.java
Modified: trunk/eXist/test/src/org/exist/http/RESTServiceTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/http/RESTServiceTest.java 2007-03-28 13:12:33 UTC (rev 5543)
+++ trunk/eXist/test/src/org/exist/http/RESTServiceTest.java 2007-03-28 13:32:49 UTC (rev 5544)
@@ -317,7 +317,7 @@
if (semicolon > 0) {
contentType = contentType.substring(0, semicolon).trim();
}
- assertEquals("Server returned content type " + contentType, "text/html", contentType);
+ assertEquals("Server returned content type " + contentType, "text/xml", contentType);
//get the response of the query
String response = readResponse(connect.getInputStream());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2007-03-28 13:12:34
|
Revision: 5543
http://svn.sourceforge.net/exist/?rev=5543&view=rev
Author: wolfgang_m
Date: 2007-03-28 06:12:33 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Small fix to save some time on URI comparison.
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/GeneralComparison.java
Modified: trunk/eXist/src/org/exist/xquery/GeneralComparison.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/GeneralComparison.java 2007-03-28 13:08:23 UTC (rev 5542)
+++ trunk/eXist/src/org/exist/xquery/GeneralComparison.java 2007-03-28 13:12:33 UTC (rev 5543)
@@ -828,7 +828,7 @@
boolean hasQNameIndex = true;
for (Iterator i = contextSequence.getCollectionIterator(); i.hasNext(); ) {
Collection collection = (Collection) i.next();
- if (collection.getURI().equals(XmldbURI.SYSTEM_COLLECTION_URI))
+ if (collection.getURI().equalsInternal(XmldbURI.SYSTEM_COLLECTION_URI))
continue;
hasQNameIndex = collection.getIndexByQNameConfiguration(context.getBroker(), contextQName) != null;
if (!hasQNameIndex) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2007-03-28 13:08:24
|
Revision: 5542
http://svn.sourceforge.net/exist/?rev=5542&view=rev
Author: wolfgang_m
Date: 2007-03-28 06:08:23 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Use XMLString instead of String in AttrImpl to speed up deserialization of attributes.
Modified Paths:
--------------
trunk/eXist/src/org/exist/dom/AttrImpl.java
trunk/eXist/src/org/exist/dom/DocumentImpl.java
Modified: trunk/eXist/src/org/exist/dom/AttrImpl.java
===================================================================
--- trunk/eXist/src/org/exist/dom/AttrImpl.java 2007-03-28 11:44:34 UTC (rev 5541)
+++ trunk/eXist/src/org/exist/dom/AttrImpl.java 2007-03-28 13:08:23 UTC (rev 5542)
@@ -30,6 +30,7 @@
import org.exist.util.ByteArrayPool;
import org.exist.util.ByteConversion;
import org.exist.util.UTF8;
+import org.exist.util.XMLString;
import org.exist.util.serializer.AttrList;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
@@ -49,17 +50,26 @@
public final static int DEFAULT_ATTRIBUTE_TYPE = CDATA;
protected int attributeType = DEFAULT_ATTRIBUTE_TYPE;
- protected String value = null;
+ protected XMLString value = null;
public AttrImpl() {
super(Node.ATTRIBUTE_NODE);
}
- public AttrImpl( QName name, String value ) {
+ public AttrImpl (QName name) {
super( Node.ATTRIBUTE_NODE, name);
+ }
+
+ public AttrImpl( QName name, XMLString value ) {
+ super( Node.ATTRIBUTE_NODE, name);
this.value = value;
}
+ public AttrImpl (QName name, String str) {
+ super( Node.ATTRIBUTE_NODE, name);
+ this.value = new XMLString( str.toCharArray() );
+ }
+
public AttrImpl(AttrImpl other) {
super(other);
this.attributeType = other.attributeType;
@@ -87,7 +97,7 @@
LENGTH_SIGNATURE_LENGTH + NodeId.LENGTH_NODE_ID_UNITS + nodeIdLen +
Signatures.getLength(idSizeType) +
(nodeName.needsNamespaceDecl() ? LENGTH_NS_ID + LENGTH_PREFIX_LENGTH + prefixLen : 0) +
- UTF8.encoded(value));
+ value.UTF8Size());
int pos = 0;
data[pos] = (byte) ( Signatures.Attr << 0x5 );
data[pos] |= idSizeType;
@@ -111,7 +121,7 @@
UTF8.encode(nodeName.getPrefix(), data, pos);
pos += prefixLen;
}
- UTF8.encode(value, data, pos);
+ value.UTF8Encode(data, pos);
return data;
}
@@ -142,13 +152,8 @@
pos += prefixLen;
}
String namespace = nsId == 0 ? "" : doc.getSymbols().getNamespace(nsId);
- String value;
- try {
- value = new String(data, pos, len - (pos - start), "UTF-8");
- } catch (UnsupportedEncodingException uee) {
- LOG.warn(uee);
- value = new String(data, pos, len - (pos - start));
- }
+ XMLString value = UTF8.decode(data, pos, len - (pos - start));
+
//OK : we have the necessary material to build the attribute
AttrImpl attr;
if(pooled)
@@ -156,7 +161,7 @@
else
attr = new AttrImpl();
attr.setNodeName(doc.getSymbols().getQName(Node.ATTRIBUTE_NODE, namespace, name, prefix));
- attr.setValue(value);
+ attr.value = value;
attr.setNodeId(dln);
if (dln == null)
throw new RuntimeException("no node id " + id);
@@ -215,17 +220,17 @@
}
public String getValue() {
- return value;
+ return value.toString();
}
public String getNodeValue() {
- return value;
+ return value.toString();
}
- public void setValue( String value ) throws DOMException {
- this.value = value;
- }
-
+ public void setValue(String str) throws DOMException {
+ this.value = new XMLString(str.toCharArray());
+ }
+
public Element getOwnerElement() {
return (Element) ((DocumentImpl)getOwnerDocument()).getNode( nodeId.getParentId() );
}
Modified: trunk/eXist/src/org/exist/dom/DocumentImpl.java
===================================================================
--- trunk/eXist/src/org/exist/dom/DocumentImpl.java 2007-03-28 11:44:34 UTC (rev 5541)
+++ trunk/eXist/src/org/exist/dom/DocumentImpl.java 2007-03-28 13:08:23 UTC (rev 5542)
@@ -550,7 +550,7 @@
}
public Attr createAttribute(String name) throws DOMException {
- AttrImpl attr = new AttrImpl(new QName(name, "", null), null);
+ AttrImpl attr = new AttrImpl(new QName(name, "", null));
attr.setOwnerDocument(this);
return attr;
}
@@ -566,7 +566,7 @@
prefix = qualifiedName.substring(0, p);
name = qualifiedName.substring(p);
}
- AttrImpl attr = new AttrImpl(new QName(name, namespaceURI, prefix), null);
+ AttrImpl attr = new AttrImpl(new QName(name, namespaceURI, prefix));
attr.setOwnerDocument(this);
return attr;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2007-03-28 11:44:45
|
Revision: 5541
http://svn.sourceforge.net/exist/?rev=5541&view=rev
Author: wolfgang_m
Date: 2007-03-28 04:44:34 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Warning in DOMFilePageHeader.setDataLength is based on the default page size (4032). If the db uses a different page size, the logs are flooded by those warnings.
Modified Paths:
--------------
trunk/eXist/src/org/exist/storage/dom/DOMFile.java
Modified: trunk/eXist/src/org/exist/storage/dom/DOMFile.java
===================================================================
--- trunk/eXist/src/org/exist/storage/dom/DOMFile.java 2007-03-28 10:24:54 UTC (rev 5540)
+++ trunk/eXist/src/org/exist/storage/dom/DOMFile.java 2007-03-28 11:44:34 UTC (rev 5541)
@@ -2924,7 +2924,7 @@
}
}
- protected final static class DOMFilePageHeader extends BTreePageHeader {
+ protected final class DOMFilePageHeader extends BTreePageHeader {
protected int dataLen = 0;
protected long nextDataPage = Page.NO_PAGE;
@@ -3019,8 +3019,7 @@
}
public void setDataLength(int len) {
- //TODO : how can we get 4032 ?
- if (len > 4032)
+ if (len > fileHeader.getWorkSize())
LOG.warn("too long !");
dataLen = len;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2007-03-28 10:24:57
|
Revision: 5540
http://svn.sourceforge.net/exist/?rev=5540&view=rev
Author: ellefj
Date: 2007-03-28 03:24:54 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Minor fix after tidying up with MimeType in org.exist.http.RESTServer.java.
Modified Paths:
--------------
trunk/eXist/src/org/exist/http/RESTServer.java
Modified: trunk/eXist/src/org/exist/http/RESTServer.java
===================================================================
--- trunk/eXist/src/org/exist/http/RESTServer.java 2007-03-28 09:20:21 UTC (rev 5539)
+++ trunk/eXist/src/org/exist/http/RESTServer.java 2007-03-28 10:24:54 UTC (rev 5540)
@@ -1,23 +1,22 @@
/*
- * eXist Open Source Native XML Database
- * Copyright (C) 2001-06 Wolfgang M. Meier
- * wol...@ex...
- * http://exist-db.org
+ * eXist Open Source Native XML Database
+ * Copyright (C) 2001-2007 The eXist team
+ * http://exist-db.org
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
* $Id$
*/
package org.exist.http;
@@ -113,6 +112,7 @@
protected final static Logger LOG = Logger.getLogger(RESTServer.class);
+ // Should we not obey the instance's defaults? /ljo
protected final static Properties defaultProperties = new Properties();
static {
@@ -123,7 +123,15 @@
defaultProperties.setProperty(EXistOutputKeys.HIGHLIGHT_MATCHES, "elements");
defaultProperties.setProperty(EXistOutputKeys.PROCESS_XSL_PI, "yes");
}
+
+ protected final static Properties defaultOutputKeysProperties = new Properties();
+ static {
+ defaultOutputKeysProperties.setProperty(OutputKeys.INDENT, "yes");
+ defaultOutputKeysProperties.setProperty(OutputKeys.ENCODING, "UTF-8");
+ defaultOutputKeysProperties.setProperty(OutputKeys.MEDIA_TYPE, MimeType.XML_TYPE.getName());
+ }
+
private final static String QUERY_ERROR_HEAD =
"<html>" +
"<head>" +
@@ -215,7 +223,7 @@
int start = 1;
boolean wrap = true;
boolean source = false;
- Properties outputProperties = new Properties(defaultProperties);
+ Properties outputProperties = new Properties(defaultOutputKeysProperties);
String query = request.getParameter("_xpath");
if (query == null)
query = request.getParameter("_query");
@@ -411,11 +419,11 @@
LOG.debug("media-type: " + asMimeType);
response.setContentType(asMimeType + "; charset="+encoding);
} else {
- response.setContentType(resource.getMetadata().getMimeType()+"; charset="+encoding);
+ response.setContentType(resource.getMetadata().getMimeType() + "; charset=" + encoding);
}
}
OutputStream is = response.getOutputStream();
- Writer w = new OutputStreamWriter(is,encoding);
+ Writer w = new OutputStreamWriter(is, encoding);
serializer.serialize(resource,w);
w.flush();
w.close();
@@ -472,7 +480,7 @@
if (request.getCharacterEncoding() == null)
request.setCharacterEncoding(formEncoding);
- Properties outputProperties = new Properties(defaultProperties);
+ Properties outputProperties = new Properties(defaultOutputKeysProperties);
XmldbURI pathUri = XmldbURI.create(path);
DocumentImpl resource = null;
@@ -999,7 +1007,7 @@
*/
private String formatXPathException(String query, String path, XPathException e) {
StringWriter writer = new StringWriter();
- writer.write("<xml version=\"1.0\" />");
+ writer.write("<?xml version=\"1.0\" ?>");
writer.write("<exception><path>");
writer.write(path);
writer.write("</path>");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2007-03-28 09:20:23
|
Revision: 5539
http://svn.sourceforge.net/exist/?rev=5539&view=rev
Author: wolfgang_m
Date: 2007-03-28 02:20:21 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
Fixed: if a QName index is defined on an element or attribute, use this index for general comparisons, even if the optimizer is not active. Without that fix, the general comparison just returned 0 hits, which is certainly not the expected behaviour.
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/GeneralComparison.java
Modified: trunk/eXist/src/org/exist/xquery/GeneralComparison.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/GeneralComparison.java 2007-03-27 13:47:09 UTC (rev 5538)
+++ trunk/eXist/src/org/exist/xquery/GeneralComparison.java 2007-03-28 09:20:21 UTC (rev 5539)
@@ -25,6 +25,8 @@
import java.util.Iterator;
import org.exist.EXistException;
+import org.exist.xmldb.XmldbURI;
+import org.exist.collections.Collection;
import org.exist.dom.ContextItem;
import org.exist.dom.DocumentSet;
import org.exist.dom.ExtArrayNodeSet;
@@ -543,7 +545,12 @@
context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index '" + context.getBroker().getValueIndex().toString() +
"' to find key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'");
- NodeSet ns = context.getBroker().getValueIndex().find(relation, docs, nodes, NodeSet.ANCESTOR, null, (Indexable)key);
+ if (!checkForQNameIndex(contextSequence)) {
+ LOG.trace("Cannot use QName index");
+ contextQName = null;
+ }
+
+ NodeSet ns = context.getBroker().getValueIndex().find(relation, docs, nodes, NodeSet.ANCESTOR, contextQName, (Indexable)key);
hasUsedIndex = true;
if (result == null)
@@ -814,8 +821,27 @@
public void setCollation(Expression collationArg) {
this.collationArg = collationArg;
}
-
- /* (non-Javadoc)
+
+ private boolean checkForQNameIndex(Sequence contextSequence) {
+ if (contextSequence == null || contextQName == null)
+ return false;
+ boolean hasQNameIndex = true;
+ for (Iterator i = contextSequence.getCollectionIterator(); i.hasNext(); ) {
+ Collection collection = (Collection) i.next();
+ if (collection.getURI().equals(XmldbURI.SYSTEM_COLLECTION_URI))
+ continue;
+ hasQNameIndex = collection.getIndexByQNameConfiguration(context.getBroker(), contextQName) != null;
+ if (!hasQNameIndex) {
+ if (LOG.isTraceEnabled())
+ LOG.trace("cannot use index on QName: " + contextQName + ". Collection " + collection.getURI() +
+ " does not define an index");
+ break;
+ }
+ }
+ return hasQNameIndex;
+ }
+
+ /* (non-Javadoc)
* @see org.exist.xquery.PathExpr#resetState()
*/
public void resetState() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2007-03-27 13:47:11
|
Revision: 5538
http://svn.sourceforge.net/exist/?rev=5538&view=rev
Author: ellefj
Date: 2007-03-27 06:47:09 -0700 (Tue, 27 Mar 2007)
Log Message:
-----------
Some further tidying up with MimeType.
Modified Paths:
--------------
trunk/eXist/src/org/exist/http/RESTServer.java
trunk/eXist/src/org/exist/util/MimeType.java
Modified: trunk/eXist/src/org/exist/http/RESTServer.java
===================================================================
--- trunk/eXist/src/org/exist/http/RESTServer.java 2007-03-26 18:44:56 UTC (rev 5537)
+++ trunk/eXist/src/org/exist/http/RESTServer.java 2007-03-27 13:47:09 UTC (rev 5538)
@@ -118,6 +118,7 @@
static {
defaultProperties.setProperty(OutputKeys.INDENT, "yes");
defaultProperties.setProperty(OutputKeys.ENCODING, "UTF-8");
+ defaultProperties.setProperty(OutputKeys.MEDIA_TYPE, MimeType.XML_TYPE.getName());
defaultProperties.setProperty(EXistOutputKeys.EXPAND_XINCLUDES, "yes");
defaultProperties.setProperty(EXistOutputKeys.HIGHLIGHT_MATCHES, "elements");
defaultProperties.setProperty(EXistOutputKeys.PROCESS_XSL_PI, "yes");
@@ -214,7 +215,7 @@
int start = 1;
boolean wrap = true;
boolean source = false;
- Properties outputProperties = new Properties();
+ Properties outputProperties = new Properties(defaultProperties);
String query = request.getParameter("_xpath");
if (query == null)
query = request.getParameter("_query");
@@ -238,23 +239,28 @@
}
}
String option;
- if ((option = request.getParameter("_wrap")) != null)
+ if ((option = request.getParameter("_wrap")) != null) {
wrap = option.equals("yes");
- if ((option = request.getParameter("_indent")) != null)
+ }
+ if ((option = request.getParameter("_indent")) != null) {
outputProperties.setProperty(OutputKeys.INDENT, option);
- if((option = request.getParameter("_source")) != null)
+ }
+ if((option = request.getParameter("_source")) != null) {
source = option.equals("yes");
+ }
String stylesheet;
if ((stylesheet = request.getParameter("_xsl")) != null) {
if (stylesheet.equals("no")) {
outputProperties.setProperty(EXistOutputKeys.PROCESS_XSL_PI, "no");
outputProperties.remove(EXistOutputKeys.STYLESHEET);
stylesheet = null;
- } else
+ } else {
outputProperties.setProperty(EXistOutputKeys.STYLESHEET,
stylesheet);
- } else
+ }
+ } else {
outputProperties.setProperty(EXistOutputKeys.PROCESS_XSL_PI, "yes");
+ }
LOG.debug("stylesheet = " + stylesheet);
LOG.debug("query = " + query);
String encoding;
@@ -262,6 +268,8 @@
outputProperties.setProperty(OutputKeys.ENCODING, encoding);
else
encoding = "UTF-8";
+
+ String mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
// Process the request
DocumentImpl resource = null;
@@ -269,56 +277,46 @@
try {
// check if path leads to an XQuery resource
resource = broker.getXMLResource(pathUri, Lock.READ_LOCK);
- if (resource != null)
- {
- if (resource.getResourceType() == DocumentImpl.BINARY_FILE && "application/xquery".equals(resource.getMetadata().getMimeType()))
- {
- // found an XQuery resource
+ if (resource != null) {
+ if (resource.getResourceType() == DocumentImpl.BINARY_FILE && MimeType.XQUERY_TYPE.getName().equals(resource.getMetadata().getMimeType())) {
+ // found an XQuery resource
- //Should we display the source of the XQuery or execute it
- Descriptor descriptor = Descriptor.getDescriptorSingleton();
- if(source && descriptor != null)
- {
- //show the source
-
- //check are we allowed to show the xquery source - descriptor.xml
- if(descriptor.allowSourceXQuery(path))
- {
- //TODO: change writeResourceAs to use a serializer that will serialize xquery to syntax coloured xhtml, replace the asMimeType parameter with a method for specifying the serializer, or split the code into two methods. - deliriumsky
-
- //Show the source of the XQuery
- writeResourceAs(resource, broker, stylesheet, encoding, "text/plain", outputProperties, response);
- }
- else
- {
- //we are not allowed to show the source - query not allowed in descriptor.xml
+ //Should we display the source of the XQuery or execute it
+ Descriptor descriptor = Descriptor.getDescriptorSingleton();
+ if(source && descriptor != null) {
+ //show the source
+
+ //check are we allowed to show the xquery source - descriptor.xml
+ if(descriptor.allowSourceXQuery(path)) {
+ //TODO: change writeResourceAs to use a serializer that will serialize xquery to syntax coloured xhtml, replace the asMimeType parameter with a method for specifying the serializer, or split the code into two methods. - deliriumsky
+
+ //Show the source of the XQuery
+ writeResourceAs(resource, broker, stylesheet, encoding, MimeType.TEXT_TYPE.getName(), outputProperties, response);
+ } else {
+ //we are not allowed to show the source - query not allowed in descriptor.xml
response.sendError(HttpServletResponse.SC_FORBIDDEN, "Permission to view XQuery source for: " + path + " denied. Must be explicitly defined in descriptor.xml");
- return;
- }
- }
- else
- {
- //Execute the XQuery
- try
- {
+ return;
+ }
+ } else { //Execute the XQuery
+ try {
String result = executeXQuery(broker, resource, request, response, outputProperties);
- encoding = outputProperties.getProperty(OutputKeys.ENCODING, encoding);
+ encoding = outputProperties.getProperty(OutputKeys.ENCODING);
+ mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
- //only write the response if it is not already committed,
- //some xquery functions can write directly to the response
- if(!response.isCommitted())
- {
- String mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE, "text/html");
-
- writeResponse(response, result, mimeType, encoding);
+ //only write the response if it is not already committed,
+ //some xquery functions can write directly to the response
+ if(!response.isCommitted()) {
+ writeResponse(response, result, mimeType, encoding);
}
- }
- catch (XPathException e)
- {
+ } catch (XPathException e) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
- writeResponse(response, formatXPathException(query, path, e), "text/html", encoding);
+ if (MimeType.XML_TYPE.getName().equals(mimeType)) {
+ writeResponse(response, formatXPathException(query, path, e), mimeType, encoding);
+ } else {
+ writeResponse(response, formatXPathExceptionHtml(query, path, e), MimeType.HTML_TYPE.getName(), encoding);
+ }
}
- }
+ }
return;
}
}
@@ -326,20 +324,23 @@
// query parameter specified
try {
String result = search(broker, query, path, howmany, start, outputProperties, wrap, request, response);
- encoding = outputProperties.getProperty(OutputKeys.ENCODING, encoding);
+ encoding = outputProperties.getProperty(OutputKeys.ENCODING);
+ mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
//only write the response if it is not already committed,
//some xquery functions can write directly to the response
- if(!response.isCommitted())
- {
- String mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE, "text/html");
+ if(!response.isCommitted()) {
writeResponse(response, result, mimeType, encoding);
}
} catch (XPathException e) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
- writeResponse(response, formatXPathException(query, path, e), "text/html", encoding);
- }
+ if (MimeType.XML_TYPE.getName().equals(mimeType)) {
+ writeResponse(response, formatXPathException(query, path, e), mimeType, encoding);
+ } else {
+ writeResponse(response, formatXPathExceptionHtml(query, path, e), MimeType.HTML_TYPE.getName(), encoding);
+ }
+ }
} else {
// no query parameter: try to load a document from the specified
// path
@@ -348,7 +349,7 @@
Collection collection = broker.getCollection(pathUri);
if (collection != null) {
if (!collection.getPermissions().validate(
- broker.getUser(), Permission.READ))
+ broker.getUser(), Permission.READ))
throw new PermissionDeniedException(
"Not allowed to read collection");
// return a listing of the collection contents
@@ -369,71 +370,56 @@
}
//writes out a resource, uses asMimeType as the specified mime-type or if null uses the type of the resource
- private void writeResourceAs(DocumentImpl resource, DBBroker broker, String stylesheet, String encoding, String asMimeType, Properties outputProperties, HttpServletResponse response) throws BadRequestException, PermissionDeniedException, IOException
- {
+ private void writeResourceAs(DocumentImpl resource, DBBroker broker, String stylesheet, String encoding, String asMimeType, Properties outputProperties, HttpServletResponse response) throws BadRequestException, PermissionDeniedException, IOException {
//Do we have permission to read the resource
- if (!resource.getPermissions().validate(broker.getUser(), Permission.READ))
- throw new PermissionDeniedException("Not allowed to read resource");
+ if (!resource.getPermissions().validate(broker.getUser(), Permission.READ)) {
+ throw new PermissionDeniedException("Not allowed to read resource");
+ }
- if (resource.getResourceType() == DocumentImpl.BINARY_FILE)
- {
- // binary resource
- if(asMimeType != null) //was a mime-type specified?
- {
- response.setContentType(asMimeType);
- }
- else
- {
- response.setContentType(resource.getMetadata().getMimeType());
- }
- OutputStream os = response.getOutputStream();
- broker.readBinaryResource((BinaryDocument) resource, os);
- os.flush();
- }
- else
- {
+ if (resource.getResourceType() == DocumentImpl.BINARY_FILE) {
+ // binary resource
+ if(asMimeType != null) { //was a mime-type specified?
+
+ response.setContentType(asMimeType);
+ } else {
+ response.setContentType(resource.getMetadata().getMimeType());
+ }
+ OutputStream os = response.getOutputStream();
+ broker.readBinaryResource((BinaryDocument) resource, os);
+ os.flush();
+ } else {
// xml resource
Serializer serializer = broker.getSerializer();
serializer.reset();
-
+
//Serialize the document
- try
- {
+ try {
//use a stylesheet if specified in query parameters
- if (stylesheet != null)
- {
+ if (stylesheet != null) {
serializer.setStylesheet(resource, stylesheet);
}
serializer.setProperties(outputProperties);
serializer.prepareStylesheets(resource);
- if(asMimeType != null) //was a mime-type specified?
- {
- response.setContentType(asMimeType+"; charset="+encoding);
+ if(asMimeType != null) { //was a mime-type specified?
+ response.setContentType(asMimeType+"; charset="+encoding);
+ } else {
+ if (serializer.isStylesheetApplied() || serializer.hasXSLPi(resource) != null) {
+ asMimeType = serializer.getStylesheetProperty(OutputKeys.MEDIA_TYPE);
+ if (!useDynamicContentType || asMimeType == null)
+ asMimeType = MimeType.HTML_TYPE.getName();
+ LOG.debug("media-type: " + asMimeType);
+ response.setContentType(asMimeType + "; charset="+encoding);
+ } else {
+ response.setContentType(resource.getMetadata().getMimeType()+"; charset="+encoding);
+ }
}
- else
- {
- if (serializer.isStylesheetApplied() || serializer.hasXSLPi(resource) != null)
- {
- asMimeType = serializer.getStylesheetProperty(OutputKeys.MEDIA_TYPE);
- if (!useDynamicContentType || asMimeType == null)
- asMimeType = "text/html";
- LOG.debug("media-type: " + asMimeType);
- response.setContentType(asMimeType + "; charset="+encoding);
- }
- else
- {
- response.setContentType(resource.getMetadata().getMimeType()+"; charset="+encoding);
- }
- }
OutputStream is = response.getOutputStream();
Writer w = new OutputStreamWriter(is,encoding);
serializer.serialize(resource,w);
w.flush();
w.close();
- }
- catch (SAXException saxe)
- {
+ } catch (SAXException saxe) {
LOG.warn(saxe);
throw new BadRequestException("Error while serializing XML: " + saxe.getMessage());
} catch (TransformerConfigurationException e) {
@@ -489,22 +475,29 @@
Properties outputProperties = new Properties(defaultProperties);
XmldbURI pathUri = XmldbURI.create(path);
DocumentImpl resource = null;
+
+ String encoding = outputProperties.getProperty(OutputKeys.ENCODING);
+ String mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
try {
// check if path leads to an XQuery resource.
// if yes, the resource is loaded and the XQuery executed.
resource = broker.getXMLResource(pathUri, Lock.READ_LOCK);
if (resource != null) {
if (resource.getResourceType() == DocumentImpl.BINARY_FILE &&
- "application/xquery".equals(resource.getMetadata().getMimeType())) {
+ MimeType.XQUERY_TYPE.getName().equals(resource.getMetadata().getMimeType())) {
// found an XQuery resource
try {
String result = executeXQuery(broker, resource, request, response, outputProperties);
- String encoding = outputProperties.getProperty(OutputKeys.ENCODING, "UTF-8");
- String mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE, "text/html");
+ encoding = outputProperties.getProperty(OutputKeys.ENCODING);
+ mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
writeResponse(response, result, mimeType, encoding);
} catch (XPathException e) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
- writeResponse(response, formatXPathException(null, path, e), "text/html", "UTF-8");
+ if (MimeType.XML_TYPE.getName().equals(mimeType)) {
+ writeResponse(response, formatXPathException(null, path, e), mimeType, encoding);
+ } else {
+ writeResponse(response, formatXPathExceptionHtml(null, path, e), MimeType.HTML_TYPE.getName(), encoding);
+ }
}
return;
}
@@ -609,7 +602,7 @@
if (query != null) {
writeResponse(response, search(broker, query, path, howmany,
start, outputProperties, enclose, request, response), mime,
- outputProperties.getProperty(OutputKeys.ENCODING, "UTF-8"));
+ outputProperties.getProperty(OutputKeys.ENCODING));
} else {
transact.abort(transaction);
throw new BadRequestException("No query specified");
@@ -974,9 +967,10 @@
/**
* @param query
+ * @param path
* @param e
*/
- private String formatXPathException(String query, String path, XPathException e) {
+ private String formatXPathExceptionHtml(String query, String path, XPathException e) {
StringWriter writer = new StringWriter();
writer.write(QUERY_ERROR_HEAD);
writer.write("<p class=\"path\"><span class=\"high\">Path</span>: ");
@@ -997,6 +991,29 @@
writer.write("</body></html>");
return writer.toString();
}
+
+ /**
+ * @param query
+ * @param path
+ * @param e
+ */
+ private String formatXPathException(String query, String path, XPathException e) {
+ StringWriter writer = new StringWriter();
+ writer.write("<xml version=\"1.0\" />");
+ writer.write("<exception><path>");
+ writer.write(path);
+ writer.write("</path>");
+ writer.write("<message>");
+ writer.write(e.getMessage());
+ writer.write("</message>");
+ if(query != null) {
+ writer.write("<query>");
+ writer.write(query);
+ writer.write("</query>");
+ }
+ writer.write("</exception>");
+ return writer.toString();
+ }
/**
* Check if the XQuery contains pragmas that define serialization settings.
Modified: trunk/eXist/src/org/exist/util/MimeType.java
===================================================================
--- trunk/eXist/src/org/exist/util/MimeType.java 2007-03-26 18:44:56 UTC (rev 5537)
+++ trunk/eXist/src/org/exist/util/MimeType.java 2007-03-27 13:47:09 UTC (rev 5538)
@@ -36,15 +36,18 @@
// new MimeType("application/xml", XML);
public final static MimeType XML_CONTENT_TYPE =
new MimeType("text/xml; charset=UTF-8", XML);
-
public final static MimeType XSL_TYPE =
new MimeType("text/xsl", XML);
public final static MimeType XSLT_TYPE =
new MimeType("application/xslt+xml", XML);
+ public final static MimeType XQUERY_TYPE =
+ new MimeType("application/xquery", BINARY);
public final static MimeType CSS_TYPE =
new MimeType("text/css", BINARY);
public final static MimeType HTML_TYPE =
new MimeType("text/html", BINARY);
+ public final static MimeType TEXT_TYPE =
+ new MimeType("text/plain", BINARY);
private String name;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-03-26 18:44:57
|
Revision: 5537
http://svn.sourceforge.net/exist/?rev=5537&view=rev
Author: dizzzz
Date: 2007-03-26 11:44:56 -0700 (Mon, 26 Mar 2007)
Log Message:
-----------
nbproject updates
Modified Paths:
--------------
trunk/eXist/nbproject/project.xml
Modified: trunk/eXist/nbproject/project.xml
===================================================================
--- trunk/eXist/nbproject/project.xml 2007-03-26 16:20:29 UTC (rev 5536)
+++ trunk/eXist/nbproject/project.xml 2007-03-26 18:44:56 UTC (rev 5537)
@@ -323,7 +323,7 @@
</compilation-unit>
<compilation-unit>
<package-root>tools/wrapper/src</package-root>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
+ <classpath mode="compile">tools/wrapper/lib/wrapper.jar;start.jar</classpath>
<built-to>build/classes</built-to>
<built-to>extensions/modules/classes</built-to>
<built-to>tools/wrapper/classes</built-to>
@@ -341,7 +341,7 @@
</compilation-unit>
<compilation-unit>
<package-root>extensions/modules/src</package-root>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
+ <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar;exist-optional.jar;exist.jar;start.jar</classpath>
<built-to>build/classes</built-to>
<built-to>extensions/modules/classes</built-to>
<built-to>tools/wrapper/classes</built-to>
@@ -359,7 +359,7 @@
</compilation-unit>
<compilation-unit>
<package-root>tools/ircbot/src</package-root>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
+ <classpath mode="compile">lib/core/javax.servlet-1.4.jar;tools/ircbot/lib/pircbot.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;exist.jar</classpath>
<built-to>build/classes</built-to>
<built-to>extensions/modules/classes</built-to>
<built-to>tools/wrapper/classes</built-to>
@@ -369,7 +369,7 @@
<compilation-unit>
<package-root>test/src</package-root>
<unit-tests/>
- <classpath mode="compile">lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
+ <classpath mode="compile">exist-modules.jar;exist-optional.jar;exist.jar;start.jar;lib/core/antlr-2.7.6.jar;lib/core/commons-collections-3.1.jar;lib/core/commons-logging-1.0.4.jar;lib/core/commons-pool-1.2.jar;lib/core/excalibur-cli-1.0.jar;lib/core/javax.servlet-1.4.jar;lib/core/jEdit-syntax.jar;lib/core/jgroups-all.jar;lib/core/jline-0_9_5.jar;lib/core/jta.jar;lib/core/log4j-1.2.14.jar;lib/core/quartz-1.6.0.jar;lib/core/resolver-1.2.jar;lib/core/sunxacml.jar;lib/core/xmldb.jar;lib/core/xmlrpc-1.2-patched.jar;lib/endorsed/serializer-2.9.0.jar;lib/endorsed/xalan-2.7.0.jar;lib/endorsed/xercesImpl-2.9.0.jar;lib/endorsed/xml-apis.jar;lib/optional/axis-ant.jar;lib/optional/axis-schema.jar;lib/optional/axis.jar;lib/optional/commons-discovery-0.2.jar;lib/optional/commons-fileupload-1.1.1.jar;lib/optional/commons-httpclient-3.0.1.jar;lib/optional/commons-io-1.3.jar;lib/optional/jaxrpc.jar;lib/optional/saaj.jar;lib/optional/wsdl4j-1.5.1.jar;lib/user/xmlunit1.0.jar;tools/ant/lib/ant.jar;tools/ant/lib/ant-jdepend.jar;tools/ant/lib/junit.jar;tools/ant/lib/xmlunit1.0.jar;tools/ircbot/lib/pircbot.jar;tools/jetty/lib/org.mortbay.jetty.jar;tools/wrapper/lib/wrapper.jar;thirdparty/tomcat5/bin/jmx.jar;thirdparty/tomcat5/server/lib/catalina-5.0.28.jar</classpath>
<built-to>test/classes</built-to>
<built-to>build/classes</built-to>
<source-level>1.4</source-level>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|