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

query CrossRef, DataCite, and Re3data when DOI provided as linked identifier #23

Open
larsvilhuber opened this issue Feb 24, 2020 · 5 comments
Labels
dynamic UI Affects the dynamic UI (requires server component) enhancement New feature or request

Comments

@larsvilhuber
Copy link
Member

Both CrossRef and DataCite have API to query information.

@larsvilhuber larsvilhuber added enhancement New feature or request dynamic UI Affects the dynamic UI (requires server component) labels Feb 24, 2020
@larsvilhuber
Copy link
Member Author

larsvilhuber commented Feb 24, 2020

depends on (#22 or #72) , #71

Note from @bbarker : We can start this without #22 or #72 in place

@bbarker
Copy link
Contributor

bbarker commented Sep 19, 2020

This comment applies to arXiv as well (#24); while arbitrary sites may not be allowed, it appears that CrossRef (or at least dx.doi.org), DataCite, and arXiv all allow requests from github.com in their CORS policy. So it should be beneficial to build this into the client and build a server to run that same client code as a backup. If someone wants to host an instance of metajelo, it is likely they could request that these providers add their site to the CORS policy.

@bbarker
Copy link
Contributor

bbarker commented Sep 19, 2020

Here's the test code I used to make requests:

<!doctype html>
<html lang=en>
    <head>
        <meta charset=utf-8>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Tests for purescript</title>
    </head>
    <body>
        <div class= "pure-g">
            <div class="pure-u-1-1">
                <div id="metajelo_ui_root"></div>
            </div>
        </div>
        <script type="application/javascript" charset="utf-8">
          function reqListener () {
            console.log(this.responseText);
          }

          var oReq = new XMLHttpRequest();
          oReq.addEventListener("load", reqListener);
          // oReq.open("GET", "https://export.arxiv.org/api/query?search_query=all:electron&start=0&max_results=1");
          // oReq.send();


          oReq.open("GET", "https://dx.doi.org/10.5555/515151");
          oReq.setRequestHeader('Accept', 'application/json');
          oReq.send();

          // oReq.open("GET", "https://api.test.datacite.org/dois/10.5438/0012");
          // oReq.send();


        </script>
    </body>
</html>

@bbarker bbarker changed the title query CrossRef and DataCite when DOI provided as linked identifier query CrossRef, DataCite, and Re3data when DOI provided as linked identifier Sep 23, 2020
@bbarker
Copy link
Contributor

bbarker commented Sep 23, 2020

  • After discussion, it seems that we most likely to start with DataCite as the simplest example.
  • For Re3data, multiple metadata records may be returned and the user may have to click through some options to get to the appropriate field and allow the user to choose the data they wish to start with. See paper for details.
  • Consider how the user-interface will work for this. We could have a loosely coupled approach where the data retrieval is a separate UI-element, and data can be imported by some means (Add a data-load capability. #71).
  • Related: Explore packaging as an Electron application #72 - we can also be conscious of the fact that we should design this with the ability to run in Electron, though primarily this involves making an abstract interface to HTTP Requests that can be supplied by whatever runtime.

@bbarker
Copy link
Contributor

bbarker commented Nov 3, 2020

In the case of failure, show relevant raw data to the user in a message so they can make the edits manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamic UI Affects the dynamic UI (requires server component) enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants