Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
f1e8649d
Commit
f1e8649d
authored
Oct 07, 2019
by
Mathias Goebel
🎠
Browse files
add doc and correct test
parent
b292314b
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/index-api.xqm
View file @
f1e8649d
...
...
@@ -289,6 +289,7 @@ return
(:~
: Returns available image from TextGrid Repository
: @param $id the xml:id of an entity in the database
: @param $type the index to look up, on of: plc, wrk, psn, eve, org
: @return an array of URIs
:)
declare
...
...
@@ -297,13 +298,17 @@ declare
%output:method("json")
%test:arg("id", "Arnoldi-Denkmal")
%test:arg("type", "plc")
%test:assertTrue
function index:rendered-entity($type as xs:string, $id as xs:string)
as item()* {
let $request := <hc:request method="get" href="https://textgridlab.org/1.0/tgsearch-public/search/?q=(title:%22{$type}:{$id}%22)" />
let $request :=
<hc:request
method="get"
href="https://textgridlab.org/1.0/tgsearch-public/search/?q=(title:%22{$type}:{$id}%22)" />
let $tgsearch := hc:send-request($request)[2]
return
[
$tgsearch//tgmd:textgridUri/string()
$tgsearch//tgmd:textgridUri/string()
]
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment