Skip to content

Instantly share code, notes, and snippets.

View raprasad's full-sized avatar

Raman Prasad raprasad

View GitHub Profile
@raprasad
raprasad / gist:fbea82705b999b7a6328254cb31de9cf
Last active April 6, 2016 21:17
Metadata Updates in Dataverse

Purpose

In preparing to add File Level metadata to Dataverse these are notes on several places where experience has shown that the API could be improved.

Adding an Email value to a Dataset's Metadata

Expected code (java)

@raprasad
raprasad / brd_fits_reference.md
Last active April 7, 2016 15:11
Dataverse "metadata" from a FITS file is currently stored in a general description field.

FITS file level metadata

  • Current (4/2016) handling of FITS metadata includes:

    • Extra information in the file description field which shows up on the cards
    • The addition of a FITS file tag
  • Reference document for the File level metadata BRD

Example FITS file

@raprasad
raprasad / add_installation.md
Last active October 12, 2016 20:21
Steps for adding a Dataverse installation to Dataverse.org
@raprasad
raprasad / split_2290.md
Last active October 13, 2016 15:30
Splitting Ticket 2290 into API and UI sections

Notes for IQSS/dataverse#2290

File Replace

A. Remaining API tasks

1. Include ability to add a file description

  • In another release: add categories, tags, and/or restrictions
@raprasad
raprasad / potential_ingest_improvement.md
Last active October 18, 2016 16:09
Potential Ingest Improvement

@leonid_andreev :

Ingest thoughts for another release.

Current Scenario: User uploads files to dataset (before save)

Tracking lots of non-persisted objects

  • We currently create non-persisted DataFile and FileMetadata objects linked to a non-persisted DatasetVersion
@raprasad
raprasad / gson_to_json_bleh.md
Created October 26, 2016 20:10
GSON to JsonObjectBuilder
  • Go from a gsonObject object -> String -> jsonObjectBuilder
    public static JsonObjectBuilder convertGsonObjectToJsonObjectBuilder(String successMsg, JsonObject gsonObject) {
        JsonObjectBuilder jsonObjectBuilder = Json.createObjectBuilder();
        jsonObjectBuilder.add("message", successMsg);
        JsonReader jsonReader = Json.createReader(new StringReader(gsonObject.toString()));
        javax.json.JsonObject object = jsonReader.readObject();
 jsonObjectBuilder.add("files", object.get("files"));
@raprasad
raprasad / dv_to_map.md
Created November 1, 2016 17:07
Configure Dataverse for Mapping
INSERT into setting VALUES (':GeoconnectCreateEditMaps', 'true');
INSERT into setting VALUES (':GeoconnectViewMaps', 'true');
INSERT into setting VALUES (':GeoconnectDebug', 'true');
@raprasad
raprasad / json-2-schema-2-yaml.md
Last active December 7, 2016 19:35
JSON -> JSON Schema -> YAML
@raprasad
raprasad / url_change.md
Last active December 7, 2016 20:18
home page to list plants
  • File to change: greenhousedb/plants/urls.py

1. Make home page the plant listing page

Change 'apps.greenhousedb.views.home' to 'apps.greenhousedb.views.view_plants'

Current lines

 # Examples:
@raprasad
raprasad / dataset_json.json
Last active December 16, 2016 18:21
Dataset JSON cleaned up
{
"status": "OK",
"info": {
"generation_time": "2016-12-16T13:10:25",
"cache_time_seconds": 900,
"params": {
"persistentId": "doi:10.7910/DVN/26935",
"pretty": "true",
"key": "10350864-ff48-4ebd-a2d9-80a07a35f911 "
}