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

Validate collections are real collections #5

Open
peterdietz opened this issue Nov 20, 2014 · 0 comments
Open

Validate collections are real collections #5

peterdietz opened this issue Nov 20, 2014 · 0 comments

Comments

@peterdietz
Copy link
Contributor

A new feature of SAFBuilder is the ability to batch import to multiple collections. (Also requires modifying DSpace ItemImport, done for Longsight code, perhaps contributable upstream in DSpace 6 -- LongsightGroup/DSpace@c14db37)

collection
123/2233||123/2334||123/3434

However, if they aren't actually a collection, this will cause a problem for the importer. So.. it would be nice if SAFBuilder could query the collections to ensure they are collections... Perhaps as a post generation check

I'm thinking it could query the handle REST API:
http://hdl.handle.net/api/handles/1811/686

{
  "responseCode":1,
  "handle":"1811/686",
  "values":[{
    "index":100,
    "type":"URL",
    "data":{
      "format":"string",
      "value":"http://kb.osu.edu/dspace/handle/1811/686"
    },
    "permissions":"1010",
    "ttl":100,
    "timestamp":"1970-01-01T00:01:40Z"
  }]
}

Then from that, look up: http://kb.osu.edu/dspace/handle/1811/686, then try to guess where the DSpace REST API might be, and query that, to see if this handle is of type collection?

http://kb.osu.edu/rest/handle/1811/686

{
  "id":34,
  "name":"Ohio Journal of Science (Ohio Academy of Science)",
  "handle":"1811/686",
  "type":"community",
  ...
}

In which case, we learn that 1811/686 is a community, and SAFBuilder could complain.

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

No branches or pull requests

1 participant