Skip to content

MIR-1686 Use REST API v2 instead of MCRFileNodeServlet in export formats - #1528

Merged
yagee-de merged 3 commits into
mainfrom
issues/MIR-1686-Use_REST_API_v2_instead_of_MCRFileNodeServlet_in_export_formats
Oct 27, 2026
Merged

yagee-de merged 3 commits into
mainfrom
issues/MIR-1686-Use_REST_API_v2_instead_of_MCRFileNodeServlet_in_export_formats

Conversation

@sebhofmann

@sebhofmann sebhofmann commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Link to jira.

Replaces links to MCRFileNodeServlet and MCRZipServlet in the MIR export formats by links to the REST API v2:

  • mods2oai_dc.xsl (dc:identifier)
  • mods2epicur.xsl
  • mods2xMetaDissPlus.xsl (ddb:transfer)
  • mycoreobject2dissemin-status.xsl (pdf_url)

A single file is linked as api/v2/objects/{mcrid}/derivates/{derid}/contents/{path}, all files of one derivate as api/v2/objects/{mcrid}/derivates/{derid}/contents.zip. The link to MCRZipServlet/{objectId} (object with more than one derivate) is unchanged until it is clarified how this case is handled in the REST API.

This is the MIR part of MCR-3858 and MCR-3860 (MyCoRe PR: MyCoRe-Org/mycore#3162 provides the archive support, the MyCoRe export formats are changed in MCR-3860). The archive links need the archive support from MCR-3858.

How to test

Tested locally against a deployed MIR with a published object with one file and with several files (including a sub directory) via the OAI interface (epicur, xMetaDissPlus, mods): a single file is linked as contents/{path}, several files as contents.zip, and the links deliver the file or the archive. mycoreobject2dissemin-status.xsl was not tested.

oai_dc delivers an empty result on main, independent of this change (see MIR-1687). So oai_dc could not be checked with this change either.

Link to files and derivates through the REST API v2 (contents and archive/zip)
instead of MCRFileNodeServlet and MCRZipServlet in the export formats oai_dc,
epicur, xMetaDissPlus and the Dissemin status. The link to
MCRZipServlet/{objectId} for objects with more than one derivate is unchanged.
@sebhofmann
sebhofmann force-pushed the issues/MIR-1686-Use_REST_API_v2_instead_of_MCRFileNodeServlet_in_export_formats branch from 6c6c901 to 883e7b3 Compare October 26, 2026 12:08
Comment on lines 52 to 58
<xsl:value-of select="concat($WebApplicationBaseURL,
'servlets/MCRFileNodeServlet/',
'api/v2/objects/',
/mycoreobject/@ID,
'/derivates/',
$derivate/@xlink:href,
'/',
'/contents/',
$derivate/maindoc/text())"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. If there are multiple derivates with a maindoc, concat causes cardinality issues
  2. The maindoc may need to be encoded

…ats fix cardinality and encode maindoc in dissemin status
@yagee-de
yagee-de merged commit ed68b1b into main Oct 27, 2026
2 checks passed
@yagee-de
yagee-de deleted the issues/MIR-1686-Use_REST_API_v2_instead_of_MCRFileNodeServlet_in_export_formats branch October 27, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants