Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to eXist 5 #376

Merged
merged 40 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6fa2622
apply some fixes for current eXist-db 4.7
peterstadler May 28, 2019
0ba0ded
add collation for sorting of facets
peterstadler May 29, 2019
1072455
some speedups for eXist 4.7
peterstadler Apr 27, 2020
bdf098c
add `norm:create-norm-doc-documents()`
peterstadler Apr 28, 2020
d3c2c8a
response data is always an array
peterstadler Apr 28, 2020
2681650
Merge branch 'develop' into test-4.7
peterstadler Sep 25, 2020
77e9fda
Merge branch 'develop' into test-4.7
peterstadler Sep 29, 2020
9c7ed8f
Merge branch 'develop' into test-4.7
peterstadler Sep 29, 2020
4005093
move functions
peterstadler Sep 30, 2020
f58fbbd
refactor to use eXist5 facets and fields
peterstadler Sep 30, 2020
c3b3eab
remove outdated stuff
peterstadler Sep 30, 2020
46eadb8
move `strip-diacritics()` to WeGA-WebApp-lib str module
peterstadler Sep 30, 2020
21af8d5
get rid of norm module completely
peterstadler Sep 30, 2020
186c334
fix `core:undated`
peterstadler Sep 30, 2020
9a3766c
declare namespace
peterstadler Sep 30, 2020
df76556
remove superfluous lines
peterstadler Oct 1, 2020
afcf3b7
refactor `core:undated()` to use date filter
peterstadler Oct 1, 2020
5d40748
add function `core:index-keys-for-field()`
peterstadler Oct 1, 2020
82b7b6c
fix filtering
peterstadler Oct 2, 2020
2906dd2
Merge branch 'develop' into test-4.7
peterstadler Oct 8, 2020
ec89ce4
set semver-min
peterstadler Nov 9, 2020
65baecd
update processing/filtering of tests
peterstadler Nov 9, 2020
b54447f
Merge branch 'develop' into test-4.7
peterstadler Nov 23, 2020
a3a8f94
Merge branch 'develop' into test-4.7
peterstadler Nov 23, 2020
c0f04b8
update Dockerfile to use eXist5.2.0
peterstadler Nov 30, 2020
fb4ef35
use local curl binary
peterstadler Nov 30, 2020
b4215c1
update (some) expected results
peterstadler Nov 30, 2020
d03a894
add dependencies
peterstadler Nov 30, 2020
99b486d
getting saxon from sourceforge
peterstadler Nov 30, 2020
dff6de5
try to reduce memory consumption
peterstadler Nov 30, 2020
231cb2c
normalize characterNames
peterstadler Nov 30, 2020
f450351
update expected results
peterstadler Nov 30, 2020
b049fd2
try more recent distro for travis
peterstadler Nov 30, 2020
307dd3a
Merge branch 'develop' into test-4.7
peterstadler Dec 2, 2020
894c153
ups, never meant to commit these files
peterstadler Dec 2, 2020
5d8139a
exclude xpr-files from the xar package
peterstadler Dec 2, 2020
33b672d
Merge branch 'develop' into test-4.7
peterstadler Dec 2, 2020
914136e
refactor some API endpoints
peterstadler Dec 7, 2020
ea19a17
Merge branch 'develop' into test-4.7
peterstadler Dec 8, 2020
a9581e8
update Readme
peterstadler Dec 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
apply some fixes for current eXist-db 4.7
  • Loading branch information
