Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project award element does not seem to be accessible #305

Open
srearl opened this issue Jun 28, 2020 · 3 comments
Open

project award element does not seem to be accessible #305

srearl opened this issue Jun 28, 2020 · 3 comments

Comments

@srearl
Copy link

srearl commented Jun 28, 2020

One of the enhancements of EML 2.2.0 is the ability to add additional and more structured details of funding with the <award> element within <project>. However, the <award> element does not seem to be accessible.

Confirming that we are using the appropriate version of EML:
emld::eml_version()
[1] "eml-2.2.0"

EML::eml$project() suggests a structure characteristic of EML 2.1.1 lacking the <award> element.

@amoeba
Copy link
Collaborator

amoeba commented Jun 29, 2020

Hey @srearl, thanks for the report. Looks related to #287 and it looks like we have some more work there to get this to work.

In the mean time, because of the new list-based structure we use, you may be able to manually set an award list member on your project so long as its in the right spot. Haven't tested so your mileage may vary.

I'll try to make some time to look at this and #287 later this week.

@mbjones
Copy link
Member

mbjones commented Jul 2, 2020

I can confirm that the EML::eml$project() constructor does not seem to reflect the EML 2.2.0 schema.

However, I was able to produce valid EML using the list structure:

library(emld)
library(EML)
emld::eml_version("eml-2.2.0")

me <- list(individualName = list(givenName = "Matt", surName = "Jones"))
my_eml <- list(
  packageId = list("foo.bar"),
  system = "https://dataone.org",
  dataset = list(
    title = "Check award structure in EML 2.2.0",
    creator = me,
    abstract = "Dataset abstract",
    contact = me,
    project = list(
      title = "Project title",
      personnel = list(individualName = list(givenName = "Matt", surName = "Jones"),
                       role = list("Principal Investigator")),
      abstract = "Project abstract",
      funding = list(para = "Funding para"),
      award = list(
        funderName = "National Science Foundation",
        funderIdentifier = "https://doi.org/10.13039/00000001",
        awardNumber = "1546024",
        title = "Scientia Arctica: A Knowledge Archive for Discovery and Reproducible Science in the Arctic",
        awardUrl = "https://www.nsf.gov/awardsearch/showAward?AWD_ID=1546024"
      )
    )
  )
)
eml_validate(my_eml)
write_eml(my_eml, "eml.xml")

That code produces this valid EML:

<?xml version="1.0" encoding="UTF-8"?>
<eml:eml xmlns:eml="https://eml.ecoinformatics.org/eml-2.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stmml="http://www.xml-cml.org/schema/stmml-1.2" packageId="foo.bar" system="https://dataone.org" xsi:schemaLocation="https://eml.ecoinformatics.org/eml-2.2.0 https://eml.ecoinformatics.org/eml-2.2.0/eml.xsd">
  <dataset>
    <title>Check award structure in EML 2.2.0</title>
    <creator>
      <individualName>
        <givenName>Matt</givenName>
        <surName>Jones</surName>
      </individualName>
    </creator>
    <abstract>Dataset abstract</abstract>
    <contact>
      <individualName>
        <givenName>Matt</givenName>
        <surName>Jones</surName>
      </individualName>
    </contact>
    <project>
      <title>Project title</title>
      <personnel>
        <individualName>
          <givenName>Matt</givenName>
          <surName>Jones</surName>
        </individualName>
        <role>Principal Investigator</role>
      </personnel>
      <abstract>Project abstract</abstract>
      <funding>
        <para>Funding para</para>
      </funding>
      <award>
        <funderName>National Science Foundation</funderName>
        <funderIdentifier>https://doi.org/10.13039/00000001</funderIdentifier>
        <awardNumber>1546024</awardNumber>
        <title>Scientia Arctica: A Knowledge Archive for Discovery and Reproducible Science in the Arctic</title>
        <awardUrl>https://www.nsf.gov/awardsearch/showAward?AWD_ID=1546024</awardUrl>
      </award>
    </project>
  </dataset>
</eml:eml>

So it seems there is a constructor issue to be worked out. I wonder if this is limited to just the project constructor, or if all constructors that differ between 2.1.1 and 2.2.0 are incorrect when there are changes in 2.2.0? @cboettig any thoughts on how the constructors are generated for the different versions?

@mbjones
Copy link
Member

mbjones commented Jul 2, 2020

I just reread Issue #287 and realized that all of this was already pointed out in that issue. Fixing #287 should fix this eml$project() issue, so this is really a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants