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

Resolving issue #240 #487

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
9 changes: 6 additions & 3 deletions add/data/xql/getAnnotationsInText.xql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";
import module namespace eutil = "http://www.edirom.de/xquery/eutil" at "../xqm/eutil.xqm";


(: OPTION DECLARATIONS ===================================================== :)

Expand All @@ -29,10 +31,10 @@ declare option output:media-type "application/json";
@param $elems The elements to check (most likely measures and zones)
@returns A sequence of annotation elements
:)
declare function local:findAnnotations($uri as xs:string) as element(mei:annot)* {
declare function local:findAnnotations($uri as xs:string, $edition as xs:string) as element(mei:annot)* {

(: TODO: check if annotations hold URIs or IDRefs :)
collection('/db/contents')//mei:annot[matches(@plist, $uri)]
collection(eutil:getPreference('edition_path', $edition))//mei:annot[matches(@plist, $uri)]
hizclick marked this conversation as resolved.
Show resolved Hide resolved
};

declare function local:getAnnotations($uriSharp as xs:string, $annotations as element()*) as array(*)* {
Expand Down Expand Up @@ -64,10 +66,11 @@ declare function local:getAnnotations($uriSharp as xs:string, $annotations as el
}
}
};
let $edition := request:get-parameter('edition', '')
peterstadler marked this conversation as resolved.
Show resolved Hide resolved

let $uri := request:get-parameter('uri', '')
let $uriSharp := concat($uri, '#')
let $annotations := local:findAnnotations($uri)
let $annotations := local:findAnnotations($uri,$edition)

return
local:getAnnotations($uriSharp, $annotations)
6 changes: 6 additions & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Ext.ClassManager.addNameAlternateMappings({
"EdiromOnline.controller.window.SummaryView": [],
"EdiromOnline.controller.window.WindowController": [],
"EdiromOnline.controller.window.XmlView": [],
"EdiromOnline.controller.window.about.AboutWindow": [],
"EdiromOnline.controller.window.audio.AudioView": [],
"EdiromOnline.controller.window.concordanceNavigator.ConcordanceNavigator": [],
"EdiromOnline.controller.window.iFrameView": [],
Expand Down Expand Up @@ -78,6 +79,7 @@ Ext.ClassManager.addNameAlternateMappings({
"EdiromOnline.view.window.View": [],
"EdiromOnline.view.window.Window": [],
"EdiromOnline.view.window.XmlView": [],
"EdiromOnline.view.window.about.AboutWindow": [],
"EdiromOnline.view.window.annotationLayouts.AnnotationLayout1": [],
"EdiromOnline.view.window.annotationLayouts.AnnotationLayout2": [],
"EdiromOnline.view.window.annotationLayouts.AnnotationLayout3": [],
Expand Down Expand Up @@ -956,6 +958,7 @@ Ext.ClassManager.addNameAliasMappings({
"EdiromOnline.controller.window.SummaryView": [],
"EdiromOnline.controller.window.WindowController": [],
"EdiromOnline.controller.window.XmlView": [],
"EdiromOnline.controller.window.about.AboutWindow": [],
"EdiromOnline.controller.window.audio.AudioView": [],
"EdiromOnline.controller.window.concordanceNavigator.ConcordanceNavigator": [],
"EdiromOnline.controller.window.iFrameView": [],
Expand Down Expand Up @@ -1016,6 +1019,9 @@ Ext.ClassManager.addNameAliasMappings({
"EdiromOnline.view.window.XmlView": [
"widget.xmlView"
],
"EdiromOnline.view.window.about.AboutWindow": [
"widget.aboutWindow"
],
"EdiromOnline.view.window.annotationLayouts.AnnotationLayout1": [],
"EdiromOnline.view.window.annotationLayouts.AnnotationLayout2": [],
"EdiromOnline.view.window.annotationLayouts.AnnotationLayout3": [],
Expand Down