eprintsug / sd_goals

UN Sustainable Development Goals plugin for EPrints
GNU General Public License v3.0
1 stars 0 forks source link

Add notes about PURE and Symplectic Elements integration to readme #1

Closed jesusbagpuss closed 9 months ago

jesusbagpuss commented 1 year ago

Firstly - yay! This was on my list of things to create - and I'd already done some investigation about how the data might flow from Elements into EPrints .

Here are some notes about integrating this extension with Elements - below covers the deposit crosswalk. I haven't tested the plugin out yet, but I think the notes below will be pretty close. I'll test/add to the README / submit a PR soon.

  1. Add a field mapping to the 'deposit' crosswalk. You may have a 'standard' field-map <xwalk:field-map name="standard-fields"> - add it there.

    <xwalk:field-mapping to="sd_goals" is-list="true" distinct="true">
    <xwalk:field-source from="object.labels" format="keyword:with-scheme" value-map="sdg-labels-only">
    <xwalk:field-source from="keyword:value" value-map="translate-sdg-to-sd_goals" />
    </xwalk:field-source>
    </xwalk:field-mapping>
  2. Create a filter for only SDG labels, and a mapping from the Elements label values to the sd_goals namedset. These should be added to the <xwalk:value-maps> section of the deposit crosswalk.

    <!-- filter labels for only SDG -->
    <xwalk:value-map name="sdg-labels-only" data-part="keyword:scheme">
    <xwalk:value-mapping from="sdg" action="continue" />
    <xwalk:otherwise-mapping action="ignore-this-value" />
    </xwalk:value-map>
    <!-- translate Elements label values into EPrints namedset values - see https://github.com/eprintsug/sd_goals/ -->
    <xwalk:value-map name="translate-sdg-to-sd_goals">
    <xwalk:value-mapping from="1 No Poverty"                              to="01np" />
    <xwalk:value-mapping from="2 Zero Hunger"                             to="02zh" />
    <xwalk:value-mapping from="3 Good Health and Well Being"              to="03ghwb" />
    <xwalk:value-mapping from="4 Quality Education"                       to="04qe" />
    <xwalk:value-mapping from="5 Gender Equality"                         to="05ge" />
    <xwalk:value-mapping from="6 Clean Water and Sanitation"              to="06cws" />
    <xwalk:value-mapping from="7 Affordable and Clean Energy"             to="07ace" />
    <xwalk:value-mapping from="8 Decent Work and Economic Growth"         to="08dweg" />
    <xwalk:value-mapping from="9 Industry, Innovation and Infrastructure" to="09iii" />
    <xwalk:value-mapping from="10 Reduced Inequalities"                   to="10ri" />
    <xwalk:value-mapping from="11 Sustainable Cities and Communities"     to="11scc" />
    <xwalk:value-mapping from="12 Responsible Consumption and Production" to="12rcp" />
    <xwalk:value-mapping from="13 Climate Action"                         to="13ca" />
    <xwalk:value-mapping from="14 Life Below Water"                       to="14lbw" />
    <xwalk:value-mapping from="15 Life on Land"                           to="15lol" />
    <xwalk:value-mapping from="16 Peace, Justice and Strong Institutions" to="16pjsi" />
    <xwalk:value-mapping from="17 Partnerships for the Goals"             to="17pfg" />
    </xwalk:value-map>
jesusbagpuss commented 11 months ago

Approach for PURE is documented here: https://github.com/digital-york/wrro-pure/issues/16 Can also to be included in README.