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
(8) |
|
2
(4) |
3
(11) |
4
(5) |
5
(3) |
6
|
7
(10) |
8
(2) |
|
9
(2) |
10
(6) |
11
(2) |
12
(9) |
13
(4) |
14
(4) |
15
(8) |
|
16
(16) |
17
(11) |
18
(8) |
19
(18) |
20
(8) |
21
(2) |
22
(2) |
|
23
(10) |
24
(9) |
25
(8) |
26
(14) |
27
(20) |
28
(10) |
29
(12) |
|
30
(10) |
31
(2) |
|
|
|
|
|
|
From: <el...@us...> - 2011-01-31 17:51:02
|
Revision: 13705
http://exist.svn.sourceforge.net/exist/?rev=13705&view=rev
Author: ellefj
Date: 2011-01-31 17:50:56 +0000 (Mon, 31 Jan 2011)
Log Message:
-----------
[ignore] moving xq3 switch test to subdirectory.
Added Paths:
-----------
branches/adam/eXist-xq3/test/src/xquery/xquery3/xq3_switch.xml
Removed Paths:
-------------
branches/adam/eXist-xq3/test/src/xquery/xq3_switch.xml
Deleted: branches/adam/eXist-xq3/test/src/xquery/xq3_switch.xml
===================================================================
--- branches/adam/eXist-xq3/test/src/xquery/xq3_switch.xml 2011-01-31 17:02:00 UTC (rev 13704)
+++ branches/adam/eXist-xq3/test/src/xquery/xq3_switch.xml 2011-01-31 17:50:56 UTC (rev 13705)
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<TestSet>
- <testName>xquery3 switch</testName>
- <description>
- <p>Test xquery3 switch functionality</p>
- <author>Leif-Jöran Olsson</author>
- </description>
- <setup>
- <create-collection parent="/db" name="xquery3"/>
- <store collection="/db/xquery3" name="product-err.xml"><![CDATA[
- <products>
- <product>
- <name>broiler</name>
- <category>kitchen</category>
- <price>100</price>
- <cost>"70"</cost>
- </product>
- <product>
- <name>toaster</name>
- <category>kitchen</category>
- <price>30</price>
- <cost>10</cost>
- </product>
- <product>
- <name>blender</name>
- <category>kitchen</category>
- <price>50</price>
- <cost>25</cost>
- </product>
- <product>
- <name>socks</name>
- <category>clothes</category>
- <price>5</price>
- <cost>2</cost>
- </product>
- <product>
- <name>shirt</name>
- <category>clothes</category>
- <price>10</price>
- <cost>3</cost>
- </product>
- </products>
- ]]>
- </store>
- </setup>
- <tearDown>
- <remove-collection collection="/db/xquery3"/>
- </tearDown>
-
- <!-- the following tests are derived from http://www.w3.org/TR/xquery-30/#id-switch -->
-
- <test output="text">
- <task>A switch expression with all string case alternatives
- </task>
- <code><![CDATA[
- let $animal := "Cat"
- return
- switch ($animal)
- case "Cow" return "Moo"
- case "Cat" return "Meow"
- case "Duck" return "Quack"
- default return "What's that odd noise?"
-]]>
- </code>
- <expected>Meow</expected>
- </test>
- <test output="text">
- <task>A switch with multiple case clauses with one return
- </task>
- <code><![CDATA[
- let $animal := "Calf"
- return
- switch ($animal)
- case "Cow" case "Calf" return "Moo"
- default return "No Bull?"
-]]>
- </code>
- <expected>Moo</expected>
- </test>
-</TestSet>
Copied: branches/adam/eXist-xq3/test/src/xquery/xquery3/xq3_switch.xml (from rev 13676, branches/adam/eXist-xq3/test/src/xquery/xq3_switch.xml)
===================================================================
--- branches/adam/eXist-xq3/test/src/xquery/xquery3/xq3_switch.xml (rev 0)
+++ branches/adam/eXist-xq3/test/src/xquery/xquery3/xq3_switch.xml 2011-01-31 17:50:56 UTC (rev 13705)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestSet>
+ <testName>xquery3 switch</testName>
+ <description>
+ <p>Test xquery3 switch functionality</p>
+ <author>Leif-Jöran Olsson</author>
+ </description>
+ <setup>
+ <create-collection parent="/db" name="xquery3"/>
+ <store collection="/db/xquery3" name="product-err.xml"><![CDATA[
+ <products>
+ <product>
+ <name>broiler</name>
+ <category>kitchen</category>
+ <price>100</price>
+ <cost>"70"</cost>
+ </product>
+ <product>
+ <name>toaster</name>
+ <category>kitchen</category>
+ <price>30</price>
+ <cost>10</cost>
+ </product>
+ <product>
+ <name>blender</name>
+ <category>kitchen</category>
+ <price>50</price>
+ <cost>25</cost>
+ </product>
+ <product>
+ <name>socks</name>
+ <category>clothes</category>
+ <price>5</price>
+ <cost>2</cost>
+ </product>
+ <product>
+ <name>shirt</name>
+ <category>clothes</category>
+ <price>10</price>
+ <cost>3</cost>
+ </product>
+ </products>
+ ]]>
+ </store>
+ </setup>
+ <tearDown>
+ <remove-collection collection="/db/xquery3"/>
+ </tearDown>
+
+ <!-- the following tests are derived from http://www.w3.org/TR/xquery-30/#id-switch -->
+
+ <test output="text">
+ <task>A switch expression with all string case alternatives
+ </task>
+ <code><![CDATA[
+ let $animal := "Cat"
+ return
+ switch ($animal)
+ case "Cow" return "Moo"
+ case "Cat" return "Meow"
+ case "Duck" return "Quack"
+ default return "What's that odd noise?"
+]]>
+ </code>
+ <expected>Meow</expected>
+ </test>
+ <test output="text">
+ <task>A switch with multiple case clauses with one return
+ </task>
+ <code><![CDATA[
+ let $animal := "Calf"
+ return
+ switch ($animal)
+ case "Cow" case "Calf" return "Moo"
+ default return "No Bull?"
+]]>
+ </code>
+ <expected>Moo</expected>
+ </test>
+</TestSet>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sha...@us...> - 2011-01-31 17:02:06
|
Revision: 13704
http://exist.svn.sourceforge.net/exist/?rev=13704&view=rev
Author: shabanovd
Date: 2011-01-31 17:02:00 +0000 (Mon, 31 Jan 2011)
Log Message:
-----------
[ignore] fix account's home collection issue
Modified Paths:
--------------
trunk/eXist/src/org/exist/config/Configurator.java
trunk/eXist/src/org/exist/security/AbstractRealm.java
trunk/eXist/src/org/exist/storage/BrokerPool.java
Modified: trunk/eXist/src/org/exist/config/Configurator.java
===================================================================
--- trunk/eXist/src/org/exist/config/Configurator.java 2011-01-30 21:06:24 UTC (rev 13703)
+++ trunk/eXist/src/org/exist/config/Configurator.java 2011-01-31 17:02:00 UTC (rev 13704)
@@ -575,6 +575,8 @@
return field.get(instance).toString();
} else if (typeName.equals("boolean") || typeName.equals("java.lang.Boolean")) {
return Boolean.valueOf(field.get(instance).toString()).toString();
+ } else if (typeName.equals("org.exist.xmldb.XmldbURI")) {
+ return field.get(instance).toString();
}
return null;
@@ -843,35 +845,49 @@
if (data == null || data.length() == 0) {
return null;
}
+ FullXmldbURI fullURI = null;
+
BrokerPool pool = broker.getBrokerPool();
TransactionManager transact = pool.getTransactionManager();
- Txn txn = transact.beginTransaction();
+ Txn txn = null;
LOG.info("STORING CONFIGURATION collection = "+collection.getURI()+" document = "+uri);
Subject currentUser = broker.getSubject();
try {
broker.setUser(pool.getSecurityManager().getSystemSubject());
- //String data = buf.toString();
+
+ txn = transact.beginTransaction();
txn.acquireLock(collection.getLock(), Lock.WRITE_LOCK);
+
IndexInfo info = collection.validateXMLResource(txn, broker, uri, data);
DocumentImpl doc = info.getDocument();
doc.getMetadata().setMimeType(MimeType.XML_TYPE.getName());
doc.setPermissions(0770);
- FullXmldbURI fullURI = getFullURI(broker.getBrokerPool(), doc.getURI());
+
+ fullURI = getFullURI(broker.getBrokerPool(), doc.getURI());
+
saving.add(fullURI);
collection.store(txn, broker, info, data, false);
broker.saveCollection(txn, doc.getCollection());
transact.commit(txn);
+ txn = null;
+
saving.remove(fullURI);
+
+ broker.flush();
+ broker.sync(Sync.MAJOR_SYNC);
+ return collection.getDocument(broker, uri.lastSegment());
} catch (Exception e) {
- transact.abort(txn);
- e.printStackTrace();
+ if (txn != null)
+ transact.abort(txn);
+
+ if (fullURI != null)
+ saving.remove(fullURI);
+
+ LOG.error(e);
throw new IOException(e);
} finally {
broker.setUser(currentUser);
}
- broker.flush();
- broker.sync(Sync.MAJOR_SYNC);
- return collection.getDocument(broker, uri.lastSegment());
}
public static synchronized void clear(Database db) {
Modified: trunk/eXist/src/org/exist/security/AbstractRealm.java
===================================================================
--- trunk/eXist/src/org/exist/security/AbstractRealm.java 2011-01-30 21:06:24 UTC (rev 13703)
+++ trunk/eXist/src/org/exist/security/AbstractRealm.java 2011-01-31 17:02:00 UTC (rev 13704)
@@ -335,8 +335,7 @@
public synchronized boolean updateAccount(Subject invokingUser, Account account) throws PermissionDeniedException, EXistException {
DBBroker broker = null;
try {
- broker = getDatabase().get(null);
- Account user = broker.getUser();
+ Account user = getDatabase().getSubject();
if ( ! (account.getName().equals(user.getName()) || user.hasDbaRole()) )
throw new PermissionDeniedException(
@@ -365,6 +364,7 @@
}
updatingAccount.setPassword(account.getPassword());
+ updatingAccount.setHome(account.getHome());
((AbstractPrincipal)updatingAccount).save();
Modified: trunk/eXist/src/org/exist/storage/BrokerPool.java
===================================================================
--- trunk/eXist/src/org/exist/storage/BrokerPool.java 2011-01-30 21:06:24 UTC (rev 13703)
+++ trunk/eXist/src/org/exist/storage/BrokerPool.java 2011-01-31 17:02:00 UTC (rev 13704)
@@ -1262,7 +1262,20 @@
return false;
}
- //Seems dangerous and redundant as you myst acquire a broker yourself first, just use broker.getUser()
+ /*
+ * Seems dangerous and redundant as you must acquire a broker yourself first, just use broker.getUser()
+ *
+ * yes, you have to authenticate before any action
+ * try {
+ * broker = db.authenticate(...);
+ *
+ * ...actions...
+ *
+ * broker = db.getBroker();
+ * } finally {
+ * db.release();
+ * }
+ */
public Subject getSubject() {
synchronized(this) {
//Try to get an active broker
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-01-30 21:06:30
|
Revision: 13703
http://exist.svn.sourceforge.net/exist/?rev=13703&view=rev
Author: dizzzz
Date: 2011-01-30 21:06:24 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] update to ant 1.8.2
Modified Paths:
--------------
trunk/eXist/tools/ant/lib/ant-antlr.jar
trunk/eXist/tools/ant/lib/ant-apache-xalan2.jar
trunk/eXist/tools/ant/lib/ant-jdepend.jar
trunk/eXist/tools/ant/lib/ant-junit.jar
trunk/eXist/tools/ant/lib/ant-launcher.jar
trunk/eXist/tools/ant/lib/ant.jar
Added Paths:
-----------
trunk/eXist/tools/ant/lib/ant-junit4.jar
Modified: trunk/eXist/tools/ant/lib/ant-antlr.jar
===================================================================
(Binary files differ)
Modified: trunk/eXist/tools/ant/lib/ant-apache-xalan2.jar
===================================================================
(Binary files differ)
Modified: trunk/eXist/tools/ant/lib/ant-jdepend.jar
===================================================================
(Binary files differ)
Modified: trunk/eXist/tools/ant/lib/ant-junit.jar
===================================================================
(Binary files differ)
Added: trunk/eXist/tools/ant/lib/ant-junit4.jar
===================================================================
(Binary files differ)
Property changes on: trunk/eXist/tools/ant/lib/ant-junit4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/eXist/tools/ant/lib/ant-launcher.jar
===================================================================
(Binary files differ)
Modified: trunk/eXist/tools/ant/lib/ant.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-01-30 18:44:42
|
Revision: 13702
http://exist.svn.sourceforge.net/exist/?rev=13702&view=rev
Author: dizzzz
Date: 2011-01-30 18:44:33 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] update netbeansproject for java5, fixed some javadoc warnings
Modified Paths:
--------------
stable/eXist-1.4.x/build/scripts/build-impl.xml
stable/eXist-1.4.x/nbproject/build-impl.xml
stable/eXist-1.4.x/nbproject/genfiles.properties
stable/eXist-1.4.x/nbproject/private/private.xml
stable/eXist-1.4.x/nbproject/project.properties
stable/eXist-1.4.x/nbproject/project.xml
stable/eXist-1.4.x/src/org/exist/util/GZIPInputSource.java
stable/eXist-1.4.x/src/org/exist/util/VirtualTempFile.java
Modified: stable/eXist-1.4.x/build/scripts/build-impl.xml
===================================================================
--- stable/eXist-1.4.x/build/scripts/build-impl.xml 2011-01-30 18:26:15 UTC (rev 13701)
+++ stable/eXist-1.4.x/build/scripts/build-impl.xml 2011-01-30 18:44:33 UTC (rev 13702)
@@ -431,7 +431,7 @@
<link href="" rel="nofollow">http://jline.sourceforge.net/javadoc/"/>
<link href="" rel="nofollow">http://logging.apache.org/log4j/1.2/apidocs/"/>
<link href="" rel="nofollow">http://nekohtml.sourceforge.net/javadoc/"/>
- <link href="" rel="nofollow">http://quartz.sourceforge.net/javadoc/"/>
+ <link href="" rel="nofollow">http://www.quartz-scheduler.org/docs/api/1.8.1/"/>
<link href="" rel="nofollow">http://sunxacml.sourceforge.net/javadoc/"/>
<link href="" rel="nofollow">http://ws.apache.org/axis/java/apiDocs/"/>
<link href="" rel="nofollow">http://ws.apache.org/xmlrpc/apidocs/"/>
Modified: stable/eXist-1.4.x/nbproject/build-impl.xml
===================================================================
--- stable/eXist-1.4.x/nbproject/build-impl.xml 2011-01-30 18:26:15 UTC (rev 13701)
+++ stable/eXist-1.4.x/nbproject/build-impl.xml 2011-01-30 18:44:33 UTC (rev 13702)
@@ -1,973 +1,1014 @@
-<?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 xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="eXist-1.4-impl">
- <fail message="Please build using Ant 1.7.1 or higher.">
- <condition>
- <not>
- <antversion atleast="1.7.1"/>
- </not>
- </condition>
- </fail>
- <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
- <!--
- ======================
- INITIALIZATION SECTION
- ======================
- -->
- <target name="-pre-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="-pre-init" name="-init-private">
- <property file="nbproject/private/config.properties"/>
- <property file="nbproject/private/configs/${config}.properties"/>
- <property file="nbproject/private/private.properties"/>
- </target>
- <target depends="-pre-init,-init-private" name="-init-user">
- <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 depends="-pre-init,-init-private,-init-user" name="-init-project">
- <property file="nbproject/configs/${config}.properties"/>
- <property file="nbproject/project.properties"/>
- </target>
- <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
- <available file="${manifest.file}" property="manifest.available"/>
- <available file="${application.splash}" property="splashscreen.available"/>
- <condition property="main.class.available">
- <and>
- <isset property="main.class"/>
- <not>
- <equals arg1="${main.class}" arg2="" trim="true"/>
- </not>
- </and>
- </condition>
- <condition property="manifest.available+main.class">
- <and>
- <isset property="manifest.available"/>
- <isset property="main.class.available"/>
- </and>
- </condition>
- <condition property="do.mkdist">
- <and>
- <isset property="libs.CopyLibs.classpath"/>
- <not>
- <istrue value="${mkdist.disabled}"/>
- </not>
- </and>
- </condition>
- <condition property="manifest.available+main.class+mkdist.available">
- <and>
- <istrue value="${manifest.available+main.class}"/>
- <isset property="do.mkdist"/>
- </and>
- </condition>
- <condition property="manifest.available+main.class+mkdist.available+splashscreen.available">
- <and>
- <istrue value="${manifest.available+main.class+mkdist.available}"/>
- <istrue value="${splashscreen.available}"/>
- </and>
- </condition>
- <condition property="do.archive">
- <not>
- <istrue value="${jar.archive.disabled}"/>
- </not>
- </condition>
- <condition property="do.archive+manifest.available">
- <and>
- <isset property="manifest.available"/>
- <istrue value="${do.archive}"/>
- </and>
- </condition>
- <condition property="do.archive+manifest.available+main.class">
- <and>
- <istrue value="${manifest.available+main.class}"/>
- <istrue value="${do.archive}"/>
- </and>
- </condition>
- <condition property="do.archive+manifest.available+main.class+mkdist.available">
- <and>
- <istrue value="${manifest.available+main.class+mkdist.available}"/>
- <istrue value="${do.archive}"/>
- </and>
- </condition>
- <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available">
- <and>
- <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/>
- <istrue value="${do.archive}"/>
- </and>
- </condition>
- <condition property="have.tests">
- <or>
- <available file="${test.src.dir}"/>
- <available file="${test.eXist-1.32.dir}"/>
- </or>
- </condition>
- <condition property="have.sources">
- <or>
- <available file="${src.dir}"/>
- <available file="${src.src.dir}"/>
- <available file="${src.src2.dir}"/>
- <available file="${src.src3.dir}"/>
- <available file="${src.src4.dir}"/>
- <available file="${src.src5.dir}"/>
- <available file="${eXist-1.33.dir}"/>
- <available file="${src.src6.dir}"/>
- <available file="${eXist-1.32.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">
- <and>
- <isset property="javadoc.preview"/>
- <isfalse value="${javadoc.preview}"/>
- </and>
- </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"/>
- <property name="application.args" value=""/>
- <property name="source.encoding" value="${file.encoding}"/>
- <property name="runtime.encoding" value="${source.encoding}"/>
- <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
- <and>
- <isset property="javadoc.encoding"/>
- <not>
- <equals arg1="${javadoc.encoding}" arg2=""/>
- </not>
- </and>
- </condition>
- <property name="javadoc.encoding.used" value="${source.encoding}"/>
- <property name="includes" value="**"/>
- <property name="excludes" value=""/>
- <property name="do.depend" value="false"/>
- <condition property="do.depend.true">
- <istrue value="${do.depend}"/>
- </condition>
- <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
- <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
- <length length="0" string="${endorsed.classpath}" when="greater"/>
- </condition>
- <property name="javac.fork" value="false"/>
- <property name="jar.index" value="false"/>
- <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
- </target>
- <target name="-post-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
- <fail unless="src.dir">Must set src.dir</fail>
- <fail unless="src.src.dir">Must set src.src.dir</fail>
- <fail unless="src.src2.dir">Must set src.src2.dir</fail>
- <fail unless="src.src3.dir">Must set src.src3.dir</fail>
- <fail unless="src.src4.dir">Must set src.src4.dir</fail>
- <fail unless="src.src5.dir">Must set src.src5.dir</fail>
- <fail unless="eXist-1.33.dir">Must set eXist-1.33.dir</fail>
- <fail unless="src.src6.dir">Must set src.src6.dir</fail>
- <fail unless="eXist-1.32.dir">Must set eXist-1.32.dir</fail>
- <fail unless="test.src.dir">Must set test.src.dir</fail>
- <fail unless="test.eXist-1.32.dir">Must set test.eXist-1.32.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="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- </target>
- <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
- <macrodef name="javac" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${src.dir}:${src.src.dir}:${src.src2.dir}:${src.src3.dir}:${src.src4.dir}:${src.src5.dir}:${eXist-1.33.dir}:${src.src6.dir}:${eXist-1.32.dir}" name="srcdir"/>
- <attribute default="${build.classes.dir}" name="destdir"/>
- <attribute default="${javac.classpath}" name="classpath"/>
- <attribute default="${javac.processorpath}" name="processorpath"/>
- <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
- <attribute default="${includes}" name="includes"/>
- <attribute default="${excludes}" name="excludes"/>
- <attribute default="${javac.debug}" name="debug"/>
- <attribute default="${empty.dir}" name="sourcepath"/>
- <attribute default="${empty.dir}" name="gensrcdir"/>
- <element name="customize" optional="true"/>
- <sequential>
- <property location="${build.dir}/empty" name="empty.dir"/>
- <mkdir dir="${empty.dir}"/>
- <mkdir dir="@{apgeneratedsrcdir}"/>
- <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
- <src>
- <dirset dir="@{gensrcdir}" erroronmissingdir="false">
- <include name="*"/>
- </dirset>
- </src>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
- <compilerarg line="${javac.compilerargs}"/>
- <compilerarg value="-processorpath"/>
- <compilerarg path="@{processorpath}:${empty.dir}"/>
- <compilerarg line="${ap.processors.internal}"/>
- <compilerarg line="${annotation.processing.processor.options}"/>
- <compilerarg value="-s"/>
- <compilerarg path="@{apgeneratedsrcdir}"/>
- <compilerarg line="${ap.proc.none.internal}"/>
- <customize/>
- </javac>
- </sequential>
- </macrodef>
- </target>
- <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
- <macrodef name="javac" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${src.dir}:${src.src.dir}:${src.src2.dir}:${src.src3.dir}:${src.src4.dir}:${src.src5.dir}:${eXist-1.33.dir}:${src.src6.dir}:${eXist-1.32.dir}" name="srcdir"/>
- <attribute default="${build.classes.dir}" name="destdir"/>
- <attribute default="${javac.classpath}" name="classpath"/>
- <attribute default="${javac.processorpath}" name="processorpath"/>
- <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
- <attribute default="${includes}" name="includes"/>
- <attribute default="${excludes}" name="excludes"/>
- <attribute default="${javac.debug}" name="debug"/>
- <attribute default="${empty.dir}" name="sourcepath"/>
- <attribute default="${empty.dir}" name="gensrcdir"/>
- <element name="customize" optional="true"/>
- <sequential>
- <property location="${build.dir}/empty" name="empty.dir"/>
- <mkdir dir="${empty.dir}"/>
- <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
- <src>
- <dirset dir="@{gensrcdir}" erroronmissingdir="false">
- <include name="*"/>
- </dirset>
- </src>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
- <compilerarg line="${javac.compilerargs}"/>
- <customize/>
- </javac>
- </sequential>
- </macrodef>
- </target>
- <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
- <macrodef name="depend" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${src.dir}:${src.src.dir}:${src.src2.dir}:${src.src3.dir}:${src.src4.dir}:${src.src5.dir}:${eXist-1.33.dir}:${src.src6.dir}:${eXist-1.32.dir}" name="srcdir"/>
- <attribute default="${build.classes.dir}" name="destdir"/>
- <attribute default="${javac.classpath}" name="classpath"/>
- <sequential>
- <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- </depend>
- </sequential>
- </macrodef>
- <macrodef name="force-recompile" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${build.classes.dir}" name="destdir"/>
- <sequential>
- <fail unless="javac.includes">Must set javac.includes</fail>
- <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
- <path>
- <filelist dir="@{destdir}" files="${javac.includes}"/>
- </path>
- <globmapper from="*.java" to="*.class"/>
- </pathconvert>
- <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
- <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
- <delete>
- <files includesfile="${javac.includesfile.binary}"/>
- </delete>
- <delete file="${javac.includesfile.binary}"/>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-junit">
- <macrodef name="junit" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${includes}" name="includes"/>
- <attribute default="${excludes}" name="excludes"/>
- <attribute default="**" name="testincludes"/>
- <sequential>
- <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
- <batchtest todir="${build.test.results.dir}">
- <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
- <filename name="@{testincludes}"/>
- </fileset>
- <fileset dir="${test.eXist-1.32.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
- <filename name="@{testincludes}"/>
- </fileset>
- </batchtest>
- <classpath>
- <path path="${run.test.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="test-sys-prop."/>
- <mapper from="test-sys-prop.*" to="*" type="glob"/>
- </syspropertyset>
- <formatter type="brief" usefile="false"/>
- <formatter type="xml"/>
- <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
- <jvmarg line="${run.jvmargs}"/>
- </junit>
- </sequential>
- </macrodef>
- </target>
- <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
- <macrodef name="nbjpdastart" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/1">
- <attribute default="${main.class}" name="name"/>
- <attribute default="${debug.classpath}" name="classpath"/>
- <attribute default="" name="stopclassname"/>
- <sequential>
- <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- </nbjpdastart>
- </sequential>
- </macrodef>
- <macrodef name="nbjpdareload" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/1">
- <attribute default="${build.classes.dir}" name="dir"/>
- <sequential>
- <nbjpdareload>
- <fileset dir="@{dir}" includes="${fix.classes}">
- <include name="${fix.includes}*.class"/>
- </fileset>
- </nbjpdareload>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-debug-args">
- <property name="version-output" value="java version "${ant.java.version}"/>
- <condition property="have-jdk-older-than-1.4">
- <or>
- <contains string="${version-output}" substring="java version "1.0"/>
- <contains string="${version-output}" substring="java version "1.1"/>
- <contains string="${version-output}" substring="java version "1.2"/>
- <contains string="${version-output}" substring="java version "1.3"/>
- </or>
- </condition>
- <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
- <istrue value="${have-jdk-older-than-1.4}"/>
- </condition>
- <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
- <os family="windows"/>
- </condition>
- <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
- <isset property="debug.transport"/>
- </condition>
- </target>
- <target depends="-init-debug-args" name="-init-macrodef-debug">
- <macrodef name="debug" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/3">
- <attribute default="${main.class}" name="classname"/>
- <attribute default="${debug.classpath}" name="classpath"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java classname="@{classname}" dir="${work.dir}" fork="true">
- <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
- <jvmarg line="${debug-args-line}"/>
- <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
- <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
- <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper from="run-sys-prop.*" to="*" type="glob"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-java">
- <macrodef name="java" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/1">
- <attribute default="${main.class}" name="classname"/>
- <attribute default="${run.classpath}" name="classpath"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java classname="@{classname}" dir="${work.dir}" fork="true">
- <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
- <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
- <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper from="run-sys-prop.*" to="*" type="glob"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-copylibs">
- <macrodef name="copylibs" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/3">
- <element name="customize" optional="true"/>
- <sequential>
- <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
- <pathconvert property="run.classpath.without.build.classes.dir">
- <path path="${run.classpath}"/>
- <map from="${build.classes.dir.resolved}" to=""/>
- </pathconvert>
- <pathconvert pathsep=" " property="jar.classpath">
- <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" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
- <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
- <fileset dir="${build.classes.dir}"/>
- <manifest>
- <attribute name="Class-Path" value="${jar.classpath}"/>
- <customize/>
- </manifest>
- </copylibs>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-presetdef-jar">
- <presetdef name="jar" uri="" rel="nofollow">http://www.netbeans.org/ns/j2se-project/1">
- <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
- <j2seproject1:fileset dir="${build.classes.dir}"/>
- </jar>
- </presetdef>
- </target>
- <target name="-init-ap-cmdline-properties">
- <property name="annotation.processing.enabled" value="true"/>
- <property name="annotation.processing.processors.list" value=""/>
- <property name="annotation.processing.processor.options" value=""/>
- <property name="annotation.processing.run.all.processors" value="true"/>
- <property name="javac.processorpath" value="${javac.classpath}"/>
- <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
- <condition property="ap.supported.internal" value="true">
- <not>
- <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
- </not>
- </condition>
- </target>
- <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
- <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
- <isfalse value="${annotation.processing.run.all.processors}"/>
- </condition>
- <condition else="" property="ap.proc.none.internal" value="-proc:none">
- <isfalse value="${annotation.processing.enabled}"/>
- </condition>
- </target>
- <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
- <property name="ap.cmd.line.internal" value=""/>
- </target>
- <target 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,-init-ap-cmdline" name="init"/>
- <!--
- ===================
- COMPILATION SECTION
- ===================
- -->
- <target name="-deps-jar-init" unless="built-jar.properties">
- <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
- <delete file="${built-jar.properties}" quiet="true"/>
- </target>
- <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
- <echo level="warn" message="Cycle detected: eXist-1.4 was already built"/>
- </target>
- <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
- <mkdir dir="${build.dir}"/>
- <touch file="${built-jar.properties}" verbose="false"/>
- <property file="${built-jar.properties}" prefix="already.built.jar."/>
- <antcall target="-warn-already-built-jar"/>
- <propertyfile file="${built-jar.properties}">
- <entry key="${basedir}" value=""/>
- </propertyfile>
- </target>
- <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
- <target depends="init" name="-check-automatic-build">
- <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
- </target>
- <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
- <antcall target="clean"/>
- </target>
- <target depends="init,deps-jar" name="-pre-pre-compile">
- <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 if="do.depend.true" name="-compile-depend">
- <pathconvert property="build.generated.subdirs">
- <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
- <include name="*"/>
- </dirset>
- </pathconvert>
- <j2seproject3:depend srcdir="${src.dir}:${src.src.dir}:${src.src2.dir}:${src.src3.dir}:${src.src4.dir}:${src.src5.dir}:${eXist-1.33.dir}:${src.src6.dir}:${eXist-1.32.dir}:${build.generated.subdirs}"/>
- </target>
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
- <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
- <copy todir="${build.classes.dir}">
- <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${src.src2.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${src.src3.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${src.src4.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${src.src5.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${eXist-1.33.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${src.src6.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${eXist-1.32.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- </copy>
- </target>
- <target if="has.persistence.xml" name="-copy-persistence-xml">
- <mkdir dir="${build.classes.dir}/META-INF"/>
- <copy todir="${build.classes.dir}/META-INF">
- <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
- </copy>
- </target>
- <target name="-post-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
- <target name="-pre-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:force-recompile/>
- <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}:${src.src.dir}:${src.src2.dir}:${src.src3.dir}:${src.src4.dir}:${src.src5.dir}:${eXist-1.33.dir}:${src.src6.dir}:${eXist-1.32.dir}"/>
- </target>
- <target name="-post-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
- <!--
- ====================
- JAR BUILDING SECTION
- ====================
- -->
- <target depends="init" name="-pre-pre-jar">
- <dirname file="${dist.jar}" property="dist.jar.dir"/>
- <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 depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available">
- <j2seproject1:jar/>
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
- <j2seproject1:jar manifest="${manifest.file}"/>
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 location="${build.classes.dir}" name="build.classes.dir.resolved"/>
- <property location="${dist.jar}" name="dist.jar.resolved"/>
- <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 depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen">
- <basename file="${application.splash}" property="splashscreen.basename"/>
- <mkdir dir="${build.classes.dir}/META-INF"/>
- <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
- <j2seproject3:copylibs>
- <customize>
- <attribute name="Main-Class" value="${main.class}"/>
- <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
- </customize>
- </j2seproject3:copylibs>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property location="${dist.jar}" name="dist.jar.resolved"/>
- <echo>java -jar "${dist.jar.resolved}"</echo>
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available">
- <j2seproject3:copylibs>
- <customize>
- <attribute name="Main-Class" value="${main.class}"/>
- </customize>
- </j2seproject3:copylibs>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property location="${dist.jar}" name="dist.jar.resolved"/>
- <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 depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
- <!--
- =================
- EXECUTION SECTION
- =================
- -->
- <target depends="init,compile" description="Run a main class." name="run">
- <j2seproject1:java>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject1:java>
- </target>
- <target name="-do-not-recompile">
- <property name="javac.includes.binary" value=""/>
- </target>
- <target depends="init,compile-single" name="run-single">
- <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
- <j2seproject1:java classname="${run.class}"/>
- </target>
- <target depends="init,compile-test-single" name="run-test-with-main">
- <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
- <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
- </target>
- <!--
- =================
- DEBUGGING SECTION
- =================
- -->
- <target depends="init" if="netbeans.home" name="-debug-start-debugger">
- <j2seproject1:nbjpdastart name="${debug.class}"/>
- </target>
- <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
- <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
- </target>
- <target depends="init,compile" name="-debug-start-debuggee">
- <j2seproject3:debug>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
- <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
- <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
- </target>
- <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
- <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
- <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
- <j2seproject3:debug classname="${debug.class}"/>
- </target>
- <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
- <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
- <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
- <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
- </target>
- <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
- <target depends="init" name="-pre-debug-fix">
- <fail unless="fix.includes">Must set fix.includes</fail>
- <property name="javac.includes" value="${fix.includes}.java"/>
- </target>
- <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
- <j2seproject1:nbjpdareload/>
- </target>
- <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
- <!--
- ===============
- JAVADOC SECTION
- ===============
- -->
- <target depends="init" if="have.sources" name="-javadoc-build">
- <mkdir dir="${dist.javadoc.dir}"/>
- <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
- <classpath>
- <path path="${javac.classpath}"/>
- </classpath>
- <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${src.src2.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${src.src3.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${src.src4.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${src.src5.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${eXist-1.33.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${src.src6.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${eXist-1.32.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
- <include name="**/*.java"/>
- </fileset>
- </javadoc>
- <copy todir="${dist.javadoc.dir}">
- <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${src.src2.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${src.src3.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${src.src4.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${src.src5.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${eXist-1.33.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${src.src6.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${eXist-1.32.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/doc-files/**"/>
- </fileset>
- <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
- <include name="**/doc-files/**"/>
- </fileset>
- </copy>
- </target>
- <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
- <nbbrowse file="${dist.javadoc.dir}/index.html"/>
- </target>
- <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
- <!--
- =========================
- JUNIT COMPILATION SECTION
- =========================
- -->
- <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
- <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 if="do.depend.true" name="-compile-test-depend">
- <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}:${test.eXist-1.32.dir}"/>
- </target>
- <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
- <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}:${test.eXist-1.32.dir}"/>
- <copy todir="${build.test.classes.dir}">
- <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${test.eXist-1.32.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- </copy>
- </target>
- <target name="-post-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="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 depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
- <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}:${test.eXist-1.32.dir}" srcdir="${test.src.dir}:${test.eXist-1.32.dir}"/>
- <copy todir="${build.test.classes.dir}">
- <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- <fileset dir="${test.eXist-1.32.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- </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 depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
- <!--
- =======================
- JUNIT EXECUTION SECTION
- =======================
- -->
- <target depends="init" if="have.tests" name="-pre-test-run">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
- <j2seproject3:junit testincludes="**/*Test.java"/>
- </target>
- <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
- <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
- </target>
- <target depends="init" if="have.tests" name="test-report"/>
- <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
- <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
- <target depends="init" if="have.tests" name="-pre-test-run-single">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
- <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
- <j2seproject3:junit excludes="" includes="${test.includes}"/>
- </target>
- <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
- <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
- </target>
- <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
- <!--
- =======================
- JUNIT DEBUGGING SECTION
- =======================
- -->
- <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
- <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
- <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
- <delete file="${test.report.file}"/>
- <mkdir dir="${build.test.results.dir}"/>
- <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
- <customize>
- <syspropertyset>
- <propertyref prefix="test-sys-prop."/>
- <mapper from="test-sys-prop.*" to="*" type="glob"/>
- </syspropertyset>
- <arg value="${test.class}"/>
- <arg value="showoutput=true"/>
- <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
- <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
- <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
- </target>
- <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
- <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
- <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
- </target>
- <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
- <!--
- =========================
- APPLET EXECUTION SECTION
- =========================
- -->
- <target depends="init,compile-single" name="run-applet">
- <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 depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
- <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 depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
- <!--
- ===============
- CLEANUP SECTION
- ===============
- -->
- <target name="-deps-clean-init" unless="built-clean.properties">
- <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
- <delete file="${built-clean.properties}" quiet="true"/>
- </target>
- <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
- <echo level="warn" message="Cycle detected: eXist-1.4 was already built"/>
- </target>
- <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
- <mkdir dir="${build.dir}"/>
- <touch file="${built-clean.properties}" verbose="false"/>
- <property file="${built-clean.properties}" prefix="already.built.clean."/>
- <antcall target="-warn-already-built-clean"/>
- <propertyfile file="${built-clean.properties}">
- <entry key="${basedir}" value=""/>
- </propertyfile>
- </target>
- <target depends="init" name="-do-clean">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
- </target>
- <target name="-post-clean">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
- <target name="-check-call-dep">
- <property file="${call.built.properties}" prefix="already.built."/>
- <condition property="should.call.dep">
- <not>
- <isset property="already.built.${call.subproject}"/>
- </not>
- </condition>
- </target>
- <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
- <ant antfile="${call.script}" inheritall="false" target="${call.target}">
- <propertyset>
- <propertyref prefix="transfer."/>
- <mapper from="transfer.*" to="*" type="glob"/>
- </propertyset>
- </ant>
- </target>
-</project>
+<?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 xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="eXist-1.4-impl">
+ <fail message="Please build using Ant 1.7.1 or higher.">
+ <condition>
+ <not>
+ <antversion atleast="1.7.1"/>
+ </not>
+ </condition>
+ </fail>
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init" name="-init-private">
+ <property file="nbproject/private/config.properties"/>
+ <property file="nbproject/private/configs/${config}.properties"/>
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private" name="-init-user">
+ <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 depends="-pre-init,-init-private,-init-user" name="-init-project">
+ <property file="nbproject/configs/${config}.properties"/>
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+ <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
+ <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
+ <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>
+ <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>
+ <condition property="platform.javac" value="${platform.home}/bin/javac">
+ <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>
+ </condition>
+ <property name="platform.javac" value="${platform.javac.tmp}"/>
+ <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>
+ <condition property="platform.java" value="${platform.home}/bin/java">
+ <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>
+ </condition>
+ <property name="platform.java" value="${platform.java.tmp}"/>
+ <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>
+ <condition property="platform.javadoc" value="${platform.home}/bin/javadoc">
+ <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>
+ </condition>
+ <property name="platform.javadoc" value="${platform.javadoc.tmp}"/>
+ <condition property="platform.invalid" value="true">
+ <or>
+ <contains string="...
[truncated message content] |
|
From: <di...@us...> - 2011-01-30 18:26:21
|
Revision: 13701
http://exist.svn.sourceforge.net/exist/?rev=13701&view=rev
Author: dizzzz
Date: 2011-01-30 18:26:15 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[bugfix] recent changes did not compile on Java5
Modified Paths:
--------------
stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java
stable/eXist-1.4.x/src/org/exist/storage/NodePath.java
Modified: stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java
===================================================================
--- stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java 2011-01-30 13:34:44 UTC (rev 13700)
+++ stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java 2011-01-30 18:26:15 UTC (rev 13701)
@@ -214,12 +214,12 @@
}
}
- @Override
+ //@Override
public boolean hasNext() {
return (nextConfig != null);
}
- @Override
+ //@Override
public LuceneIndexConfig next() {
if (nextConfig == null)
return null;
@@ -233,7 +233,7 @@
return currentConfig;
}
- @Override
+ //@Override
public void remove() {
//Nothing to do
}
Modified: stable/eXist-1.4.x/src/org/exist/storage/NodePath.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/storage/NodePath.java 2011-01-30 13:34:44 UTC (rev 13700)
+++ stable/eXist-1.4.x/src/org/exist/storage/NodePath.java 2011-01-30 18:26:15 UTC (rev 13701)
@@ -257,7 +257,7 @@
return h;
}
- @Override
+ //s@Override
public int compareTo(NodePath o) {
return toString().compareTo(o.toString()); //TODO: optimize
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-01-30 13:34:50
|
Revision: 13700
http://exist.svn.sourceforge.net/exist/?rev=13700&view=rev
Author: dizzzz
Date: 2011-01-30 13:34:44 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] try-catch is only possible if xquery version='3.0'; is selected. Updated tests.
Note: default value is still 1.0; since "3.0" is just partly supported now.
Modified Paths:
--------------
branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java
branches/adam/eXist-xq3/src/org/exist/xquery/XQueryContext.java
branches/adam/eXist-xq3/src/org/exist/xquery/parser/XQueryTree.g
branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
Modified: branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java
===================================================================
--- branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java 2011-01-30 11:27:26 UTC (rev 13699)
+++ branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java 2011-01-30 13:34:44 UTC (rev 13700)
@@ -27,6 +27,7 @@
import org.apache.log4j.Logger;
import org.exist.dom.QName;
+import org.exist.xquery.ErrorCodes.EXistErrorCode;
import org.exist.xquery.ErrorCodes.ErrorCode;
import org.exist.xquery.util.ExpressionDumper;
@@ -111,8 +112,15 @@
@Override
public Sequence eval(Sequence contextSequence, Item contextItem) throws XPathException {
+
context.expressionStart(this);
+ if(getContext().getXQueryVersion()<30){
+ ErrorCode ec = new EXistErrorCode("EXXQDY0002", "The try-catch expression is supported "
+ + "for xquery version \"3.0\" and later.");
+ throw new XPathException(ec, ec.getDescription(), null);
+ }
+
try {
// Evaluate 'try' expression
Sequence tryTargetSeq = tryTargetExpr.eval(contextSequence, contextItem);
Modified: branches/adam/eXist-xq3/src/org/exist/xquery/XQueryContext.java
===================================================================
--- branches/adam/eXist-xq3/src/org/exist/xquery/XQueryContext.java 2011-01-30 11:27:26 UTC (rev 13699)
+++ branches/adam/eXist-xq3/src/org/exist/xquery/XQueryContext.java 2011-01-30 13:34:44 UTC (rev 13700)
@@ -344,7 +344,9 @@
private DebuggeeJoint debuggeeJoint = null;
+ private int xqueryVersion = 10;
+
// TODO: expath repo manageer, may change
private static ExistRepository _repo = null;
@@ -3589,7 +3591,15 @@
return isVarDeclared( Debuggee.SESSION );
}
+ public void setXQueryVersion(int version) {
+ xqueryVersion=version;
+ }
+ public int getXQueryVersion(){
+ return xqueryVersion;
+ }
+
+
// ====================================================================================
Modified: branches/adam/eXist-xq3/src/org/exist/xquery/parser/XQueryTree.g
===================================================================
--- branches/adam/eXist-xq3/src/org/exist/xquery/parser/XQueryTree.g 2011-01-30 11:27:26 UTC (rev 13699)
+++ branches/adam/eXist-xq3/src/org/exist/xquery/parser/XQueryTree.g 2011-01-30 13:34:44 UTC (rev 13700)
@@ -187,13 +187,12 @@
#(
v:VERSION_DECL
{
- if (v.getText().equals("1.1")) {
- //context.setVersion(11);
- }
- if (v.getText().equals("1.0")) {
- //context.setVersion(10);
+ if (v.getText().equals("3.0")) {
+ context.setXQueryVersion(30);
+ } else if (v.getText().equals("1.0")) {
+ context.setXQueryVersion(10);
} else {
- throw new XPathException(v, "err:XQST0031: Wrong XQuery version: require 1.0 or 1.1");
+ throw new XPathException(v, "err:XQST0031: Wrong XQuery version: require 1.0 or 3.0");
}
}
( enc:STRING_LITERAL )?
Modified: branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
===================================================================
--- branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-30 11:27:26 UTC (rev 13699)
+++ branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-30 13:34:44 UTC (rev 13700)
@@ -5,6 +5,7 @@
import org.exist.test.EmbeddedExistTester;
import org.exist.xquery.ErrorCodes;
+import org.exist.xquery.XPathException;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -41,15 +42,69 @@
}
@Test
- public void simpleCatch() {
+ public void xQuery3_1() {
+ String query = "xquery version '1.0';"
+ + "try { a + 7 } catch * { 1 }";
+ try {
+ ResourceSet results = executeQuery(query);
+ String r = (String) results.getResource(0).getContent();
+
+ assertEquals("1", r);
+ fail("exception expected");
+
+ } catch (Throwable t){
+
+ Throwable cause = t.getCause();
+ if(cause instanceof XPathException){
+ XPathException ex = (XPathException) cause;
+ assertEquals("exerr:EXXQDY0002", ex.getErrorCode().getErrorQName().getStringValue());
+
+ } else {
+ t.printStackTrace();
+ fail(t.getMessage());
+ }
+ }
+
+ }
+
+ @Test // default xquery version
+ public void xQuery3_2() {
+
String query = "try { a + 7 } catch * { 1 }";
try {
ResourceSet results = executeQuery(query);
String r = (String) results.getResource(0).getContent();
assertEquals("1", r);
+ fail("exception expected");
+ } catch (Throwable t){
+
+ Throwable cause = t.getCause();
+ if(cause instanceof XPathException){
+ XPathException ex = (XPathException) cause;
+ assertEquals("exerr:EXXQDY0002", ex.getErrorCode().getErrorQName().getStringValue());
+
+ } else {
+ t.printStackTrace();
+ fail(t.getMessage());
+ }
+ }
+
+ }
+
+ @Test
+ public void simpleCatch() {
+
+ String query = "xquery version '3.0';"
+ + "try { a + 7 } catch * { 1 }";
+ try {
+ ResourceSet results = executeQuery(query);
+ String r = (String) results.getResource(0).getContent();
+
+ assertEquals("1", r);
+
} catch (Throwable ex) {
ex.printStackTrace();
fail(ex.getMessage());
@@ -60,7 +115,8 @@
@Test
public void catchWithCodeAndDescription() {
- String query = "try { a + 7 } "
+ String query = "xquery version '3.0';"
+ + "try { a + 7 } "
+ "catch * ($errcode, $errdesc, $errval) "
+ "{ $errcode, $errdesc } ";
try {
@@ -84,7 +140,8 @@
@Test
public void catchWithError3Matches() {
- String query = "try { a + 7 } "
+ String query = "xquery version '3.0';"
+ + "try { a + 7 } "
+ "catch err:XPDY0001 { 1 }"
+ "catch err:XPDY0002 { 2 }"
+ "catch err:XPDY0003 { 3 }";
@@ -103,7 +160,8 @@
@Test
public void catchWithErrorNoMatches() {
- String query = "try { a + 7 } "
+ String query = "xquery version '3.0';"
+ + "try { a + 7 } "
+ "catch err:XPDY0001 { 1 }"
+ "catch err:XPDY0002 { a }"
+ "catch err:XPDY0003 { 3 }";
@@ -123,7 +181,8 @@
@Test
public void catchWithError5Matches() {
- String query = "try { a + 7 } "
+ String query = "xquery version '3.0';"
+ + "try { a + 7 } "
+ "catch err:XPDY0001 | err:XPDY0003 { 13 }"
+ "catch err:XPDY0002 { 2 }"
+ "catch err:XPDY0004 | err:XPDY0005 { 45 }";
@@ -142,7 +201,8 @@
@Test
public void catchWithError51Matches() {
- String query = "try { a + 7 } "
+ String query = "xquery version '3.0';"
+ + "try { a + 7 } "
+ "catch err:XPDY0001 | * { 13 }"
+ "catch err:XPDY0002 { 2 }"
+ "catch err:XPDY0004 | err:XPDY0005 { 45 }";
@@ -161,7 +221,8 @@
@Test
public void catchFnError3() {
- String query = "try {"
+ String query = "xquery version '3.0';"
+ + "try {"
+ " fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'), 'TEST', <ab/>) "
+ "} catch * ($errcode, $errdesc, $errval) "
+ "{ $errcode, $errdesc, $errval }";
@@ -189,7 +250,8 @@
@Test
public void catchFnError2() {
- String query = "try {"
+ String query = "xquery version '3.0';"
+ + "try {"
+ " fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'), 'TEST') "
+ "} catch * ($errcode, $errdesc) "
+ "{ $errcode, $errdesc }";
@@ -214,7 +276,8 @@
@Test
public void catchFnError2a() {
- String query = "try {"
+ String query = "xquery version '3.0';"
+ + "try {"
+ " fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'), 'TEST') "
+ "} catch * ($errcode, $errdesc, $errval) "
+ "{ $errcode, $errdesc }";
@@ -239,7 +302,8 @@
@Test
public void catchFnError1() {
- String query = "try {"
+ String query = "xquery version '3.0';"
+ + "try {"
+ " fn:error( fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000') ) "
+ "} catch * ($errcode) "
+ "{ $errcode }";
@@ -261,7 +325,8 @@
@Test
public void catchFnError1a() {
- String query = "try {"
+ String query = "xquery version '3.0';"
+ + "try {"
+ " fn:error( fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000') ) "
+ "} catch * ($errcode , $errdescr, $errval) "
+ "{ $errcode }";
@@ -283,7 +348,8 @@
@Test
public void catchFullErrorCode() {
- String query = "try { a + 7 } "
+ String query = "xquery version '3.0';"
+ + "try { a + 7 } "
+ "catch * ($errcode, $errdesc, $errval) "
+ "{ $errcode, $errdesc, empty($errval) } ";
try {
@@ -310,8 +376,8 @@
@Test @Ignore(" <AST>:0:0: unexpected end of subtree") // leave out the <A></A> for fun
public void catchDefinedNamespace() {
- String query =
- "declare namespace foo='http://foo.com'; "
+ String query = "xquery version '3.0';"
+ + "declare namespace foo='http://foo.com'; "
+ "try { "
+ " fn:error(fn:QName('http://foo.com', 'ERRORNAME'), 'ERRORTEXT')"
+ "} "
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-01-30 11:27:32
|
Revision: 13699
http://exist.svn.sourceforge.net/exist/?rev=13699&view=rev
Author: wolfgang_m
Date: 2011-01-30 11:27:26 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[bugfix] Lucene indexing module: fixed use of different analyzers in index definitions and queries. Added more tests. Port of rev 13692, rev 13693.
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=13692&view=rev
http://exist.svn.sourceforge.net/exist/?rev=13693&view=rev
Modified Paths:
--------------
stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java
stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java
stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java
stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml
Added Paths:
-----------
stable/eXist-1.4.x/extensions/indexes/lucene/lib/lucene-analyzers-2.9.2.jar
stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml
stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml
Property Changed:
----------------
stable/eXist-1.4.x/extensions/indexes/lucene/
Property changes on: stable/eXist-1.4.x/extensions/indexes/lucene
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/eXist/extensions/indexes/lucene:10483,11414-11418
+ /trunk/eXist/extensions/indexes/lucene:10483,11414-11418,13632,13692-13693
Copied: stable/eXist-1.4.x/extensions/indexes/lucene/lib/lucene-analyzers-2.9.2.jar (from rev 13693, trunk/eXist/extensions/indexes/lucene/lib/lucene-analyzers-2.9.2.jar)
===================================================================
(Binary files differ)
Modified: stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java
===================================================================
--- stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java 2011-01-30 11:08:48 UTC (rev 13698)
+++ stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java 2011-01-30 11:27:26 UTC (rev 13699)
@@ -27,28 +27,37 @@
public class DefaultTextExtractor extends AbstractTextExtractor {
private int stack = 0;
-
+ private boolean addSpaceBeforeNext = false;
+
public int startElement(QName name) {
if (config.isIgnoredNode(name) || (idxConfig != null && idxConfig.isIgnoredNode(name)))
stack++;
- else if (!(config.isInlineNode(name) || (idxConfig != null && idxConfig.isInlineNode(name)))) {
+ else if (!isInlineNode(name)) {
buffer.append(' ');
return 1;
}
return 0;
}
+ private boolean isInlineNode(QName name) {
+ return (config.isInlineNode(name) || (idxConfig != null && idxConfig.isInlineNode(name)));
+ }
+
public int endElement(QName name) {
if (config.isIgnoredNode(name) || (idxConfig != null && idxConfig.isIgnoredNode(name)))
stack--;
- else if (!(config.isInlineNode(name) || (idxConfig != null && idxConfig.isInlineNode(name)))) {
- buffer.append(' ');
+ else if (!isInlineNode(name)) {
+ addSpaceBeforeNext = true;
return 1;
}
return 0;
}
public int characters(XMLString text) {
+ if (addSpaceBeforeNext) {
+ buffer.append(' ');
+ addSpaceBeforeNext = false;
+ }
if (stack == 0) {
buffer.append(text);
return text.length();
Modified: stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java
===================================================================
--- stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java 2011-01-30 11:08:48 UTC (rev 13698)
+++ stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java 2011-01-30 11:27:26 UTC (rev 13699)
@@ -71,7 +71,7 @@
public Analyzer getAnalyzer(QName qname) {
LuceneIndexConfig idxConf = paths.get(qname);
while (idxConf != null) {
- if (idxConf.getNodePath().match(qname))
+ if (!idxConf.isNamed() && idxConf.getNodePath().match(qname))
break;
idxConf = idxConf.getNext();
}
@@ -88,7 +88,7 @@
throw new RuntimeException();
LuceneIndexConfig idxConf = paths.get(nodePath.getLastComponent());
while (idxConf != null) {
- if (idxConf.getNodePath().match(nodePath))
+ if (!idxConf.isNamed() && idxConf.match(nodePath))
break;
idxConf = idxConf.getNext();
}
@@ -116,6 +116,10 @@
return analyzers.getDefaultAnalyzer();
}
+ public Analyzer getAnalyzerById(String id) {
+ return analyzers.getAnalyzerById(id);
+ }
+
public boolean isInlineNode(QName qname) {
return inlineNodes != null && inlineNodes.contains(qname);
}
Modified: stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java
===================================================================
--- stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java 2011-01-30 11:08:48 UTC (rev 13698)
+++ stable/eXist-1.4.x/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java 2011-01-30 11:27:26 UTC (rev 13699)
@@ -464,6 +464,7 @@
try {
searcher = index.getSearcher();
Analyzer analyzer = getAnalyzer(field, null, context.getBroker(), docs);
+ LOG.debug("Using analyzer " + analyzer + " for " + queryString);
QueryParser parser = new QueryParser(field, analyzer);
setOptions(options, parser);
Query query = parser.parse(queryString);
@@ -881,13 +882,11 @@
NodeId nodeId;
CharSequence text;
QName qname;
- Analyzer analyzer;
LuceneIndexConfig idxConf;
private PendingDoc(NodeId nodeId, QName qname, NodePath path, CharSequence text, LuceneIndexConfig idxConf) {
this.nodeId = nodeId;
this.qname = qname;
- this.analyzer = config.getAnalyzer(path);
this.text = text;
this.idxConf = idxConf;
}
@@ -932,10 +931,11 @@
doc.add(new Field(contentField, pending.text.toString(), Field.Store.NO, Field.Index.ANALYZED,
Field.TermVector.YES));
- if (pending.analyzer == null)
+ if (pending.idxConf.getAnalyzer() == null)
writer.addDocument(doc);
- else
- writer.addDocument(doc, pending.analyzer);
+ else {
+ writer.addDocument(doc, pending.idxConf.getAnalyzer());
+ }
}
} catch (IOException e) {
LOG.warn("An exception was caught while indexing document: " + e.getMessage(), e);
Copied: stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml (from rev 13693, trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml)
===================================================================
--- stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml (rev 0)
+++ stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml 2011-01-30 11:27:26 UTC (rev 13699)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestSet xmlns:stats="" rel="nofollow">http://exist-db.org/xquery/profiling">
+ <testName>Lucene indexing tests</testName>
+ <description>
+ <para>Tests for the Lucene extensions</para>
+ <author>Wolfgang Meier</author>
+ </description>
+ <setup>
+ <create-collection parent="/db/system" name="config"/>
+ <create-collection parent="/db/system/config" name="db"/>
+ <create-collection parent="/db/system/config/db" name="lucene"/>
+ <store collection="/db/system/config/db/lucene" name="collection.xconf">
+ <collection xmlns="" rel="nofollow">http://exist-db.org/collection-config/1.0">
+ <index>
+ <!-- Lucene index is configured below -->
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+ <analyzer id="keyword" class="org.apache.lucene.analysis.KeywordAnalyzer"/>
+ <analyzer id="de" class="org.apache.lucene.analysis.de.GermanAnalyzer"/>
+ <text field="line" qname="l"/>
+ <text qname="l" analyzer="de"/>
+ <text field="lineno" qname="@n" analyzer="keyword"/>
+ </lucene>
+ </index>
+ </collection>
+ </store>
+ <create-collection parent="/db" name="lucene"/>
+ <store collection="/db/lucene" name="text.xml">
+ <text>
+ <body>
+ <lg>
+ <l n="l1.1">Habe nun, ach! Philosophie,</l>
+ <l n="l1.2">Juristerei und Medizin,</l>
+ <l n="l1.3">Und leider auch Theologie</l>
+ <l n="l1.4">Durchaus studiert, mit heißem Bemühn.</l>
+ <l n="l1.5">Da steh ich nun, ich armer Tor!</l>
+ <l n="l1.6">Und bin so klug als wie zuvor;</l>
+ <l n="l1.7">Heiße Magister, heiße Doktor gar</l>
+ <l n="l1.8">Und ziehe schon an die zehen Jahr</l>
+ <l n="l1.9">Herauf, herab und quer und krumm</l>
+ <l n="l1.10">Meine Schüler an der Nase herum –</l>
+ <l n="l1.11">Und sehe, daß wir nichts wissen können!</l>
+ <l n="l1.12">Das will mir schier das Herz verbrennen.</l>
+ </lg>
+ </body>
+ </text>
+ </store>
+ </setup>
+ <tearDown>
+ <remove-collection collection="/db/lucene"/>
+ <remove-document collection="/db/system/config/db/lucene" name="collection.xconf"/>
+ </tearDown>
+ <test output="xml">
+ <task>German Analyzer: standard search</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query(., 'philosophie')]</code>
+ <expected>
+ <l n="l1.1">Habe nun, ach! Philosophie,</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>German Analyzer: stemmed verb</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query(., 'studieren')]</code>
+ <expected>
+ <l n="l1.4">Durchaus studiert, mit heißem Bemühn.</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>German Analyzer: plural finds singular</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query(., 'herzen')]</code>
+ <expected>
+ <l n="l1.12">Das will mir schier das Herz verbrennen.</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Query field with standard analyzer, no match</task>
+ <code>ft:query-field("line", "herzen")</code>
+ <expected/>
+ </test>
+ <test output="xml">
+ <task>Query field with standard analyzer and without context</task>
+ <code>ft:query-field("line", 'klug')</code>
+ <expected>
+ <l n="l1.6">Und bin so klug als wie zuvor;</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Query field with keyword analyzer, no match</task>
+ <code>ft:query-field("lineno", "10")</code>
+ <expected/>
+ </test>
+ <test output="xml">
+ <task>Query field with keyword analyzer and without context</task>
+ <code><![CDATA[ft:query-field("lineno", "l1.10")/..]]></code>
+ <expected>
+ <l n="l1.10">Meine Schüler an der Nase herum –</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Query field with keyword analyzer and context</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query-field("lineno", "l1.10")]</code>
+ <expected>
+ <l n="l1.10">Meine Schüler an der Nase herum –</l>
+ </expected>
+ </test>
+</TestSet>
\ No newline at end of file
Copied: stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml (from rev 13693, trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml)
===================================================================
--- stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml (rev 0)
+++ stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml 2011-01-30 11:27:26 UTC (rev 13699)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestSet xmlns:stats="" rel="nofollow">http://exist-db.org/xquery/profiling">
+ <testName>Lucene indexing tests</testName>
+ <description>
+ <para>Tests for the Lucene extensions</para>
+ <author>Wolfgang Meier</author>
+ </description>
+ <setup>
+ <create-collection parent="/db/system" name="config"/>
+ <create-collection parent="/db/system/config" name="db"/>
+ <create-collection parent="/db/system/config/db" name="lucene"/>
+ <store collection="/db/system/config/db/lucene" name="collection.xconf">
+ <collection xmlns="" rel="nofollow">http://exist-db.org/collection-config/1.0">
+ <index>
+ <!-- Lucene index is configured below -->
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+ <text qname="size"/>
+ <text qname="p">
+ <inline qname="b"/>
+ <ignore qname="note"/>
+ </text>
+ </lucene>
+ </index>
+ </collection>
+ </store>
+ <create-collection parent="/db" name="lucene"/>
+ <store collection="/db/lucene" name="text.xml">
+ <root>
+ <size><width>12</width><height>8</height></size>
+ <p>This is <b>un</b>clear.</p>
+ <p>This is a paragraph<note>containing an inline note</note>.</p>
+ </root>
+ </store>
+ </setup>
+ <tearDown>
+ <remove-collection collection="/db/lucene"/>
+ <remove-document collection="/db/system/config/db/lucene" name="collection.xconf"/>
+ </tearDown>
+ <test output="xml">
+ <task>Default processing</task>
+ <code>doc("/db/lucene/text.xml")//size[ft:query(., '12')]</code>
+ <expected>
+ <size><width>12</width><height>8</height></size>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Inline node</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'unclear')]</code>
+ <expected>
+ <p>This is <b>un</b>clear.</p>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Inline node: no match</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'clear')]</code>
+ <expected/>
+ </test>
+ <test output="xml">
+ <task>Ignored node: match outside</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'paragraph')]</code>
+ <expected>
+ <p>This is a paragraph<note>containing an inline note</note>.</p>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Ignored node: no match</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'inline')]</code>
+ <expected/>
+ </test>
+</TestSet>
\ No newline at end of file
Modified: stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml
===================================================================
--- stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml 2011-01-30 11:08:48 UTC (rev 13698)
+++ stable/eXist-1.4.x/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml 2011-01-30 11:27:26 UTC (rev 13699)
@@ -881,13 +881,13 @@
</test>
<test output="xml">
<task>Fields: keyword analyzer</task>
- <code>doc("/db/lucene/text1.xml")/test[ft:query-field("id", "a11")]/id</code>
+ <code>doc("/db/lucene/text1.xml")/test[ft:query-field("id", "A11")]/id</code>
<expected><id>A11</id></expected>
</test>
<test output="xml">
<task>Fields: keyword analyzer, XML syntax</task>
<code><![CDATA[
- let $query := <query><term>a11</term></query>
+ let $query := <query><term>A11</term></query>
return
doc("/db/lucene/text1.xml")/test[ft:query-field("id", $query)]/id
]]></code>
@@ -895,7 +895,7 @@
</test>
<test output="xml">
<task>Fields: keyword analyzer, no context</task>
- <code>ft:query-field("id", "a11")</code>
+ <code>ft:query-field("id", "A11")</code>
<expected><id>A11</id></expected>
</test>
<!--test output="xml">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-01-30 11:08:54
|
Revision: 13698
http://exist.svn.sourceforge.net/exist/?rev=13698&view=rev
Author: dizzzz
Date: 2011-01-30 11:08:48 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] changed mime-type
Property Changed:
----------------
trunk/eXist/src/org/exist/start/start.config
Property changes on: trunk/eXist/src/org/exist/start/start.config
___________________________________________________________________
Added: svn:mime-type
+ text/plain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-01-30 10:57:12
|
Revision: 13697
http://exist.svn.sourceforge.net/exist/?rev=13697&view=rev
Author: dizzzz
Date: 2011-01-30 10:57:06 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] an attempt to get fix the namespace issue. an AST issue remains..... LJO, please help?
Modified Paths:
--------------
branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java
branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
Modified: branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java
===================================================================
--- branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java 2011-01-30 06:58:16 UTC (rev 13696)
+++ branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java 2011-01-30 10:57:06 UTC (rev 13697)
@@ -111,6 +111,14 @@
// and construct error code
if (!args[0].isEmpty()) {
QName errorQName = ((QNameValue) args[0].itemAt(0)).getQName();
+
+// String prefix = errorQName.getPrefix();
+// if(prefix==null){
+// String ns = errorQName.getNamespaceURI();
+// prefix = getContext().getInScopePrefix(ns);
+// errorQName.setPrefix(prefix);
+// }
+
errorCode = new ErrorCode(errorQName, errorDesc);
}
Modified: branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
===================================================================
--- branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-30 06:58:16 UTC (rev 13696)
+++ branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-30 10:57:06 UTC (rev 13697)
@@ -312,11 +312,11 @@
String query =
"declare namespace foo='http://foo.com'; "
- + "<A>try { "
- + " fn:error(fn:QName('http://foo.com', 'ValueToBig'), 'Value too big')"
- + "}"
- + "catch foo:ValueToBig { good }"
- + "catch * { wrong }</A>";
+ + "try { "
+ + " fn:error(fn:QName('http://foo.com', 'ERRORNAME'), 'ERRORTEXT')"
+ + "} "
+ + "catch foo:ERRORNAME { good } "
+ + "catch * { wrong } ";
try {
ResourceSet results = executeQuery(query);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sha...@us...> - 2011-01-30 06:58:24
|
Revision: 13696
http://exist.svn.sourceforge.net/exist/?rev=13696&view=rev
Author: shabanovd
Date: 2011-01-30 06:58:16 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[feature] group's managers
Modified Paths:
--------------
trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPGroupImpl.java
trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPRealm.java
trunk/eXist/extensions/security/openid/src/org/exist/security/realm/openid/OpenIDRealm.java
trunk/eXist/src/org/exist/security/AbstractAccount.java
trunk/eXist/src/org/exist/security/AbstractGroup.java
trunk/eXist/src/org/exist/security/AbstractRealm.java
trunk/eXist/src/org/exist/security/AbstractSubject.java
trunk/eXist/src/org/exist/security/Account.java
trunk/eXist/src/org/exist/security/Group.java
trunk/eXist/src/org/exist/security/SecurityManager.java
trunk/eXist/src/org/exist/security/User.java
trunk/eXist/src/org/exist/security/internal/GroupImpl.java
trunk/eXist/src/org/exist/security/internal/RealmImpl.java
trunk/eXist/src/org/exist/security/internal/SecurityManagerImpl.java
trunk/eXist/src/org/exist/security/internal/aider/GroupAider.java
trunk/eXist/src/org/exist/security/management/GroupsManagement.java
trunk/eXist/src/org/exist/security/utils/ConverterFrom1_0.java
trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java
Modified: trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPGroupImpl.java
===================================================================
--- trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPGroupImpl.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPGroupImpl.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -18,7 +18,7 @@
}
public LDAPGroupImpl(AbstractRealm realm, int id, String name) throws ConfigurationException {
- super(realm, id, name);
+ super(realm, id, name, null);
}
LDAPGroupImpl(AbstractRealm realm, Configuration config, boolean removed) throws ConfigurationException {
Modified: trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPRealm.java
===================================================================
--- trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPRealm.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/extensions/security/ldap/src/org/exist/security/realm/ldap/LDAPRealm.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -372,13 +372,13 @@
@Override
public boolean deleteAccount(Subject invokingUser, Account account) throws PermissionDeniedException, EXistException {
- // TODO Auto-generated method stub
+ // TODO we dont support writting to LDAP
return false;
}
@Override
- public boolean updateGroup(Group group) throws PermissionDeniedException, EXistException {
- // TODO Auto-generated method stub
+ public boolean updateGroup(Subject invokingUser, Group group) throws PermissionDeniedException, EXistException {
+ // TODO we dont support writting to LDAP
return false;
}
Modified: trunk/eXist/extensions/security/openid/src/org/exist/security/realm/openid/OpenIDRealm.java
===================================================================
--- trunk/eXist/extensions/security/openid/src/org/exist/security/realm/openid/OpenIDRealm.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/extensions/security/openid/src/org/exist/security/realm/openid/OpenIDRealm.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -89,7 +89,7 @@
}
@Override
- public boolean updateGroup(Group group) throws PermissionDeniedException, EXistException, ConfigurationException {
+ public boolean updateGroup(Subject invokingUser, Group group) throws PermissionDeniedException, EXistException, ConfigurationException {
return false;
}
Modified: trunk/eXist/src/org/exist/security/AbstractAccount.java
===================================================================
--- trunk/eXist/src/org/exist/security/AbstractAccount.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/AbstractAccount.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -80,20 +80,20 @@
}
- public boolean checkCredentials(Object credentials) {
- return _cred == null ? false : _cred.check(credentials);
- }
+ public boolean checkCredentials(Object credentials) {
+ return _cred == null ? false : _cred.check(credentials);
+ }
@Override
public Group addGroup(String name) throws PermissionDeniedException {
- Group group = getRealm().getGroup(null, name);
+ Group group = getRealm().getGroup(null, name);
- //if we cant find the group in our own realm, try the default realm
- if(group == null) {
- Realm internalRealm = getRealm().getSecurityManager().getRealm(RealmImpl.ID);
- group = internalRealm.getGroup(null, name);
- }
- return addGroup(group);
+ //if we cant find the group in our own realm, try the default realm
+ if(group == null) {
+ Realm internalRealm = getRealm().getSecurityManager().getRealm(RealmImpl.ID);
+ group = internalRealm.getGroup(null, name);
+ }
+ return addGroup(group);
}
//this method used by Configurator
@@ -105,20 +105,57 @@
return addGroup(name);
}
+
+ @Override
+ public Group addGroup(Group group) throws PermissionDeniedException {
+
+ if(group == null){
+ return null;
+ }
+
+ Account user = getDatabase().getSubject();
+ //TODO change once membersManbager is implemented correctly
+ if(!((user != null && user.hasDbaRole()) || group.isManager(user))){
+ //if(!((user != null && user.hasDbaRole()) || user.hasGroup(group.getName()))){
+ throw new PermissionDeniedException("User '" + user.getName() + "' is not allowed to change group '" + group.getName() + "' memberships");
+ }
+
+ if(!groups.contains(group)) {
+ groups.add(group);
+
+ if(SecurityManager.DBA_GROUP.equals(name)) {
+ hasDbaRole = true;
+ }
+ }
+
+ return group;
+ }
@Override
- public final void remGroup(String name) {
- for (Group group : groups) {
- if (group.getName().equals(name)) {
- groups.remove(group);
- break;
- }
- }
+ public final void remGroup(String name) throws PermissionDeniedException {
- if (SecurityManager.DBA_GROUP.equals(name))
- hasDbaRole = false;
- }
+ for (Group group : groups) {
+ if (group.getName().equals(name)) {
+
+ Account user = getDatabase().getSubject();
+ //TODO change once membersManbager is implemented correctly
+ if(!((user != null && user.hasDbaRole()) || group.isManager(user))){
+ //if(!((user != null && user.hasDbaRole()) || user.hasGroup(group.getName()))){
+ throw new PermissionDeniedException("User '" + user.getName() + "' is not allowed to change group '" + group.getName() + "' memberships");
+ }
+
+ //remove from the group
+ groups.remove(group);
+ break;
+ }
+ }
+
+ if(SecurityManager.DBA_GROUP.equals(name)){
+ hasDbaRole = false;
+ }
+ }
+
@Override
public final void setGroups(String[] groups) {
// this.groups = groups;
@@ -143,12 +180,14 @@
@Override
public final boolean hasGroup(String name) {
- if (groups == null)
+ if (groups == null) {
return false;
+ }
for (Group group : groups) {
- if (group.getName().equals(name))
+ if (group.getName().equals(name)) {
return true;
+ }
}
return false;
@@ -255,33 +294,6 @@
}
@Override
- public Group addGroup(Group group) throws PermissionDeniedException {
-
- if(group == null){
- return null;
- }
-
- Account user = getDatabase().getSubject();
-
-
- //TODO change once membersManbager is implemented correctly
- //if(!((user != null && user.hasDbaRole()) || group.isMembersManager(user))){
- if(!((user != null && user.hasDbaRole()) || user.hasGroup(group.getName()))){
- throw new PermissionDeniedException("User '" + user.getName() + "' is not allowed to change group '" + group.getName() + "' memberships");
- }
-
- if(!groups.contains(group)) {
- groups.add(group);
-
- if(SecurityManager.DBA_GROUP.equals(name)) {
- hasDbaRole = true;
- }
- }
-
- return group;
- }
-
- @Override
public String getMetadataValue(AXSchemaType axSchemaType) {
return metadata.get(axSchemaType.getNamespace());
}
Modified: trunk/eXist/src/org/exist/security/AbstractGroup.java
===================================================================
--- trunk/eXist/src/org/exist/security/AbstractGroup.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/AbstractGroup.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -22,24 +22,34 @@
package org.exist.security;
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
import org.exist.config.Configuration;
import org.exist.config.ConfigurationException;
import org.exist.config.Configurator;
+import org.exist.config.Reference;
+import org.exist.config.ReferenceImpl;
import org.exist.config.annotation.ConfigurationClass;
import org.exist.config.annotation.ConfigurationFieldAsElement;
+import org.exist.config.annotation.ConfigurationReferenceBy;
import org.exist.security.internal.GroupImpl;
@ConfigurationClass("")
public abstract class AbstractGroup extends AbstractPrincipal implements Comparable<Object>, Group {
- @ConfigurationFieldAsElement("members-manager")
- private Set<Account> membersManagers = new HashSet<Account>();
+ @ConfigurationFieldAsElement("manager")
+ @ConfigurationReferenceBy("name")
+ private List<Reference<SecurityManager, Account>> managers =
+ new ArrayList<Reference<SecurityManager, Account>>();
- public AbstractGroup(AbstractRealm realm, int id, String name) throws ConfigurationException {
+ public AbstractGroup(AbstractRealm realm, int id, String name, List<Account> managers) throws ConfigurationException {
super(realm, realm.collectionGroups, id, name);
+
+ if (managers != null)
+ for (Account manager : managers) {
+ _addManager(manager);
+ }
}
public AbstractGroup(AbstractRealm realm, String name) throws ConfigurationException {
@@ -70,12 +80,98 @@
buf.append(name);
buf.append("\" id=\"");
buf.append(Integer.toString(id));
- buf.append("\"/>");
+ buf.append("\">");
+ for(Account manager : getManagers()) {
+ buf.append("<manager name=\"" + manager.getUsername() + "\"/>");
+ }
+ buf.append("</group>");
return buf.toString();
}
@Override
- public boolean isMembersManager(Account account) {
- return membersManagers.contains(account);
+ public boolean isManager(Account account) {
+ for (Reference<SecurityManager, Account> manager : managers) {
+ if (manager.resolve().equals(account.getName()))
+ return true;
+ }
+ return false;
}
+
+ private void _addManager(Account account) {
+ if(!managers.contains(account.getName())) {
+ managers.add(
+ new ReferenceImpl<SecurityManager, Account>(
+ getRealm().getSecurityManager(),
+ account
+ )
+ );
+ }
+ }
+
+ @Override
+ public void addManager(Account manager) throws PermissionDeniedException {
+ Subject subject = getDatabase().getSubject();
+ if(!(isManager(subject) || subject.hasDbaRole())) {
+ throw new PermissionDeniedException("Only existing managers or DBA's may add a new manager to a group");
+ }
+
+ _addManager(manager);
+ }
+
+ @Override
+ public void addManagers(List<Account> managers) throws PermissionDeniedException {
+ if (managers != null)
+ for (Account manager : managers) {
+ addManager(manager);
+ }
+ }
+
+ public void addManager(String name) throws PermissionDeniedException {
+ Subject user = getDatabase().getSubject();
+ if(!isManager(user) && !user.hasDbaRole()) {
+ throw new PermissionDeniedException("Only existing managers or DBA's may add a new manager to a group");
+ }
+
+ for(Reference<SecurityManager, Account> ref : managers) {
+ if(ref.resolve().getName().equals(name)) {
+ return;
+ }
+ }
+
+ managers.add(
+ new ReferenceImpl<SecurityManager, Account>(
+ getRealm().getSecurityManager(),
+ "getAccount",
+ name
+ )
+ );
+ }
+
+ @Override
+ public List<Account> getManagers() {
+
+ List<Account> list = new ArrayList<Account>(managers.size());
+
+ for (Reference<SecurityManager, Account> ref : managers) {
+ list.add(ref.resolve());
+ }
+
+ return list;
+ }
+
+ @Override
+ public void removeManager(Account account) throws PermissionDeniedException {
+
+ Account user = getDatabase().getSubject();
+ if(!isManager(user) && !user.hasDbaRole()) {
+ throw new PermissionDeniedException("Only existing managers or DBA's may remove another manager from a group");
+ }
+
+ for(Reference<SecurityManager, Account> ref : managers) {
+ if(ref.resolve().getName().equals(account.getName())) {
+ managers.remove(ref);
+ break;
+ }
+ }
+ }
}
\ No newline at end of file
Modified: trunk/eXist/src/org/exist/security/AbstractRealm.java
===================================================================
--- trunk/eXist/src/org/exist/security/AbstractRealm.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/AbstractRealm.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import org.exist.Database;
@@ -279,11 +280,11 @@
return collectionRealm;
}
- private Group _addGroup(String name) throws ConfigurationException {
+ private Group _addGroup(String name, List<Account> managers) throws ConfigurationException {
if (groupsByName.containsKey(name))
throw new IllegalArgumentException("Group "+name+" exist.");
- Group group = new GroupImpl(this, sm.getNextGroupId(), name);
+ Group group = new GroupImpl(this, sm.getNextGroupId(), name, managers);
// Group group = instantiateGroup(this, getSecurityManager().getNextGroupId(), name);
getSecurityManager().addGroup(group.getId(), group);
groupsByName.put(name, group);
@@ -291,23 +292,23 @@
return group;
}
- private Group _addGroup(int id, String name) throws ConfigurationException {
+ private Group _addGroup(int id, String name, List<Account> managers) throws ConfigurationException {
if (groupsByName.containsKey(name))
throw new IllegalArgumentException("Group "+name+" exist.");
if (getSecurityManager().hasGroup(id))
throw new IllegalArgumentException("Group id "+id+" allready used.");
- Group group = new GroupImpl(this, id, name);
-// G group = instantiateGroup(this, id, name);
+ Group group = new GroupImpl(this, id, name, managers);
+// G group = instantiateGroup(this, id, name, managers);
getSecurityManager().addGroup(id, group);
groupsByName.put(name, group);
return group;
}
- public synchronized Group addGroup(String name) throws PermissionDeniedException, EXistException {
- Group created_group = _addGroup(name);
+ public synchronized Group addGroup(String name, List<Account> managers) throws PermissionDeniedException, EXistException {
+ Group created_group = _addGroup(name, managers);
((AbstractPrincipal)created_group).save();
@@ -316,7 +317,7 @@
@Override
public synchronized Group addGroup(Group group) throws PermissionDeniedException, EXistException {
- return addGroup(group.getName());
+ return addGroup(group.getName(), group.getManagers());
}
@Override
@@ -357,13 +358,10 @@
//check: remove account from group
groups = updatingAccount.getGroups();
for (int i = 0; i < groups.length; i++) {
- if (!(account.hasGroup(groups[i]))) {
- if ( !user.hasDbaRole() )
- throw new PermissionDeniedException(
- "not allowed to change group memberships");
- updatingAccount.remGroup(groups[i]);
- }
+ if(!(account.hasGroup(groups[i]))) {
+ updatingAccount.remGroup(groups[i]);
+ }
}
updatingAccount.setPassword(account.getPassword());
@@ -372,11 +370,54 @@
return true;
} finally {
- getDatabase().release(broker);
+ if(broker != null) {
+ getDatabase().release(broker);
+ }
}
}
@Override
+ public synchronized boolean updateGroup(Subject invokingUser, Group group) throws PermissionDeniedException, EXistException {
+
+ DBBroker broker = null;
+ try {
+ broker = getDatabase().get(null);
+ Account user = broker.getUser();
+
+ if(!(group.isManager(user) || user.hasDbaRole()) ) {
+ throw new PermissionDeniedException(" you are not allowed to change '" + group.getName() + "' group");
+ }
+
+ Group updatingGroup = getGroup(invokingUser, group.getName());
+ if(updatingGroup == null) {
+ throw new PermissionDeniedException("group " + group.getName() + " does not exist");
+ }
+
+ //check: add account to group
+ for(Account manager : group.getManagers()) {
+ if(!updatingGroup.isManager(manager)) {
+ updatingGroup.addManager(manager);
+ }
+ }
+
+ //check: remove account from group
+ for(Account manager : updatingGroup.getManagers()){
+ if(!group.isManager(manager)) {
+ updatingGroup.removeManager(manager);
+ }
+ }
+
+ group.save();
+
+ return true;
+ } finally {
+ if(broker != null) {
+ getDatabase().release(broker);
+ }
+ }
+ }
+
+ @Override
public Group getExternalGroup(Subject invokingUser, String name) {
return getSecurityManager().getGroup(invokingUser, name);
}
Modified: trunk/eXist/src/org/exist/security/AbstractSubject.java
===================================================================
--- trunk/eXist/src/org/exist/security/AbstractSubject.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/AbstractSubject.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -60,7 +60,7 @@
* @see org.exist.security.User#remGroup(java.lang.String)
*/
@Override
- public void remGroup(String group) {
+ public void remGroup(String group) throws PermissionDeniedException {
account.remGroup(group);
}
Modified: trunk/eXist/src/org/exist/security/Account.java
===================================================================
--- trunk/eXist/src/org/exist/security/Account.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/Account.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -57,7 +57,7 @@
*@param group The feature to be removed to the Group attribute
*/
@Override
- public void remGroup(String group);
+ public void remGroup(String group) throws PermissionDeniedException;
/**
* Get all groups this user belongs to
Modified: trunk/eXist/src/org/exist/security/Group.java
===================================================================
--- trunk/eXist/src/org/exist/security/Group.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/Group.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -21,8 +21,18 @@
*/
package org.exist.security;
+import java.util.List;
+
public interface Group extends Principal {
- boolean isMembersManager(Account account);
+ public boolean isManager(Account account);
+ public void addManager(Account account) throws PermissionDeniedException;
+
+ public void addManagers(List<Account> managers) throws PermissionDeniedException;
+
+ public List<Account> getManagers() throws PermissionDeniedException;
+
+ public void removeManager(Account account) throws PermissionDeniedException;
+
}
\ No newline at end of file
Modified: trunk/eXist/src/org/exist/security/SecurityManager.java
===================================================================
--- trunk/eXist/src/org/exist/security/SecurityManager.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/SecurityManager.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -39,10 +39,6 @@
* There's only one SecurityManager for each database instance, which
* may be obtained by {@link BrokerPool#getSecurityManager()}.
*
- * Users and groups are stored in the system collection, in document
- * users.xml. While it is possible to edit this file by hand, it
- * may lead to unexpected results, since SecurityManager reads
- * users.xml only during database startup and shutdown.
*/
public interface SecurityManager extends Configurable {
@@ -81,6 +77,8 @@
<A extends Account> boolean updateAccount(Subject invokingUser, A account) throws PermissionDeniedException, EXistException, ConfigurationException;
+ <G extends Group> boolean updateGroup(Subject invokingUser, G group) throws PermissionDeniedException, EXistException, ConfigurationException;
+
Account getAccount(Subject invokingUser, String name);
<G extends Group> G addGroup(Group group) throws PermissionDeniedException, EXistException, ConfigurationException;
Modified: trunk/eXist/src/org/exist/security/User.java
===================================================================
--- trunk/eXist/src/org/exist/security/User.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/User.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -21,8 +21,6 @@
*/
package org.exist.security;
-import java.util.Set;
-
import org.exist.security.realm.Realm;
import org.exist.xmldb.XmldbURI;
@@ -53,7 +51,7 @@
*
*@param group The feature to be removed to the Group attribute
*/
- public void remGroup(String group);
+ public void remGroup(String group) throws PermissionDeniedException;
/**
* Get all groups this user belongs to
Modified: trunk/eXist/src/org/exist/security/internal/GroupImpl.java
===================================================================
--- trunk/eXist/src/org/exist/security/internal/GroupImpl.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/internal/GroupImpl.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -21,8 +21,11 @@
*/
package org.exist.security.internal;
+import java.util.List;
+
import org.exist.security.AbstractRealm;
import org.exist.security.AbstractGroup;
+import org.exist.security.Account;
import org.exist.config.Configuration;
import org.exist.config.ConfigurationException;
import org.exist.config.annotation.ConfigurationClass;
@@ -34,16 +37,22 @@
super(realm, configuration);
}
- public GroupImpl(AbstractRealm realm, int id, String name) throws ConfigurationException {
- super(realm, id, name);
- }
-
GroupImpl(AbstractRealm realm, Configuration configuration, boolean removed) throws ConfigurationException {
super(realm, configuration);
this.removed = removed;
}
+ public GroupImpl(AbstractRealm realm, int id, String name) throws ConfigurationException {
+ this(realm, id, name, null);
+ }
+
+ public GroupImpl(AbstractRealm realm, int id, String name, List<Account> managers) throws ConfigurationException {
+ super(realm, id, name, managers);
+ }
+
GroupImpl(AbstractRealm realm, String name) throws ConfigurationException {
super(realm, name);
}
+
+
}
\ No newline at end of file
Modified: trunk/eXist/src/org/exist/security/internal/RealmImpl.java
===================================================================
--- trunk/eXist/src/org/exist/security/internal/RealmImpl.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/internal/RealmImpl.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.exist.security.AbstractAccount;
@@ -64,7 +65,7 @@
protected final GroupImpl GROUP_DBA;
protected final GroupImpl GROUP_GUEST;
- protected final AccountImpl ACCOUNT_UNKNOW;
+ protected final AccountImpl ACCOUNT_UNKNOWN;
protected final GroupImpl GROUP_UNKNOWN;
protected RealmImpl(SecurityManagerImpl sm, Configuration config) throws ConfigurationException { //, Configuration conf
@@ -73,7 +74,7 @@
//Build-in accounts
GROUP_UNKNOWN = new GroupImpl(this, -1, "");
- ACCOUNT_UNKNOW = new AccountImpl(this, -1, "", (String)null, GROUP_UNKNOWN);
+ ACCOUNT_UNKNOWN = new AccountImpl(this, -1, "", (String)null, GROUP_UNKNOWN);
//DBA group & account
GROUP_DBA = new GroupImpl(this, 1, SecurityManager.DBA_GROUP);
@@ -98,7 +99,7 @@
ACCOUNT_GUEST = new AccountImpl(this, 2, SecurityManager.GUEST_USER, SecurityManager.GUEST_USER, GROUP_GUEST);
sm.usersById.put(ACCOUNT_GUEST.getId(), ACCOUNT_GUEST);
usersByName.put(ACCOUNT_GUEST.getName(), ACCOUNT_GUEST);
-
+
sm.lastUserId = 3;
sm.lastGroupId = 3;
}
@@ -160,12 +161,6 @@
}
@Override
- public synchronized boolean updateGroup(Group group) throws PermissionDeniedException {
- //nothing to do: the name or id can't be changed
- return false;
- }
-
- @Override
public synchronized boolean deleteGroup(Group group) throws PermissionDeniedException, EXistException {
if(group == null)
return false;
@@ -219,6 +214,11 @@
AuthenticationException.ACCOUNT_NOT_FOUND,
"Acount '" + accountName + "' not found");
+ if ("SYSTEM".equals(accountName))
+ throw new AuthenticationException(
+ AuthenticationException.ACCOUNT_NOT_FOUND,
+ "Acount '" + accountName + "' can not be used");
+
Subject newUser = new SubjectImpl((AccountImpl) user, credentials);
if (newUser.isAuthenticated()) {
Modified: trunk/eXist/src/org/exist/security/internal/SecurityManagerImpl.java
===================================================================
--- trunk/eXist/src/org/exist/security/internal/SecurityManagerImpl.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/internal/SecurityManagerImpl.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -215,6 +215,22 @@
}
@Override
+ public synchronized <G extends Group> boolean updateGroup(Subject invokingUser, G group) throws PermissionDeniedException, EXistException {
+ if(group == null){
+ return false;
+ }
+
+ if(group.getRealmId() == null) {
+ throw new ConfigurationException("Group must have realm id.");
+ }
+
+ Realm registeredRealm = findRealmForRealmId(group.getRealmId());
+
+ return registeredRealm.updateGroup(invokingUser, group);
+ }
+
+
+ @Override
public synchronized void deleteGroup(Subject invokingUser, String name) throws PermissionDeniedException, EXistException {
Group group = getGroup(invokingUser, name);
@@ -252,6 +268,10 @@
registeredRealm.deleteAccount(invokingUser, account);
}
+ public Account getAccount(String name) {
+ return getAccount(null, name);
+ }
+
@Override
public synchronized Account getAccount(Subject invokingUser, String name) {
for (Realm realm : realms) {
@@ -347,8 +367,8 @@
for (Realm realm : realms) {
- if (LOG.isDebugEnabled())
- LOG.debug("authenticating '"+username+"' with realm '"+realm.getId()+"'...");
+ //if (LOG.isDebugEnabled())
+ // LOG.debug("authenticating '"+username+"' with realm '"+realm.getId()+"'...");
try {
return realm.authenticate(username, credentials);
@@ -372,12 +392,12 @@
@Override
public Subject getSystemSubject() {
- return new SubjectImpl((AccountImpl) defaultRealm.ACCOUNT_SYSTEM, "");
+ return new SubjectAccreditedImpl((AccountImpl) defaultRealm.ACCOUNT_SYSTEM, this);
}
@Override
public Subject getGuestSubject() {
- return new SubjectImpl((AccountImpl) defaultRealm.ACCOUNT_GUEST, "");
+ return new SubjectAccreditedImpl((AccountImpl) defaultRealm.ACCOUNT_GUEST, this);
}
@Override
Modified: trunk/eXist/src/org/exist/security/internal/aider/GroupAider.java
===================================================================
--- trunk/eXist/src/org/exist/security/internal/aider/GroupAider.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/internal/aider/GroupAider.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -21,7 +21,8 @@
*/
package org.exist.security.internal.aider;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
import org.exist.config.Configuration;
import org.exist.security.Account;
@@ -40,7 +41,7 @@
private String name;
private int id;
- private Set<Account> membersManagers;
+ private List<Account> managers = new ArrayList<Account>();
public GroupAider(int id) {
this(id, null, null);
@@ -100,15 +101,46 @@
}
@Override
- public boolean isMembersManager(Account account) {
- throw new UnsupportedOperationException("Not supported yet.");
+ public boolean isManager(Account account) {
+ for(Account manager : managers) {
+ if(manager.getName().equals(account.getName())) {
+ return true;
+ }
+ }
+ return false;
}
@Override
- public Realm getRealm() {
- throw new UnsupportedOperationException("Not supported yet.");
+ public void addManager(Account account) throws PermissionDeniedException {
+ if(!managers.contains(account)) {
+ managers.add(account);
+ }
}
+ @Override
+ public void addManagers(List<Account> managers) throws PermissionDeniedException {
+ for (Account manager : managers) {
+ addManager(manager);
+ }
+ }
+ @Override
+ public List<Account> getManagers() throws PermissionDeniedException {
+ return managers;
+ }
-}
+ @Override
+ public void removeManager(Account account) throws PermissionDeniedException {
+ for(Account manager : managers) {
+ if(manager.getName().equals(account.getName())) {
+ managers.remove(manager);
+ break;
+ }
+ }
+ }
+
+ @Override
+ public Realm getRealm() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+}
\ No newline at end of file
Modified: trunk/eXist/src/org/exist/security/management/GroupsManagement.java
===================================================================
--- trunk/eXist/src/org/exist/security/management/GroupsManagement.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/management/GroupsManagement.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -40,7 +40,7 @@
public boolean hasGroup(Group group);
public boolean hasGroup(String name);
- public boolean updateGroup(Group group) throws PermissionDeniedException, EXistException, ConfigurationException;
+ public boolean updateGroup(Subject invokingUser, Group group) throws PermissionDeniedException, EXistException, ConfigurationException;
public boolean deleteGroup(Group group) throws PermissionDeniedException, EXistException, ConfigurationException;
Modified: trunk/eXist/src/org/exist/security/utils/ConverterFrom1_0.java
===================================================================
--- trunk/eXist/src/org/exist/security/utils/ConverterFrom1_0.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/security/utils/ConverterFrom1_0.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -120,7 +120,7 @@
group = createGroup((Element) node);
if (realm.hasGroup(group.getName())) {
- realm.updateGroup(group);
+ realm.updateGroup(invokingUser, group);
} else {
realm.addGroup(group);
}
Modified: trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java
===================================================================
--- trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/xmlrpc/RpcConnection.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -3783,10 +3783,7 @@
for (String g : groups) {
if (g.equals(rgroup)) {
- if(!manager.hasAdminPrivileges(user))
- throw new PermissionDeniedException(
- "User is not allowed to remove groups");
- u.remGroup(g);
+ u.remGroup(g);
}
}
manager.addAccount(u);
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -27,7 +27,6 @@
import org.exist.security.Account;
import org.exist.security.Group;
import org.exist.security.PermissionDeniedException;
-import org.exist.security.Subject;
import org.exist.xquery.BasicFunction;
import org.exist.xquery.Cardinality;
import org.exist.xquery.FunctionSignature;
@@ -43,6 +42,7 @@
/**
* @author Adam Retter <ad...@ex...>
+ * @author <a href="mailto:sha...@gm...">Dmitriy Shabanov</a>
*/
public class XMLDBAddUserToGroup extends BasicFunction {
@@ -73,8 +73,9 @@
@Override
public Sequence eval(Sequence args[], Sequence contextSequence) throws XPathException {
- if(context.getUser().getUsername().equals("guest")) {
- XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getUser().getName() + "' must be an authenticated user to call this function.");
+ if(context.getSubject().getName().equals("guest")) {
+ XPathException xPathException =
+ new XPathException(this, "Permission denied, calling account '" + context.getSubject().getName() + "' must be an authenticated account to call this function.");
logger.error("Invalid user", xPathException);
throw xPathException;
}
@@ -82,46 +83,27 @@
String userName = args[0].getStringValue();
String groupName = args[1].getStringValue();
-
- if(groupName.equals("dba") && !context.getUser().hasDbaRole()) {
- XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getUser().getName() + "' must be a DBA to add users to the DBA group.");
- logger.error("Invalid user", xPathException);
- throw xPathException;
- }
-
- if(!context.getUser().hasGroup(groupName)) {
- XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getUser().getName() + "' must be a memeber of '" + groupName + "' to add users to the '" + groupName + "' group.");
- logger.error("Invalid user", xPathException);
- throw xPathException;
- }
-
logger.info("Attempting to add user '" + userName + "' to group '" + groupName + "'");
- Subject currentSubject = context.getSubject();
try {
- //elevate privs
- context.getBroker().setSubject(context.getBroker().getBrokerPool().getSecurityManager().getSystemSubject());
-
SecurityManager sm = context.getBroker().getBrokerPool().getSecurityManager();
- Group group = sm.getGroup(context.getBroker().getUser(), groupName);
+ Group group = sm.getGroup(context.getBroker().getSubject(), groupName);
- Account account = sm.getAccount(context.getBroker().getUser(), userName);
+ Account account = sm.getAccount(context.getBroker().getSubject(), userName);
if(account != null) {
account.addGroup(group);
- sm.updateAccount(context.getBroker().getUser(), account);
+ sm.updateAccount(context.getBroker().getSubject(), account);
return BooleanValue.TRUE;
} else {
logger.warn("Could not find account for username '" + userName + "' in call to xmldb:add-user-to-group");
}
} catch(PermissionDeniedException pde) {
- logger.error("Failed to add user '" + userName + "' to group '" + groupName + "'", pde);
+ throw new XPathException(this, "Permission denied, calling account '" + context.getSubject().getName() + "' don not authorize to call this function.");
} catch(EXistException exe) {
logger.error("Failed to add user '" + userName + "' to group '" + groupName + "'", exe);
- } finally {
- context.getBroker().setSubject(currentSubject);
}
return BooleanValue.FALSE;
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -21,13 +21,10 @@
*/
package org.exist.xquery.functions.xmldb;
-import java.util.ArrayList;
-import java.util.List;
import org.apache.log4j.Logger;
import org.exist.EXistException;
import org.exist.dom.QName;
import org.exist.security.Account;
-import org.exist.security.AuthenticationException;
import org.exist.security.Group;
import org.exist.security.PermissionDeniedException;
import org.exist.security.SecurityManager;
@@ -49,112 +46,97 @@
/**
* @author Adam Retter <ad...@ex...>
+ * @author <a href="mailto:sha...@gm...">Dmitriy Shabanov</a>
*/
public class XMLDBCreateGroup extends BasicFunction {
-
- protected static final Logger logger = Logger.getLogger(XMLDBCreateUser.class);
- public final static FunctionSignature signatures[] = {
- new FunctionSignature(
- new QName("create-group", XMLDBModule.NAMESPACE_URI, XMLDBModule.PREFIX),
- "Create a new user group. $group is the group name. The current user will be the groups manager.",
- new SequenceType[]{
- new FunctionParameterSequenceType("group", Type.STRING, Cardinality.EXACTLY_ONE, "The group name")
- },
- new FunctionReturnSequenceType(Type.BOOLEAN, Cardinality.EXACTLY_ONE, "true() or false() indicating the outcome of the operation"),
- "Use xmldb:create-group($group, $group-manager-username) instead."
- ),
+ protected static final Logger logger = Logger.getLogger(XMLDBCreateUser.class);
- new FunctionSignature(
- new QName("create-group", XMLDBModule.NAMESPACE_URI, XMLDBModule.PREFIX),
- "Create a new user group, with an initial member. $group is the group name, $group-manager-username is the groups manager.",
- new SequenceType[]{
- new FunctionParameterSequenceType("group", Type.STRING, Cardinality.EXACTLY_ONE, "The group name"),
- new FunctionParameterSequenceType("group-manager-username", Type.STRING, Cardinality.ONE_OR_MORE, "The name of the user(s) who will be the groups manager")
- },
- new FunctionReturnSequenceType(Type.BOOLEAN, Cardinality.EXACTLY_ONE, "true() or false() indicating the outcome of the operation")),
- };
-
- /**
- * @param context
- */
- public XMLDBCreateGroup(XQueryContext context, FunctionSignature signature) {
- super(context, signature);
- }
+ public final static FunctionSignature signatures[] = {
+ new FunctionSignature(new QName("create-group", XMLDBModule.NAMESPACE_URI, XMLDBModule.PREFIX),
+ "Create a new user group. $group is the group name. The current user will be the groups manager.",
+ new SequenceType[] { new FunctionParameterSequenceType("group", Type.STRING, Cardinality.EXACTLY_ONE, "The group name") },
+ new FunctionReturnSequenceType(Type.BOOLEAN, Cardinality.EXACTLY_ONE, "true() or false() indicating the outcome of the operation"),
+ "Use xmldb:create-group($group, $group-manager-username) instead."),
- /*
- * (non-Javadoc)
- *
- * @see org.exist.xquery.Expression#eval(org.exist.dom.DocumentSet,
- * org.exist.xquery.value.Sequence, org.exist.xquery.value.Item)
- */
- @Override
- public Sequence eval(Sequence args[], Sequence contextSequence) throws XPathException {
+ new FunctionSignature(
+ new QName("create-group", XMLDBModule.NAMESPACE_URI, XMLDBModule.PREFIX),
+ "Create a new user group, with an initial member. $group is the group name, $group-manager-username are the groups managers in addition to the current user.",
+ new SequenceType[] {
+ new FunctionParameterSequenceType("group", Type.STRING, Cardinality.EXACTLY_ONE, "The group name"),
+ new FunctionParameterSequenceType("group-manager-username", Type.STRING, Cardinality.ONE_OR_MORE,
+ "The name of the user(s) who will be the groups manager") }, new FunctionReturnSequenceType(Type.BOOLEAN,
+ Cardinality.EXACTLY_ONE, "true() or false() indicating the outcome of the operation")), };
- String groupName = args[0].getStringValue();
+ /**
+ * @param context
+ */
+ public XMLDBCreateGroup(XQueryContext context, FunctionSignature signature) {
+ super(context, signature);
+ }
- if(context.getUser().getUsername().equals("guest") || groupName.equals("dba")) {
- XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getUser().getName() + "' must be an authenticated user to call this function.");
- logger.error("Invalid user", xPathException);
- throw xPathException;
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.exist.xquery.Expression#eval(org.exist.dom.DocumentSet,
+ * org.exist.xquery.value.Sequence, org.exist.xquery.value.Item)
+ */
+ @Override
+ public Sequence eval(Sequence args[], Sequence contextSequence) throws XPathException {
- logger.info("Attempting to create group " + groupName);
+ String groupName = args[0].getStringValue();
- Group group = new GroupAider(groupName);
+ if (context.getSubject().getName().equals("guest") || groupName.equals("dba")) {
+ XPathException xPathException =
+ new XPathException(this, "Permission denied, calling account '" + context.getSubject().getName()
+ + "' must be an authenticated account to call this function.");
+ logger.error("Invalid user", xPathException);
+ throw xPathException;
+ }
- DBBroker broker = context.getBroker();
- Subject currentUser = broker.getUser();
+ logger.info("Attempting to create group " + groupName);
- try {
+ Group group = new GroupAider(groupName);
- SecurityManager sm = broker.getBrokerPool().getSecurityManager();
+ DBBroker broker = context.getBroker();
+ Subject currentUser = broker.getSubject();
- List<Account> groupManagerAccounts = new ArrayList<Account>();
- if(args.length == 2) {
- //find the group managers, this makes sure they all exist first!
- for(SequenceIterator i = args[1].iterate(); i.hasNext(); ) {
- String groupManager = i.nextItem().getStringValue();
+ try {
- Account groupManagerAccount = sm.getAccount(broker.getUser(), groupManager);
- if(groupManagerAccount == null) {
- logger.error("Could not find the user: " + groupManager);
- return BooleanValue.FALSE;
- }
- groupManagerAccounts.add(groupManagerAccount);
- }
- } else {
- //no group manager specified, so use the current user
- groupManagerAccounts.add(currentUser);
- }
+ SecurityManager sm = broker.getBrokerPool().getSecurityManager();
- //TODO remove this once the security implementation supports group managers
- //elevate to system user, so we can add groups to the user
- Subject systemUser = sm.authenticate(SecurityManager.SYSTEM, "");
- broker.setUser(systemUser);
+ // add the current user as a group manager
+ group.addManager(currentUser);
- //create the group
- group = sm.addGroup(group);
+ if (args.length == 2) {
+ // add the additional group managers, this also makes sure they
+ // all exist first!
+ for (SequenceIterator i = args[1].iterate(); i.hasNext();) {
+ String groupManager = i.nextItem().getStringValue();
- //add the managers to the group
- for(Account groupManagerAccount : groupManagerAccounts) {
- groupManagerAccount.addGroup(group);
- sm.updateAccount(broker.getUser(), groupManagerAccount);
- }
+ Account groupManagerAccount = sm.getAccount(null, groupManager);
+ if (groupManagerAccount == null) {
+ logger.error("Could not find the user: " + groupManager);
+ // throw exception is better -shabanovd
+ return BooleanValue.FALSE;
+ }
+ group.addManager(groupManagerAccount);
+ }
+ }
- return BooleanValue.TRUE;
+ // create the group
+ group = sm.addGroup(group);
- } catch (PermissionDeniedException pde) {
- logger.error("Failed to create group: " + group, pde);
- } catch (EXistException exe) {
- logger.error("Failed to create group: " + group, exe);
- } catch(AuthenticationException ae) {
- logger.error("Failed to create group: " + group, ae);
- } finally {
- //restore the original user
- broker.setUser(currentUser);
- }
-
- return BooleanValue.FALSE;
- }
+ return BooleanValue.TRUE;
+
+ } catch (PermissionDeniedException pde) {
+ throw new XPathException(this,
+ "Permission denied, calling account '" + context.getSubject().getName()
+ + "' do not authorize to call this function.");
+ } catch (EXistException exe) {
+ logger.error("Failed to create group: " + group, exe);
+ }
+
+ return BooleanValue.FALSE;
+ }
}
\ No newline at end of file
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java 2011-01-30 06:54:17 UTC (rev 13695)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java 2011-01-30 06:58:16 UTC (rev 13696)
@@ -25,9 +25,7 @@
import org.exist.EXistException;
import org.exist.dom.QName;
import org.exist.security.Account;
-import org.exist.security.Group;
import org.exist.security.PermissionDeniedException;
-import org.exist.security.Subject;
import org.exist.security.SecurityManager;
import org.exist.xquery.BasicFunction;
import org.exist.xquery.Cardinality;
@@ -43,6 +41,7 @@
/**
* @author Adam Retter <ad...@ex...>
+ * @author <a href="mailto:sha...@gm...">Dmitriy Shabanov</a>
*/
public class XMLDBRemoveUserFromGroup extends BasicFunction {
@@ -73,54 +72,37 @@
@Override
public Sequence eval(Sequence args[], Sequence contextSequence) throws XPathException {
- if(context.getUser().getUsername().equals("guest")) {
- XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getUser().getName() + "' must be an authenticated user to call this function.");
- logger.error("Invalid user", xPathException);
+ if(context.getSubject().getName().equals("guest")) {
+ XPathException xPathException =
+ new XPathException(this, "Permission denied, calling account '" + context.getSubject().getName() + "' must be an authenticated user to call this function.");
+ logger.error("Invalid account", xPathException);
throw xPathException;
}
String userName = args[0].getStringValue();
String groupName = args[1].getStringValue();
-
- if(groupName.equals("dba") && !context.getUser().hasDbaRole()) {
- XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getUser().getName() + "' must be a DBA to remove users from the DBA group.");
- logger.error("Invalid user", xPathException);
- throw xPathException;
- }
-
- if(!context.getUser().hasGroup(groupName)) {
- XPathException xPathException = new XPathException(this, "Permission denied, calling user '" + context.getUser().getName() + "' must be a memeber of '" + groupName + "' to remove users from the '" + groupName + "' group.");
- logger.error("Invalid user", xPathException);
- throw xPathException;
- }
-
logger.info("Attempting to remove user '" + userName + "' from group '" + groupName + "'");
- Subject currentSubject = context.getSubject();
try {
- //elevate privs
- context.getBroker().setSubject(context.getBroker().getBrokerPool().getSecurityManager().getSystemSubject());
-
SecurityManager sm = context.getBroker().getBrokerPool().getSecurityManager();
- Group group = sm.getGroup(context.getBroker().getUser(), groupName);
+ Account account = sm.getAccount(null, userName);
- Account account = sm.getAccount(context.getBroker().getUser(), userName);
-
account.remGroup(groupName);
- sm.updateAccount(context.getBroker().getUser(), account);
+ sm.updateAccount(null, account);
return BooleanValue.TRUE;
} catch(PermissionDeniedException pde) {
- logger.error("Failed to remove user '" + userName + "' from group '" + groupName + "'", pde);
+ throw new XPathException(this,
+ "Permission denied, calling account '" + context.getSubject().getName()
+ + "' do not authorize to call this function.");
} catch(EXistException exe) {
logger.error("Failed to remove user '" + userName + "' from group '" + groupName + "'", exe);
} finally {
- context.getBroker().setSubject(currentSubject);
- }
+ }
return BooleanValue.FALSE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sha...@us...> - 2011-01-30 06:54:24
|
Revision: 13695
http://exist.svn.sourceforge.net/exist/?rev=13695&view=rev
Author: shabanovd
Date: 2011-01-30 06:54:17 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] update year
Modified Paths:
--------------
trunk/eXist/src/org/exist/client/InteractiveClient.java
Modified: trunk/eXist/src/org/exist/client/InteractiveClient.java
===================================================================
--- trunk/eXist/src/org/exist/client/InteractiveClient.java 2011-01-30 05:24:03 UTC (rev 13694)
+++ trunk/eXist/src/org/exist/client/InteractiveClient.java 2011-01-30 06:54:17 UTC (rev 13695)
@@ -2624,7 +2624,7 @@
messageln(sysProperties.getProperty("product-name") + " version "
+ sysProperties.getProperty("product-version")
- +", Copyright (C) 2001-2010 Wolfgang Meier");
+ +", Copyright (C) 2001-2011 Wolfgang Meier");
messageln("eXist comes with ABSOLUTELY NO WARRANTY.");
messageln("This is free software, and you are welcome to "
+ "redistribute it\nunder certain conditions; "
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sha...@us...> - 2011-01-30 05:24:09
|
Revision: 13694
http://exist.svn.sourceforge.net/exist/?rev=13694&view=rev
Author: shabanovd
Date: 2011-01-30 05:24:03 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
[ignore] missing jar for client mode
Modified Paths:
--------------
trunk/eXist/src/org/exist/start/start.config
Modified: trunk/eXist/src/org/exist/start/start.config
===================================================================
--- trunk/eXist/src/org/exist/start/start.config 2011-01-29 21:07:22 UTC (rev 13693)
+++ trunk/eXist/src/org/exist/start/start.config 2011-01-30 05:24:03 UTC (rev 13694)
@@ -63,12 +63,13 @@
lib/optional/isorelax-%latest%.jar mode == client
lib/optional/commons-codec-%latest%.jar mode == client
lib/optional/commons-httpclient-%latest%.jar mode == client
+lib/optional/servlet-api-2.5.jar mode == client
lib/extensions/* always
extensions/debuggee/lib/* always
extensions/security/openid/lib/* always
extensions/indexes/spatial/lib/* always
extensions/indexes/lucene/lib/* always
-extensions/xprocxq/main/lib/* always
+extensions/xprocxq/main/lib/* always
extensions/xqdoc/lib/* always
extensions/cocoon/lib/* always
extensions/webdav/lib/* always
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-01-29 21:07:28
|
Revision: 13693
http://exist.svn.sourceforge.net/exist/?rev=13693&view=rev
Author: wolfgang_m
Date: 2011-01-29 21:07:22 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[bugfix] Lucene indexing module: fixed use of different analyzers in index definitions and queries. Added more tests.
Added Paths:
-----------
trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml
Added: trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml
===================================================================
--- trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml (rev 0)
+++ trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/inline.xml 2011-01-29 21:07:22 UTC (rev 13693)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestSet xmlns:stats="" rel="nofollow">http://exist-db.org/xquery/profiling">
+ <testName>Lucene indexing tests</testName>
+ <description>
+ <para>Tests for the Lucene extensions</para>
+ <author>Wolfgang Meier</author>
+ </description>
+ <setup>
+ <create-collection parent="/db/system" name="config"/>
+ <create-collection parent="/db/system/config" name="db"/>
+ <create-collection parent="/db/system/config/db" name="lucene"/>
+ <store collection="/db/system/config/db/lucene" name="collection.xconf">
+ <collection xmlns="" rel="nofollow">http://exist-db.org/collection-config/1.0">
+ <index>
+ <!-- Lucene index is configured below -->
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+ <text qname="size"/>
+ <text qname="p">
+ <inline qname="b"/>
+ <ignore qname="note"/>
+ </text>
+ </lucene>
+ </index>
+ </collection>
+ </store>
+ <create-collection parent="/db" name="lucene"/>
+ <store collection="/db/lucene" name="text.xml">
+ <root>
+ <size><width>12</width><height>8</height></size>
+ <p>This is <b>un</b>clear.</p>
+ <p>This is a paragraph<note>containing an inline note</note>.</p>
+ </root>
+ </store>
+ </setup>
+ <tearDown>
+ <remove-collection collection="/db/lucene"/>
+ <remove-document collection="/db/system/config/db/lucene" name="collection.xconf"/>
+ </tearDown>
+ <test output="xml">
+ <task>Default processing</task>
+ <code>doc("/db/lucene/text.xml")//size[ft:query(., '12')]</code>
+ <expected>
+ <size><width>12</width><height>8</height></size>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Inline node</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'unclear')]</code>
+ <expected>
+ <p>This is <b>un</b>clear.</p>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Inline node: no match</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'clear')]</code>
+ <expected/>
+ </test>
+ <test output="xml">
+ <task>Ignored node: match outside</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'paragraph')]</code>
+ <expected>
+ <p>This is a paragraph<note>containing an inline note</note>.</p>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Ignored node: no match</task>
+ <code>doc("/db/lucene/text.xml")//p[ft:query(., 'inline')]</code>
+ <expected/>
+ </test>
+</TestSet>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-01-29 21:05:53
|
Revision: 13692
http://exist.svn.sourceforge.net/exist/?rev=13692&view=rev
Author: wolfgang_m
Date: 2011-01-29 21:05:46 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[bugfix] Lucene indexing module: fixed use of different analyzers in index definitions and queries. Added more tests.
Modified Paths:
--------------
trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java
trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java
trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java
trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml
Added Paths:
-----------
trunk/eXist/extensions/indexes/lucene/lib/lucene-analyzers-2.9.2.jar
trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml
Added: trunk/eXist/extensions/indexes/lucene/lib/lucene-analyzers-2.9.2.jar
===================================================================
(Binary files differ)
Property changes on: trunk/eXist/extensions/indexes/lucene/lib/lucene-analyzers-2.9.2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java
===================================================================
--- trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java 2011-01-29 20:36:44 UTC (rev 13691)
+++ trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java 2011-01-29 21:05:46 UTC (rev 13692)
@@ -27,28 +27,37 @@
public class DefaultTextExtractor extends AbstractTextExtractor {
private int stack = 0;
-
+ private boolean addSpaceBeforeNext = false;
+
public int startElement(QName name) {
if (config.isIgnoredNode(name) || (idxConfig != null && idxConfig.isIgnoredNode(name)))
stack++;
- else if (!(config.isInlineNode(name) || (idxConfig != null && idxConfig.isInlineNode(name)))) {
+ else if (!isInlineNode(name)) {
buffer.append(' ');
return 1;
}
return 0;
}
+ private boolean isInlineNode(QName name) {
+ return (config.isInlineNode(name) || (idxConfig != null && idxConfig.isInlineNode(name)));
+ }
+
public int endElement(QName name) {
if (config.isIgnoredNode(name) || (idxConfig != null && idxConfig.isIgnoredNode(name)))
stack--;
- else if (!(config.isInlineNode(name) || (idxConfig != null && idxConfig.isInlineNode(name)))) {
- buffer.append(' ');
+ else if (!isInlineNode(name)) {
+ addSpaceBeforeNext = true;
return 1;
}
return 0;
}
public int characters(XMLString text) {
+ if (addSpaceBeforeNext) {
+ buffer.append(' ');
+ addSpaceBeforeNext = false;
+ }
if (stack == 0) {
buffer.append(text);
return text.length();
Modified: trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java
===================================================================
--- trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java 2011-01-29 20:36:44 UTC (rev 13691)
+++ trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneConfig.java 2011-01-29 21:05:46 UTC (rev 13692)
@@ -71,7 +71,7 @@
public Analyzer getAnalyzer(QName qname) {
LuceneIndexConfig idxConf = paths.get(qname);
while (idxConf != null) {
- if (idxConf.getNodePath().match(qname))
+ if (!idxConf.isNamed() && idxConf.getNodePath().match(qname))
break;
idxConf = idxConf.getNext();
}
@@ -88,7 +88,7 @@
throw new RuntimeException();
LuceneIndexConfig idxConf = paths.get(nodePath.getLastComponent());
while (idxConf != null) {
- if (idxConf.getNodePath().match(nodePath))
+ if (!idxConf.isNamed() && idxConf.match(nodePath))
break;
idxConf = idxConf.getNext();
}
@@ -116,6 +116,10 @@
return analyzers.getDefaultAnalyzer();
}
+ public Analyzer getAnalyzerById(String id) {
+ return analyzers.getAnalyzerById(id);
+ }
+
public boolean isInlineNode(QName qname) {
return inlineNodes != null && inlineNodes.contains(qname);
}
Modified: trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java
===================================================================
--- trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java 2011-01-29 20:36:44 UTC (rev 13691)
+++ trunk/eXist/extensions/indexes/lucene/src/org/exist/indexing/lucene/LuceneIndexWorker.java 2011-01-29 21:05:46 UTC (rev 13692)
@@ -464,6 +464,7 @@
try {
searcher = index.getSearcher();
Analyzer analyzer = getAnalyzer(field, null, context.getBroker(), docs);
+ LOG.debug("Using analyzer " + analyzer + " for " + queryString);
QueryParser parser = new QueryParser(field, analyzer);
setOptions(options, parser);
Query query = parser.parse(queryString);
@@ -881,13 +882,11 @@
NodeId nodeId;
CharSequence text;
QName qname;
- Analyzer analyzer;
LuceneIndexConfig idxConf;
private PendingDoc(NodeId nodeId, QName qname, NodePath path, CharSequence text, LuceneIndexConfig idxConf) {
this.nodeId = nodeId;
this.qname = qname;
- this.analyzer = config.getAnalyzer(path);
this.text = text;
this.idxConf = idxConf;
}
@@ -932,10 +931,11 @@
doc.add(new Field(contentField, pending.text.toString(), Field.Store.NO, Field.Index.ANALYZED,
Field.TermVector.YES));
- if (pending.analyzer == null)
+ if (pending.idxConf.getAnalyzer() == null)
writer.addDocument(doc);
- else
- writer.addDocument(doc, pending.analyzer);
+ else {
+ writer.addDocument(doc, pending.idxConf.getAnalyzer());
+ }
}
} catch (IOException e) {
LOG.warn("An exception was caught while indexing document: " + e.getMessage(), e);
Added: trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml
===================================================================
--- trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml (rev 0)
+++ trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/analyzers.xml 2011-01-29 21:05:46 UTC (rev 13692)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestSet xmlns:stats="" rel="nofollow">http://exist-db.org/xquery/profiling">
+ <testName>Lucene indexing tests</testName>
+ <description>
+ <para>Tests for the Lucene extensions</para>
+ <author>Wolfgang Meier</author>
+ </description>
+ <setup>
+ <create-collection parent="/db/system" name="config"/>
+ <create-collection parent="/db/system/config" name="db"/>
+ <create-collection parent="/db/system/config/db" name="lucene"/>
+ <store collection="/db/system/config/db/lucene" name="collection.xconf">
+ <collection xmlns="" rel="nofollow">http://exist-db.org/collection-config/1.0">
+ <index>
+ <!-- Lucene index is configured below -->
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+ <analyzer id="keyword" class="org.apache.lucene.analysis.KeywordAnalyzer"/>
+ <analyzer id="de" class="org.apache.lucene.analysis.de.GermanAnalyzer"/>
+ <text field="line" qname="l"/>
+ <text qname="l" analyzer="de"/>
+ <text field="lineno" qname="@n" analyzer="keyword"/>
+ </lucene>
+ </index>
+ </collection>
+ </store>
+ <create-collection parent="/db" name="lucene"/>
+ <store collection="/db/lucene" name="text.xml">
+ <text>
+ <body>
+ <lg>
+ <l n="l1.1">Habe nun, ach! Philosophie,</l>
+ <l n="l1.2">Juristerei und Medizin,</l>
+ <l n="l1.3">Und leider auch Theologie</l>
+ <l n="l1.4">Durchaus studiert, mit heißem Bemühn.</l>
+ <l n="l1.5">Da steh ich nun, ich armer Tor!</l>
+ <l n="l1.6">Und bin so klug als wie zuvor;</l>
+ <l n="l1.7">Heiße Magister, heiße Doktor gar</l>
+ <l n="l1.8">Und ziehe schon an die zehen Jahr</l>
+ <l n="l1.9">Herauf, herab und quer und krumm</l>
+ <l n="l1.10">Meine Schüler an der Nase herum –</l>
+ <l n="l1.11">Und sehe, daß wir nichts wissen können!</l>
+ <l n="l1.12">Das will mir schier das Herz verbrennen.</l>
+ </lg>
+ </body>
+ </text>
+ </store>
+ </setup>
+ <tearDown>
+ <remove-collection collection="/db/lucene"/>
+ <remove-document collection="/db/system/config/db/lucene" name="collection.xconf"/>
+ </tearDown>
+ <test output="xml">
+ <task>German Analyzer: standard search</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query(., 'philosophie')]</code>
+ <expected>
+ <l n="l1.1">Habe nun, ach! Philosophie,</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>German Analyzer: stemmed verb</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query(., 'studieren')]</code>
+ <expected>
+ <l n="l1.4">Durchaus studiert, mit heißem Bemühn.</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>German Analyzer: plural finds singular</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query(., 'herzen')]</code>
+ <expected>
+ <l n="l1.12">Das will mir schier das Herz verbrennen.</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Query field with standard analyzer, no match</task>
+ <code>ft:query-field("line", "herzen")</code>
+ <expected/>
+ </test>
+ <test output="xml">
+ <task>Query field with standard analyzer and without context</task>
+ <code>ft:query-field("line", 'klug')</code>
+ <expected>
+ <l n="l1.6">Und bin so klug als wie zuvor;</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Query field with keyword analyzer, no match</task>
+ <code>ft:query-field("lineno", "10")</code>
+ <expected/>
+ </test>
+ <test output="xml">
+ <task>Query field with keyword analyzer and without context</task>
+ <code><![CDATA[ft:query-field("lineno", "l1.10")/..]]></code>
+ <expected>
+ <l n="l1.10">Meine Schüler an der Nase herum –</l>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>Query field with keyword analyzer and context</task>
+ <code>doc("/db/lucene/text.xml")//l[ft:query-field("lineno", "l1.10")]</code>
+ <expected>
+ <l n="l1.10">Meine Schüler an der Nase herum –</l>
+ </expected>
+ </test>
+</TestSet>
\ No newline at end of file
Modified: trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml
===================================================================
--- trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml 2011-01-29 20:36:44 UTC (rev 13691)
+++ trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/queries.xml 2011-01-29 21:05:46 UTC (rev 13692)
@@ -881,13 +881,13 @@
</test>
<test output="xml">
<task>Fields: keyword analyzer</task>
- <code>doc("/db/lucene/text1.xml")/test[ft:query-field("id", "a11")]/id</code>
+ <code>doc("/db/lucene/text1.xml")/test[ft:query-field("id", "A11")]/id</code>
<expected><id>A11</id></expected>
</test>
<test output="xml">
<task>Fields: keyword analyzer, XML syntax</task>
<code><![CDATA[
- let $query := <query><term>a11</term></query>
+ let $query := <query><term>A11</term></query>
return
doc("/db/lucene/text1.xml")/test[ft:query-field("id", $query)]/id
]]></code>
@@ -895,7 +895,7 @@
</test>
<test output="xml">
<task>Fields: keyword analyzer, no context</task>
- <code>ft:query-field("id", "a11")</code>
+ <code>ft:query-field("id", "A11")</code>
<expected><id>A11</id></expected>
</test>
<!--test output="xml">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-01-29 20:36:50
|
Revision: 13691
http://exist.svn.sourceforge.net/exist/?rev=13691&view=rev
Author: wolfgang_m
Date: 2011-01-29 20:36:44 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[ignore] conf.xml.tmpl contained a comment within a comment and was thus invalid xml.
Modified Paths:
--------------
trunk/eXist/conf.xml.tmpl
Modified: trunk/eXist/conf.xml.tmpl
===================================================================
--- trunk/eXist/conf.xml.tmpl 2011-01-29 19:26:08 UTC (rev 13690)
+++ trunk/eXist/conf.xml.tmpl 2011-01-29 20:36:44 UTC (rev 13691)
@@ -820,16 +820,16 @@
<module class="org.exist.xquery.modules.simpleql.SimpleQLModule"
uri="http://exist-db.org/xquery/simple-ql" />
<module class="org.exist.xquery.modules.sql.SQLModule"
- uri="http://exist-db.org/xquery/sql" />
+ uri="http://exist-db.org/xquery/sql" /-->
- <module class="org.exist.xquery.modules.xslfo.XSLFOModule"
+ <!-- valid processor adapters are -
+ org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter for Apache's FOP
+ org.exist.xquery.modules.xslfo.RenderHouseXepProcessorAdapter for RenderHouse's XEP
+ -->
+ <!--module class="org.exist.xquery.modules.xslfo.XSLFOModule"
uri="" rel="nofollow">http://exist-db.org/xquery/xslfo">
- <!-- valid processor adapters are -
- org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter for Apache's FOP
- org.exist.xquery.modules.xslfo.RenderHouseXepProcessorAdapter for RenderHouse's XEP
- -->
<parameter name="processorAdapter" value="org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter"/>
- </module>
+ </module-->
<module class="org.exist.xquery.modules.xmldiff.XmlDiffModule"
uri="http://exist-db.org/xquery/xmldiff" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-01-29 19:26:14
|
Revision: 13690
http://exist.svn.sourceforge.net/exist/?rev=13690&view=rev
Author: dizzzz
Date: 2011-01-29 19:26:08 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[ignore] cleanup, repaired testcase
Modified Paths:
--------------
branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java
branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java
branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
Modified: branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java
===================================================================
--- branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java 2011-01-29 18:40:42 UTC (rev 13689)
+++ branches/adam/eXist-xq3/src/org/exist/xquery/TryCatchExpression.java 2011-01-29 19:26:08 UTC (rev 13690)
@@ -23,14 +23,13 @@
import java.util.ArrayList;
import java.util.List;
+
import org.apache.log4j.Logger;
-import org.exist.dom.DocumentSet;
-import org.exist.dom.EmptyNodeSet;
import org.exist.dom.QName;
+
import org.exist.xquery.ErrorCodes.ErrorCode;
import org.exist.xquery.util.ExpressionDumper;
-import org.exist.xquery.value.EmptySequence;
import org.exist.xquery.value.Item;
import org.exist.xquery.value.QNameValue;
import org.exist.xquery.value.Sequence;
Modified: branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java
===================================================================
--- branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java 2011-01-29 18:40:42 UTC (rev 13689)
+++ branches/adam/eXist-xq3/src/org/exist/xquery/functions/FunError.java 2011-01-29 19:26:08 UTC (rev 13690)
@@ -24,15 +24,16 @@
import org.apache.log4j.Logger;
import org.exist.dom.QName;
+
import org.exist.xquery.BasicFunction;
import org.exist.xquery.Cardinality;
import org.exist.xquery.ErrorCodes;
import org.exist.xquery.ErrorCodes.ErrorCode;
-import org.exist.xquery.ErrorCodes.W3CErrorCode;
import org.exist.xquery.Function;
import org.exist.xquery.FunctionSignature;
import org.exist.xquery.XPathException;
import org.exist.xquery.XQueryContext;
+
import org.exist.xquery.value.FunctionParameterSequenceType;
import org.exist.xquery.value.QNameValue;
import org.exist.xquery.value.Sequence;
@@ -40,8 +41,10 @@
import org.exist.xquery.value.Type;
public class FunError extends BasicFunction {
- protected static final Logger logger = Logger.getLogger(FunError.class);
- public final static FunctionSignature signature[] = {
+
+ protected static final Logger logger = Logger.getLogger(FunError.class);
+
+ public final static FunctionSignature signature[] = {
new FunctionSignature(
new QName("error", Function.BUILTIN_FUNCTION_NS),
"Indicates that an irrecoverable error has occurred. The "
@@ -76,39 +79,48 @@
},
new SequenceType(Type.EMPTY, Cardinality.ZERO)),
};
-
- public FunError(XQueryContext context, FunctionSignature signature) {
- super(context, signature);
- }
- public final static ErrorCode DEFAULT_ERROR = ErrorCodes.FOER0000;
+ public FunError(XQueryContext context, FunctionSignature signature) {
+ super(context, signature);
+ }
+ public final static ErrorCode DEFAULT_ERROR = ErrorCodes.FOER0000;
- @Override
- public int returnsType() {
- return Type.EMPTY;
- }
+ @Override
+ public int returnsType() {
+ return Type.EMPTY;
+ }
- @Override
- public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
- ErrorCode errorCode = DEFAULT_ERROR;
- String errorDesc = "An error has been raised by the query";
- Sequence errorVal = Sequence.EMPTY_SEQUENCE;
- if (args.length > 0) {
- if(args.length > 1) {
- errorDesc = args[1].getStringValue();
- }
+ @Override
+ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
- if(!args[0].isEmpty()) {
- QName errorQName = ((QNameValue) args[0].itemAt(0)).getQName();
- errorCode = new ErrorCode(errorQName, errorDesc);
- }
+ // Define default values
+ ErrorCode errorCode = DEFAULT_ERROR;
+ String errorDesc = "An error has been raised by the query";
+ Sequence errorVal = Sequence.EMPTY_SEQUENCE;
- if(args.length == 3) {
- errorVal = args[2];
- }
+ // Enter if one or more parameters are supplied
+ if (args.length > 0) {
+
+ // If there are 2 arguments or more supplied
+ // use 2nd argument for error description
+ if (args.length > 1) {
+ errorDesc = args[1].getStringValue();
}
- logger.error(errorDesc + ": " + errorCode.toString());
- throw new XPathException(this, errorCode, errorDesc, errorVal);
- }
-}
\ No newline at end of file
+ // If first argument is not empty, get qname from argument
+ // and construct error code
+ if (!args[0].isEmpty()) {
+ QName errorQName = ((QNameValue) args[0].itemAt(0)).getQName();
+ errorCode = new ErrorCode(errorQName, errorDesc);
+ }
+
+ // If there is a third argument, us it.
+ if (args.length == 3) {
+ errorVal = args[2];
+ }
+ }
+
+ logger.error(errorDesc + ": " + errorCode.toString());
+ throw new XPathException(this, errorCode, errorDesc, errorVal);
+ }
+}
Modified: branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
===================================================================
--- branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-29 18:40:42 UTC (rev 13689)
+++ branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-29 19:26:08 UTC (rev 13690)
@@ -158,7 +158,7 @@
}
}
- @Test
+ @Test
public void catchFnError3() {
String query = "try {"
@@ -203,7 +203,7 @@
assertEquals("err:FOER0000", r1);
String r2 = (String) results.getResource(1).getContent();
- assertEquals("TEST", r2);
+ assertEquals("TEST", r2);
} catch (Throwable ex) {
ex.printStackTrace();
@@ -228,7 +228,7 @@
assertEquals("err:FOER0000", r1);
String r2 = (String) results.getResource(1).getContent();
- assertEquals("TEST", r2); //
+ assertEquals("TEST", r2); //
} catch (Throwable ex) {
ex.printStackTrace();
@@ -236,7 +236,7 @@
}
}
- @Test
+ @Test
public void catchFnError1() {
String query = "try {"
@@ -249,7 +249,7 @@
assertEquals(1, results.getSize());
String r1 = (String) results.getResource(0).getContent();
- assertEquals("err:FOER0000", r1);
+ assertEquals("err:FOER0000", r1);
} catch (Throwable ex) {
@@ -280,34 +280,34 @@
}
}
- @Test @Ignore("issue with 3rd parameter")
+ @Test
public void catchFullErrorCode() {
String query = "try { a + 7 } "
+ "catch * ($errcode, $errdesc, $errval) "
- + "{ $errcode, $errdesc, $errval } ";
+ + "{ $errcode, $errdesc, empty($errval) } ";
try {
ResourceSet results = executeQuery(query);
- assertEquals(3, results.getSize());
+ assertEquals(3, results.getSize());
String r1 = (String) results.getResource(0).getContent();
assertEquals(ErrorCodes.XPDY0002.getErrorQName().getStringValue(), r1);
String r2 = (String) results.getResource(1).getContent();
- assertEquals(ErrorCodes.XPDY0002.toString(), r2);
+ assertEquals(ErrorCodes.XPDY0002.getDescription(), r2);
String r3 = (String) results.getResource(2).getContent();
- assertEquals(ErrorCodes.XPDY0002.toString(), r3);
+ assertEquals("true", r3);
} catch (Throwable ex) {
ex.printStackTrace();
- fail(ex.getMessage());
+ fail(ex.getMessage());
}
}
- @Test @Ignore(" <AST>:0:0: unexpected end of subtree") // leace at the <A></A>
+ @Test @Ignore(" <AST>:0:0: unexpected end of subtree") // leave out the <A></A> for fun
public void catchDefinedNamespace() {
String query =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sha...@us...> - 2011-01-29 18:40:48
|
Revision: 13689
http://exist.svn.sourceforge.net/exist/?rev=13689&view=rev
Author: shabanovd
Date: 2011-01-29 18:40:42 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[ignore] get the type of a generic class at runtime is nightmare, so resolver method should be send to constructor
Modified Paths:
--------------
trunk/eXist/src/org/exist/config/ReferenceImpl.java
Modified: trunk/eXist/src/org/exist/config/ReferenceImpl.java
===================================================================
--- trunk/eXist/src/org/exist/config/ReferenceImpl.java 2011-01-29 18:34:16 UTC (rev 13688)
+++ trunk/eXist/src/org/exist/config/ReferenceImpl.java 2011-01-29 18:40:42 UTC (rev 13689)
@@ -29,28 +29,34 @@
* @author <a href="mailto:sha...@gm...">Dmitriy Shabanov</a>
*
*/
-public class ReferenceImpl<R, O> implements Reference<R, O> {
+public class ReferenceImpl<R, O extends Configurable> implements Reference<R, O>, Configurable {
- R resolver;
- String name;
+ private R resolver;
+ private String methodName;
+ private String name;
+ private O cached = null;
- public ReferenceImpl(R resolver, String name) {
+ public ReferenceImpl(R resolver, String methodName, String name) {
this.resolver = resolver;
+ this.methodName = methodName;
this.name = name;
}
- O cached = null;
-
+ public ReferenceImpl(R resolver, O cached) {
+ this.resolver = resolver;
+ this.methodName = null;
+ this.name = null;
+ this.cached = cached;
+ }
+
+ @SuppressWarnings("unchecked")
@Override
public O resolve() {
if (cached == null) {
- String methodName = "get"+cached.getClass().getName();
- methodName = methodName.toLowerCase();
-
Class<? extends Object> clazz = resolver.getClass();
for (Method method : clazz.getMethods()) {
- if (method.getName().toLowerCase().equals(methodName)
+ if (method.getName().equals(methodName)
&& method.getParameterTypes().length == 1
&& method.getParameterTypes()[0].getName().equals("java.lang.String")
)
@@ -72,4 +78,20 @@
public R resolver() {
return resolver;
}
+
+ @Override
+ public boolean isConfigured() {
+ O obj = resolve();
+ if (obj == null) return false;
+
+ return obj.isConfigured();
+ }
+
+ @Override
+ public Configuration getConfiguration() {
+ O obj = resolve();
+ if (obj == null) return null;
+
+ return obj.getConfiguration();
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-01-29 18:34:23
|
Revision: 13688
http://exist.svn.sourceforge.net/exist/?rev=13688&view=rev
Author: dizzzz
Date: 2011-01-29 18:34:16 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[ignore] cleanup
Modified Paths:
--------------
branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
Modified: branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java
===================================================================
--- branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-29 18:05:25 UTC (rev 13687)
+++ branches/adam/eXist-xq3/test/src/org/exist/xquery/functions/xquery3/TryCatchTest.java 2011-01-29 18:34:16 UTC (rev 13688)
@@ -40,11 +40,6 @@
public void tearDown() {
}
- // TODO add test methods here.
- // The methods must be annotated with annotation @Test. For example:
- //
- // @Test
- // public void hello() {}
@Test
public void simpleCatch() {
@@ -163,7 +158,7 @@
}
}
- @Test //@Ignore("where is the third parameter")
+ @Test
public void catchFnError3() {
String query = "try {"
@@ -208,7 +203,7 @@
assertEquals("err:FOER0000", r1);
String r2 = (String) results.getResource(1).getContent();
- assertEquals("TEST", r2); // <[(http://www.w3.org/2005/xqt-errors#FOER0000):]TEST>
+ assertEquals("TEST", r2);
} catch (Throwable ex) {
ex.printStackTrace();
@@ -233,7 +228,7 @@
assertEquals("err:FOER0000", r1);
String r2 = (String) results.getResource(1).getContent();
- assertEquals("TEST", r2); // <[(http://www.w3.org/2005/xqt-errors#FOER0000):]TEST>
+ assertEquals("TEST", r2); //
} catch (Throwable ex) {
ex.printStackTrace();
@@ -312,23 +307,23 @@
}
- @Test @Ignore(" <AST>:0:0: unexpected end of subtree")
+ @Test @Ignore(" <AST>:0:0: unexpected end of subtree") // leace at the <A></A>
public void catchDefinedNamespace() {
String query =
"declare namespace foo='http://foo.com'; "
- + "try { "
+ + "<A>try { "
+ " fn:error(fn:QName('http://foo.com', 'ValueToBig'), 'Value too big')"
+ "}"
+ "catch foo:ValueToBig { good }"
- + "catch * { wrong }";
+ + "catch * { wrong }</A>";
try {
ResourceSet results = executeQuery(query);
assertEquals(1, results.getSize());
String r1 = (String) results.getResource(0).getContent();
- assertEquals("good", r1);
+ assertEquals("bad", r1);
} catch (Throwable ex) {
ex.printStackTrace();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-01-29 18:05:32
|
Revision: 13687
http://exist.svn.sourceforge.net/exist/?rev=13687&view=rev
Author: deliriumsky
Date: 2011-01-29 18:05:25 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[bugfix] Oops! Not everyone has the XEP processor library, so use reflection
Modified Paths:
--------------
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java 2011-01-29 17:41:24 UTC (rev 13686)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java 2011-01-29 18:05:25 UTC (rev 13687)
@@ -1,10 +1,10 @@
package org.exist.xquery.modules.xslfo;
-import com.renderx.xep.FOTarget;
-import com.renderx.xep.FormatterImpl;
-import com.renderx.xep.lib.FormatterException;
import java.io.OutputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
import java.util.Properties;
+import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
import org.exist.storage.DBBroker;
import org.exist.xquery.XPathException;
@@ -19,7 +19,7 @@
*/
public class RenderHouseXepProcessorAdapter implements ProcessorAdapter {
- private FormatterImpl formatter = null;
+ private Object formatter = null;
@Override
@@ -30,24 +30,40 @@
}
try {
+
+ Class formatterImplClazz = Class.forName("com.renderx.xep.FormatterImpl");
+
if(parameters == null) {
- formatter = new FormatterImpl(new DOMSource((Node)configFile));
+ Constructor formatterImplCstr = formatterImplClazz.getConstructor(Source.class);
+ formatter = formatterImplCstr.newInstance(new DOMSource((Node)configFile));
} else {
- formatter = new FormatterImpl(new DOMSource((Node)configFile), parameters);
+ Constructor formatterImplCstr = formatterImplClazz.getConstructor(Source.class, Properties.class);
+ formatter = formatterImplCstr.newInstance(new DOMSource((Node)configFile), parameters);
}
String backendType = mimeType.substring(mimeType.indexOf("/")+1).toUpperCase();
- FOTarget foTarget = new FOTarget(os, backendType);
- return formatter.createContentHandler(null, foTarget);
- } catch (FormatterException fe) {
- throw new SAXException(fe.getMessage(), fe);
+ Class foTargetClazz = Class.forName("com.renderx.xep.FOTarget");
+ Constructor foTargetCstr = foTargetClazz.getConstructor(OutputStream.class, String.class);
+ Object foTarget = foTargetCstr.newInstance(os, backendType);
+
+ Method createContentHandlerMethod = formatterImplClazz.getMethod("createContentHandler", String.class, foTargetClazz);
+
+ return (ContentHandler) createContentHandlerMethod.invoke(formatter, null, foTarget);
+ } catch (Exception e) {
+ throw new SAXException(e.getMessage(), e);
}
}
@Override
public void cleanup() {
if(formatter != null) {
- formatter.cleanup();
+ try{
+ Class formatterImplClazz = Class.forName("com.renderx.xep.FormatterImpl");
+ Method cleanupMethod = formatterImplClazz.getMethod("cleanup", new Class[]{});
+ cleanupMethod.invoke(formatter, new Class[]{});
+ } catch(Exception e) {
+ // do nothing
+ }
}
}
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-01-29 17:41:31
|
Revision: 13686
http://exist.svn.sourceforge.net/exist/?rev=13686&view=rev
Author: deliriumsky
Date: 2011-01-29 17:41:24 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[feature] XSL-FO XQuery module now supports pluggable XSL-FO processors. Added support for RenderHouse XEP XSL-FO Processor alongside Apache FOP - see conf.xml.tmpl
Modified Paths:
--------------
trunk/eXist/conf.xml.tmpl
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderFunction.java
Added Paths:
-----------
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ApacheFopProcessorAdapter.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ProcessorAdapter.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java
Modified: trunk/eXist/conf.xml.tmpl
===================================================================
--- trunk/eXist/conf.xml.tmpl 2011-01-29 17:30:17 UTC (rev 13685)
+++ trunk/eXist/conf.xml.tmpl 2011-01-29 17:41:24 UTC (rev 13686)
@@ -821,8 +821,16 @@
uri="http://exist-db.org/xquery/simple-ql" />
<module class="org.exist.xquery.modules.sql.SQLModule"
uri="http://exist-db.org/xquery/sql" />
+
<module class="org.exist.xquery.modules.xslfo.XSLFOModule"
- uri="http://exist-db.org/xquery/xslfo" />
+ uri="" rel="nofollow">http://exist-db.org/xquery/xslfo">
+ <!-- valid processor adapters are -
+ org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter for Apache's FOP
+ org.exist.xquery.modules.xslfo.RenderHouseXepProcessorAdapter for RenderHouse's XEP
+ -->
+ <parameter name="processorAdapter" value="org.exist.xquery.modules.xslfo.ApacheFopProcessorAdapter"/>
+ </module>
+
<module class="org.exist.xquery.modules.xmldiff.XmlDiffModule"
uri="http://exist-db.org/xquery/xmldiff" />
<module class="org.exist.xquery.modules.cache.CacheModule"
Added: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ApacheFopProcessorAdapter.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ApacheFopProcessorAdapter.java (rev 0)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ApacheFopProcessorAdapter.java 2011-01-29 17:41:24 UTC (rev 13686)
@@ -0,0 +1,118 @@
+package org.exist.xquery.modules.xslfo;
+
+import java.io.OutputStream;
+import java.util.Map.Entry;
+import java.util.Properties;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.SAXConfigurationHandler;
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.Fop;
+import org.apache.fop.apps.FopFactory;
+import org.apache.log4j.Logger;
+import org.exist.storage.DBBroker;
+import org.exist.xquery.value.NodeValue;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Adam Retter <ad...@ex...>
+ */
+public class ApacheFopProcessorAdapter implements ProcessorAdapter {
+
+ private static final Logger LOG = Logger.getLogger(ApacheFopProcessorAdapter.class);
+
+ private final FopFactory fopFactory = FopFactory.newInstance();
+
+ @Override
+ public ContentHandler getContentHandler(DBBroker broker, NodeValue configFile, Properties parameters, String mimeType, OutputStream os) throws SAXException {
+
+ // setup the FopFactory
+ if(configFile != null) {
+ FopConfigurationBuilder cfgBuilder = new FopConfigurationBuilder(broker);
+ Configuration cfg = cfgBuilder.buildFromNode(configFile);
+ fopFactory.setUserConfig(cfg);
+ }
+
+ // setup the foUserAgent, using given parameters held in the
+ // transformer handler
+ FOUserAgent foUserAgent = setupFOUserAgent(fopFactory.newFOUserAgent(), parameters);
+
+ // create new instance of FOP using the mimetype, the created user
+ // agent, and the output stream
+ Fop fop = fopFactory.newFop(mimeType, foUserAgent, os);
+
+ // Obtain FOP's DefaultHandler
+ return fop.getDefaultHandler();
+ }
+
+ @Override
+ public void cleanup() {
+ }
+
+ /**
+ * Setup the UserAgent for FOP, from given parameters *
+ *
+ * @param transformer
+ * Created based on the XSLT, so containing any parameters to the
+ * XSL-FO specified in the XQuery
+ * @param parameters
+ * any user defined parameters to the XSL-FO process
+ * @return FOUserAgent The generated FOUserAgent to include any parameters
+ * passed in
+ */
+ private FOUserAgent setupFOUserAgent(FOUserAgent foUserAgent, Properties parameters) {
+
+ // setup the foUserAgent as per the parameters given
+ foUserAgent.setProducer("eXist-db with Apache FOP");
+
+ if(parameters != null) {
+ for(Entry paramEntry : parameters.entrySet()) {
+ String key = (String)paramEntry.getKey();
+ String value = (String)paramEntry.getValue();
+
+ if(key.equals("FOPauthor")) {
+ foUserAgent.setAuthor(value);
+ } else if(key.equals("FOPtitle")) {
+ foUserAgent.setTitle(value);
+ } else if(key.equals("FOPkeywords")) {
+ foUserAgent.setTitle(value);
+ } else if(key.equals("FOPdpi")) {
+ try {
+ foUserAgent.setTargetResolution(Integer.parseInt(value));
+ } catch(NumberFormatException nfe) {
+ LOG.warn("Unable to set DPI to: " + value);
+ }
+ }
+ }
+ }
+
+ return foUserAgent;
+ }
+
+ /**
+ * Extension of the Apache Avalon DefaultConfigurationBuilder Allows better
+ * integration with Nodes passed in from eXist as Configuration files
+ */
+ private class FopConfigurationBuilder extends org.apache.avalon.framework.configuration.DefaultConfigurationBuilder {
+
+ DBBroker broker = null;
+
+ public FopConfigurationBuilder(DBBroker broker) {
+ super();
+ this.broker = broker;
+ }
+
+ @SuppressWarnings("unused")
+ public FopConfigurationBuilder(DBBroker broker, final boolean enableNamespaces) {
+ super(enableNamespaces);
+ this.broker = broker;
+ }
+
+ public Configuration buildFromNode(NodeValue configFile) throws SAXException {
+ SAXConfigurationHandler handler = getHandler();
+ handler.clear();
+ configFile.toSAX(broker, handler, new Properties());
+ return handler.getConfiguration();
+ }
+ }
+}
Added: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ProcessorAdapter.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ProcessorAdapter.java (rev 0)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/ProcessorAdapter.java 2011-01-29 17:41:24 UTC (rev 13686)
@@ -0,0 +1,19 @@
+package org.exist.xquery.modules.xslfo;
+
+import java.io.OutputStream;
+import java.util.Properties;
+import org.exist.storage.DBBroker;
+import org.exist.xquery.XPathException;
+import org.exist.xquery.value.NodeValue;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Adam Retter <ad...@ex...>
+ */
+public interface ProcessorAdapter {
+
+ public ContentHandler getContentHandler(DBBroker broker, NodeValue configFile, Properties parameters, String mimeType, OutputStream os) throws XPathException, SAXException;
+
+ public void cleanup();
+}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderFunction.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderFunction.java 2011-01-29 17:30:17 UTC (rev 13685)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderFunction.java 2011-01-29 17:41:24 UTC (rev 13686)
@@ -21,19 +21,12 @@
package org.exist.xquery.modules.xslfo;
import java.io.ByteArrayInputStream;
-import java.util.Map.Entry;
import java.util.Properties;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.SAXConfigurationHandler;
import org.exist.external.org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.Fop;
-import org.apache.fop.apps.FopFactory;
import org.apache.log4j.Logger;
import org.exist.dom.QName;
-import org.exist.storage.DBBroker;
import org.exist.xquery.BasicFunction;
import org.exist.xquery.Cardinality;
import org.exist.xquery.FunctionSignature;
@@ -48,8 +41,8 @@
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.SequenceType;
import org.exist.xquery.value.Type;
+import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
/**
* @author Craig Goodyer <cra...@gm...>
@@ -89,7 +82,7 @@
new FunctionParameterSequenceType("document", Type.NODE, Cardinality.EXACTLY_ONE, "FO document"),
new FunctionParameterSequenceType("mime-type", Type.STRING, Cardinality.EXACTLY_ONE, ""),
new FunctionParameterSequenceType("parameters", Type.NODE, Cardinality.ZERO_OR_ONE, "parameters for the transform"),
- new FunctionParameterSequenceType("config-file", Type.NODE, Cardinality.ZERO_OR_ONE, "Apache FOP Configuration file")
+ new FunctionParameterSequenceType("config-file", Type.NODE, Cardinality.ZERO_OR_ONE, "FOP Processor Configuration file")
},
new FunctionParameterSequenceType("result", Type.BASE64_BINARY, Cardinality.ZERO_OR_ONE, "result")
)
@@ -136,103 +129,28 @@
parameters = ModuleUtils.parseParameters(((NodeValue) args[2].itemAt(0)).getNode());
}
+ ProcessorAdapter adapter = null;
try {
+ adapter = ((XSLFOModule)getParentModule()).getProcessorAdapter();
- // setup the FopFactory
- FopFactory fopFactory = FopFactory.newInstance();
- if(args.length == 4 && args[3] != null && !args[3].isEmpty()) {
- FopConfigurationBuilder cfgBuilder = new FopConfigurationBuilder(context.getBroker());
- Configuration cfg = cfgBuilder.buildFromItem(args[3].itemAt(0));
- fopFactory.setUserConfig(cfg);
- }
-
- // setup the foUserAgent, using given parameters held in the
- // transformer handler
- FOUserAgent foUserAgent = setupFOUserAgent(fopFactory.newFOUserAgent(), parameters);
-
- // create new instance of FOP using the mimetype, the created user
- // agent, and the output stream
+ NodeValue configFile = args.length == 4 ? (NodeValue)args[3].itemAt(0) : null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- Fop fop = fopFactory.newFop(mimeType, foUserAgent, baos);
- // Obtain FOP's DefaultHandler
- DefaultHandler dh = fop.getDefaultHandler();
+ ContentHandler contentHandler = adapter.getContentHandler(context.getBroker(), configFile, parameters, mimeType, baos);
// process the XSL-FO
- dh.startDocument();
- inputNode.toSAX(context.getBroker(), dh, new Properties());
- dh.endDocument();
+ contentHandler.startDocument();
+ inputNode.toSAX(context.getBroker(), contentHandler, new Properties());
+ contentHandler.endDocument();
// return the result
return BinaryValueFromInputStream.getInstance(context, new Base64BinaryValueType(), new ByteArrayInputStream(baos.toByteArray()));
} catch(SAXException se) {
throw new XPathException(this, se.getMessage(), se);
- }
- }
-
- /**
- * Setup the UserAgent for FOP, from given parameters *
- *
- * @param transformer
- * Created based on the XSLT, so containing any parameters to the
- * XSL-FO specified in the XQuery
- * @param parameters
- * any user defined parameters to the XSL-FO process
- * @return FOUserAgent The generated FOUserAgent to include any parameters
- * passed in
- */
- private FOUserAgent setupFOUserAgent(FOUserAgent foUserAgent, Properties parameters) {
-
- // setup the foUserAgent as per the parameters given
- foUserAgent.setProducer("eXist-db with Apache FOP");
-
- for(Entry paramEntry : parameters.entrySet()) {
- String key = (String)paramEntry.getKey();
- String value = (String)paramEntry.getValue();
-
- if(key.equals("FOPauthor")) {
- foUserAgent.setAuthor(value);
- } else if(key.equals("FOPtitle")) {
- foUserAgent.setTitle(value);
- } else if(key.equals("FOPkeywords")) {
- foUserAgent.setTitle(value);
- } else if(key.equals("FOPdpi")) {
- try {
- foUserAgent.setTargetResolution(Integer.parseInt(value));
- } catch(NumberFormatException nfe) {
- LOG.warn("Unable to set DPI to: " + value);
- }
+ } finally {
+ if(adapter != null) {
+ adapter.cleanup();
}
-
}
-
- return foUserAgent;
}
-
- /**
- * Extension of the Apache Avalon DefaultConfigurationBuilder Allows better
- * integration with Nodes passed in from eXist as Configuration files
- */
- private class FopConfigurationBuilder extends org.apache.avalon.framework.configuration.DefaultConfigurationBuilder {
-
- DBBroker broker = null;
-
- public FopConfigurationBuilder(DBBroker broker) {
- super();
- this.broker = broker;
- }
-
- @SuppressWarnings("unused")
- public FopConfigurationBuilder(DBBroker broker, final boolean enableNamespaces) {
- super(enableNamespaces);
- this.broker = broker;
- }
-
- public Configuration buildFromItem(Item item) throws SAXException {
- SAXConfigurationHandler handler = getHandler();
- handler.clear();
- item.toSAX(broker, handler, new Properties());
- return handler.getConfiguration();
- }
- }
}
\ No newline at end of file
Added: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java (rev 0)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/RenderHouseXepProcessorAdapter.java 2011-01-29 17:41:24 UTC (rev 13686)
@@ -0,0 +1,53 @@
+package org.exist.xquery.modules.xslfo;
+
+import com.renderx.xep.FOTarget;
+import com.renderx.xep.FormatterImpl;
+import com.renderx.xep.lib.FormatterException;
+import java.io.OutputStream;
+import java.util.Properties;
+import javax.xml.transform.dom.DOMSource;
+import org.exist.storage.DBBroker;
+import org.exist.xquery.XPathException;
+import org.exist.xquery.value.NodeValue;
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ *
+ * @author Adam Retter <ad...@ex...>
+ */
+public class RenderHouseXepProcessorAdapter implements ProcessorAdapter {
+
+ private FormatterImpl formatter = null;
+
+
+ @Override
+ public ContentHandler getContentHandler(DBBroker broker, NodeValue configFile, Properties parameters, String mimeType, OutputStream os) throws XPathException, SAXException {
+
+ if(configFile == null) {
+ throw new XPathException("XEP requires a configuration file");
+ }
+
+ try {
+ if(parameters == null) {
+ formatter = new FormatterImpl(new DOMSource((Node)configFile));
+ } else {
+ formatter = new FormatterImpl(new DOMSource((Node)configFile), parameters);
+ }
+ String backendType = mimeType.substring(mimeType.indexOf("/")+1).toUpperCase();
+ FOTarget foTarget = new FOTarget(os, backendType);
+
+ return formatter.createContentHandler(null, foTarget);
+ } catch (FormatterException fe) {
+ throw new SAXException(fe.getMessage(), fe);
+ }
+ }
+
+ @Override
+ public void cleanup() {
+ if(formatter != null) {
+ formatter.cleanup();
+ }
+ }
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-01-29 17:30:26
|
Revision: 13685
http://exist.svn.sourceforge.net/exist/?rev=13685&view=rev
Author: deliriumsky
Date: 2011-01-29 17:30:17 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[bugfix] Dont send all module parameters to all modules
Modified Paths:
--------------
trunk/eXist/extensions/contentextraction/src/org/exist/contentextraction/xquery/ContentExtractionModule.java
trunk/eXist/extensions/indexes/lucene/src/org/exist/xquery/modules/lucene/LuceneModule.java
trunk/eXist/extensions/indexes/ngram/src/org/exist/xquery/modules/ngram/NGramModule.java
trunk/eXist/extensions/indexes/sort/src/org/exist/xquery/modules/sort/SortModule.java
trunk/eXist/extensions/indexes/spatial/src/org/exist/xquery/modules/spatial/SpatialModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/cache/CacheModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/compression/CompressionModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/context/ContextModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/counter/CounterModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/datetime/DateTimeModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/example/ExampleModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/expathrepo/ExpathPackageModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/file/FileModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/httpclient/HTTPClientModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/image/ImageModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeChartModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jndi/JNDIModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/MailModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/math/MathModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/memcached/MemcachedModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/oracle/OracleModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/scheduler/SchedulerModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/simpleql/SimpleQLModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/sql/SQLModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/svn/SVNModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmlcalabash/XMLCalabashModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmldiff/XmlDiffModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmpp/XMPPModule.java
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/XSLFOModule.java
trunk/eXist/extensions/modules/src/ro/kuberam/xcrypt/XcryptModule.java
trunk/eXist/extensions/svn/src/org/exist/versioning/svn/xquery/SVNModule.java
trunk/eXist/extensions/versioning/src/org/exist/versioning/xquery/VersioningModule.java
trunk/eXist/extensions/xqdoc/src/org/exist/xqdoc/xquery/XQDocModule.java
trunk/eXist/extensions/xslt/src/org/exist/xslt/functions/XSLModule.java
trunk/eXist/src/org/exist/backup/xquery/BackupModule.java
trunk/eXist/src/org/exist/xquery/AbstractInternalModule.java
trunk/eXist/src/org/exist/xquery/XQueryContext.java
trunk/eXist/src/org/exist/xquery/functions/fn/FnModule.java
trunk/eXist/src/org/exist/xquery/functions/request/RequestModule.java
trunk/eXist/src/org/exist/xquery/functions/response/ResponseModule.java
trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java
trunk/eXist/src/org/exist/xquery/functions/session/SessionModule.java
trunk/eXist/src/org/exist/xquery/functions/system/SystemModule.java
trunk/eXist/src/org/exist/xquery/functions/text/TextModule.java
trunk/eXist/src/org/exist/xquery/functions/transform/TransformModule.java
trunk/eXist/src/org/exist/xquery/functions/util/UtilModule.java
trunk/eXist/src/org/exist/xquery/functions/validation/ValidationModule.java
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBModule.java
trunk/eXist/test/src/org/exist/performance/xquery/PerfTestModule.java
trunk/eXist/test/src/org/exist/storage/util/TestUtilModule.java
Modified: trunk/eXist/extensions/contentextraction/src/org/exist/contentextraction/xquery/ContentExtractionModule.java
===================================================================
--- trunk/eXist/extensions/contentextraction/src/org/exist/contentextraction/xquery/ContentExtractionModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/contentextraction/src/org/exist/contentextraction/xquery/ContentExtractionModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -27,7 +27,7 @@
// public final static QName EXCEPTION_MESSAGE_QNAME =
// new QName("exception-message", ContentExtractionModule.NAMESPACE_URI, ContentExtractionModule.PREFIX);
- public ContentExtractionModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public ContentExtractionModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters, true);
// declareVariable(EXCEPTION_QNAME, null);
// declareVariable(EXCEPTION_MESSAGE_QNAME, null);
Modified: trunk/eXist/extensions/indexes/lucene/src/org/exist/xquery/modules/lucene/LuceneModule.java
===================================================================
--- trunk/eXist/extensions/indexes/lucene/src/org/exist/xquery/modules/lucene/LuceneModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/indexes/lucene/src/org/exist/xquery/modules/lucene/LuceneModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -50,7 +50,7 @@
new FunctionDef(Optimize.signature, Optimize.class)
};
- public LuceneModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public LuceneModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters, false);
}
Modified: trunk/eXist/extensions/indexes/ngram/src/org/exist/xquery/modules/ngram/NGramModule.java
===================================================================
--- trunk/eXist/extensions/indexes/ngram/src/org/exist/xquery/modules/ngram/NGramModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/indexes/ngram/src/org/exist/xquery/modules/ngram/NGramModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -49,7 +49,7 @@
new FunctionDef(HighlightMatches.signature, HighlightMatches.class)
};
- public NGramModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public NGramModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters, false);
}
Modified: trunk/eXist/extensions/indexes/sort/src/org/exist/xquery/modules/sort/SortModule.java
===================================================================
--- trunk/eXist/extensions/indexes/sort/src/org/exist/xquery/modules/sort/SortModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/indexes/sort/src/org/exist/xquery/modules/sort/SortModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -43,7 +43,7 @@
new FunctionDef(RemoveIndex.signatures[1], RemoveIndex.class)
};
- public SortModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public SortModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters, false);
}
Modified: trunk/eXist/extensions/indexes/spatial/src/org/exist/xquery/modules/spatial/SpatialModule.java
===================================================================
--- trunk/eXist/extensions/indexes/spatial/src/org/exist/xquery/modules/spatial/SpatialModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/indexes/spatial/src/org/exist/xquery/modules/spatial/SpatialModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -84,7 +84,7 @@
new FunctionDef(FunGMLProducers.signatures[11], FunGMLProducers.class)
};
- public SpatialModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public SpatialModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/cache/CacheModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/cache/CacheModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/cache/CacheModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -53,7 +53,7 @@
new FunctionDef(RemoveFunction.signatures[0], RemoveFunction.class)
};
- public CacheModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public CacheModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/compression/CompressionModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/compression/CompressionModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/compression/CompressionModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -57,7 +57,7 @@
new FunctionDef(UnTarFunction.signatures[0], UnTarFunction.class)
};
- public CompressionModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public CompressionModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/context/ContextModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/context/ContextModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/context/ContextModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -51,7 +51,7 @@
new FunctionDef( GetID.signatures[0], GetID.class )
};
- public ContextModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public ContextModule(Map<String, List<? extends Object>> parameters) {
super( signatures, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/counter/CounterModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/counter/CounterModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/counter/CounterModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -63,7 +63,7 @@
public final static QName EXCEPTION_MESSAGE_QNAME =
new QName("exception-message", CounterModule.NAMESPACE_URI, CounterModule.PREFIX);
- public CounterModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public CounterModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters, true);
declareVariable(EXCEPTION_QNAME, null);
declareVariable(EXCEPTION_MESSAGE_QNAME, null);
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/datetime/DateTimeModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/datetime/DateTimeModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/datetime/DateTimeModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -59,7 +59,7 @@
};
- public DateTimeModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public DateTimeModule(Map<String, List<? extends Object>> parameters)
{
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/example/ExampleModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/example/ExampleModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/example/ExampleModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -43,7 +43,7 @@
new FunctionDef(EchoFunction.signature, EchoFunction.class)
};
- public ExampleModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public ExampleModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/expathrepo/ExpathPackageModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/expathrepo/ExpathPackageModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/expathrepo/ExpathPackageModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -57,7 +57,7 @@
new FunctionDef(RemoveFunction.signature, RemoveFunction.class)
};
- public ExpathPackageModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public ExpathPackageModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters);
_repo = getRepo();
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/file/FileModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/file/FileModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/file/FileModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -72,7 +72,7 @@
};
- public FileModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public FileModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/httpclient/HTTPClientModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/httpclient/HTTPClientModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/httpclient/HTTPClientModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -61,7 +61,7 @@
};
- public HTTPClientModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public HTTPClientModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/image/ImageModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/image/ImageModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/image/ImageModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -72,7 +72,7 @@
};
- public ImageModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public ImageModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeChartModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeChartModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jfreechart/JFreeChartModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -52,7 +52,7 @@
public final static QName EXCEPTION_MESSAGE_QNAME =
new QName("exception-message", JFreeChartModule.NAMESPACE_URI, JFreeChartModule.PREFIX);
- public JFreeChartModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public JFreeChartModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters);
declareVariable(EXCEPTION_QNAME, null);
declareVariable(EXCEPTION_MESSAGE_QNAME, null);
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jndi/JNDIModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jndi/JNDIModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/jndi/JNDIModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -83,7 +83,7 @@
private static long currentContextID = System.currentTimeMillis();
- public JNDIModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public JNDIModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/MailModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/MailModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/MailModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -94,7 +94,7 @@
private static long currentSessionHandle = System.currentTimeMillis();
- public MailModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public MailModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/math/MathModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/math/MathModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/math/MathModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -61,7 +61,7 @@
new FunctionDef(TwoParamFunctions.signature[1], TwoParamFunctions.class)
};
- public MathModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public MathModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/memcached/MemcachedModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/memcached/MemcachedModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/memcached/MemcachedModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -68,7 +68,7 @@
private static long currentSessionHandle = System.currentTimeMillis();
- public MemcachedModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public MemcachedModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/oracle/OracleModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/oracle/OracleModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/oracle/OracleModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -56,7 +56,7 @@
new FunctionDef(ExecuteFunction.signatures[1], ExecuteFunction.class)
};
- public OracleModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public OracleModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/scheduler/SchedulerModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/scheduler/SchedulerModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/scheduler/SchedulerModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -63,7 +63,7 @@
new FunctionDef( ResumeScheduledJob.signature, ResumeScheduledJob.class )
};
- public SchedulerModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public SchedulerModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/simpleql/SimpleQLModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/simpleql/SimpleQLModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/simpleql/SimpleQLModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -46,7 +46,7 @@
new FunctionDef(ParseSimpleQL.signature, ParseSimpleQL.class)
};
- public SimpleQLModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public SimpleQLModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/sql/SQLModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/sql/SQLModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/sql/SQLModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -75,7 +75,7 @@
public final static String CONNECTIONS_CONTEXTVAR = "_eXist_sql_connections";
public final static String PREPARED_STATEMENTS_CONTEXTVAR = "_eXist_sql_prepared_statements";
- public SQLModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public SQLModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/svn/SVNModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/svn/SVNModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/svn/SVNModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -47,7 +47,7 @@
new FunctionDef(SVNLatestRevision.signature, SVNLatestRevision.class),
};
- public SVNModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public SVNModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmlcalabash/XMLCalabashModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmlcalabash/XMLCalabashModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmlcalabash/XMLCalabashModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -16,7 +16,7 @@
new FunctionDef(ProcessFunction.signature, ProcessFunction.class)
};
- public XMLCalabashModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public XMLCalabashModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmldiff/XmlDiffModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmldiff/XmlDiffModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmldiff/XmlDiffModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -43,7 +43,7 @@
new FunctionDef(Compare.signature, Compare.class),
};
- public XmlDiffModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public XmlDiffModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmpp/XMPPModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmpp/XMPPModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xmpp/XMPPModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -69,7 +69,7 @@
private static long currentSessionHandle = System.currentTimeMillis();
- public XMPPModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public XMPPModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters );
}
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/XSLFOModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/XSLFOModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/xslfo/XSLFOModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -23,6 +23,7 @@
import java.util.List;
import java.util.Map;
+import org.apache.log4j.Logger;
import org.exist.xquery.AbstractInternalModule;
import org.exist.xquery.FunctionDef;
@@ -33,6 +34,8 @@
*/
public class XSLFOModule extends AbstractInternalModule {
+ private static final Logger logger = Logger.getLogger(XSLFOModule.class);
+
public final static String NAMESPACE_URI = "http://exist-db.org/xquery/xslfo";
public final static String PREFIX = "xslfo";
public final static String INCLUSION_DATE = "2007-10-04";
@@ -43,7 +46,7 @@
new FunctionDef(RenderFunction.signatures[1], RenderFunction.class)
};
- public XSLFOModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public XSLFOModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
@@ -67,4 +70,27 @@
return RELEASED_IN_VERSION;
}
-}
+ private ProcessorAdapter adapter = null;
+
+ public synchronized ProcessorAdapter getProcessorAdapter() {
+
+ if(adapter == null) {
+ List<String> processorAdapterParamList = (List<String>)getParameter("processorAdapter");
+ if(!processorAdapterParamList.isEmpty()) {
+ String processorAdapter = processorAdapterParamList.get(0);
+
+ try {
+ Class<ProcessorAdapter> clazzAdapter = (Class<ProcessorAdapter>)Class.forName(processorAdapter);
+ adapter = clazzAdapter.newInstance();
+ } catch (ClassNotFoundException cnfe) {
+ logger.error("Unable to instantiate FO Processor Adapter:" + cnfe.getMessage(), cnfe);
+ } catch(InstantiationException ie) {
+ logger.error("Unable to instantiate FO Processor Adapter:" + ie.getMessage(), ie);
+ } catch(IllegalAccessException iae) {
+ logger.error("Unable to instantiate FO Processor Adapter:" + iae.getMessage(), iae);
+ }
+ }
+ }
+ return adapter;
+ }
+}
\ No newline at end of file
Modified: trunk/eXist/extensions/modules/src/ro/kuberam/xcrypt/XcryptModule.java
===================================================================
--- trunk/eXist/extensions/modules/src/ro/kuberam/xcrypt/XcryptModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/modules/src/ro/kuberam/xcrypt/XcryptModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -33,7 +33,7 @@
new FunctionDef(ValidateSignatureFunction.signature, ValidateSignatureFunction.class)
};
- public XcryptModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public XcryptModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/svn/src/org/exist/versioning/svn/xquery/SVNModule.java
===================================================================
--- trunk/eXist/extensions/svn/src/org/exist/versioning/svn/xquery/SVNModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/svn/src/org/exist/versioning/svn/xquery/SVNModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -57,7 +57,7 @@
new FunctionDef(SVNUpdate.signature, SVNUpdate.class)
};
- public SVNModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public SVNModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/versioning/src/org/exist/versioning/xquery/VersioningModule.java
===================================================================
--- trunk/eXist/extensions/versioning/src/org/exist/versioning/xquery/VersioningModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/versioning/src/org/exist/versioning/xquery/VersioningModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -49,7 +49,7 @@
new FunctionDef(DiffFunction.signature, DiffFunction.class)
};
- public VersioningModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public VersioningModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/extensions/xqdoc/src/org/exist/xqdoc/xquery/XQDocModule.java
===================================================================
--- trunk/eXist/extensions/xqdoc/src/org/exist/xqdoc/xquery/XQDocModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/xqdoc/src/org/exist/xqdoc/xquery/XQDocModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -18,7 +18,7 @@
new FunctionDef(Scan.signatures[1], Scan.class)
};
- public XQDocModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public XQDocModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters, true);
}
Modified: trunk/eXist/extensions/xslt/src/org/exist/xslt/functions/XSLModule.java
===================================================================
--- trunk/eXist/extensions/xslt/src/org/exist/xslt/functions/XSLModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/extensions/xslt/src/org/exist/xslt/functions/XSLModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -66,7 +66,7 @@
/**
* @param functions
*/
- public XSLModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public XSLModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/src/org/exist/backup/xquery/BackupModule.java
===================================================================
--- trunk/eXist/src/org/exist/backup/xquery/BackupModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/backup/xquery/BackupModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -46,7 +46,7 @@
new FunctionDef( RetrieveBackup.signature, RetrieveBackup.class )
};
- public BackupModule(Map<String, Map<String, List<? extends Object>>> parameters)
+ public BackupModule(Map<String, List<? extends Object>> parameters)
{
super( functions, parameters, true );
}
Modified: trunk/eXist/src/org/exist/xquery/AbstractInternalModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/AbstractInternalModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/AbstractInternalModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -55,15 +55,15 @@
protected final FunctionDef[] mFunctions;
protected final boolean ordered;
- private final Map<String, Map<String, List<? extends Object>>> parameters;
+ private final Map<String, List<? extends Object>> parameters;
protected final TreeMap<QName, Variable> mGlobalVariables = new TreeMap<QName, Variable>();
- public AbstractInternalModule(FunctionDef[] functions, Map<String, Map<String, List<? extends Object>>> parameters) {
+ public AbstractInternalModule(FunctionDef[] functions, Map<String, List<? extends Object>> parameters) {
this(functions, parameters, false);
}
- public AbstractInternalModule(FunctionDef[] functions, Map<String, Map<String, List<? extends Object>>> parameters, boolean functionsOrdered) {
+ public AbstractInternalModule(FunctionDef[] functions, Map<String, List<? extends Object>> parameters, boolean functionsOrdered) {
this.mFunctions = functions;
this.ordered = functionsOrdered;
this.parameters = parameters;
@@ -80,7 +80,7 @@
/**
* returns a module parameter
*/
- protected Map<String, List<? extends Object>> getParameter(String paramName) {
+ protected List<? extends Object> getParameter(String paramName) {
return parameters.get(paramName);
}
Modified: trunk/eXist/src/org/exist/xquery/XQueryContext.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/XQueryContext.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/XQueryContext.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -1688,12 +1688,11 @@
protected Module instantiateModule( String namespaceURI, Class<Module> mClass, Map<String, Map<String, List<? extends Object>>> moduleParameters) {
Module module = null;
-
-
try {
Constructor<Module> cnstr = mClass.getConstructor(Map.class);
- module = cnstr.newInstance(moduleParameters);
+
+ module = cnstr.newInstance(moduleParameters.get(namespaceURI));
if(!module.getNamespaceURI().equals(namespaceURI)) {
LOG.warn( "the module declares a different namespace URI. Expected: " + namespaceURI + " found: " + module.getNamespaceURI() );
Modified: trunk/eXist/src/org/exist/xquery/functions/fn/FnModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/fn/FnModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/fn/FnModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -207,7 +207,7 @@
Arrays.sort(functions, new FunctionComparator());
}
- public FnModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public FnModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters, true);
}
Modified: trunk/eXist/src/org/exist/xquery/functions/request/RequestModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/request/RequestModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/request/RequestModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -80,7 +80,7 @@
Arrays.sort(functions, new FunctionComparator());
}
- public RequestModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public RequestModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters, true);
// predefined module global variables:
declareVariable(REQUEST_VAR, null);
Modified: trunk/eXist/src/org/exist/xquery/functions/response/ResponseModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/response/ResponseModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/response/ResponseModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -58,7 +58,7 @@
new FunctionDef( GetExists.signature, GetExists.class )
};
- public ResponseModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException
+ public ResponseModule(Map<String, List<? extends Object>> parameters) throws XPathException
{
super(functions, parameters);
Modified: trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -49,7 +49,7 @@
new FunctionDef(GetAccountMetadataFunction.signatures[1], GetAccountMetadataFunction.class)
};
- public SecurityManagerModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public SecurityManagerModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/src/org/exist/xquery/functions/session/SessionModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/session/SessionModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/session/SessionModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -71,7 +71,7 @@
new FunctionDef( GetExists.signature, GetExists.class )
};
- public SessionModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException
+ public SessionModule(Map<String, List<? extends Object>> parameters) throws XPathException
{
super(functions, parameters);
// predefined module global variables:
Modified: trunk/eXist/src/org/exist/xquery/functions/system/SystemModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/system/SystemModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/system/SystemModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -76,7 +76,7 @@
new FunctionDef(FunctionAvailable.signature, FunctionAvailable.class)
};
- public SystemModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public SystemModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/src/org/exist/xquery/functions/text/TextModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/text/TextModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/text/TextModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -74,7 +74,7 @@
/**
*
*/
- public TextModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public TextModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/src/org/exist/xquery/functions/transform/TransformModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/transform/TransformModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/transform/TransformModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -47,7 +47,7 @@
new FunctionDef(Transform.signatures[3], Transform.class)
};
- public TransformModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public TransformModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/src/org/exist/xquery/functions/util/UtilModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/util/UtilModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/util/UtilModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -142,7 +142,7 @@
public final static QName EXCEPTION_MESSAGE_QNAME = new QName( "exception-message", UtilModule.NAMESPACE_URI, UtilModule.PREFIX );
- public UtilModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException
+ public UtilModule(Map<String, List<? extends Object>> parameters) throws XPathException
{
super( functions, parameters, true );
declareVariable( EXCEPTION_QNAME, null );
Modified: trunk/eXist/src/org/exist/xquery/functions/validation/ValidationModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/validation/ValidationModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/validation/ValidationModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -77,7 +77,7 @@
public final static QName EXCEPTION_MESSAGE_QNAME =
new QName("exception-message", ValidationModule.NAMESPACE_URI, ValidationModule.PREFIX);
- public ValidationModule(Map<String, Map<String, List<? extends Object>>> parameters) throws XPathException {
+ public ValidationModule(Map<String, List<? extends Object>> parameters) throws XPathException {
super(functions, parameters);
declareVariable(EXCEPTION_QNAME, null);
declareVariable(EXCEPTION_MESSAGE_QNAME, null);
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -123,7 +123,7 @@
Arrays.sort(functions, new FunctionComparator());
}
- public XMLDBModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public XMLDBModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters, true);
}
Modified: trunk/eXist/test/src/org/exist/performance/xquery/PerfTestModule.java
===================================================================
--- trunk/eXist/test/src/org/exist/performance/xquery/PerfTestModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/test/src/org/exist/performance/xquery/PerfTestModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -45,7 +45,7 @@
};
- public PerfTestModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public PerfTestModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
Modified: trunk/eXist/test/src/org/exist/storage/util/TestUtilModule.java
===================================================================
--- trunk/eXist/test/src/org/exist/storage/util/TestUtilModule.java 2011-01-29 17:19:39 UTC (rev 13684)
+++ trunk/eXist/test/src/org/exist/storage/util/TestUtilModule.java 2011-01-29 17:30:17 UTC (rev 13685)
@@ -44,7 +44,7 @@
new FunctionDef(PauseFunction.signature, PauseFunction.class)
};
- public TestUtilModule(Map<String, Map<String, List<? extends Object>>> parameters) {
+ public TestUtilModule(Map<String, List<? extends Object>> parameters) {
super(functions, parameters);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-01-29 17:19:46
|
Revision: 13684
http://exist.svn.sourceforge.net/exist/?rev=13684&view=rev
Author: deliriumsky
Date: 2011-01-29 17:19:39 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
Test case showing problem with in-memory ElementImpl for getElementsByTagName
Modified Paths:
--------------
trunk/eXist/test/src/org/exist/memtree/DOMTest.java
Modified: trunk/eXist/test/src/org/exist/memtree/DOMTest.java
===================================================================
--- trunk/eXist/test/src/org/exist/memtree/DOMTest.java 2011-01-29 15:53:09 UTC (rev 13683)
+++ trunk/eXist/test/src/org/exist/memtree/DOMTest.java 2011-01-29 17:19:39 UTC (rev 13684)
@@ -15,10 +15,15 @@
import org.exist.dom.QName;
import org.exist.util.serializer.DOMSerializer;
+import org.junit.Test;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.AttributesImpl;
/**
* @author wolf
@@ -77,22 +82,92 @@
}
public void testGetChildNodes2() {
- MemTreeBuilder builder = new MemTreeBuilder();
- builder.startDocument();
- builder.startElement(new QName("top", null, null), null);
- builder.startElement(new QName("child1", null, null), null);
- builder.endElement();
- builder.startElement(new QName("child2", null, null), null);
- builder.endElement();
- builder.endElement();
- builder.endDocument();
- DocumentImpl doc = builder.getDocument();
+ MemTreeBuilder builder = new MemTreeBuilder();
+ builder.startDocument();
+ builder.startElement(new QName("top", null, null), null);
+ builder.startElement(new QName("child1", null, null), null);
+ builder.endElement();
+ builder.startElement(new QName("child2", null, null), null);
+ builder.endElement();
+ builder.endElement();
+ builder.endDocument();
+ DocumentImpl doc = builder.getDocument();
Node top = doc.getFirstChild();
assertEquals(Node.ELEMENT_NODE, top.getNodeType());
assertEquals("top", top.getNodeName());
assertEquals(2, top.getChildNodes().getLength());
}
+ @Test
+ public void testGetElementsByTagName() {
+ MemTreeBuilder builder = new MemTreeBuilder();
+ builder.startDocument();
+ builder.startElement(new QName("xquery", null, null), null);
+ builder.startElement(new QName("builtin-modules", null, null), null);
+
+ AttributesImpl attrs = new AttributesImpl();
+ attrs.addAttribute(null, "class", "class", "string", "org.exist.xquery.functions.util.UtilModule");
+ attrs.addAttribute(null, "uri", "uri", "string", "http://exist-db.org/xquery/util");
+ builder.startElement(new QName("module", null, null), attrs);
+ builder.endElement();
+
+ attrs = new AttributesImpl();
+ attrs.addAttribute(null, "class", "class", "string", "org.exist.xquery.functions.request.RequestModule");
+ attrs.addAttribute(null, "uri", "uri", "string", "http://exist-db.org/xquery/request");
+ builder.startElement(new QName("module", null, null), attrs);
+
+ attrs = new AttributesImpl();
+ attrs.addAttribute(null, "name", "name", "string", "stream");
+ attrs.addAttribute(null, "value", "value", "string", "true");
+ builder.startElement(new QName("parameter", null, null), attrs);
+ builder.endElement();
+
+ builder.endElement();
+
+ attrs = new AttributesImpl();
+ attrs.addAttribute(null, "class", "class", "string", "org.exist.xquery.functions.util.ResponseModule");
+ attrs.addAttribute(null, "uri", "uri", "string", "http://exist-db.org/xquery/response");
+ builder.startElement(new QName("module", null, null), attrs);
+ builder.endElement();
+
+ attrs = new AttributesImpl();
+ attrs.addAttribute(null, "class", "class", "string", "org.exist.xquery.functions.util.SessionModule");
+ attrs.addAttribute(null, "uri", "uri", "string", "http://exist-db.org/xquery/session");
+ builder.startElement(new QName("module", null, null), attrs);
+ builder.endElement();
+
+ builder.endElement();
+ builder.endElement();
+ builder.endDocument();
+
+ DocumentImpl doc = builder.getDocument();
+
+ Node nXQuery = doc.getFirstChild();
+ assertTrue(nXQuery.getNodeType() == Node.ELEMENT_NODE);
+ assertTrue(nXQuery.getLocalName().equals("xquery"));
+
+ Node nBuiltinModules = nXQuery.getFirstChild();
+ assertTrue(nBuiltinModules.getNodeType() == Node.ELEMENT_NODE);
+ assertTrue(nBuiltinModules.getLocalName().equals("builtin-modules"));
+
+ NodeList nlModules = nBuiltinModules.getChildNodes();
+ for(int i = 0; i < nlModules.getLength(); i++) {
+ Node nModule = nlModules.item(i);
+
+ assertTrue(nModule.getNodeType() == Node.ELEMENT_NODE);
+ assertTrue(nModule.getLocalName().equals("module"));
+
+ Element eModule = (Element)nModule;
+ NodeList nlParameter = eModule.getElementsByTagName("parameter");
+
+ if(eModule.getAttribute("class").equals("org.exist.xquery.functions.request.RequestModule")) {
+ assertEquals(1, nlParameter.getLength());
+ } else {
+ assertEquals(0, nlParameter.getLength());
+ }
+ }
+ }
+
public void print(Node node) {
while (node != null) {
switch (node.getNodeType()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-01-29 15:53:16
|
Revision: 13683
http://exist.svn.sourceforge.net/exist/?rev=13683&view=rev
Author: wolfgang_m
Date: 2011-01-29 15:53:09 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[bugfix] recent changes to the symbol table led to incorrect ids being assigned if an attribute and element had the same name. This caused some issues in the security manager.
Modified Paths:
--------------
trunk/eXist/src/org/exist/dom/SymbolTable.java
Modified: trunk/eXist/src/org/exist/dom/SymbolTable.java
===================================================================
--- trunk/eXist/src/org/exist/dom/SymbolTable.java 2011-01-29 11:06:16 UTC (rev 13682)
+++ trunk/eXist/src/org/exist/dom/SymbolTable.java 2011-01-29 15:53:09 UTC (rev 13683)
@@ -180,7 +180,7 @@
ensureCapacity();
names[id] = localName;
- write(NAME_ID_TYPE, id, localName);
+ write(NAME_ID_TYPE, id, key);
changed = true;
return id;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ge...@us...> - 2011-01-29 11:06:22
|
Revision: 13682
http://exist.svn.sourceforge.net/exist/?rev=13682&view=rev
Author: gev
Date: 2011-01-29 11:06:16 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
[feature] use URL (the request header "HOST" + an URI) instead an URI as key for urlCache
Modified Paths:
--------------
trunk/eXist/src/org/exist/http/urlrewrite/XQueryURLRewrite.java
Modified: trunk/eXist/src/org/exist/http/urlrewrite/XQueryURLRewrite.java
===================================================================
--- trunk/eXist/src/org/exist/http/urlrewrite/XQueryURLRewrite.java 2011-01-28 15:48:45 UTC (rev 13681)
+++ trunk/eXist/src/org/exist/http/urlrewrite/XQueryURLRewrite.java 2011-01-29 11:06:16 UTC (rev 13682)
@@ -234,7 +234,7 @@
// check if the request URI is already in the url cache
ModelAndView modelView;
synchronized (urlCache) {
- modelView = urlCache.get(modifiedRequest.getRequestURI());
+ modelView = urlCache.get(modifiedRequest.getHeader("Host") + modifiedRequest.getRequestURI());
}
// no: create a new model and view configuration
if (modelView == null) {
@@ -329,7 +329,7 @@
if (modelView.useCache()) {
synchronized (urlCache) {
- urlCache.put(request.getRequestURI(), modelView);
+ urlCache.put(modifiedRequest.getHeader("Host") + request.getRequestURI(), modelView);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jen...@us...> - 2011-01-28 15:48:54
|
Revision: 13681
http://exist.svn.sourceforge.net/exist/?rev=13681&view=rev
Author: jenspetersen
Date: 2011-01-28 15:48:45 +0000 (Fri, 28 Jan 2011)
Log Message:
-----------
[biblio app] Fixes to the basic input forms, the presentation of the help system and retrieve-mods.
Modified Paths:
--------------
trunk/eXist/webapp/biblio/mods/apps/mods/code-tables/role-codes.xml
trunk/eXist/webapp/biblio/mods/apps/mods/code-tables/script-codes.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/docbook.css
trunk/eXist/webapp/biblio/mods/apps/mods/docs/header.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/index.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/security-manager.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/sidebar.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.01.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.02.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.03.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.04.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.05.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.06.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.07.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.08.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.09.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.10.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.11.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.12.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.13.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.14.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.15.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.16.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.17.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.18.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.19.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.20.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.21.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.22.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.23.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.24.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/body/00-compact-contents.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/body/00-compact-related.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/body/00-compact-standalone.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/body/01-title.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/body/02-name.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/compact-template.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/edit.css
trunk/eXist/webapp/biblio/mods/apps/mods/edit/insert-templates.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/anthology-latin.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/anthology-transliterated.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/article-in-periodical-latin-compact.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/article-in-periodical-transliterated-compact.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/contribution-to-anthology-latin-compact.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/contribution-to-anthology-transliterated-compact.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/monograph-latin.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/monograph-transliteration.xml
trunk/eXist/webapp/biblio/mods/apps/mods/edit/instances/suebs-tibetan.xml
trunk/eXist/webapp/biblio/mods/apps/mods/search/index.xml
trunk/eXist/webapp/biblio/mods/apps/mods/search/retrieve-mods.xql
trunk/eXist/webapp/biblio/mods/modules/style.xqm
trunk/eXist/webapp/biblio/mods/resources/css/style.css
trunk/eXist/webapp/biblio/mods/styles/default-style2.css
trunk/eXist/webapp/biblio/mods/stylesheets/db2xhtml.xsl
trunk/eXist/webapp/biblio/mods/stylesheets/xmlsource.xsl
Added Paths:
-----------
trunk/eXist/webapp/biblio/mods/apps/mods/code-tables/date-encoding-short-codes.xml
trunk/eXist/webapp/biblio/mods/apps/mods/code-tables/role-codes-legend.xml
trunk/eXist/webapp/biblio/mods/apps/mods/docs/images/text_list_bullets.png
trunk/eXist/webapp/biblio/mods/apps/mods/docs/walkthrough.toc.xml
Added: trunk/eXist/webapp/biblio/mods/apps/mods/code-tables/date-encoding-short-codes.xml
===================================================================
--- trunk/eXist/webapp/biblio/mods/apps/mods/code-tables/date-encoding-short-codes.xml (rev 0)
+++ trunk/eXist/webapp/biblio/mods/apps/mods/code-tables/date-encoding-short-codes.xml 2011-01-28 15:48:45 UTC (rev 13681)
@@ -0,0 +1 @@
+<code-table><code-table-name>date-encoding-short-code</code-table-name><status>finished</status><form>closed</form><basis> |