在禁运期间从项目视图中删除摘要

时间:2017-05-31 04:07:39

标签: dspace

我们希望在项目处于禁运状态时从项目视图(以及HTML源代码中的元数据)中删除项目的摘要。我们可以使用一些选择'锁定'缩略图实现这个?

1 个答案:

答案 0 :(得分:2)

您的假设是正确的,您可以查询用于显示锁定图标的相同信息来控制元数据显示。这些信息有点难以检索,但它就在那里。

我已经提取了一些可能有帮助的代码。我实际上使用它来自定义缩略图显示,但在你的情况下概念将类似。

<!-- Get the current item handle -->
<xsl:variable name="HANDLE" select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request'][@qualifier='URI']"/>

<!-- Generate the URL to the rights information for the item -->
<xsl:variable name="EXTMETSURL" select="concat('cocoon://metadata/',$HANDLE,'/mets.xml?rightsMDTypes=METSRIGHTS')"/>

<!-- Retrieve the rights information (as a cocoon request) -->
<xsl:variable name="EXTMETS" select="document($EXTMETSURL)"/>

<!-- Point this variable at a specific bitstream of interest (such as the primary bitstream or the first original bitstream)-->
<xsl:variable name="bit" select="..."/>

<!-- Retrieve the rights information for a specific bitstream -->
<xsl:variable name="bitmets" select="$EXTMETS//mets:fileSec/mets:fileGrp[@USE='ORIGINAL']/mets:file[@GROUPID=$bit/@GROUPID]"/>

<!-- Get the authorization id for the bitstream -->
<xsl:variable name="authid" select="$bitmets/@ADMID"/>

<!-- Get the authorization record based on that id -->
<xsl:variable name="authrec" select="$EXTMETS//mets:rightsMD[@ID=$authid]"/>

<!-- Check that General Public (aka Anonymous) can access that record -->
<xsl:variable name="pubrec" select="$authrec//metsrights:Context[@in-effect='true'][@CONTEXTCLASS='GENERAL PUBLIC']"/>