cioos-siooc / biological-data

Collaboration on CIOOS biological data code, standards, and best practices.
0 stars 0 forks source link

Setup metadata links from OBIS to CIOOS #4

Open jeffcullis opened 2 years ago

jeffcullis commented 2 years ago

For physical/BGC data that is related to a biological dataset in OBIS, we need to determine a standard way of filling in the IPT / EML metadata so that it can link out from the OBIS dataset record to the associated CIOOS dataset and/or catalogue entry.

jeffcullis commented 2 years ago

Copied over Sean's post relevant to this issue from Slack:

An example of a method to link external resources into the body of the EML of an OBIS file can be seen below. Note that this falls under the AdditionalMetadata tag as opposed to the Dataset tag where most EML dataset content is held. This typically gets listed at near the end of the EML file after the </dataset>

<additionalMetadata>
<metadata>
<gbif>
<dateStamp>2020-01-01T00:00:00Z</dateStamp>
<hierarchyLevel>dataset</hierarchyLevel>
<citation identifier="https://doi.org/10.34943/23F98FB5-B34D-447C-A8E7-C47AF5E41CFD">Ocean Networks Canada Society. (2018). Barkley Canyon Axis Video Camera Deployed 2018-06-22 [Data set]. Ocean Networks Canada Society. https://doi.org/10.34943/23F98FB5-B34D-447C-A8E7-C47AF5E41CFD</citation>
<physical>
<objectName>Dataset Collection</objectName>
<characterEncoding>UTF-8</characterEncoding>
<dataFormat>
<externallyDefinedFormat>
<formatName>HTML</formatName>
</externallyDefinedFormat>
</dataFormat>
<distribution>
<online>
<url function="information">http://dx.doi.org/10.21966/1.566666</url>
</online>
</distribution>
</physical>
</gbif>
</metadata>
</additionalMetadata>

Note that this EML may or may not be frankensteined together, so this does not represent a real-world example from an existing dataset.

jdpye commented 2 years ago

Not sure if this's helpful but this is the additionalMetadata part of my eml.xml.j2

<additionalMetadata>
    <metadata>
      <gbif>
          {% if dataset_first_publication_date %}
          <dateStamp>{{ dataset_first_publication_date }}</dateStamp>
          {% else %}
          <dateStamp>{{ current_utc_dt }}</dateStamp>
          {% endif %}
          <hierarchyLevel>dataset</hierarchyLevel>
            <citation identifier="http://iobis.org/mapper/?resource_id=2834">{{ project_citation }}  Accessed on –INSERT DATE</citation>
          <bibliography>
                <citation>{{ project_citation}} {{ series_citation }} In: {{ datacentre_citation }} Retrieved: {{ dataset_first_publication_date }} from {{ datacentre_url }}</citation>
          </bibliography>
            <physical>
              <objectName>{{ project_shortname }}</objectName>
              <characterEncoding>ASCII</characterEncoding>
              <dataFormat>
                <externallyDefinedFormat>
                  <formatName>HTM</formatName>
                </externallyDefinedFormat>
              </dataFormat>
              <distribution>
                <online>
                  <url function="download">{{ otn_portal_project_url }}</url>
                </online>
              </distribution>
            </physical>
          <resourceLogoUrl>{{ otn_logo_url }}</resourceLogoUrl>
          <!-- <dc:replaces>http://ipt.iobis.org/obiscanada/resource.do?id={{ dataset_ipt_id }}/v5.xml</dc:replaces> Don't know how to identify the version we're replacing -->
      </gbif>
    </metadata>
  </additionalMetadata>
jdpye commented 2 years ago

It won't let me attach the j2 template raw, so here it is zipped. It's actually too hardcoded still, we're working on replacing more of it with the Jinja variables eml.xml.zip .