-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature: OAI-Interface #479
base: develop
Are you sure you want to change the base?
Conversation
Thanks for the PR! Could you please rebase your branch on current develop? That should fix the issues with the failing tests |
292e27c
to
1c67961
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so far. There's one issue (calling a private function …) that hinders me to test further
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some more issues ;)
: return The date ad xs:dateTime or empty | ||
:) | ||
declare %private function oai:last-modified($docID) as xs:dateTime { | ||
let $props := config:get-data-props($docID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is called config:get-svn-props
. A quick fix would be to adjust it here, the more elaborate way would be to duplicate such a function in the config module as e.g. config:get-version-control-props
, link the old one to the new function and deprecate the old one, like:
(:~
: Deprecated, please use config:get-version-control-props#1
: This function is to be removed in the near future
:)
declare function config:get-svn-props($docID as xs:string) as map(*) {
config:get-version-control-props($docID),
wega-util:log-to-file('info', 'call to deprecated function `config:get-svn-props`!')
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, in my code it will be overwritten and the different name was to avoid myself to get confused. I'll fix that!
declare function oai:oai($model as map(*)) as node() { | ||
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> | ||
<responseDate>{fn:current-dateTime()}</responseDate> | ||
<request verb="GetRecord" identifier="{$lod-metadata?DC.identifier}" metadataPrefix="oai_dc">http://www.openarchives.org/OAI/2.0/oai_dc/</request> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable $lod-metadata
is not available in this function. It's probably best to fetch lod:metadata
first and append this to the main $model
(see below)?!
<request verb="GetRecord" identifier="{$lod-metadata?DC.identifier}" metadataPrefix="oai_dc">http://www.openarchives.org/OAI/2.0/oai_dc/</request> | |
<request verb="GetRecord" identifier="{$model?lod?DC.identifier}" metadataPrefix="oai_dc">http://www.openarchives.org/OAI/2.0/oai_dc/</request> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, but why does it work on my machine?
Co-authored-by: Peter Stadler <[email protected]>
This PR introduces the possibility to export every object as a valid oai-xml-file. The feature is just basic at the moment and can be extended in the future.