ropensci-archive / dataone-restful

:no_entry: ARCHIVED :no_entry:
0 stars 0 forks source link

Handling sysmeta #3

Open cboettig opened 10 years ago

cboettig commented 10 years ago

Uploading via the REST API requires providing a system metadata as an additional XML file. Working backwards from the System metadata schema I was able to implement the minimal required elements as a separate function (see write_sysmeta, e.g. computing MD5sums, etc), so that this file could be generated automatically when calling d1_upload, but my handling of this may not be ideal. Looking for feedback on how that may be done better / copy the approach used by dataone package.

((of course may be a moot point depending on how we go about integrating into the existing dataone package, but just wanted to signpost this particular issue here).

mbjones commented 10 years ago

I think we should have a SystemMetadata S4 class, and incorporate it into the slots needed on other classes.

Regarding the dataone package, I got it moved over to GitHub last week, and starting building the classes needed to fully implement the DataONE API using httr as the transport. I'll plan on replacing all of the current Java class references and then remove the rJava dependency. There's a fair amount to do to replace all of the existing functions, but having a full SystemMetadata implementation will help get us there. I'm currently working in the 'user_httr' branch on these changes: https://github.com/DataONEorg/rdataone/tree/use_httr

cboettig commented 10 years ago

ah, very nice! Looks like you'll be able to preserve the namespace structure while removing the java dependency then?

Now that I take a look at the classes and methods it makes more sense to me; that's a much cleaner way of handling the possible url endpoints, etc. Right, then S4 versions of SystemMetadata and ResourceMap would be the natural thing too. Very cool.

On Mon, Nov 18, 2013 at 1:12 PM, Matt Jones notifications@github.comwrote:

I think we should have a SystemMetadata S4 class, and incorporate it into the slots needed on other classes.

Regarding the dataone package, I got it moved over to GitHub last week, and starting building the classes needed to fully implement the DataONE API using httr as the transport. I'll plan on replacing all of the current Java class references and then remove the rJava dependency. There's a fair amount to do to replace all of the existing functions, but having a full SystemMetadata implementation will help get us there. I'm currently working in the 'user_httr' branch on these changes: https://github.com/DataONEorg/rdataone/tree/use_httr

— Reply to this email directly or view it on GitHubhttps://github.com/ropensci/rdataone/issues/3#issuecomment-28738398 .

Carl Boettiger UC Santa Cruz http://carlboettiger.info/