Skip to content

Commit

Permalink
Merge pull request #280 from TAMULib/research-project-entity-virtual-…
Browse files Browse the repository at this point in the history
…metadata

[279] Research project entity virtual metadata
  • Loading branch information
jsavell authored Sep 5, 2024
2 parents 9cff938 + 7ddfe0c commit afddf67
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions dspace/config/spring/api/virtual-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<!-- TAMU Customization - Dataset / PDAC virtual metadata mapping -->
<entry key="isPDACForDataset" value-ref="isPDACForDatasetMap"/>
<entry key="isDatasetAssignedToPDAC" value-ref="isDatasetAssignedToPDACMap"/>
<entry key="isPDACForProject" value-ref="isPDACForProjectMap"/>
<entry key="isProjectAssignedtoPDAC" value-ref="isProjectAssignedToPDACMap"/>
<!-- End TAMU Customization - Dataset / PDAC virtual metadata mapping -->
</map>
</property>
Expand All @@ -40,6 +42,7 @@
<!-- TAMU Customization - Dataset / PDAC entity type to filter query entry -->
<entry key="Dataset" value="f.entityType=Dataset,equals"/>
<entry key="PDAC" value="f.entityType=PDAC,equals"/>
<entry key="ResearchProject" value="f.entityType=ResearchProject,equals"/>
<!-- End TAMU Customization - Dataset / PDAC entity type to filter query entry -->
</map>
</property>
Expand Down Expand Up @@ -82,6 +85,33 @@
</bean>
<!-- End TAMU Customization - Dataset / PDAC virtual metadata -->

<util:map id="isPDACForProjectMap">
<entry key="local.pdac.name" value-ref="projectPDAC_name"/>
<entry key="dc.contributor.pdac" value-ref="projectPDAC_identifier"/>
</util:map>
<bean class="org.dspace.content.virtual.Concatenate" id="projectPDAC_name">
<property name="fields">
<util:list>
<value>local.pdac.name</value>
</util:list>
</property>
<property name="separator">
<value>, </value>
</property>
<property name="useForPlace" value="true"/>
<property name="populateWithNameVariant" value="true"/>
</bean>
<bean class="org.dspace.content.virtual.Collected" id="projectPDAC_identifier">
<property name="fields">
<util:list>
<value>dc.identifier.uri</value>
</util:list>
</property>
</bean>
<util:map id="isProjectAssignedToPDACMap">
<entry key="dc.relation.hasResearchProject" value-ref="pdac_identifier"/>
</util:map>

<!-- Config like this will tell our VirtualMetadataPopulator to include the virtual metadata field
'dc.contributor.author' on the appropriate item with the values defined in the value-ref.
This value-ref should be a bean of type VirtualMetadataConfiguration -->
Expand Down

0 comments on commit afddf67

Please sign in to comment.