peterstadler committed Apr 7, 2020
commit 6fa262292515c0890cbffcab99dea102ad95b698
2 changes: 1 addition & 1 deletion expath-pkg.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://expath.org/ns/pkg" name="@project.name@"
abbrev="@project.app@" version="@project.version@" spec="1.0">
<title>@project.app@</title>
<dependency processor="http://exist-db.org" semver-min="3.0.0" semver-max="3.3.0"/>
<dependency processor="http://exist-db.org" />
<dependency package="http://weber-gesamtausgabe.de/webapp-lib"/>
<dependency package="http://exist-db.org/apps/shared"/>
<dependency package="http://www.functx.com"/>
Expand Down
2 changes: 1 addition & 1 deletion modules/app.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ declare
return
map { 'beaconLinks':
for $i in map:keys($beaconMap)
order by $beaconMap($i)[2] collation "?lang=de-DE"
order by $beaconMap($i)[2]
return
(: replacement in @href for invalid links from www.sbn.it :)
<a title="{$i}" href="{replace($beaconMap($i)[1], '\\', '%5C')}">{$beaconMap($i)[2]}</a>
Expand Down
2 changes: 1 addition & 1 deletion modules/bibl.xqm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
xquery version "3.0" encoding "UTF-8";

module namespace bibl="http://xquery.weber-gesamtausgabe.de/modules/bibl";
declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
Expand Down
68 changes: 51 additions & 17 deletions modules/config.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,22 @@ declare function config:set-option($key as xs:string, $value as xs:string) as xs
: @return xs:string document type
:)
declare function config:get-doctype-by-id($id as xs:string?) as xs:string? {
for $func in $wdt:functions
return
if($func($id)('check')() and $func($id)('prefix')) then $func($id)('name')
else ()
if(config:is-person($id)) then 'persons'
else if(config:is-writing($id)) then 'writings'
else if(config:is-work($id)) then 'works'
else if(config:is-diary($id)) then 'diaries'
else if(config:is-letter($id)) then 'letters'
else if(config:is-news($id)) then 'news'
else if(config:is-iconography($id)) then 'iconography'
else if(config:is-var($id)) then 'var'
else if(config:is-biblio($id)) then 'biblio'
else if(config:is-place($id)) then 'places'
else if(config:is-source($id)) then 'sources'
else if(config:is-org($id)) then 'orgs'
else if(config:is-addenda($id)) then 'addenda'
else if(config:is-thematicCommentary($id)) then 'thematicCommentaries'
else if(config:is-document($id)) then 'documents'
else ()
};

