diff --git a/.circleci/config.yml b/.circleci/config.yml
index 2a2eeca6bf..0d4cc2c6d9 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -530,12 +530,13 @@ jobs:
else
export JAVA_TOOL_OPTIONS="<< pipeline.parameters.java_tool_options >>"
fi
- $MAVEN_BIN test -Dappbundler.skip=true -Ddocker=false -P !mac-dmg-on-mac,!codesign-mac-app,!codesign-mac-dmg,!mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives
+ $MAVEN_BIN test integration-test -Dappbundler.skip=true -Ddocker=false -P !mac-dmg-on-mac,!codesign-mac-app,!codesign-mac-dmg,!mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives
- run:
name: Save test results
command: |
mkdir -p ~/test-results/junit/
/usr/bin/find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \;
+ /usr/bin/find . -type f -regex ".*/target/failsafe-reports/.*xml" -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: ~/test-results
diff --git a/build.bat b/build.bat
index 6658cbc41c..d242a11495 100644
--- a/build.bat
+++ b/build.bat
@@ -95,7 +95,7 @@ if "%TARGET%"=="quick" (
) else if "%TARGET%"=="test" (
set "CMD=%BASE_CMD% clean test -Ddependency-check.skip=true"
) else if "%TARGET%"=="site" (
- set "CMD=%BASE_CMD% clean test -Ddependency-check.skip=true"
+ set "CMD=%BASE_CMD% clean verify site -Ddependency-check.skip=true"
) else if "%TARGET%"=="license-check" (
set "CMD=%BASE_CMD% license:check"
) else if "%TARGET%"=="license-format" (
diff --git a/build.sh b/build.sh
index 86330bb101..d5bce47c7a 100755
--- a/build.sh
+++ b/build.sh
@@ -141,7 +141,7 @@ if [ "${TARGET}" == "test" ]; then
fi
if [ "${TARGET}" == "site" ]; then
- CMD="${BASE_CMD} clean site -Ddependency-check.skip=true"
+ CMD="${BASE_CMD} clean verify site -Ddependency-check.skip=true"
$CMD
exit 0;
fi
@@ -171,4 +171,4 @@ if [ "${TARGET}" == "dependency-security-check" ]; then
fi
print-useage
-exit 0;
\ No newline at end of file
+exit 0;
diff --git a/elemental-parent/pom.xml b/elemental-parent/pom.xml
index f8285542cd..0dea922d7b 100644
--- a/elemental-parent/pom.xml
+++ b/elemental-parent/pom.xml
@@ -413,6 +413,10 @@
JRE,CLDR,SPI${project.build.testOutputDirectory}/log4j2.xml
+
+ **/*Test.java
+ **/*Tests.java
+
@@ -424,6 +428,11 @@
org.apache.maven.pluginsmaven-failsafe-plugin3.5.3
+
+
+ **/*IT.java
+
+ com.github.hazendaz.maven
@@ -528,6 +537,26 @@
org.apache.maven.pluginsmaven-surefire-plugin
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+
+
+ integration-test
+ integration-test
+
+ integration-test
+
+
+
+ verify
+ verify
+
+ verify
+
+
+
+ org.apache.maven.pluginsmaven-release-plugin
diff --git a/exist-ant/src/test/resources/log4j2.xml b/exist-ant/src/test/resources/log4j2.xml
index 5d4834fd6a..4b66772f41 100644
--- a/exist-ant/src/test/resources/log4j2.xml
+++ b/exist-ant/src/test/resources/log4j2.xml
@@ -231,15 +231,15 @@
-
+
-
+
-
+
diff --git a/exist-core/pom.xml b/exist-core/pom.xml
index f6540927b8..6f6b81f322 100644
--- a/exist-core/pom.xml
+++ b/exist-core/pom.xml
@@ -755,9 +755,9 @@
src/test/xquery/xquery3/parse-xml.xqmsrc/test/xquery/xquery3/serialize.xqlsrc/main/java/org/exist/Indexer.java
+ src/test/java/org/exist/Indexer2Test.java
+ src/test/java/org/exist/Indexer3Test.javasrc/test/java/org/exist/IndexerTest.java
- src/test/java/org/exist/IndexerTest2.java
- src/test/java/org/exist/IndexerTest3.javasrc/main/java/org/exist/Namespaces.javasrc/main/resources-filtered/org/exist/system.propertiessrc/main/java/org/exist/backup/SystemExport.java
@@ -790,23 +790,30 @@
src/main/java/org/exist/collections/Collection.javasrc/main/java/org/exist/collections/CollectionConfiguration.javasrc/main/java/org/exist/collections/CollectionConfigurationManager.java
+ src/test/java/org/exist/collections/CollectionStoreTest.javasrc/main/java/org/exist/collections/LockedCollection.javasrc/main/java/org/exist/collections/MutableCollection.java
+ src/test/java/org/exist/collections/OpenCollectionTestsrc/main/java/org/exist/collections/triggers/CollectionTrigger.javasrc/main/java/org/exist/collections/triggers/DocumentTrigger.java
+ src/test/java/org/exist/collections/triggers/MessagesTrigger.java
+ src/test/java/org/exist/collections/triggers/TriggerConfigTest.javasrc/main/java/org/exist/collections/triggers/XQueryStartupTrigger.javasrc/main/java/org/exist/config/Configuration.javasrc/main/java/org/exist/config/ConfigurationImpl.javasrc/main/java/org/exist/config/Configurator.java
+ src/test/java/org/exist/deadlocks/GetReleaseBrokerDeadlocksTest.javasrc/main/java/org/exist/dom/NodeListImpl.javasrc/main/java/org/exist/dom/QName.javasrc/main/java/org/exist/dom/memtree/AbstractCharacterData.javasrc/main/java/org/exist/dom/memtree/AttrImpl.javasrc/main/java/org/exist/dom/memtree/DocumentImpl.java
+ src/test/java/org/exist/dom/memtree/DocumentImplTest.javasrc/main/java/org/exist/dom/memtree/DOMIndexer.javasrc/test/java/org/exist/dom/memtree/DOMIndexerTest.javasrc/test/java/org/exist/dom/memtree/DOMTest.javasrc/main/java/org/exist/dom/memtree/ElementImpl.java
+ src/test/java/org/exist/dom/memtree/MemtreeInXQueryTest.javasrc/main/java/org/exist/dom/memtree/MemTreeBuilder.javasrc/main/java/org/exist/dom/memtree/NamespaceNode.javasrc/main/java/org/exist/dom/memtree/NodeImpl.java
@@ -815,6 +822,7 @@
src/main/java/org/exist/dom/persistent/AttrImpl.javasrc/main/java/org/exist/dom/persistent/BinaryDocument.javasrc/main/java/org/exist/dom/persistent/CommentImpl.java
+ src/test/java/org/exist/dom/persistent/DefaultDocumentSetTest.javasrc/main/java/org/exist/dom/persistent/DocumentImpl.javasrc/main/java/org/exist/dom/persistent/DocumentMetadata.javasrc/main/java/org/exist/dom/persistent/DocumentTypeImpl.java
@@ -896,6 +904,8 @@
src/test/java/org/exist/storage/BFileRecoverTest.javasrc/main/java/org/exist/storage/BrokerFactory.javasrc/main/java/org/exist/storage/BrokerPool.java
+ src/test/java/org/exist/storage/BrokerPoolsTest.java
+ src/test/java/org/exist/storage/BrokerPoolTest.javasrc/test/java/org/exist/storage/CollectionTest.javasrc/test/java/org/exist/storage/CopyResourceTest.javasrc/main/java/org/exist/storage/DBBroker.java
@@ -907,8 +917,9 @@
src/main/java/org/exist/storage/NodePath.javasrc/test/java/org/exist/storage/NodePathTest.javasrc/main/java/org/exist/storage/ProcessMonitor.java
+ src/test/java/org/exist/storage/RecoverBinary2Test.javasrc/test/java/org/exist/storage/RecoveryTest.java
- src/test/java/org/exist/storage/RecoveryTest2.java
+ src/test/java/org/exist/storage/Recovery2Test.javasrc/main/java/org/exist/storage/StorageAddress.javasrc/test/java/org/exist/storage/btree/BTreeTest.javasrc/main/java/org/exist/storage/btree/TreeMetrics.java
@@ -924,17 +935,29 @@
src/main/java/org/exist/storage/serializers/Serializer.javasrc/test/resources-filtered/org/exist/storage/statistics/conf.xmlsrc/main/java/org/exist/storage/sync/SyncTask.java
+ src/test/java/org/exist/storage/util/PauseFunction.javasrc/main/java/org/exist/test/ExistXmldbEmbeddedServer.java
+ src/main/java/org/exist/test/runner/ExtTestAssumptionFailedFunction.java
+ src/main/java/org/exist/test/runner/ExtTestErrorFunction.javasrc/main/java/org/exist/test/runner/ExtTestFailureFunction.java
+ src/main/java/org/exist/test/runner/ExtTestFinishedFunction.java
+ src/main/java/org/exist/test/runner/ExtTestIgnoredFunction.java
+ src/main/java/org/exist/test/runner/ExtTestStartedFunction.java
+ src/main/java/org/exist/test/runner/JUnitIntegrationFunction.javasrc/main/java/org/exist/test/runner/XMLTestRunner.javasrc/main/java/org/exist/test/runner/XQueryTestRunner.javasrc/main/java/org/exist/test/runner/XSuite.javasrc/test/java/org/exist/util/AbstractXMLReaderSecurityTest.javasrc/main/java/org/exist/util/Collations.java
+ src/test/java/org/exist/util/CollationsTest.javasrc/main/java/org/exist/util/Configuration.javasrc/test/java/org/exist/util/DOMSerializerTest.java
+ src/test/java/org/exist/util/LeasableTest.javasrc/main/java/org/exist/util/ParametersExtractor.javasrc/main/java/org/exist/util/crypto/digest/DigestType.java
+ src/test/java/org/exist/util/io/FilterInputStreamCacheMonitorTest.java
+ src/test/java/org/exist/util/io/OverflowToDiskStreamTest.java
+ src/test/java/org/exist/util/pool/NodePoolTest.javasrc/main/java/org/exist/util/serializer/AttrList.javasrc/main/java/org/exist/util/serializer/DOMStreamer.javasrc/main/java/org/exist/util/serializer/EXISerializer.java
@@ -945,6 +968,12 @@
src/test/java/org/exist/util/serializer/json/JSONObjectTest.javasrc/main/java/org/exist/util/serializer/json/JSONSerializer.javasrc/test/java/org/exist/util/serializer/json/JSONWriterTest.java
+ src/test/java/org/exist/util/sorters/ListChecker.java
+ src/test/java/org/exist/util/sorters/LongArrayAndObjectChecker.java
+ src/test/java/org/exist/util/sorters/NodeProxyByIdChecker.java
+ src/test/java/org/exist/util/sorters/NodeProxyChecker.java
+ src/test/java/org/exist/util/sorters/ObjectAndIntArrayChecker.java
+ src/test/java/org/exist/util/sorters/PlainArrayChecker.javasrc/test/java/org/exist/util/sorters/SortTestNodeId.javasrc/test/resources/org/exist/validation/catalog.xmlsrc/test/java/org/exist/validation/CollectionConfigurationValidationModeTest.java
@@ -953,19 +982,35 @@
src/main/java/org/exist/webstart/JnlpJarFiles.javasrc/test/java/org/exist/xmldb/ContentAsDOMTest.javasrc/test/java/org/exist/xmldb/CreateCollectionsTest.java
+ src/test/java/org/exist/xmldb/EXistXMLSerializeTest.javasrc/test/java/org/exist/xmldb/IndexingTest.javasrc/main/java/org/exist/xmldb/LocalResourceSet.javasrc/main/java/org/exist/xmldb/LocalXMLResource.javasrc/main/java/org/exist/xmldb/RemoteRestoreService.java
+ src/test/java/org/exist/xmldb/RemoteDOMTest.javasrc/test/java/org/exist/xmldb/ResourceTest.javasrc/test/java/org/exist/xmldb/SerializationTest.java
- src/test/java/org/exist/xmldb/TestEXistXMLSerialize.javasrc/test/java/org/exist/xmldb/TreeLevelOrderTest.java
+ src/test/java/org/exist/xmldb/concurrent/AbstractConcurrentTest.java
+ src/test/java/org/exist/xmldb/concurrent/ComplexUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentAttrUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentQueryTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentQueryUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentResource2Test.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentResourceTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentXUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/DBUtils.java
+ src/test/java/org/exist/xmldb/concurrent/FragmentsTest.java
+ src/test/java/org/exist/xmldb/concurrent/TextUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ValueIndexUpdateTest.javasrc/test/java/org/exist/xmldb/concurrent/XMLGenerator.java
+ src/test/java/org/exist/xmldb/concurrent/action/MultiResourcesAction.javasrc/main/java/org/exist/xmlrpc/ExistRpcTypeFactory.javasrc/main/java/org/exist/xmlrpc/RpcConnection.javasrc/main/java/org/exist/xqj/Marshaller.javasrc/test/java/org/exist/xqj/MarshallerTest.java
+ src/test/java/org/exist/xquery/CardinalityTest.java
+ src/test/java/org/exist/xquery/CleanupTest.javasrc/main/java/org/exist/xquery/CombiningExpression.javasrc/test/java/org/exist/xquery/ConstructedNodesRecoveryTest.javasrc/main/java/org/exist/xquery/DeferredFunctionCall.java
@@ -982,9 +1027,12 @@
src/main/java/org/exist/xquery/PerformanceStats.javasrc/main/java/org/exist/xquery/TryCatchExpression.javasrc/main/java/org/exist/xquery/UserDefinedFunction.java
+ src/test/java/org/exist/xquery/XmldbBinariesTest.java
+ src/test/java/org/exist/xquery/XPathOpOrSpecialCaseTest.javasrc/main/java/org/exist/xquery/XPathUtil.javasrc/main/java/org/exist/xquery/XQueryContext.javasrc/test/java/org/exist/xquery/XQueryFunctionsTest.java
+ src/test/java/org/exist/xquery/XQueryProcessingInstructionTest.javasrc/test/java/org/exist/xquery/XQueryTest.javasrc/main/java/org/exist/xquery/functions/array/ArrayType.javasrc/test/java/org/exist/xquery/functions/fn/DocTest.java
@@ -1107,25 +1155,37 @@
src/main/java/org/exist/xquery/functions/util/FunctionFunction.javasrc/main/java/org/exist/xquery/functions/util/LogFunction.javasrc/main/java/org/exist/xquery/functions/util/ModuleInfo.java
+ src/test/java/org/exist/xquery/functions/validate/JaxvTest.javasrc/main/java/org/exist/xquery/functions/validation/Jaxp.java
+ src/test/java/org/exist/xquery/functions/xmldb/DbStore2Test.javasrc/main/java/org/exist/xquery/functions/xmldb/XMLDBStore.javasrc/main/java/org/exist/xquery/functions/xmldb/XMLDBXUpdate.javasrc/main/antlr/org/exist/xquery/parser/XQueryTree.gsrc/main/java/org/exist/xquery/pragmas/Optimize.java
+ src/test/java/org/exist/xquery/update/AbstractUpdateTest.java
+ src/test/java/org/exist/xquery/update/IndexIntegrationTest.java
+ src/test/java/org/exist/xquery/update/UpdateInsertTest.javasrc/test/java/org/exist/xquery/update/UpdateReplaceTest.java
+ src/test/java/org/exist/xquery/update/UpdateValueTest.javasrc/main/java/org/exist/xquery/util/ExpressionDumper.javasrc/main/java/org/exist/xquery/util/SerializerUtils.javasrc/main/java/org/exist/xquery/value/AbstractDateTimeValue.java
+ src/main/java/org/exist/xquery/value/AbstractTimeRelatedTest.javasrc/main/java/org/exist/xquery/value/AnyURIValue.javasrc/test/java/org/exist/xquery/value/Base64BinaryValueTypeTest.javasrc/main/java/org/exist/xquery/value/BinaryValue.javasrc/main/java/org/exist/xquery/value/BooleanValue.java
+ src/test/java/org/exist/xquery/value/DateTest.java
+ src/test/java/org/exist/xquery/value/DateTimeStampTest.javasrc/main/java/org/exist/xquery/value/DateTimeStampValue.java
+ src/test/java/org/exist/xquery/value/DateTimeTest.javasrc/main/java/org/exist/xquery/value/DateTimeValue.javasrc/main/java/org/exist/xquery/value/DateValue.java
+ src/test/java/org/exist/xquery/value/DayTimeDurationTest.javasrc/main/java/org/exist/xquery/value/DayTimeDurationValue.javasrc/main/java/org/exist/xquery/value/DecimalValue.javasrc/main/java/org/exist/xquery/value/DoubleValue.java
+ src/test/java/org/exist/xquery/value/DurationTest.javasrc/main/java/org/exist/xquery/value/DurationValue.javasrc/main/java/org/exist/xquery/value/FloatValue.javasrc/main/java/org/exist/xquery/value/GDayValue.java
@@ -1136,7 +1196,9 @@
src/main/java/org/exist/xquery/value/IntegerValue.javasrc/main/java/org/exist/xquery/value/QNameValue.javasrc/main/java/org/exist/xquery/value/StringValue.java
+ src/test/java/org/exist/xquery/value/TimeTest.javasrc/main/java/org/exist/xquery/value/TimeValue.java
+ src/test/java/org/exist/xquery/value/YearMonthDurationTest.javasrc/main/java/org/exist/xquery/value/YearMonthDurationValue.javasrc/main/java/org/exist/xquery/value/SequenceType.javasrc/main/java/org/exist/xquery/value/TimeUtils.java
@@ -1182,9 +1244,9 @@
src/test/xquery/xquery3/postfix-expr.xqmsrc/test/xquery/xquery3/serialize.xqlsrc/main/java/org/exist/Indexer.java
+ src/test/java/org/exist/Indexer2Test.java
+ src/test/java/org/exist/Indexer3Test.javasrc/test/java/org/exist/IndexerTest.java
- src/test/java/org/exist/IndexerTest2.java
- src/test/java/org/exist/IndexerTest3.javasrc/main/java/org/exist/Namespaces.javasrc/main/resources-filtered/org/exist/system.propertiessrc/main/java/org/exist/backup/SystemExport.java
@@ -1217,24 +1279,31 @@
src/main/java/org/exist/collections/Collection.javasrc/main/java/org/exist/collections/CollectionConfiguration.javasrc/main/java/org/exist/collections/CollectionConfigurationManager.java
+ src/test/java/org/exist/collections/CollectionStoreTest.javasrc/main/java/org/exist/collections/LockedCollection.javasrc/main/java/org/exist/collections/MutableCollection.java
+ src/test/java/org/exist/collections/OpenCollectionTestsrc/main/java/org/exist/collections/triggers/CollectionTrigger.javasrc/main/java/org/exist/collections/triggers/DocumentTrigger.java
+ src/test/java/org/exist/collections/triggers/MessagesTrigger.java
+ src/test/java/org/exist/collections/triggers/TriggerConfigTest.javasrc/main/java/org/exist/collections/triggers/XQueryStartupTrigger.javasrc/main/java/org/exist/config/Configuration.javasrc/main/java/org/exist/config/ConfigurationImpl.javasrc/main/java/org/exist/config/Configurator.java
+ src/test/java/org/exist/deadlocks/GetReleaseBrokerDeadlocksTest.javasrc/main/java/org/exist/dom/NodeListImpl.javasrc/main/java/org/exist/dom/QName.javasrc/main/java/org/exist/dom/memtree/AbstractCharacterData.javasrc/main/java/org/exist/dom/memtree/AttrImpl.javasrc/main/java/org/exist/dom/memtree/DocumentImpl.java
+ src/test/java/org/exist/dom/memtree/DocumentImplTest.javasrc/main/java/org/exist/dom/memtree/DocumentTypeImpl.javasrc/main/java/org/exist/dom/memtree/DOMIndexer.javasrc/test/java/org/exist/dom/memtree/DOMIndexerTest.javasrc/test/java/org/exist/dom/memtree/DOMTest.javasrc/main/java/org/exist/dom/memtree/ElementImpl.java
+ src/test/java/org/exist/dom/memtree/MemtreeInXQueryTest.javasrc/main/java/org/exist/dom/memtree/MemTreeBuilder.javasrc/main/java/org/exist/dom/memtree/NamespaceNode.javasrc/main/java/org/exist/dom/memtree/NodeImpl.java
@@ -1249,6 +1318,7 @@
src/main/java/org/exist/dom/persistent/AttrImpl.javasrc/main/java/org/exist/dom/persistent/BinaryDocument.javasrc/main/java/org/exist/dom/persistent/CommentImpl.java
+ src/test/java/org/exist/dom/persistent/DefaultDocumentSetTest.javasrc/main/java/org/exist/dom/persistent/DocumentImpl.javasrc/main/java/org/exist/dom/persistent/DocumentMetadata.javasrc/main/java/org/exist/dom/persistent/DocumentSet.java
@@ -1340,6 +1410,8 @@
src/main/java/org/exist/storage/BrokerPoolServicesManager.javasrc/main/java/org/exist/storage/BrokerPoolServicesManagerException.javasrc/test/java/org/exist/storage/BrokerPoolServiceTest.java
+ src/test/java/org/exist/storage/BrokerPoolsTest.java
+ src/test/java/org/exist/storage/BrokerPoolTest.javasrc/test/java/org/exist/storage/CollectionTest.javasrc/test/java/org/exist/storage/CopyResourceTest.javasrc/main/java/org/exist/storage/DBBroker.java
@@ -1354,9 +1426,10 @@
src/test/java/org/exist/storage/NodePathTest.javasrc/main/java/org/exist/storage/ProcessMonitor.javasrc/test/java/org/exist/storage/RecoverBinaryTest.java
+ src/test/java/org/exist/storage/RecoverBinary2Test.javasrc/test/java/org/exist/storage/RecoverXmlTest.javasrc/test/java/org/exist/storage/RecoveryTest.java
- src/test/java/org/exist/storage/RecoveryTest2.java
+ src/test/java/org/exist/storage/Recovery2Test.javasrc/main/java/org/exist/storage/StorageAddress.javasrc/main/java/org/exist/storage/XQueryPool.javasrc/main/java/org/exist/storage/blob/**
@@ -1406,6 +1479,7 @@
src/main/java/org/exist/storage/serializers/Serializer.javasrc/test/resources-filtered/org/exist/storage/statistics/conf.xmlsrc/main/java/org/exist/storage/sync/SyncTask.java
+ src/test/java/org/exist/storage/util/PauseFunction.javasrc/test/java/org/exist/storage/txn/ConcurrentTransactionsTest.javasrc/test/java/org/exist/storage/txn/CountingTxnListener.javasrc/test/java/org/exist/storage/txn/ReusableTxnTest.java
@@ -1415,25 +1489,36 @@
src/main/java/org/exist/test/DiffMatcher.javasrc/main/java/org/exist/test/ExistXmldbEmbeddedServer.javasrc/test/java/org/exist/test/Util.java
+ src/main/java/org/exist/test/runner/ExtTestAssumptionFailedFunction.java
+ src/main/java/org/exist/test/runner/ExtTestErrorFunction.javasrc/main/java/org/exist/test/runner/ExtTestFailureFunction.java
+ src/main/java/org/exist/test/runner/ExtTestFinishedFunction.java
+ src/main/java/org/exist/test/runner/ExtTestIgnoredFunction.java
+ src/main/java/org/exist/test/runner/ExtTestStartedFunction.java
+ src/main/java/org/exist/test/runner/JUnitIntegrationFunction.javasrc/main/java/org/exist/test/runner/XMLTestRunner.javasrc/main/java/org/exist/test/runner/XQueryTestRunner.javasrc/main/java/org/exist/test/runner/XSuite.javasrc/test/java/org/exist/util/AbstractXMLReaderSecurityTest.javasrc/main/java/org/exist/util/ByteOrderMark.javasrc/main/java/org/exist/util/Collations.java
+ src/test/java/org/exist/util/CollationsTest.javasrc/main/java/org/exist/util/CollectionOfArrayIterator.javasrc/test/java/org/exist/util/CollectionOfArrayIteratorTest.javasrc/main/java/org/exist/util/Configuration.javasrc/test/java/org/exist/util/DOMSerializerTest.javasrc/main/java/org/exist/util/IPUtil.javasrc/main/java/org/exist/util/JREUtil.java
+ src/test/java/org/exist/util/LeasableTest.javasrc/main/java/org/exist/util/MapUtil.javasrc/main/java/org/exist/util/OSUtil.javasrc/main/java/org/exist/util/ParametersExtractor.javasrc/main/java/org/exist/util/StringUtil.javasrc/main/java/org/exist/util/UTF8.javasrc/main/java/org/exist/util/crypto/digest/DigestType.java
+ src/test/java/org/exist/util/io/FilterInputStreamCacheMonitorTest.java
+ src/test/java/org/exist/util/io/OverflowToDiskStreamTest.java
+ src/test/java/org/exist/util/pool/NodePoolTest.javasrc/main/java/org/exist/util/serializer/AttrList.javasrc/main/java/org/exist/util/serializer/DOMStreamer.javasrc/main/java/org/exist/util/serializer/EXISerializer.java
@@ -1445,6 +1530,12 @@
src/test/java/org/exist/util/serializer/json/JSONObjectTest.javasrc/main/java/org/exist/util/serializer/json/JSONSerializer.javasrc/test/java/org/exist/util/serializer/json/JSONWriterTest.java
+ src/test/java/org/exist/util/sorters/ListChecker.java
+ src/test/java/org/exist/util/sorters/LongArrayAndObjectChecker.java
+ src/test/java/org/exist/util/sorters/NodeProxyByIdChecker.java
+ src/test/java/org/exist/util/sorters/NodeProxyChecker.java
+ src/test/java/org/exist/util/sorters/ObjectAndIntArrayChecker.java
+ src/test/java/org/exist/util/sorters/PlainArrayChecker.javasrc/test/java/org/exist/util/sorters/SortTestNodeId.javasrc/test/resources/org/exist/validation/catalog.xmlsrc/test/java/org/exist/validation/CollectionConfigurationValidationModeTest.java
@@ -1453,15 +1544,29 @@
src/main/java/org/exist/webstart/JnlpJarFiles.javasrc/test/java/org/exist/xmldb/ContentAsDOMTest.javasrc/test/java/org/exist/xmldb/CreateCollectionsTest.java
+ src/test/java/org/exist/xmldb/EXistXMLSerializeTest.javasrc/test/java/org/exist/xmldb/IndexingTest.javasrc/main/java/org/exist/xmldb/LocalResourceSet.javasrc/main/java/org/exist/xmldb/LocalXMLResource.javasrc/main/java/org/exist/xmldb/RemoteRestoreService.java
+ src/test/java/org/exist/xmldb/RemoteDOMTest.javasrc/test/java/org/exist/xmldb/ResourceTest.javasrc/test/java/org/exist/xmldb/SerializationTest.java
- src/test/java/org/exist/xmldb/TestEXistXMLSerialize.javasrc/test/java/org/exist/xmldb/TreeLevelOrderTest.java
+ src/test/java/org/exist/xmldb/concurrent/AbstractConcurrentTest.java
+ src/test/java/org/exist/xmldb/concurrent/ComplexUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentAttrUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentQueryTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentQueryUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentResource2Test.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentResourceTest.java
+ src/test/java/org/exist/xmldb/concurrent/ConcurrentXUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/DBUtils.java
+ src/test/java/org/exist/xmldb/concurrent/FragmentsTest.java
+ src/test/java/org/exist/xmldb/concurrent/TextUpdateTest.java
+ src/test/java/org/exist/xmldb/concurrent/ValueIndexUpdateTest.javasrc/test/java/org/exist/xmldb/concurrent/XMLGenerator.java
+ src/test/java/org/exist/xmldb/concurrent/action/MultiResourcesAction.javasrc/main/java/org/exist/xmlrpc/ACEAiderParser.javasrc/main/java/org/exist/xmlrpc/ACEAiderSerializer.javasrc/main/java/org/exist/xmlrpc/ExistRpcTypeFactory.java
@@ -1469,6 +1574,9 @@
src/main/java/org/exist/xqj/Marshaller.javasrc/test/java/org/exist/xqj/MarshallerTest.javasrc/main/java/org/exist/xquery/Cardinality.java
+ src/test/java/org/exist/xquery/CardinalityTest.java
+ src/test/java/org/exist/xquery/CastExpressionTest.java
+ src/test/java/org/exist/xquery/CleanupTest.javasrc/main/java/org/exist/xquery/CombiningExpression.javasrc/test/java/org/exist/xquery/ConstructedNodesRecoveryTest.javasrc/main/java/org/exist/xquery/DeferredFunctionCall.java
@@ -1495,10 +1603,14 @@
src/main/java/org/exist/xquery/TryCatchExpression.javasrc/main/java/org/exist/xquery/UserDefinedFunction.javasrc/test/java/org/exist/xquery/WatchdogTest.java
+ src/test/java/org/exist/xquery/WindowClauseTest.java
+ src/test/java/org/exist/xquery/XmldbBinariesTest.java
+ src/test/java/org/exist/xquery/XPathOpOrSpecialCaseTest.javasrc/main/java/org/exist/xquery/XPathUtil.javasrc/main/java/org/exist/xquery/XQueryContext.javasrc/test/java/org/exist/xquery/XQueryContextAttributesTest.javasrc/test/java/org/exist/xquery/XQueryFunctionsTest.java
+ src/test/java/org/exist/xquery/XQueryProcessingInstructionTest.javasrc/test/java/org/exist/xquery/XQueryTest.javasrc/main/java/org/exist/xquery/functions/array/ArrayType.javasrc/main/java/org/exist/xquery/functions/fn/ExtCollection.java
@@ -1631,8 +1743,10 @@
src/main/java/org/exist/xquery/functions/util/FunctionFunction.javasrc/main/java/org/exist/xquery/functions/util/LogFunction.javasrc/main/java/org/exist/xquery/functions/util/ModuleInfo.java
+ src/test/java/org/exist/xquery/functions/validate/JaxvTest.javasrc/main/java/org/exist/xquery/functions/validation/Jaxp.javasrc/test/java/org/exist/xquery/functions/xmldb/AbstractXMLDBTest.java
+ src/test/java/org/exist/xquery/functions/xmldb/DbStore2Test.javasrc/test/java/org/exist/xquery/functions/xmldb/XMLDBAuthenticateTest.javasrc/main/java/org/exist/xquery/functions/xmldb/XMLDBStore.javasrc/test/java/org/exist/xquery/functions/xmldb/XMLDBStoreTest.java
@@ -1641,11 +1755,16 @@
src/main/antlr/org/exist/xquery/parser/XQueryTree.gsrc/main/java/org/exist/xquery/pragmas/Optimize.javasrc/main/java/org/exist/xquery/pragmas/TimePragma.java
+ src/test/java/org/exist/xquery/update/AbstractUpdateTest.java
+ src/test/java/org/exist/xquery/update/IndexIntegrationTest.java
+ src/test/java/org/exist/xquery/update/UpdateInsertTest.javasrc/test/java/org/exist/xquery/update/UpdateReplaceTest.java
+ src/test/java/org/exist/xquery/update/UpdateValueTest.javasrc/main/java/org/exist/xquery/util/ExpressionDumper.javasrc/main/java/org/exist/xquery/util/SerializerUtils.javasrc/test/java/org/exist/xquery/util/URIUtilsTest.javasrc/main/java/org/exist/xquery/value/AbstractDateTimeValue.java
+ src/main/java/org/exist/xquery/value/AbstractTimeRelatedTest.javasrc/main/java/org/exist/xquery/value/AnyURIValue.javasrc/main/java/org/exist/xquery/value/ArrayListValueSequence.javasrc/main/java/org/exist/xquery/value/AtomicValueComparator.java
@@ -1653,13 +1772,18 @@
src/test/java/org/exist/xquery/value/BifurcanMapTest.javasrc/main/java/org/exist/xquery/value/BinaryValue.javasrc/main/java/org/exist/xquery/value/BooleanValue.java
+ src/test/java/org/exist/xquery/value/DateTest.java
+ src/test/java/org/exist/xquery/value/DateTimeStampTest.javasrc/main/java/org/exist/xquery/value/DateTimeStampValue.java
+ src/test/java/org/exist/xquery/value/DateTimeTest.javasrc/test/java/org/exist/xquery/value/DateTimeTypesTest.javasrc/main/java/org/exist/xquery/value/DateTimeValue.javasrc/main/java/org/exist/xquery/value/DateValue.java
+ src/test/java/org/exist/xquery/value/DayTimeDurationTest.javasrc/main/java/org/exist/xquery/value/DayTimeDurationValue.javasrc/main/java/org/exist/xquery/value/DecimalValue.javasrc/main/java/org/exist/xquery/value/DoubleValue.java
+ src/test/java/org/exist/xquery/value/DurationTest.javasrc/main/java/org/exist/xquery/value/DurationValue.javasrc/main/java/org/exist/xquery/value/FloatValue.javasrc/main/java/org/exist/xquery/value/GDayValue.java
@@ -1676,9 +1800,11 @@
src/main/java/org/exist/xquery/value/SubSequence.javasrc/test/java/org/exist/xquery/value/SubSequenceRangeTest.javasrc/test/java/org/exist/xquery/value/SubSequenceTest.java
+ src/test/java/org/exist/xquery/value/TimeTest.javasrc/main/java/org/exist/xquery/value/TimeValue.javasrc/main/java/org/exist/xquery/value/TimeUtils.javasrc/main/java/org/exist/xquery/value/Type.java
+ src/test/java/org/exist/xquery/value/YearMonthDurationTest.javasrc/main/java/org/exist/xquery/value/YearMonthDurationValue.javasrc/main/java/org/exist/xslt/EXistURIResolver.javasrc/main/java/org/exist/xslt/XsltURIResolverHelper.java
@@ -1703,7 +1829,7 @@
src/main/java/org/exist/util/io/ByteBufferAccessor.javasrc/main/java/org/exist/util/io/ByteBufferInputStream.javasrc/main/java/org/exist/util/io/CachingFilterInputStream.java
- src/test/java/org/exist/util/io/CachingFilterInputStreamTest_NonMarkableByteArrayInputStream.java
+ src/test/java/org/exist/util/io/CachingFilterInputStreamNonMarkableByteArrayInputStreamTest.javasrc/main/java/org/exist/util/io/FileFilterInputStreamCache.javasrc/main/java/org/exist/util/io/FilterInputStreamCache.javasrc/main/java/org/exist/util/io/FilterInputStreamCacheFactory.java
@@ -1746,7 +1872,7 @@ The original license statement is also included below.]]>
src/main/java/org/exist/util/io/ByteBufferAccessor.javasrc/main/java/org/exist/util/io/ByteBufferInputStream.javasrc/main/java/org/exist/util/io/CachingFilterInputStream.java
- src/test/java/org/exist/util/io/CachingFilterInputStreamTest_NonMarkableByteArrayInputStream.java
+ src/test/java/org/exist/util/io/CachingFilterInputStreamNonMarkableByteArrayInputStreamTest.javasrc/main/java/org/exist/util/io/FileFilterInputStreamCache.javasrc/main/java/org/exist/util/io/FilterInputStreamCache.javasrc/main/java/org/exist/util/io/FilterInputStreamCacheFactory.java
@@ -1818,6 +1944,7 @@ The original license statement is also included below.]]>
src/main/java/org/exist/xmlrpc/ACEAiderParser.javasrc/main/java/org/exist/xmlrpc/ACEAiderSerializer.javasrc/main/java/org/exist/xquery/Cardinality.java
+ src/test/java/org/exist/xquery/CastExpressionTest.javasrc/test/java/org/exist/xquery/ImportModuleTest.javasrc/main/java/org/exist/xquery/Materializable.javasrc/test/java/org/exist/xquery/XQueryContextAttributesTest.java
@@ -1998,10 +2125,6 @@ The BaseX Team. The original license statement is also included below.]]>org.exist.collections.ConcurrencyTest
org.exist.xmldb.concurrent.FragmentsTest
-
- org.exist.xmldb.concurrent.ConcurrentResourceTest2
- org.exist.xmldb.concurrent.ConcurrentResourceTest3
-
org.exist.http.underheavyload.DatabaseUnderLoadTestorg.exist.storage.lock.DeadlockTest
@@ -2111,10 +2234,6 @@ The BaseX Team. The original license statement is also included below.]]>org.exist.collections.ConcurrencyTest
org.exist.xmldb.concurrent.FragmentsTest
-
- org.exist.xmldb.concurrent.ConcurrentResourceTest2
- org.exist.xmldb.concurrent.ConcurrentResourceTest3
-
org.exist.http.underheavyload.DatabaseUnderLoadTestorg.exist.storage.lock.DeadlockTest
diff --git a/exist-core/src/main/java/org/exist/storage/recovery/RecoveryManager.java b/exist-core/src/main/java/org/exist/storage/recovery/RecoveryManager.java
index 1d3153f6a0..78c0790df1 100644
--- a/exist-core/src/main/java/org/exist/storage/recovery/RecoveryManager.java
+++ b/exist-core/src/main/java/org/exist/storage/recovery/RecoveryManager.java
@@ -325,10 +325,10 @@ private void doRecovery(final int txnCount, final Path last, final JournalReader
} catch (final Exception e) {
LOG.error("Exception caught while redoing transactions. Aborting recovery to avoid possible damage. " +
"Before starting again, make sure to run a check via the emergency export tool.", e);
- if (next != null)
- {
- LOG.info("Log entry that caused the exception: {}", next.dump());}
- throw new LogException("Recovery aborted. ");
+ if (next != null) {
+ LOG.info("Log entry that caused the exception: {}", next.dump());
+ }
+ throw new LogException("Recovery aborted: " + e.getMessage(), e);
} finally {
LOG.info("Redo processed {} out of {} transactions.", redoCnt, txnCount);
}
@@ -375,10 +375,10 @@ private void doRecovery(final int txnCount, final Path last, final JournalReader
}
} catch (final Exception e) {
LOG.warn("Exception caught while undoing dirty transactions. Remaining transactions to be undone: {}. Aborting recovery to avoid possible damage. Before starting again, make sure to run a check via the emergency export tool.", runningTxns.size(), e);
- if (next != null)
- {
- LOG.warn("Log entry that caused the exception: {}", next.dump());}
- throw new LogException("Recovery aborted", e);
+ if (next != null) {
+ LOG.warn("Log entry that caused the exception: {}", next.dump());
+ }
+ throw new LogException("Recovery aborted: " + e.getMessage(), e);
}
}
} finally {
diff --git a/exist-core/src/main/java/org/exist/test/runner/ExtTestAssumptionFailedFunction.java b/exist-core/src/main/java/org/exist/test/runner/ExtTestAssumptionFailedFunction.java
index febafc9a1c..0b68ee73e9 100644
--- a/exist-core/src/main/java/org/exist/test/runner/ExtTestAssumptionFailedFunction.java
+++ b/exist-core/src/main/java/org/exist/test/runner/ExtTestAssumptionFailedFunction.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -19,7 +43,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
package org.exist.test.runner;
import org.exist.xquery.XPathException;
@@ -34,11 +57,16 @@
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunNotifier;
+import javax.annotation.Nullable;
+
import static org.exist.xquery.FunctionDSL.optParam;
import static org.exist.xquery.FunctionDSL.param;
import static org.exist.xquery.FunctionDSL.params;
public class ExtTestAssumptionFailedFunction extends JUnitIntegrationFunction {
+
+ private static final StringValue NAME_MAP_KEY = new StringValue("name");
+
public ExtTestAssumptionFailedFunction(final XQueryContext context, final String parentName, final RunNotifier notifier) {
super("ext-test-assumption-failed-function",
params(
@@ -49,47 +77,41 @@ public ExtTestAssumptionFailedFunction(final XQueryContext context, final String
@Override
public Sequence eval(final Sequence contextSequence, final Item contextItem) throws XPathException {
- final Sequence arg1 = getCurrentArguments()[0];
- final String name = arg1.itemAt(0).getStringValue();
+ final Sequence[] args = getCurrentArguments();
+ if (args.length != 2) {
+ throw new XPathException(this, "ext-test-assumption-failed-function requires 2 parameters");
+ }
- final Sequence arg2 = getCurrentArguments().length == 2 ? getCurrentArguments()[1] : null;
- final MapType assumption = arg2 != null ? (MapType)arg2.itemAt(0) : null;
+ final Sequence argName = args[0];
+ if (argName.isEmpty()) {
+ throw new XPathException(this, "ext-test-assumption-failed-function requires a 'name' parameter");
+ }
+ final String name = safeGetStringValue(argName.itemAt(0));
+
+ final Sequence argAssumptionError = args[1];
+ @Nullable final MapType assumptionError = argAssumptionError.isEmpty() ? null : (MapType) argAssumptionError.itemAt(0);
final Description description = createTestDescription(name);
// notify JUnit
try {
- final AssumptionViolatedException assumptionFailureReason = assumptionMapAsAssumptionViolationException(assumption);
+ final AssumptionViolatedException assumptionFailureReason = assumptionMapAsAssumptionViolationException(assumptionError);
// NOTE: We remove the StackTrace, because it is not useful to have a Java Stack Trace pointing into the XML XQuery Test Suite code
assumptionFailureReason.setStackTrace(new StackTraceElement[0]);
notifier.fireTestAssumptionFailed(new Failure(description, assumptionFailureReason));
- } catch (final XPathException e) {
+ } catch (final Throwable t) {
//signal internal failure
- notifier.fireTestFailure(new Failure(description, e));
+ notifier.fireTestFailure(new Failure(description, t));
}
return Sequence.EMPTY_SEQUENCE;
}
- public AssumptionViolatedException assumptionMapAsAssumptionViolationException(final MapType assumptionMap) throws XPathException {
- final Sequence seqName = assumptionMap.get(new StringValue(this, "name"));
- final String name;
- if(seqName != null && !seqName.isEmpty()) {
- name = seqName.itemAt(0).getStringValue();
- } else {
- name = "";
- }
-
- final Sequence seqValue = assumptionMap.get(new StringValue(this, "value"));
- final String value;
- if(seqValue != null && !seqValue.isEmpty()) {
- value = seqValue.itemAt(0).getStringValue();
- } else {
- value = "";
- }
-
+ public AssumptionViolatedException assumptionMapAsAssumptionViolationException(final MapType assumptionMap) {
+ final String name = safeGetMapStringValue(NAME_MAP_KEY, assumptionMap, "");
+ final String value = safeGetMapStringValue(VALUE_MAP_KEY, assumptionMap, "");
return new AssumptionViolatedException("Assumption %" + name + " does not hold for: " + value);
}
}
diff --git a/exist-core/src/main/java/org/exist/test/runner/ExtTestErrorFunction.java b/exist-core/src/main/java/org/exist/test/runner/ExtTestErrorFunction.java
index 76d571427d..75414add64 100644
--- a/exist-core/src/main/java/org/exist/test/runner/ExtTestErrorFunction.java
+++ b/exist-core/src/main/java/org/exist/test/runner/ExtTestErrorFunction.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -19,7 +43,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
package org.exist.test.runner;
import org.exist.xquery.ErrorCodes;
@@ -40,6 +63,12 @@
public class ExtTestErrorFunction extends JUnitIntegrationFunction {
+ private static final StringValue DESCRIPTION_MAP_KEY = new StringValue("description");
+ private static final StringValue CODE_MAP_KEY = new StringValue("code");
+ private static final StringValue LINE_NUMBER_MAP_KEY = new StringValue("line-number");
+ private static final StringValue COLUMN_NUMBER_MAP_KEY = new StringValue("column-number");
+ private static final StringValue JAVA_STACK_TRACE_MAP_KEY = new StringValue("java-stack-trace");
+
public ExtTestErrorFunction(final XQueryContext context, final String parentName, final RunNotifier notifier) {
super("ext-test-error-function",
params(
@@ -50,36 +79,45 @@ public ExtTestErrorFunction(final XQueryContext context, final String parentName
@Override
public Sequence eval(final Sequence contextSequence, final Item contextItem) throws XPathException {
- final Sequence arg1 = getCurrentArguments()[0];
- final String name = arg1.itemAt(0).getStringValue();
+ final Sequence[] args = getCurrentArguments();
+ if (args.length != 2) {
+ throw new XPathException(this, "ext-test-error-function requires 2 parameters");
+ }
+
+ final Sequence argName = args[0];
+ if (argName.isEmpty()) {
+ throw new XPathException(this, "ext-test-error-function requires a 'name' parameter");
+ }
+ final String name = safeGetStringValue(argName.itemAt(0));
- final Sequence arg2 = getCurrentArguments().length == 2 ? getCurrentArguments()[1] : null;
- final MapType error = arg2 != null ? (MapType)arg2.itemAt(0) : null;
+ final Sequence argError = args[1];
+ @Nullable final MapType error = argError.isEmpty() ? null : (MapType) argError.itemAt(0);
final Description description = createTestDescription(name);
// notify JUnit
try {
- final XPathException errorReason = errorMapAsXPathException(error);
- notifier.fireTestFailure(new Failure(description, errorReason));
- } catch (final XPathException e) {
+ final Failure failure;
+ if (error != null) {
+ final XPathException errorReason = errorMapAsXPathException(error);
+ failure = new Failure(description, errorReason);
+ } else {
+ failure = new Failure(description, new XPathException(this, "No error map provided to ext-test-error-function"));
+ }
+ notifier.fireTestFailure(failure);
+ } catch (final Throwable t) {
//signal internal failure
- notifier.fireTestFailure(new Failure(description, e));
+ notifier.fireTestFailure(new Failure(description, t));
}
return Sequence.EMPTY_SEQUENCE;
}
- private XPathException errorMapAsXPathException(final MapType errorMap) throws XPathException {
- final Sequence seqDescription = errorMap.get(new StringValue(this, "description"));
- final String description;
- if(seqDescription != null && !seqDescription.isEmpty()) {
- description = seqDescription.itemAt(0).getStringValue();
- } else {
- description = "";
- }
+ private XPathException errorMapAsXPathException(final MapType errorMap) {
+ final Sequence seqDescription = errorMap.get(DESCRIPTION_MAP_KEY);
+ final String description = safeGetMapStringValue(DESCRIPTION_MAP_KEY, errorMap, "");
- final Sequence seqErrorCode = errorMap.get(new StringValue(this, "code"));
+ final Sequence seqErrorCode = errorMap.get(CODE_MAP_KEY);
final ErrorCodes.ErrorCode errorCode;
if(seqErrorCode != null && !seqErrorCode.isEmpty()) {
errorCode = new ErrorCodes.ErrorCode(((QNameValue)seqErrorCode.itemAt(0)).getQName(), description);
@@ -87,30 +125,21 @@ private XPathException errorMapAsXPathException(final MapType errorMap) throws X
errorCode = ErrorCodes.ERROR;
}
- final Sequence seqLineNumber = errorMap.get(new StringValue(this, "line-number"));
- final int lineNumber;
- if(seqLineNumber != null && !seqLineNumber.isEmpty()) {
- lineNumber = seqLineNumber.itemAt(0).toJavaObject(int.class);
- } else {
- lineNumber = -1;
- }
+ final Sequence seqLineNumber = errorMap.get(LINE_NUMBER_MAP_KEY);
+ final int lineNumber = safeGetIntValue(seqLineNumber, 0);
- final Sequence seqColumnNumber = errorMap.get(new StringValue(this, "column-number"));
- final int columnNumber;
- if(seqColumnNumber != null && !seqColumnNumber.isEmpty()) {
- columnNumber = seqColumnNumber.itemAt(0).toJavaObject(int.class);
- } else {
- columnNumber = -1;
+ final Sequence seqColumnNumber = errorMap.get(COLUMN_NUMBER_MAP_KEY);
+ final int columnNumber = safeGetIntValue(seqColumnNumber, 0);
+
+ @Nullable StackTraceElement[] stackTraceElements = null;
+ @Nullable final Sequence seqJavaStackTrace = errorMap.get(JAVA_STACK_TRACE_MAP_KEY);
+ if (seqJavaStackTrace != null && !seqJavaStackTrace.isEmpty()) {
+ stackTraceElements = convertStackTraceElements(seqJavaStackTrace);
}
final XPathException xpe = new XPathException(lineNumber, columnNumber, errorCode, description);
-
- @Nullable final Sequence seqJavaStackTrace = errorMap.get(new StringValue(this, "java-stack-trace"));
- if (seqJavaStackTrace != null && !seqJavaStackTrace.isEmpty()) {
- @Nullable final StackTraceElement[] stackTraceElements = convertStackTraceElements(seqJavaStackTrace);
- if (stackTraceElements != null) {
- xpe.setStackTrace(stackTraceElements);
- }
+ if (stackTraceElements != null) {
+ xpe.setStackTrace(stackTraceElements);
}
return xpe;
@@ -119,7 +148,7 @@ private XPathException errorMapAsXPathException(final MapType errorMap) throws X
private static final Pattern PTN_CAUSED_BY = Pattern.compile("Caused by:\\s([a-zA-Z0-9_$\\.]+)(?::\\s(.+))?");
private static final Pattern PTN_AT = Pattern.compile("at\\s((?:[a-zA-Z0-9_$]+)(?:\\.[a-zA-Z0-9_$]+)*)\\.((?:[a-zA-Z0-9_$-]+)|(?:))\\(([a-zA-Z0-9_]+\\.java):([0-9]+)\\)");
- protected @Nullable StackTraceElement[] convertStackTraceElements(final Sequence seqJavaStackTrace) throws XPathException {
+ protected @Nullable StackTraceElement[] convertStackTraceElements(final Sequence seqJavaStackTrace) {
StackTraceElement[] traceElements = null;
final Matcher matcherAt = PTN_AT.matcher("");
@@ -127,8 +156,8 @@ private XPathException errorMapAsXPathException(final MapType errorMap) throws X
// index 0 is the first `Caused by: ...`
int i = 1;
for ( ; i < seqJavaStackTrace.getItemCount(); i++) {
- final String item = seqJavaStackTrace.itemAt(i).getStringValue();
- final StackTraceElement stackTraceElement = convertStackTraceElement(matcherAt, item);
+ final String item = safeGetStringValue(seqJavaStackTrace.itemAt(i));
+ @Nullable final StackTraceElement stackTraceElement = convertStackTraceElement(matcherAt, item);
if (stackTraceElement == null) {
break;
}
@@ -153,7 +182,7 @@ private XPathException errorMapAsXPathException(final MapType errorMap) throws X
final String methodName = matcherAt.group(2);
final String fileName = matcherAt.group(3);
final String lineNumber = matcherAt.group(4);
- return new StackTraceElement(declaringClass, methodName, fileName, Integer.valueOf(lineNumber));
+ return new StackTraceElement(declaringClass, methodName, fileName, Integer.parseInt(lineNumber));
} else {
return null;
}
diff --git a/exist-core/src/main/java/org/exist/test/runner/ExtTestFailureFunction.java b/exist-core/src/main/java/org/exist/test/runner/ExtTestFailureFunction.java
index 7dc1a9f53f..939ac1ef44 100644
--- a/exist-core/src/main/java/org/exist/test/runner/ExtTestFailureFunction.java
+++ b/exist-core/src/main/java/org/exist/test/runner/ExtTestFailureFunction.java
@@ -45,8 +45,6 @@
*/
package org.exist.test.runner;
-import org.apache.commons.io.output.StringBuilderWriter;
-import org.exist.util.serializer.XQuerySerializer;
import org.exist.xquery.XPathException;
import org.exist.xquery.XQueryContext;
import org.exist.xquery.functions.map.MapType;
@@ -58,17 +56,16 @@
import org.junit.runner.Description;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunNotifier;
-import org.xml.sax.SAXException;
-
-import javax.xml.transform.OutputKeys;
-import java.io.IOException;
-import java.util.Properties;
import static org.exist.xquery.FunctionDSL.param;
import static org.exist.xquery.FunctionDSL.params;
public class ExtTestFailureFunction extends JUnitIntegrationFunction {
+ private static final StringValue XPATH_MAP_KEY = new StringValue("xpath");
+ private static final StringValue ERROR_MAP_KEY = new StringValue("error");
+ private static final StringValue RESULT_MAP_KEY = new StringValue("result");
+
public ExtTestFailureFunction(final XQueryContext context, final String parentName, final RunNotifier notifier) {
super("ext-test-failure-function",
params(
@@ -80,14 +77,28 @@ public ExtTestFailureFunction(final XQueryContext context, final String parentNa
@Override
public Sequence eval(final Sequence contextSequence, final Item contextItem) throws XPathException {
- final Sequence arg1 = getCurrentArguments()[0];
- final String name = arg1.itemAt(0).getStringValue();
+ final Sequence[] args = getCurrentArguments();
+ if (args.length != 3) {
+ throw new XPathException(this, "ext-test-failure-function requires 3 parameters");
+ }
- final Sequence arg2 = getCurrentArguments()[1];
- final MapType expected = (MapType)arg2.itemAt(0);
+ final Sequence argName = args[0];
+ if (argName.isEmpty()) {
+ throw new XPathException(this, "ext-test-failure-function requires a 'name' parameter");
+ }
+ final String name = safeGetStringValue(argName.itemAt(0));
- final Sequence arg3 = getCurrentArguments()[2];
- final MapType actual = (MapType)arg3.itemAt(0);
+ final Sequence argExpected = args[1];
+ if (argExpected.isEmpty()) {
+ throw new XPathException(this, "ext-test-failure-function requires an 'expected' parameter");
+ }
+ final MapType expected = (MapType) argExpected.itemAt(0);
+
+ final Sequence argActual = args[2];
+ if (argActual.isEmpty()) {
+ throw new XPathException(this, "ext-test-failure-function requires an 'actual' parameter");
+ }
+ final MapType actual = (MapType) argActual.itemAt(0);
final Description description = createTestDescription(name);
@@ -99,63 +110,44 @@ public Sequence eval(final Sequence contextSequence, final Item contextItem) thr
failureReason.setStackTrace(new StackTraceElement[0]);
notifier.fireTestFailure(new Failure(description, failureReason));
- } catch (final XPathException | SAXException | IOException | IllegalStateException e) {
+ } catch (final Throwable t) {
//signal internal failure
- notifier.fireTestFailure(new Failure(description, e));
+ notifier.fireTestFailure(new Failure(description, t));
}
return Sequence.EMPTY_SEQUENCE;
}
- private String expectedToString(final MapType expected) throws XPathException, SAXException, IOException {
- final Sequence seqExpectedValue = expected.get(new StringValue(this, "value"));
- if(!seqExpectedValue.isEmpty()) {
- return seqToString(seqExpectedValue);
+ private String expectedToString(final MapType expected) {
+ final Sequence seqExpectedValue = expected.get(VALUE_MAP_KEY);
+ if (!seqExpectedValue.isEmpty()) {
+ return safeSequenceToXmlString(context, seqExpectedValue);
}
- final Sequence seqExpectedXPath = expected.get(new StringValue(this, "xpath"));
- if(!seqExpectedXPath.isEmpty()) {
- return "XPath: " + seqToString(seqExpectedXPath);
+ final Sequence seqExpectedXPath = expected.get(XPATH_MAP_KEY);
+ if (!seqExpectedXPath.isEmpty()) {
+ return "XPath: " + safeSequenceToXmlString(context, seqExpectedXPath);
}
- final Sequence seqExpectedError = expected.get(new StringValue(this, "error"));
- if(!seqExpectedError.isEmpty()) {
- return "Error: " + seqToString(seqExpectedError);
+ final Sequence seqExpectedError = expected.get(ERROR_MAP_KEY);
+ if (!seqExpectedError.isEmpty()) {
+ return "Error: " + safeSequenceToXmlString(context, seqExpectedError);
}
throw new IllegalStateException("Could not extract expected value");
}
- private String actualToString(final MapType actual) throws XPathException, SAXException, IOException {
- final Sequence seqActualError = actual.get(new StringValue(this, "error"));
+ private String actualToString(final MapType actual) {
+ final Sequence seqActualError = actual.get(ERROR_MAP_KEY);
if (!seqActualError.isEmpty()) {
- return errorMapToString(seqActualError);
+ return safeSequenceToAdaptiveString(context, seqActualError);
}
- final Sequence seqActualResult = actual.get(new StringValue(this, "result"));
+ final Sequence seqActualResult = actual.get(RESULT_MAP_KEY);
if (!seqActualResult.isEmpty()) {
- return seqToString(seqActualResult);
+ return safeSequenceToXmlString(context, seqActualResult);
} else {
return ""; // empty-sequence()
}
}
-
- private String seqToString(final Sequence seq) throws XPathException, SAXException {
- try(final StringBuilderWriter writer = new StringBuilderWriter()) {
- final XQuerySerializer xquerySerializer = new XQuerySerializer(context.getBroker(), new Properties(), writer);
- xquerySerializer.serialize(seq);
- return writer.toString();
- }
- }
-
- private String errorMapToString(final Sequence seqErrorMap) throws XPathException, SAXException {
- try(final StringBuilderWriter writer = new StringBuilderWriter()) {
- final Properties properties = new Properties();
- properties.setProperty(OutputKeys.METHOD, "adaptive");
-
- final XQuerySerializer xquerySerializer = new XQuerySerializer(context.getBroker(), properties, writer);
- xquerySerializer.serialize(seqErrorMap);
- return writer.toString();
- }
- }
}
diff --git a/exist-core/src/main/java/org/exist/test/runner/ExtTestFinishedFunction.java b/exist-core/src/main/java/org/exist/test/runner/ExtTestFinishedFunction.java
index b3018742bb..cd97300fe7 100644
--- a/exist-core/src/main/java/org/exist/test/runner/ExtTestFinishedFunction.java
+++ b/exist-core/src/main/java/org/exist/test/runner/ExtTestFinishedFunction.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -19,7 +43,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
package org.exist.test.runner;
import org.exist.xquery.XPathException;
@@ -41,8 +64,16 @@ public ExtTestFinishedFunction(final XQueryContext context, final String parentN
@Override
public Sequence eval(final Sequence contextSequence, final Item contextItem) throws XPathException {
- final Sequence arg1 = getCurrentArguments()[0];
- final String name = arg1.itemAt(0).getStringValue();
+ final Sequence[] args = getCurrentArguments();
+ if (args.length != 1) {
+ throw new XPathException(this, "ext-test-finished-function requires 1 parameter");
+ }
+
+ final Sequence argName = args[0];
+ if (argName.isEmpty()) {
+ throw new XPathException(this, "ext-test-finished-function requires a 'name' parameter");
+ }
+ final String name = safeGetStringValue(argName.itemAt(0));
// notify JUnit
final Description description = createTestDescription(name);
diff --git a/exist-core/src/main/java/org/exist/test/runner/ExtTestIgnoredFunction.java b/exist-core/src/main/java/org/exist/test/runner/ExtTestIgnoredFunction.java
index fe9c9525cb..831e784ed0 100644
--- a/exist-core/src/main/java/org/exist/test/runner/ExtTestIgnoredFunction.java
+++ b/exist-core/src/main/java/org/exist/test/runner/ExtTestIgnoredFunction.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -19,7 +43,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
package org.exist.test.runner;
import org.exist.xquery.XPathException;
@@ -41,8 +64,16 @@ public ExtTestIgnoredFunction(final XQueryContext context, final String parentNa
@Override
public Sequence eval(final Sequence contextSequence, final Item contextItem) throws XPathException {
- final Sequence arg1 = getCurrentArguments()[0];
- final String name = arg1.itemAt(0).getStringValue();
+ final Sequence[] args = getCurrentArguments();
+ if (args.length != 1) {
+ throw new XPathException(this, "ext-test-ignored-function requires 1 parameter");
+ }
+
+ final Sequence argName = args[0];
+ if (argName.isEmpty()) {
+ throw new XPathException(this, "ext-test-ignored-function requires a 'name' parameter");
+ }
+ final String name = safeGetStringValue(argName.itemAt(0));
// notify JUnit
final Description description = createTestDescription(name);
diff --git a/exist-core/src/main/java/org/exist/test/runner/ExtTestStartedFunction.java b/exist-core/src/main/java/org/exist/test/runner/ExtTestStartedFunction.java
index c962b35ed6..2f6571c2b5 100644
--- a/exist-core/src/main/java/org/exist/test/runner/ExtTestStartedFunction.java
+++ b/exist-core/src/main/java/org/exist/test/runner/ExtTestStartedFunction.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -19,7 +43,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
package org.exist.test.runner;
import org.exist.xquery.XPathException;
@@ -41,8 +64,16 @@ public ExtTestStartedFunction(final XQueryContext context, final String parentNa
@Override
public Sequence eval(final Sequence contextSequence, final Item contextItem) throws XPathException {
- final Sequence arg1 = getCurrentArguments()[0];
- final String name = arg1.itemAt(0).getStringValue();
+ final Sequence[] args = getCurrentArguments();
+ if (args.length != 1) {
+ throw new XPathException(this, "ext-test-started-function requires 1 parameter");
+ }
+
+ final Sequence argName = args[0];
+ if (argName.isEmpty()) {
+ throw new XPathException(this, "ext-test-started-function requires a 'name' parameter");
+ }
+ final String name = safeGetStringValue(argName.itemAt(0));
// notify JUnit
final Description description = createTestDescription(name);
diff --git a/exist-core/src/main/java/org/exist/test/runner/JUnitIntegrationFunction.java b/exist-core/src/main/java/org/exist/test/runner/JUnitIntegrationFunction.java
index fa24c4bc9d..2ebc556535 100644
--- a/exist-core/src/main/java/org/exist/test/runner/JUnitIntegrationFunction.java
+++ b/exist-core/src/main/java/org/exist/test/runner/JUnitIntegrationFunction.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -19,18 +43,29 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
package org.exist.test.runner;
+import org.apache.commons.io.output.StringBuilderWriter;
import org.exist.dom.QName;
+import org.exist.util.serializer.XQuerySerializer;
import org.exist.xquery.ExpressionVisitor;
import org.exist.xquery.UserDefinedFunction;
+import org.exist.xquery.XPathException;
import org.exist.xquery.XQueryContext;
+import org.exist.xquery.functions.map.MapType;
import org.exist.xquery.value.FunctionParameterSequenceType;
+import org.exist.xquery.value.Item;
+import org.exist.xquery.value.Sequence;
+import org.exist.xquery.value.StringValue;
import org.junit.runner.Description;
import org.junit.runner.notification.RunNotifier;
+import org.xml.sax.SAXException;
+import javax.annotation.Nullable;
import javax.xml.XMLConstants;
+import javax.xml.transform.OutputKeys;
+
+import java.util.Properties;
import static org.exist.xquery.FunctionDSL.functionSignature;
import static org.exist.xquery.FunctionDSL.returnsNothing;
@@ -42,6 +77,18 @@
*/
public abstract class JUnitIntegrationFunction extends UserDefinedFunction {
+ protected static final StringValue VALUE_MAP_KEY = new StringValue("value");
+
+ private static final Properties XML_SERIALIZATION_PROPERTIES = new Properties();
+ static {
+ XML_SERIALIZATION_PROPERTIES.setProperty(OutputKeys.METHOD, "xml");
+ }
+
+ private static final Properties ADAPTIVE_SERIALIZATION_PROPERTIES = new Properties();
+ static {
+ ADAPTIVE_SERIALIZATION_PROPERTIES.setProperty(OutputKeys.METHOD, "adaptive");
+ }
+
protected final String suiteName;
protected final RunNotifier notifier;
@@ -75,4 +122,59 @@ public void accept(final ExpressionVisitor visitor) {
protected Description createTestDescription(final String name) {
return Description.createTestDescription(suiteName, name);
}
+
+ protected static String safeGetStringValue(final Item item) {
+ try {
+ return item.getStringValue();
+ } catch (final XPathException e) {
+ LOG.error("Unable to get String Value of item: " + e.getMessage(), e);
+ return "";
+ }
+ }
+
+ protected static int safeGetIntValue(@Nullable final Sequence sequence, final int index) {
+ if (sequence != null && !sequence.isEmpty()) {
+ return safeGetIntValue(sequence.itemAt(index));
+ }
+ return -1;
+ }
+
+ protected static int safeGetIntValue(final Item item) {
+ try {
+ return item.toJavaObject(int.class);
+ } catch (final XPathException e) {
+ LOG.error("Unable to get Int Value of item: " + e.getMessage(), e);
+ return -1;
+ }
+ }
+
+ protected static String safeSequenceToXmlString(final XQueryContext context, final Sequence sequence) {
+ return safeSequenceToString(context, sequence, XML_SERIALIZATION_PROPERTIES);
+ }
+
+ protected static String safeSequenceToAdaptiveString(final XQueryContext context, final Sequence sequence) {
+ return safeSequenceToString(context, sequence, ADAPTIVE_SERIALIZATION_PROPERTIES);
+ }
+
+ private static String safeSequenceToString(final XQueryContext context, final Sequence sequence, final Properties properties) {
+ try (final StringBuilderWriter writer = new StringBuilderWriter()) {
+ final XQuerySerializer xquerySerializer = new XQuerySerializer(context.getBroker(), properties, writer);
+ xquerySerializer.serialize(sequence);
+ return writer.toString();
+ } catch (final XPathException | SAXException e) {
+ LOG.error("Unable to convert Sequence to String: " + e.getMessage(), e);
+ return "";
+ }
+ }
+
+ protected static @Nullable String safeGetMapStringValue(final StringValue key, final MapType map, @Nullable final String defaultValue) {
+ final Sequence mapValue = map.get(key);
+ final String value;
+ if (mapValue != null && !mapValue.isEmpty()) {
+ value = safeGetStringValue(mapValue.itemAt(0));
+ } else {
+ value = defaultValue;
+ }
+ return value;
+ }
}
diff --git a/exist-core/src/test/java/org/exist/IndexerTest2.java b/exist-core/src/test/java/org/exist/Indexer2Test.java
similarity index 99%
rename from exist-core/src/test/java/org/exist/IndexerTest2.java
rename to exist-core/src/test/java/org/exist/Indexer2Test.java
index a24787f0c4..0b3a0f3bf6 100644
--- a/exist-core/src/test/java/org/exist/IndexerTest2.java
+++ b/exist-core/src/test/java/org/exist/Indexer2Test.java
@@ -84,7 +84,7 @@
*
* @author ljo
*/
-public class IndexerTest2 {
+public class Indexer2Test {
private final static String XML =
"\n" +
diff --git a/exist-core/src/test/java/org/exist/IndexerTest3.java b/exist-core/src/test/java/org/exist/Indexer3Test.java
similarity index 99%
rename from exist-core/src/test/java/org/exist/IndexerTest3.java
rename to exist-core/src/test/java/org/exist/Indexer3Test.java
index 61f771be94..7d95874c00 100644
--- a/exist-core/src/test/java/org/exist/IndexerTest3.java
+++ b/exist-core/src/test/java/org/exist/Indexer3Test.java
@@ -80,7 +80,7 @@
*
* @author ljo
*/
-public class IndexerTest3 {
+public class Indexer3Test {
@ClassRule
public static final ExistEmbeddedServer existEmbeddedServer = new ExistEmbeddedServer(true, true);
diff --git a/exist-core/src/test/java/org/exist/collections/CollectionStoreTest.java b/exist-core/src/test/java/org/exist/collections/CollectionStoreTest.java
index 5f077a8d07..9de35afbfa 100644
--- a/exist-core/src/test/java/org/exist/collections/CollectionStoreTest.java
+++ b/exist-core/src/test/java/org/exist/collections/CollectionStoreTest.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -19,7 +43,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
package org.exist.collections;
import com.evolvedbinary.j8fu.Try;
@@ -54,10 +77,10 @@
import java.util.Optional;
import static java.nio.charset.StandardCharsets.UTF_8;
-import static junit.framework.TestCase.assertNotNull;
-import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
public class CollectionStoreTest {
diff --git a/exist-core/src/test/java/org/exist/collections/OpenCollectionTest.java b/exist-core/src/test/java/org/exist/collections/OpenCollectionTest.java
index 6385086a57..78b4ada06c 100644
--- a/exist-core/src/test/java/org/exist/collections/OpenCollectionTest.java
+++ b/exist-core/src/test/java/org/exist/collections/OpenCollectionTest.java
@@ -40,7 +40,7 @@
import java.net.URISyntaxException;
import java.util.Optional;
-import static junit.framework.TestCase.assertNotNull;
+import static org.junit.Assert.assertNotNull;
public class OpenCollectionTest {
diff --git a/exist-core/src/test/java/org/exist/collections/triggers/TestTrigger.java b/exist-core/src/test/java/org/exist/collections/triggers/MessagesTrigger.java
similarity index 85%
rename from exist-core/src/test/java/org/exist/collections/triggers/TestTrigger.java
rename to exist-core/src/test/java/org/exist/collections/triggers/MessagesTrigger.java
index 174f542160..b74a836038 100644
--- a/exist-core/src/test/java/org/exist/collections/triggers/TestTrigger.java
+++ b/exist-core/src/test/java/org/exist/collections/triggers/MessagesTrigger.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -42,7 +66,7 @@
/**
* Test trigger to check if trigger configuration is working properly.
*/
-public class TestTrigger extends SAXTrigger implements DocumentTrigger {
+public class MessagesTrigger extends SAXTrigger implements DocumentTrigger {
protected Logger LOG = LogManager.getLogger(getClass());
diff --git a/exist-core/src/test/java/org/exist/collections/triggers/TriggerConfigTest.java b/exist-core/src/test/java/org/exist/collections/triggers/TriggerConfigTest.java
index c62bb65191..25390ad5a6 100644
--- a/exist-core/src/test/java/org/exist/collections/triggers/TriggerConfigTest.java
+++ b/exist-core/src/test/java/org/exist/collections/triggers/TriggerConfigTest.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -21,22 +45,16 @@
*/
package org.exist.collections.triggers;
-import java.io.IOException;
import java.util.Arrays;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import org.exist.EXistException;
-import org.exist.TestUtils;
-import org.exist.security.PermissionDeniedException;
import org.exist.test.ExistXmldbEmbeddedServer;
-import org.exist.util.LockException;
import org.exist.xmldb.IndexQueryService;
import org.junit.*;
import static org.exist.collections.CollectionConfiguration.DEFAULT_COLLECTION_CONFIG_FILE;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -44,6 +62,7 @@
import org.xmldb.api.DatabaseManager;
import org.xmldb.api.base.*;
import org.xmldb.api.modules.CollectionManagementService;
+import org.xmldb.api.modules.XMLResource;
import org.xmldb.api.modules.XQueryService;
import org.junit.runners.Parameterized.Parameters;
@@ -73,7 +92,7 @@ public static java.util.Collection
-
+
-
+
-
+
diff --git a/exist-samples/pom.xml b/exist-samples/pom.xml
index b4d6eaef46..a93bab55a3 100644
--- a/exist-samples/pom.xml
+++ b/exist-samples/pom.xml
@@ -109,6 +109,7 @@
pom.xml
+ src/main/java/org/exist/samples/Samples.javasrc/main/resources/org/exist/samples/ant/migrate.xmlsrc/main/resources/org/exist/samples/xinclude/db2html.xslsrc/main/resources/org/exist/samples/xinclude/xinclude.xml
@@ -123,7 +124,9 @@
pom.xmlsrc/main/resources/org/exist/samples/biblio.rdf
+ src/main/java/org/exist/samples/Samples.javasrc/main/resources/org/exist/samples/ant/migrate.xml
+ src/main/resources/org/exist/samples/mods/**src/main/resources/org/exist/samples/shakespeare/hamlet.xmlsrc/main/resources/org/exist/samples/shakespeare/macbeth.xmlsrc/main/resources/org/exist/samples/shakespeare/play.dtd
diff --git a/exist-samples/src/main/java/org/exist/samples/Samples.java b/exist-samples/src/main/java/org/exist/samples/Samples.java
index 98a9cfe4f5..f5146f45c8 100644
--- a/exist-samples/src/main/java/org/exist/samples/Samples.java
+++ b/exist-samples/src/main/java/org/exist/samples/Samples.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -32,45 +56,45 @@ public class Samples {
private Samples() {}
/**
- * Gets the path of the Address Book sample.
+ * Gets the Address Book sample.
*
- * @return The path to the Address Book sample
+ * @return The stream of the Address Book sample
*/
public @Nullable InputStream getAddressBookSample() {
return getSample("validation/addressbook/addressbook.xsd");
}
/**
- * Gets the path of the Shakespeare Hamlet sample.
+ * Gets the Shakespeare Hamlet sample.
*
- * @return The path to the Shakespeare Hamlet sample
+ * @return The stream of the Shakespeare Hamlet sample
*/
public @Nullable InputStream getHamletSample() {
return getShakespeareSample("hamlet.xml");
}
/**
- * Gets the path of the Shakespeare Romeo and Juliet sample.
+ * Gets the Shakespeare Romeo and Juliet sample.
*
- * @return The path to the Shakespeare Romeo and Juliet sample
+ * @return The stream of the Shakespeare Romeo and Juliet sample
*/
public @Nullable InputStream getRomeoAndJulietSample() {
return getShakespeareSample("r_and_j.xml");
}
/**
- * Gets the path of the Macbeth sample.
+ * Gets the Shakespeare Macbeth sample.
*
- * @return The path to the Macbeth sample
+ * @return The stream of the Macbeth sample
*/
- public@Nullable InputStream getMacbethSample() {
+ public@Nullable InputStream getMacbethSample() {
return getShakespeareSample("macbeth.xml");
}
/**
- * Get the names of just the Shakespeare XML data sample files.
+ * Get the names of just the Shakespeare XML sample files.
*
- * @return the names of the Shakespeare XML data files.
+ * @return the names of the Shakespeare XML files.
*/
public String[] getShakespeareXmlSampleNames() {
return new String[] { "hamlet.xml", "macbeth.xml", "r_and_j.xml"};
@@ -86,11 +110,11 @@ public String[] getShakespeareSampleNames() {
}
/**
- * Gets the path of the shakespeare sample.
+ * Gets the shakespeare sample.
*
* @param sampleFileName the name of the shakespeare sample.
*
- * @return The path to the shakespeare sample
+ * @return The stream of the Shakespeare sample
*/
public @Nullable InputStream getShakespeareSample(final String sampleFileName) {
return getSample("shakespeare/" + sampleFileName);
@@ -99,18 +123,59 @@ public String[] getShakespeareSampleNames() {
/**
* Gets the path of the Bibliographic sample.
*
- * @return The path to the Bibliographic sample
+ * @return The stream of the Bibliographic sample
*/
public @Nullable InputStream getBiblioSample() {
return getSample("biblio.rdf");
}
+ /**
+ * Get the names of just the MODS XML data sample files.
+ *
+ * @return the names of the MODS XML data files.
+ */
+ public String[] getModsXmlSampleNames() {
+ return new String[] {
+ "02db3b51-146d-4740-81c5-c22dcdadecfb.xml",
+ "0d569a0b-2738-4865-8b47-a9f8b821a653.xml",
+ "1a186ea9-d41a-4e03-8f0a-d3389cbcf769.xml",
+ "1a745d88-0d42-42e7-b911-26f1976bf41f.xml",
+ "321a0f72-8ecc-419c-992f-05b4000124e0.xml",
+ "36fe6751-7d83-4155-81f8-c00e515f07d1.xml",
+ "494ebe80-aa3c-457c-8c20-7de246bf5f72.xml",
+ "49afb9d1-71d8-49c2-8566-13eff9ff0935.xml",
+ "58f1eb27-0cec-4e2e-83f5-57d03123c194.xml",
+ "6bbce50c-8e1c-46cb-b804-9cd020816f63.xml",
+ "6fd69e78-77ca-4b2a-84c1-b22a24d676b3.xml",
+ "78f221c8-5bb0-4bf1-ad43-cf0aff6d53c7.xml",
+ "81fb0a7e-f268-4091-aae2-1e6ccb867930.xml",
+ "9f8877f7-2064-4ee5-92f5-a1b6afe68714.xml",
+ "b5c28abd-8a78-4a2d-b2eb-30d06d7dac10.xml",
+ "ba45cdc0-96d4-4181-a519-ed3f1f9f89cc.xml",
+ "ba5f637f-2ca5-4d07-b8b3-804dab7fbdb7.xml",
+ "be884622-f29f-42ba-8903-e5eda73bcf34.xml",
+ "dae9118e-573a-4230-b781-5007c0579f27.xml",
+ "f3ad5614-d1b4-4860-a108-542c42dceebf.xml"
+ };
+ }
+
+ /**
+ * Gets the MODS sample.
+ *
+ * @param sampleFileName the name of the MODS sample.
+ *
+ * @return The stream of the MODS sample
+ */
+ public @Nullable InputStream getModsSample(final String sampleFileName) {
+ return getSample("mods/" + sampleFileName);
+ }
+
/**
* Gets the sample.
*
* @param sample relative path to the sample
*
- * @return The stream to the sample
+ * @return The stream of the sample
*/
public @Nullable InputStream getSample(final String sample) {
return getClass().getResourceAsStream(sample);
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/02db3b51-146d-4740-81c5-c22dcdadecfb.xml b/exist-samples/src/main/resources/org/exist/samples/mods/02db3b51-146d-4740-81c5-c22dcdadecfb.xml
new file mode 100644
index 0000000000..60d7a48080
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/02db3b51-146d-4740-81c5-c22dcdadecfb.xml
@@ -0,0 +1,49 @@
+
+
+
+ Motivational and Structural Prerequisites of Knowledge Management
+ Paper presented at the XV World Congress of
+ Sociology, Brisbane, Australia, July 7-13, 2002, RC 30
+ Sociology of Work: Thematic Seminar II: The organisation of
+ knowledge production (Diskussionspapiere aus der Fakultät
+ für Sozialwissenschaft, Ruhr-Universität Bochum, Nr. 02-2)
+
+ Our main question in this paper is: Which
+ motivational and structural prerequisites support knowledge
+ management? We will develop a theoretical model to answer
+ these questions and illustrate it with three case studies.
+
+ Wilkesmann, Uwe
+
+
+ Rascher, Ingolf
+
+
+ http://www.ruhr-uni-bochum.de/sowi/top/sowibibliothek/dkpaper/dp02-2.pdf
+
+
+ Fakultät für Sozialwissenschaft, Ruhr-Universität Bochum
+ 2002-06-12
+
+
+ application/pdf
+
+
+ knowledge management
+
+ 10204
+ 10207
+ 10219
+
+ Bedingung
+
+
+ Informationsmanagement
+
+
+ Informationssystem
+
+
+ Wissenssoziologie
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/0d569a0b-2738-4865-8b47-a9f8b821a653.xml b/exist-samples/src/main/resources/org/exist/samples/mods/0d569a0b-2738-4865-8b47-a9f8b821a653.xml
new file mode 100644
index 0000000000..15334bbc5d
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/0d569a0b-2738-4865-8b47-a9f8b821a653.xml
@@ -0,0 +1,39 @@
+
+
+
+ The Interplay of Cash and Tax Benefits for Children in Ten European Countries
+
+ Whereas cross-sectional comparative research on monetary support for families with children linking quantitative data on cash and tax benefits with institutional regulations and system characteristics seems to be well established, systematic analyses of the long-term lines of development, however, are still lacking. This article therefore aims at analysing the child-related elements of both instruments over a longer span of time. Partly based on a newly accessible database, the presentation uses a descriptive and institution-orientated approach.
+
+ Maucher, Mathias
+
+
+ http://www.mzes.uni-mannheim.de/eurodata/newsletter/no12-13/feature.html
+
+
+ EURODATA Research Archive. Mannheim Centre for European Social Research (MZES)
+ 2000
+
+
+ text/html
+
+
+
+ EURODATA Newsletter No.12/13
+
+
+ 11007
+ 1090303
+
+ Familienpolitik
+
+
+ Steuern
+
+
+ Steuerpolitik
+
+
+ Umverteilung
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/1a186ea9-d41a-4e03-8f0a-d3389cbcf769.xml b/exist-samples/src/main/resources/org/exist/samples/mods/1a186ea9-d41a-4e03-8f0a-d3389cbcf769.xml
new file mode 100644
index 0000000000..2ee467dd53
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/1a186ea9-d41a-4e03-8f0a-d3389cbcf769.xml
@@ -0,0 +1,63 @@
+
+
+
+ Causal Inference from Series of Events
+
+ Recent years have witnessed an increased interest,
+ both in statistics and in the social sciences, in time
+ dependent models as a vehicle for the causal interpretation
+ of series of events. The Humean and empiricist tradition in
+ the philosophy of science uses the constant temporal order
+ of cause and effect as a decisive delineation of causal
+ processes from mere coincidences. To mimic the philosophical
+ distinction, series of events are modelled as dynamic
+ stochastic processes and the precedence of cause over effect
+ is expressed through conditional expectations given the
+ history of the process and the history of the causes. A main
+ technical tool in this development is the concept of
+ conditional independence. In this article we examine some
+ difficulties in the application of the approach within
+ empirical social research. Specifically, the role of
+ probabilistic concepts of causality and of conditional
+ independence, the nature of events that reasonalby qualify
+ as causes or effects, and the time order used in empirical
+ research are considered.
+
+ Pötter, Ulrich
+
+
+ Blossfeld, H.-P.
+
+
+ http://www.stat.ruhr-uni-bochum.de/papers/cause2.ps
+
+
+ 2000-06-01
+
+
+ application/postscript
+
+ 10105
+ 10102
+
+ Analyse
+
+
+ Erklärung
+
+
+ Inferenz
+
+
+ Kausalität
+
+
+ Methodenforschung
+
+
+ Modellanalyse
+
+
+ Wissenschaftsgeschichte
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/1a745d88-0d42-42e7-b911-26f1976bf41f.xml b/exist-samples/src/main/resources/org/exist/samples/mods/1a745d88-0d42-42e7-b911-26f1976bf41f.xml
new file mode 100644
index 0000000000..431c62d945
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/1a745d88-0d42-42e7-b911-26f1976bf41f.xml
@@ -0,0 +1,42 @@
+
+
+
+ The European population 1850-1945: A Historical Data Handbook
+
+ This contribution describes the project which is to publish a historical data handbook on the European population in 21 European countries, covering the time period of the first demographic transition, the years 1850-1945. All eighteen Western European nations are included plus the three Eastern European countries Czechoslovakia, Hungary and Poland. The handbook covers such topics as population development; the population structure by sex, age and marital status; the regional population structure; annual vital statistics developments in the fields of population growth and migration, fertility and legitimacy, infant mortality and life expectancy, nuptiality and divortiality. Furthermore, household and family data have been collected systematically using the population censuses as a basis. The book comprises several introductory comparative chapters and 21 national chapters for each country. Extensive documentation of available data and sources concludes the volume.
+
+ Rothenbacher, Franz
+
+
+ http://www.mzes.uni-mannheim.de/eurodata/newsletter/no11/feature.html
+
+
+ EURODATA Research Archive. Mannheim Centre for European Social Research (MZES)
+ 2000
+
+
+ text/html
+
+
+
+ EURODATA Newsletter No.11
+
+
+ 10303
+ 10209
+
+ Bevölkerungsentwicklung
+
+
+ Demographie
+
+
+ Rezension
+
+
+ historisch
+
+
+ internationaler Vergleich
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/321a0f72-8ecc-419c-992f-05b4000124e0.xml b/exist-samples/src/main/resources/org/exist/samples/mods/321a0f72-8ecc-419c-992f-05b4000124e0.xml
new file mode 100644
index 0000000000..7876ea415f
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/321a0f72-8ecc-419c-992f-05b4000124e0.xml
@@ -0,0 +1,60 @@
+
+
+
+ Demography of Germany
+ Concepts, Data and Methods
+
+ This text is an introduction to concepts and methods of demographic description and analysis. The substantial focus is on the demographic development ofgermany, all data refer to this country. The main reason for this focus on a single country is that we want to show how the tools of demography can actually be used for theanalysis of demographic problems. The text consists of two parts. Part I introduces the conceptual framework and explains basic statistical notions. This part also includesa short chapter that explains how we speak of "models" and why we do not make a sharp distinction between "describing" and "modeling" demographic processes. Then followsPart II that deals with data and methods. In the present version of the text, we almost exclusively discuss mortality and fertility data.
+
+ Rohwer, Götz
+
+
+ Pötter, Ulrich
+
+
+ ftp://ftp.stat.ruhr-uni-bochum.de/pub/eha/ddem.ps
+
+
+ 2002-10-01
+ 2003-03-01
+
+
+ application/postscript
+
+ 10301
+ 10303
+ 10105
+
+ Altersstruktur
+
+
+ Bevölkerungsstatistik
+
+
+ Kohortenanalyse
+
+
+ Lebensdauer
+
+
+ Lebenserwartung
+
+
+ Methodenlehre
+
+
+ Panel
+
+
+ Volkszählung
+
+
+ amtliche Statistik
+
+
+ deskriptive Statistik
+
+
+ statistische Analyse
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/36fe6751-7d83-4155-81f8-c00e515f07d1.xml b/exist-samples/src/main/resources/org/exist/samples/mods/36fe6751-7d83-4155-81f8-c00e515f07d1.xml
new file mode 100644
index 0000000000..8cac8468eb
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/36fe6751-7d83-4155-81f8-c00e515f07d1.xml
@@ -0,0 +1,47 @@
+
+
+
+ CATEWE - A Comparative Analysis of Transitions from Education to Work in Europe
+
+ The transition from education to work is one of the most crucial phases in the life-cycle of individuals because it often channels and shapes individual careers and life chances. These transitions differ between European countries due to different educational systems, labour markets, and organization of societal work.
+
+ Gangl, Markus
+
+
+ Hannan, Damian
+
+
+ Raffe, David
+
+
+ Smyth, Emer
+
+
+ http://www.mzes.uni-mannheim.de/eurodata/newsletter/no8/catewe.html
+
+
+ EURODATA Research Archive. Mannheim Centre for European Social Research (MZES)
+ 1998
+
+
+ text/html
+
+
+
+ EURODATA Newsletter No.8
+
+
+ 10208
+
+ Bildungswesen
+
+
+ berufliche Integration
+
+
+ dreigliedriges Schulwesen
+
+
+ internationaler Vergleich
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/494ebe80-aa3c-457c-8c20-7de246bf5f72.xml b/exist-samples/src/main/resources/org/exist/samples/mods/494ebe80-aa3c-457c-8c20-7de246bf5f72.xml
new file mode 100644
index 0000000000..c017e9bdcc
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/494ebe80-aa3c-457c-8c20-7de246bf5f72.xml
@@ -0,0 +1,79 @@
+
+
+
+ Who is Self-Employed in France, the United Kingdom and
+ West Germany?
+ Patterns of Non-Agricultural Self-Employment
+
+ This paper investigates the patterns of male
+ non-agricultural self-employment and how they have changed
+ over time in France, Germany and the UK. It is arguedthatthe
+ development of self-employment in the three
+ countries is based on specific institutional frameworks
+ resulting in different opportunities for the
+ self-employed.Thus, weexpect that the dynamics of growth,
+ the sectors of activity and the
+ socio-demographic characteristics of the
+ self-employed differ between the countries.
+ Theempiricalanalyses are based on the national Labour Force
+ Surveys of 1984 and 1994 (Germany 1982 and 1995). Our
+ findings indicate that educational requirements
+ differfundamentally betweenthe three countries and along
+ industrial branches. Further, we could observe some
+ country-specific developments in some sectors of activitybut
+ also a remarkable number of commongeneral patterns in
+ the development of self-employment.
+
+ Lohmann, Henning
+
+
+ Luber, Silvia
+
+
+ Müller, Walter
+
+
+ http://www.mzes.uni-mannheim.de/publications/wp/wp-11.pdf
+
+
+ Mannheimer Zentrum für Europäische Sozialforschung (MZES)
+ 1999
+ 2003-06-13
+
+
+ application/pdf
+
+
+
+ Arbeitspapiere / Mannheimer Zentrum für
+ Europäische Sozialforschung, Nr. 11, ISSN 1437-8574
+
+
+ 20101
+ 20102
+ 10205
+
+ Arbeitsmarkt
+
+
+ Bundesrepublik Deutschland
+
+
+ Frankreich
+
+
+ Großbritannien
+
+
+ Selbständiger
+
+
+ berufliche Selbständigkeit
+
+
+ freier Beruf
+
+
+ institutionelle Faktoren
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/49afb9d1-71d8-49c2-8566-13eff9ff0935.xml b/exist-samples/src/main/resources/org/exist/samples/mods/49afb9d1-71d8-49c2-8566-13eff9ff0935.xml
new file mode 100644
index 0000000000..f6e1c290b2
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/49afb9d1-71d8-49c2-8566-13eff9ff0935.xml
@@ -0,0 +1,38 @@
+
+
+
+ Comparative Electoral Systems: The German Experience
+ Constitution of Kenya Review Commission: Seminar on Electoral Systems and Political Parties. March 19-20, 2002, Serena Hotel Nairobi
+
+ The mixed-member proportional system (MMPS), first introduced in the Federal Republic of Germany in 1949, is currently receiving increasing attention in countries in which electoral reforms are being considered. Are electoral experts and politicians, especially in Southern countries, right to consider the MMPS a model for electoral reform? And if so, which lessons can be drawn from the German experience for transferring the MMPS to other countries? In this paper, these questions are being addressed at both a theoretical and at an emprical level. At first, the MMPS will be situated within a broader typology of electoral systems. How the MMPS has worked in the context of German politics is discussed in a second section; the conclusion contains some recommendations for reform debates, especially the Kenyan context.
+
+ Hartmann, Christof
+
+
+ http://homepage.ruhr-uni-bochum.de/christof.hartmann/downloads/2002-Kenia-Wahlen.PDF
+
+
+ 2002-03-19
+
+
+ application/pdf
+
+ 10503
+ 10505
+ 10504
+
+ Bundesrepublik Deutschland
+
+
+ Kenia
+
+
+ Systemvergleich
+
+
+ Wahlsystem
+
+
+ politische Reform
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/58f1eb27-0cec-4e2e-83f5-57d03123c194.xml b/exist-samples/src/main/resources/org/exist/samples/mods/58f1eb27-0cec-4e2e-83f5-57d03123c194.xml
new file mode 100644
index 0000000000..124d6f1c60
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/58f1eb27-0cec-4e2e-83f5-57d03123c194.xml
@@ -0,0 +1,39 @@
+
+
+
+ The Development of Trade Unions in Western Europe: Global Convergence or Cross-national Diversity?
+
+ Trade unions play an important role in Western Europe. They have been subject to, and agents of, social and political changes that reshaped the post-war industrial society. In recent years, trade unions have been facing the threat of membership decline and the challenges of global competition and European economic integration. This poses the question whether union movements are under pressure to adapt in a similar way or whether they differ in their responses. Do we find a trend towards global convergence or does cross-national diversity persist among union movements in Western Europe? Drawing on comparative data from an international research project, we will provide a short portrait of the main patterns in union density and organisational concentration. Instead of a general trend toward convergence, we find signs of persisting diversity across Western Europe in union responses to both social changes and global challenges.
+
+ Ebbinghaus,Bernhard
+
+
+ http://www.mzes.uni-mannheim.de/eurodata/newsletter/no2/feature.html
+
+
+ EURODATA Research Archive. Mannheim Centre for European Social Research (MZES)
+ 1995
+
+
+ text/html
+
+
+
+ EURODATA Newsletter No.2
+
+
+ 10204
+ 10504
+
+ Europa
+
+
+ Gewerkschaft
+
+
+ Gewerkschaftsbewegung
+
+
+ historische Entwicklung
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/6bbce50c-8e1c-46cb-b804-9cd020816f63.xml b/exist-samples/src/main/resources/org/exist/samples/mods/6bbce50c-8e1c-46cb-b804-9cd020816f63.xml
new file mode 100644
index 0000000000..99386243e1
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/6bbce50c-8e1c-46cb-b804-9cd020816f63.xml
@@ -0,0 +1,47 @@
+
+
+
+ Managing Conflict Through Democratic Institutions: A Tentative Balance Sheet
+ African Studies Association in Germany (VAD): Biennial Conference "Africa's Diversity: Ending the Monologues?", Hamburg, May 23-26, 2002
+
+ The paper starts from the premise that the specific role of democratic institutions in conflict management is still not adequately considered in the African context, especially with regard to crisis prevention. Some of the main hypothesis drawn from the general literature on the topic are presented and three levers of democratic intervention, i.e. the system of government, the electoral system, and the territorial structure of the state, are tested with regard to Africa (including discussion of case studies). As a last step the paper deals with the specific African contexts of democratic reform that have to be taken into account in processes of institutional engineering.
+
+ Hartmann, Christof
+
+
+ http://homepage.ruhr-uni-bochum.de/christof.hartmann/downloads/2002-VAD-Paper.pdf
+
+
+ 2002-05-23
+
+
+ application/pdf
+
+ 10507
+ 10503
+ 10505
+
+ Afrika
+
+
+ Demokratisierung
+
+
+ Staatsform
+
+
+ Staatsgebiet
+
+
+ Systemvergleich
+
+
+ Transformation
+
+
+ Wahlsystem
+
+
+ ethnischer Konflikt
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/6fd69e78-77ca-4b2a-84c1-b22a24d676b3.xml b/exist-samples/src/main/resources/org/exist/samples/mods/6fd69e78-77ca-4b2a-84c1-b22a24d676b3.xml
new file mode 100644
index 0000000000..3183b012c2
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/6fd69e78-77ca-4b2a-84c1-b22a24d676b3.xml
@@ -0,0 +1,41 @@
+
+
+
+ The Project on Comparative European Electoral History: 1830-1995. A computerised data handbook
+
+ This project is aimed at collecting electoral data for all European countries both in a historical and a regional perspective. Data were made machine readable from the beginning of national elections in the 19th century until the present in a disaggregated form down to the level of electoral districts. The data will we published as an electronic data handbook, comprising full documentation and introductory chapters.
+
+ Caramani, Daniele
+
+
+ http://www.mzes.uni-mannheim.de/eurodata/newsletter/no4/feature.html
+
+
+ EURODATA Research Archive. Mannheim Centre for European Social Research (MZES)
+ 1996
+
+
+ text/html
+
+
+
+ EURODATA Newsletter No.4
+
+
+ 10504
+
+ Datenaufbereitung
+
+
+ Datenbank
+
+
+ Europa
+
+
+ Wahlergebnis
+
+
+ politische Geschichte
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/78f221c8-5bb0-4bf1-ad43-cf0aff6d53c7.xml b/exist-samples/src/main/resources/org/exist/samples/mods/78f221c8-5bb0-4bf1-ad43-cf0aff6d53c7.xml
new file mode 100644
index 0000000000..0d5f773abf
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/78f221c8-5bb0-4bf1-ad43-cf0aff6d53c7.xml
@@ -0,0 +1,42 @@
+
+
+
+ Social Indicators for East European Transition Countries
+
+ The East European transition countries have been facing severe problems regarding both economic performance and living conditions in general since the beginning of the transformation process in 1989. This is the reason why this topic has been chosen. It is intended to present some fundamental social indicators for the East European transition countries. The data presented refer to the whole of Eastern and South Eastern Europe, including the Western follow-up states of the former Soviet Union, i.e. the Baltic countries, Russia, Moldavia, Ukraine and Belarus.
+
+ Rothenbacher, Franz
+
+
+ http://www.mzes.uni-mannheim.de/eurodata/newsletter/no4/rothenb1.html
+
+
+ EURODATA Research Archive. Mannheim Centre for European Social Research (MZES)
+ 1996
+
+
+ text/html
+
+
+
+ EURODATA Newsletter No.4
+
+
+ 10303
+ 10305
+
+ Altersstruktur
+
+
+ Arbeitsmarktanalyse
+
+
+ Geburtenentwicklung
+
+
+ Osteuropaforschung
+
+
+ soziale Indikatoren
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/81fb0a7e-f268-4091-aae2-1e6ccb867930.xml b/exist-samples/src/main/resources/org/exist/samples/mods/81fb0a7e-f268-4091-aae2-1e6ccb867930.xml
new file mode 100644
index 0000000000..85424eb8a9
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/81fb0a7e-f268-4091-aae2-1e6ccb867930.xml
@@ -0,0 +1,60 @@
+
+
+
+ Renaissance of the German Carmakers during the 1990s:
+ Successful Japanization or the Development of a Genuine
+ Business Model?
+
+ This chapter aims at explaining the renaissance of
+ the three German carmakers within the context of the
+ international automobile industry. The main argument is that
+ this revival can only be understood by referring to some
+ common elements of the business models in place at all three
+ companies. These business models include four basic pillars,
+ each of which answers a basic question at the core of the
+ firms activities: (1) the corporate structure and profit
+ strategies, (2) product structure and market strategies, (3)
+ the production system and (4) the labour relations regime.
+ A business model could thus be understood as the specific
+ configuration of structures and strategies in these four
+ activity fields and transformation spaces. This
+ configuration does not represent a deterministic and fixed
+ system but a sort of loosely coupled 'regime of affinity'.
+
+ Pries, Ludger
+
+
+ http://www.ruhr-uni-bochum.de/soaps/download/publ-2003_lp_renaissancegercarmakers.pdf
+
+
+ 2003
+
+
+ application/pdf
+
+
+
+ Faust, Michael; Voskamp, Ulrich; Wittke, Volker
+ (eds.): European Industrial Restructuring in a Global
+ Economy: Fragmentation and Relocation of Value Chains. SOFI
+ Berichte, Göttingen: SOFI
+
+
+
+ Geschäftsmodell
+
+
+ Volkswagen
+
+ 10204
+ 10207
+
+ Kraftfahrzeugindustrie
+
+
+ Unternehmenspolitik
+
+
+ internationaler Vergleich
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/9f8877f7-2064-4ee5-92f5-a1b6afe68714.xml b/exist-samples/src/main/resources/org/exist/samples/mods/9f8877f7-2064-4ee5-92f5-a1b6afe68714.xml
new file mode 100644
index 0000000000..9fbdfe6028
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/9f8877f7-2064-4ee5-92f5-a1b6afe68714.xml
@@ -0,0 +1,41 @@
+
+
+
+ The strengths and weaknesses of existing electoral models as instruments for managing ethnic conflict
+ Paper for the Centre of Conflict Resolution Seminar "Constitutionalism as a Primary Tool for Managing Ethnic Conflict in Africa", Cape Town, 24-26 May 2000
+
+ The paper argues that the choice of electoral systems has an impact on the change or the stability of inter-ethnic relations, and that electoral models may actually become an instrument for managing ethnic conflict. Cleverly designed electoral systems are, however, not considered being the only or most powerful of such instruments. For example, the decision for a more centralized or a more federal state or the introduction of some meaningful local government may be of more relevance to ethnic conflict management. The paper is divided in five main parts: Key terms and elements of electoral systems are introduced, followed by a typology of the most important parliamentary electoral systems. This general overview will cover a range of states with most empirical examples drawn from African contexts. The third part will briefly discuss the multiple criteria that might be used to evaluate electoral systems, followed by an assessment of the various electoral systems and their relationsship to conflict management. The last section deals with the generally neglected topic of different presidential electoral formulas and its impact on ethnic relationships.
+
+ Hartmann, Christof
+
+
+ http://homepage.ruhr-uni-bochum.de/christof.hartmann/downloads/2000-Kapstadt.PDF
+
+
+ 2000-05-24
+
+
+ application/pdf
+
+ 10507
+ 10503
+ 10504
+
+ Afrika südlich der Sahara
+
+
+ Konfliktlösung
+
+
+ Systemvergleich
+
+
+ Wahlsystem
+
+
+ ethnischer Konflikt
+
+
+ politisches System
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/b5c28abd-8a78-4a2d-b2eb-30d06d7dac10.xml b/exist-samples/src/main/resources/org/exist/samples/mods/b5c28abd-8a78-4a2d-b2eb-30d06d7dac10.xml
new file mode 100644
index 0000000000..56d1dd0e37
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/b5c28abd-8a78-4a2d-b2eb-30d06d7dac10.xml
@@ -0,0 +1,42 @@
+
+
+
+ Household and Family Trends in Europe: from Convergence to Divergence
+
+ The International Year of the Family 1994 together with the World Population Conference have drawn greater attention to the changing family. On the level of the European Union interest in the family was intensified, as the first steps taken towards the creation of a European household and family statistics and the strengthening of the European Observatory on National Family Policies (EONFP) show. In addition, other international organisations, such as the Council of Europe or the United Nations Economic Commission for Europe (ECE), have intensified their activities in the field of population and family research. In this context the question may be posed how household and family structures in Europe evolve. Not only for the European Union but also for sociological research in general the question of divergence or convergence of national household and family structures and of national demographic developments is of great importance.
+
+ Rothenbacher, Franz
+
+
+ http://www.mzes.uni-mannheim.de/eurodata/newsletter/no1/househol.html
+
+
+ EURODATA Research Archive. Mannheim Centre for European Social Research (MZES)
+ 1995
+
+
+ text/html
+
+
+
+ EURODATA Newsletter No.1
+
+
+ 10303
+ 10209
+
+ Europa
+
+
+ Familiensoziologie
+
+
+ Familienstand
+
+
+ Familienstruktur
+
+
+ internationaler Vergleich
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/ba45cdc0-96d4-4181-a519-ed3f1f9f89cc.xml b/exist-samples/src/main/resources/org/exist/samples/mods/ba45cdc0-96d4-4181-a519-ed3f1f9f89cc.xml
new file mode 100644
index 0000000000..d21c9e9737
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/ba45cdc0-96d4-4181-a519-ed3f1f9f89cc.xml
@@ -0,0 +1,58 @@
+
+
+
+ Household Labor Demand and Household Labor Supply
+ An empirical analysis of the employment of
+ domestic help in German private households and its effect on
+ female labor force participation (Diskussionspapiere aus der
+ Fakultät für Sozialwissenschaft, Ruhr-Universität Bochum,
+ Nr. 98-14)
+
+ In this paper, data from the German Socio-Economic
+ Panel (SOEP) will be used to examine the hypothesis that the
+ demand for domestic servants and womens supply of market
+ work are joint decisions.
+
+ Hank, Karsten
+
+
+ http://www.ruhr-uni-bochum.de/sowi/top/sowibibliothek/dkpaper/dp98-14.rtf
+
+
+ Fakultät für Sozialwissenschaft, Ruhr-Universität Bochum
+ 1998
+
+
+ other
+
+
+ domestic work
+
+ 20101
+ 20102
+ 20200
+
+ Arbeitsangebot
+
+
+ Arbeitskräftebedarf
+
+
+ Frauenerwerbstätigkeit
+
+
+ Hausarbeit
+
+
+ Panel
+
+
+ Privathaushalt
+
+
+ informeller Sektor
+
+
+ ungeschützte Beschäftigung
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/ba5f637f-2ca5-4d07-b8b3-804dab7fbdb7.xml b/exist-samples/src/main/resources/org/exist/samples/mods/ba5f637f-2ca5-4d07-b8b3-804dab7fbdb7.xml
new file mode 100644
index 0000000000..949e6ac10a
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/ba5f637f-2ca5-4d07-b8b3-804dab7fbdb7.xml
@@ -0,0 +1,40 @@
+
+
+
+ A Woman is Born. Production of Femininity in German o.b. Tampon Advertisements
+ Paper presented at 'Menstruation. Blood, Body, Brand.' Institute for Feminist Theory and Research, Liverpool, 24 January to 26. January 2003.
+
+ Western feminists have criticised advertisements for female hygiene products for creating stereotypes and being normative and sexist since the 1970s. Despite this criticism recent studies have shown that (at least in Germany) the topics raised are relevant to women, and female hygiene products are increasingly retailed internationally. The range of feminist analysis and opinions has also become quite broad. Based on empirical research I want to look at ads for o.b. tampons, relating the tension between the regulation of the female (body) and advertising a taboo. I reviewed a sample of 47 ads from o.b. dating from the 1950s onwards that were placed in the popular German (middle-class) women's magazine Brigitte. Each ad was analysed according to recurring themes in text, context and tone, and for content related to the representation of femininity. The body as battleground for gender is an interactive process. On the one hand the body is an important medium and a central resource for performing gender; on the other hand this performance takes place in semiotic and discursive contexts, which configure the intelligibility of the gender difference. I want to consider both aspects by taking the body-here the female body or rather femininity-seriously in the discursive moment of advertisements. I focus mainly on the following three aspects: a. Pictures of women and girls, b. Visibility of menstruation, c. Construction of femininity between regulation and agency Both a historical review and a content analysis should show a.) continuity in content (e.g. security, hygiene, invisibility) and motives (e.g. tampons vs. pads, sport, light colours, young white heterosexual middle-class women as main characters) and b.) contradictions (e.g. women at work vs. women at home, naming blood and smell vs. menstrual taboo). Finally I will give an outlook on the question: Is the way o.b. (re)presents femininity o.k.? And how can we deal with it from an academic and political point of view?
+
+ Ullrich, Charlotte
+
+
+ http://homepage.ruhr-uni-bochum.de/Charlotte.Ullrich/vortrag_ob_pdf.pdf
+
+
+ 2003-01-24
+
+
+ application/pdf
+
+ 20200
+ 1080409
+
+ Frauenbild
+
+
+ Geschlechterforschung
+
+
+ Hygiene
+
+
+ Inhaltsanalyse
+
+
+ Menstruation
+
+
+ Werbung
+
+
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/be884622-f29f-42ba-8903-e5eda73bcf34.xml b/exist-samples/src/main/resources/org/exist/samples/mods/be884622-f29f-42ba-8903-e5eda73bcf34.xml
new file mode 100644
index 0000000000..14d7463978
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/be884622-f29f-42ba-8903-e5eda73bcf34.xml
@@ -0,0 +1,70 @@
+
+
+
+ Self-governance and slowness as prerequisites for
+ knowledge management
+ Paper for the 19th EGOS Colloquium in
+ Copenhagen, Subgroup 33 "New Conditions for Managing
+ Knowledge", July 2003
+
+ The aim of this paper is to show that
+ self-governance is the only way to create knowledge in
+ organizations. We will show that knowledge can only be
+ developed and preserved by self-governance. As
+ self-governance is not a natural process, it needs
+ structures to support the development of this kind of
+ action. Management is only able to create these structures
+ at a second level. Thus a distinction between two different
+ levels has to be made: the level of performance and the
+ structural level.
+
+ Wilkesmann, Uwe
+
+
+ Rascher, Ingolf
+
+
+ http://www.ruhr-uni-bochum.de/sowi/top/sowibibliothek/dkpaper/dp03-1.pdf
+
+
+ Fakultät für Sozialwissenschaften,
+ Ruhr-Universität Bochum
+ 2003-06-03
+ 2003-06-03
+
+
+ application/pdf
+
+
+ knowledge management
+
+
+ self governance
+
+ 1080502
+ 10207
+
+ Akzeptanzforschung
+
+
+ Arbeitspsychologie
+
+
+ Informationsmanagement
+
+
+ Informationssystem
+
+
+ Organisationsstruktur
+
+
+ Selbstorganisation
+
+
+ Wissenssoziologie
+
+
+ Wissenstransfer
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/dae9118e-573a-4230-b781-5007c0579f27.xml b/exist-samples/src/main/resources/org/exist/samples/mods/dae9118e-573a-4230-b781-5007c0579f27.xml
new file mode 100644
index 0000000000..4949cbfc65
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/dae9118e-573a-4230-b781-5007c0579f27.xml
@@ -0,0 +1,74 @@
+
+
+
+ Emerging production systems in the
+ transnationalisation of German carmakers: Adaptation,
+ application or innovation?
+
+ Based on case studies, this article seeks to
+ determine whether or not German carmakers are exporting a
+ German production model to overseas plants and to what
+ extent the overseas operations have a reciprocal effect on
+ production methods in the originating country. It is argued
+ that the most adequate analytical concept is one that
+ emphasizes interest-driven organizational learning processes.
+
+ Pries, Ludger
+
+
+ http://www.ruhr-uni-bochum.de/soaps/download/publ-2003_lp_emergingproductionsystems.pdf
+
+
+ 2003-01-24
+
+
+ application/pdf
+
+
+
+ New Technology, Work and Employment 18 (2003),
+ no. 2
+
+
+
+ business models
+
+
+ production system
+
+
+ automobile industry
+
+
+ company internationalization
+
+
+ international comparison
+
+
+ transplants
+
+
+ Germany
+
+ 10204
+ 10207
+
+ Bundesrepublik Deutschland
+
+
+ Fallstudie
+
+
+ Kraftfahrzeugindustrie
+
+
+ Produktion
+
+
+ Unternehmenskultur
+
+
+ multinationales Unternehmen
+
+
\ No newline at end of file
diff --git a/exist-samples/src/main/resources/org/exist/samples/mods/f3ad5614-d1b4-4860-a108-542c42dceebf.xml b/exist-samples/src/main/resources/org/exist/samples/mods/f3ad5614-d1b4-4860-a108-542c42dceebf.xml
new file mode 100644
index 0000000000..254c09cd1f
--- /dev/null
+++ b/exist-samples/src/main/resources/org/exist/samples/mods/f3ad5614-d1b4-4860-a108-542c42dceebf.xml
@@ -0,0 +1,46 @@
+
+
+
+ U.S. Perspectives on the position and role of Germany and Japan in international and regional structures. The 1950s and the Present
+
+ Rather than focusing on the relative power of Germany and Japan within the international system, my attention is directed towards U.S. perspectives on the position and role of Germany and Japan in regional and international structures as points of reference with a view of analysing the transformation of Germany's and Japan's foreign relations in conjunction with changes in the global economy and regional security concerns. The differences between firstly Germany and Japan, secondly the regional context of German and Japanese policies, and thirdly Germany and Japan as international actors are too important and the German-Japanese relationships too underdeveloped (in spite of the spurts in the early 1980s and since 1993) to allow a direct comparison of Germany's and Japan's positions and roles in International Relations. The comparison between U.S. perspectives on Japan and "Germany integrated into Europe" is more manageable and conducive to an assessment of changes:<br/> - the U.S. is a determining factor in Europe's/Pacific Asia's affairs,<br/> - Germany/Japan regards the U.S. as a pillar of its foreign policy,<br/> - the U.S. considers (for the time being) Germany's/Japan's position and role essential to what the U.S. can accomplish regionally and internationally.<br/> The weight of these "factors" ensures that the comparison of U.S. perspectives on Germany and Japan is a reliable guide to the Interpretation of the foreign policy positions and roles of the Federal Republic of Germany (FRG) and Japan in regional and international structures.
+
+ Schmidt, Gustav
+
+
+ http://www.ruhr-uni-bochum.de/lehrstuhl-ip/Ostasien.pdf
+
+
+ 1999
+
+
+ application/pdf
+
+
+
+ Bochumer Jahrbuch zur Ostasienforschung, Bd. 23 (1999), S. 359-372.
+
+
+ 10505
+
+ Außenpolitik
+
+
+ Bundesrepublik Deutschland
+
+
+ Einfluss
+
+
+ Geopolitik
+
+
+ Japan
+
+
+ USA
+
+
+ politische Beziehungen
+
+
\ No newline at end of file
diff --git a/extensions/contentextraction/src/test/resources/log4j2.xml b/extensions/contentextraction/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/contentextraction/src/test/resources/log4j2.xml
+++ b/extensions/contentextraction/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/debuggee/src/test/resources/log4j2.xml b/extensions/debuggee/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/debuggee/src/test/resources/log4j2.xml
+++ b/extensions/debuggee/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/expath/src/test/resources/log4j2.xml b/extensions/expath/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/expath/src/test/resources/log4j2.xml
+++ b/extensions/expath/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/exquery/restxq/src/test/resources/log4j2.xml b/extensions/exquery/restxq/src/test/resources/log4j2.xml
index 499c33ac4b..1b56572ccd 100644
--- a/extensions/exquery/restxq/src/test/resources/log4j2.xml
+++ b/extensions/exquery/restxq/src/test/resources/log4j2.xml
@@ -202,15 +202,15 @@
-
+
-
+
-
+
diff --git a/extensions/indexes/lucene/src/test/resources/log4j2.xml b/extensions/indexes/lucene/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/indexes/lucene/src/test/resources/log4j2.xml
+++ b/extensions/indexes/lucene/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/indexes/ngram/src/test/resources/log4j2.xml b/extensions/indexes/ngram/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/indexes/ngram/src/test/resources/log4j2.xml
+++ b/extensions/indexes/ngram/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/indexes/range/pom.xml b/extensions/indexes/range/pom.xml
index 54f0b63d50..27cdb5a3ad 100644
--- a/extensions/indexes/range/pom.xml
+++ b/extensions/indexes/range/pom.xml
@@ -188,6 +188,7 @@
src/test/resources/log4j2.xmlsrc/test/xquery/range/conditions.xqlsrc/main/java/org/exist/indexing/range/RangeIndexAnalyzer.java
+ src/main/java/org/exist/indexing/range/RangeIndexConfig.javasrc/main/java/org/exist/indexing/range/RangeIndexConfigAttributeCondition.javasrc/main/java/org/exist/indexing/range/RangeIndexConfigElement.javasrc/main/java/org/exist/indexing/range/RangeIndexConfigField.java
@@ -206,6 +207,7 @@
src/test/resources/log4j2.xmlsrc/test/xquery/range/conditions.xqlsrc/main/java/org/exist/indexing/range/RangeIndexAnalyzer.java
+ src/main/java/org/exist/indexing/range/RangeIndexConfig.javasrc/main/java/org/exist/indexing/range/RangeIndexConfigAttributeCondition.javasrc/main/java/org/exist/indexing/range/RangeIndexConfigElement.javasrc/main/java/org/exist/indexing/range/RangeIndexConfigField.java
diff --git a/extensions/indexes/range/src/main/java/org/exist/indexing/range/RangeIndexConfig.java b/extensions/indexes/range/src/main/java/org/exist/indexing/range/RangeIndexConfig.java
index 910f3ea456..428938c33a 100644
--- a/extensions/indexes/range/src/main/java/org/exist/indexing/range/RangeIndexConfig.java
+++ b/extensions/indexes/range/src/main/java/org/exist/indexing/range/RangeIndexConfig.java
@@ -1,4 +1,28 @@
/*
+ * Elemental
+ * Copyright (C) 2024, Evolved Binary Ltd
+ *
+ * admin@evolvedbinary.com
+ * https://www.evolvedbinary.com | https://www.elemental.xyz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * NOTE: Parts of this file contain code from 'The eXist-db Authors'.
+ * The original license header is included below.
+ *
+ * =====================================================================
+ *
* eXist-db Open Source Native XML Database
* Copyright (C) 2001 The eXist-db Authors
*
@@ -135,9 +159,9 @@ private void parseChildren(NodeList configNodes, Map namespaces)
}
if(uri != null) {
- LOG.error("Invalid range index configuration (" + uri + "): " + e.getMessage());
+ getLogger().error("Invalid range index configuration (" + uri + "): " + e.getMessage());
} else {
- LOG.error("Invalid range index configuration: " + e.getMessage());
+ getLogger().error("Invalid range index configuration: " + e.getMessage());
}
}
}
@@ -266,4 +290,13 @@ public void remove() {
}
}
-}
\ No newline at end of file
+
+ /**
+ * Designed to be overridable so that we can observe logging in tests.
+ *
+ * @return the logger.
+ */
+ Logger getLogger() {
+ return LOG;
+ }
+}
diff --git a/extensions/indexes/range/src/test/java/org/exist/indexing/range/RangeIndexConfigTest.java b/extensions/indexes/range/src/test/java/org/exist/indexing/range/RangeIndexConfigTest.java
index 1b9a818feb..7eefdb9f28 100644
--- a/extensions/indexes/range/src/test/java/org/exist/indexing/range/RangeIndexConfigTest.java
+++ b/extensions/indexes/range/src/test/java/org/exist/indexing/range/RangeIndexConfigTest.java
@@ -106,7 +106,6 @@ public void errorsHaveSourceContext() throws NoSuchFieldException, IllegalAccess
expect(mockCreateDocument.getDocumentURI()).andReturn(mockCollectionXConfUri);
final Capture errorMsgCapture = newCapture();
-
mockLogger.error(capture(errorMsgCapture));
replay(mockConfigNodes, mockConfigNode, mockCreates, mockCreateDocument, mockCreate, mockEmptyNodeList, mockLogger);
@@ -116,26 +115,17 @@ public void errorsHaveSourceContext() throws NoSuchFieldException, IllegalAccess
final Map namespaces = new HashMap<>();
namespaces.put("tei", "http://www.tei-c.org/ns/1.0");
- overrideLogger(RangeIndexConfig.class, mockLogger);
- final RangeIndexConfig config = new RangeIndexConfig(mockConfigNodes, namespaces);
+ final RangeIndexConfig config = new RangeIndexConfig(mockConfigNodes, namespaces) {
+ @Override
+ Logger getLogger() {
+ return mockLogger;
+ }
+ };
assertTrue(errorMsgCapture.getValue().contains("Illegal QName: '" + badCreateQName + "'.. QName is invalid: INVALID_LOCAL_PART"));
assertTrue(errorMsgCapture.getValue().contains("(" + mockCollectionXConfUri + ")"));
- verify(mockConfigNodes, mockConfigNode, mockCreates, mockCreateDocument, mockCreate, mockEmptyNodeList, mockLogger);
+ verify(mockConfigNodes, mockConfigNode, mockCreates, mockCreateDocument, mockCreate, mockEmptyNodeList);
}
- private void overrideLogger(final Class clazz, final Logger logger) throws NoSuchFieldException, IllegalAccessException {
- final Field loggerField = clazz.getDeclaredField("LOG");
-
- // allow access to private field
- loggerField.setAccessible(true);
-
- // remove final modifier
- final Field modifiersField = JDKCompatibility.getModifiersField();
- modifiersField.setAccessible(true);
- modifiersField.setInt(loggerField, loggerField.getModifiers() & ~Modifier.FINAL);
-
- loggerField.set(null, logger);
- }
}
diff --git a/extensions/indexes/range/src/test/resources/log4j2.xml b/extensions/indexes/range/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/indexes/range/src/test/resources/log4j2.xml
+++ b/extensions/indexes/range/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/indexes/sort/src/test/resources/log4j2.xml b/extensions/indexes/sort/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/indexes/sort/src/test/resources/log4j2.xml
+++ b/extensions/indexes/sort/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/indexes/spatial/src/test/resources/log4j2.xml b/extensions/indexes/spatial/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/indexes/spatial/src/test/resources/log4j2.xml
+++ b/extensions/indexes/spatial/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/cache/src/test/resources/log4j2.xml b/extensions/modules/cache/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/modules/cache/src/test/resources/log4j2.xml
+++ b/extensions/modules/cache/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/compression/src/test/resources/log4j2.xml b/extensions/modules/compression/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/modules/compression/src/test/resources/log4j2.xml
+++ b/extensions/modules/compression/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/counter/src/test/resources/log4j2.xml b/extensions/modules/counter/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/modules/counter/src/test/resources/log4j2.xml
+++ b/extensions/modules/counter/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/expathrepo/src/test/resources/log4j2.xml b/extensions/modules/expathrepo/src/test/resources/log4j2.xml
index 37917668ae..45264aba17 100644
--- a/extensions/modules/expathrepo/src/test/resources/log4j2.xml
+++ b/extensions/modules/expathrepo/src/test/resources/log4j2.xml
@@ -197,15 +197,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/file/src/test/resources/log4j2.xml b/extensions/modules/file/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/modules/file/src/test/resources/log4j2.xml
+++ b/extensions/modules/file/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/mail/pom.xml b/extensions/modules/mail/pom.xml
index f004174a68..21a694049d 100644
--- a/extensions/modules/mail/pom.xml
+++ b/extensions/modules/mail/pom.xml
@@ -266,20 +266,6 @@
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
-
- integration-test
- verify
-
-
-
-
-
diff --git a/extensions/modules/mail/src/test/resources/log4j2.xml b/extensions/modules/mail/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/modules/mail/src/test/resources/log4j2.xml
+++ b/extensions/modules/mail/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/persistentlogin/src/test/resources/log4j2.xml b/extensions/modules/persistentlogin/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/modules/persistentlogin/src/test/resources/log4j2.xml
+++ b/extensions/modules/persistentlogin/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/sql/pom.xml b/extensions/modules/sql/pom.xml
index 4dd9abf989..8038ce69d3 100644
--- a/extensions/modules/sql/pom.xml
+++ b/extensions/modules/sql/pom.xml
@@ -237,20 +237,6 @@
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
-
-
-
- integration-test
- verify
-
-
-
-
-
diff --git a/extensions/modules/sql/src/test/resources/log4j2.xml b/extensions/modules/sql/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/modules/sql/src/test/resources/log4j2.xml
+++ b/extensions/modules/sql/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/xmldiff/src/test/resources/log4j2.xml b/extensions/modules/xmldiff/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/modules/xmldiff/src/test/resources/log4j2.xml
+++ b/extensions/modules/xmldiff/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/modules/xslfo/src/test/resources/log4j2.xml b/extensions/modules/xslfo/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/modules/xslfo/src/test/resources/log4j2.xml
+++ b/extensions/modules/xslfo/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/security/activedirectory/src/test/resources/log4j2.xml b/extensions/security/activedirectory/src/test/resources/log4j2.xml
index adb664f72a..2c644e5504 100644
--- a/extensions/security/activedirectory/src/test/resources/log4j2.xml
+++ b/extensions/security/activedirectory/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/webdav/src/test/resources/log4j2.xml b/extensions/webdav/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/webdav/src/test/resources/log4j2.xml
+++ b/extensions/webdav/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+
diff --git a/extensions/xqdoc/src/test/resources/log4j2.xml b/extensions/xqdoc/src/test/resources/log4j2.xml
index b678dc1388..282c0f4266 100644
--- a/extensions/xqdoc/src/test/resources/log4j2.xml
+++ b/extensions/xqdoc/src/test/resources/log4j2.xml
@@ -221,15 +221,15 @@
-
+
-
+
-
+