在 Embargo 下从 Item View 中移除摘要

Removing Abstract from Item View when under Embargo

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

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

我提取了一些可能有用的代码。我实际上用它来自定义缩略图显示,但这个概念在你的情况下是相似的。

<!-- 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']"/>