declare function config:get-combined-doctype-by-id($id as xs:string?) as xs:string* {
Expand Down Expand Up @@ -261,47 +273,47 @@ declare function config:is-var($docID as xs:string?) as xs:boolean {
};

(:~
: Checks whether a given id matches the WeGA pattern of biblio ids
: Checks whether a given id matches the WeGA pattern of org ids
:
: @author Peter Stadler
: @param $docID the id to test as string
: @return xs:boolean
:)
declare function config:is-biblio($docID as xs:string?) as xs:boolean {
matches($docID, '^A11\d{4}$')
declare function config:is-org($docID as xs:string?) as xs:boolean {
matches($docID, '^A08\d{4}$')
};

(:~
: Checks whether a given id matches the WeGA pattern of places ids
: Checks whether a given id matches the WeGA pattern of thematicCommentary ids
:
: @author Peter Stadler
: @param $docID the id to test as string
: @return xs:boolean
:)
declare function config:is-place($docID as xs:string?) as xs:boolean {
matches($docID, '^A13\d{4}$')
declare function config:is-thematicCommentary($docID as xs:string?) as xs:boolean {
matches($docID, '^A09\d{4}$')
};

(:~
: Checks whether a given id matches the WeGA pattern of sources ids
: Checks whether a given id matches the WeGA pattern of document ids
:
: @author Peter Stadler
: @param $docID the id to test as string
: @return xs:boolean
:)
declare function config:is-source($docID as xs:string?) as xs:boolean {
matches($docID, '^A22\d{4}$')
declare function config:is-document($docID as xs:string?) as xs:boolean {
matches($docID, '^A10\d{4}$')
};

(:~
: Checks whether a given id matches the WeGA pattern of org ids
: Checks whether a given id matches the WeGA pattern of biblio ids
:
: @author Peter Stadler
: @param $docID the id to test as string
: @return xs:boolean
:)
declare function config:is-org($docID as xs:string?) as xs:boolean {
matches($docID, '^A08[0-9A-F]{4}$')
declare function config:is-biblio($docID as xs:string?) as xs:boolean {
matches($docID, '^A11\d{4}$')
};

(:~
Expand All @@ -312,7 +324,29 @@ declare function config:is-org($docID as xs:string?) as xs:boolean {
: @return xs:boolean
:)
declare function config:is-addenda($docID as xs:string?) as xs:boolean {
matches($docID, '^A12[0-9]{4}$')
matches($docID, '^A12\d{4}$')
};

(:~
: Checks whether a given id matches the WeGA pattern of places ids
:
: @author Peter Stadler
: @param $docID the id to test as string
: @return xs:boolean
:)
declare function config:is-place($docID as xs:string?) as xs:boolean {
matches($docID, '^A13\d{4}$')
};

(:~
: Checks whether a given id matches the WeGA pattern of sources ids
:
: @author Peter Stadler
: @param $docID the id to test as string
: @return xs:boolean
:)
declare function config:is-source($docID as xs:string?) as xs:boolean {
matches($docID, '^A22\d{4}$')
};

(:~
Expand Down
2 changes: 1 addition & 1 deletion modules/core.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ xquery version "3.1";
: Core functions of the WeGA-WebApp
:)
module namespace core="http://xquery.weber-gesamtausgabe.de/modules/core";
declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace request="http://exist-db.org/xquery/request";
Expand Down
2 changes: 1 addition & 1 deletion modules/dev/api.xql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ xquery version "3.1" encoding "UTF-8";
: @version 1.0
:)

declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
Expand Down
2 changes: 1 addition & 1 deletion modules/dev/dev-app.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module namespace dev-app="http://xquery.weber-gesamtausgabe.de/modules/dev/dev-a
: @version 1.0
:)

declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace templates="http://exist-db.org/xquery/templates";
Expand Down
2 changes: 1 addition & 1 deletion modules/dev/dev.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ xquery version "3.0" encoding "UTF-8";
:)

module namespace dev="http://xquery.weber-gesamtausgabe.de/modules/dev";
declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
Expand Down
2 changes: 1 addition & 1 deletion modules/dev/ediarum.xql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ xquery version "3.0" encoding "UTF-8";
: XQuery functions for integration with oXygen editor
:)

declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
Expand Down
2 changes: 1 addition & 1 deletion modules/facets.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ xquery version "3.1" encoding "UTF-8";
:)

module namespace facets="http://xquery.weber-gesamtausgabe.de/modules/facets";
declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
Expand Down
2 changes: 1 addition & 1 deletion modules/img.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ xquery version "3.1" encoding "UTF-8";
:)

module namespace img="http://xquery.weber-gesamtausgabe.de/modules/img";
declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace xhtml="http://www.w3.org/1999/xhtml";
Expand Down
2 changes: 1 addition & 1 deletion modules/norm.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ xquery version "3.0";
: XQuery module for creating normalized lists of documents
:)
module namespace norm="http://xquery.weber-gesamtausgabe.de/modules/norm";
declare default collation "?lang=de;strength=primary";


declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
Expand Down
2 changes: 1 addition & 1 deletion modules/query.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ xquery version "3.1" encoding "UTF-8";
: Functions for querying data from the WeGA-data app
:)
module namespace query="http://xquery.weber-gesamtausgabe.de/modules/query";
declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace gn="http://www.geonames.org/ontology#";
Expand Down
2 changes: 1 addition & 1 deletion modules/wega-util.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ xquery version "3.1" encoding "UTF-8";
: Various utility functions for the WeGA WebApp
:)
module namespace wega-util="http://xquery.weber-gesamtausgabe.de/modules/wega-util";
declare default collation "?lang=de;strength=primary";

declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace wega="http://www.weber-gesamtausgabe.de";
Expand Down