From c5a1f364d3a760f2130d495170d6667a2f519f12 Mon Sep 17 00:00:00 2001 From: Zac Flamig Date: Fri, 16 Mar 2018 13:47:37 +0300 Subject: [PATCH 1/2] feat(pubs): Publication file feature feat(file): Shapefile options --- gdcdictionary/schemas/publication.yaml | 4 + gdcdictionary/schemas/publication_file.yaml | 79 +++++++++++++++++++ .../schemas/spatiotemporal_file.yaml | 8 ++ 3 files changed, 91 insertions(+) create mode 100644 gdcdictionary/schemas/publication_file.yaml diff --git a/gdcdictionary/schemas/publication.yaml b/gdcdictionary/schemas/publication.yaml index eb0f550..d1d0eb6 100644 --- a/gdcdictionary/schemas/publication.yaml +++ b/gdcdictionary/schemas/publication.yaml @@ -51,6 +51,10 @@ properties: type: string doi: type: string + organization: + type: string + author: + type: string projects: $ref: "_definitions.yaml#/to_many" project_id: diff --git a/gdcdictionary/schemas/publication_file.yaml b/gdcdictionary/schemas/publication_file.yaml new file mode 100644 index 0000000..9a36575 --- /dev/null +++ b/gdcdictionary/schemas/publication_file.yaml @@ -0,0 +1,79 @@ +$schema: "http://json-schema.org/draft-04/schema#" + +id: "publication_file" +title: publication_file +type: object +namespace: http://gdc.nci.nih.gov +category: data_file +program: '*' +project: '*' +description: > + A file representing a publication. +additionalProperties: false +submittable: true +validators: null + +systemProperties: + - id + - project_id + - created_datetime + - updated_datetime + - state + - file_state + - error_type + +links: + - exclusive: false + required: true + subgroup: + - name: publications + backref: publication_files + label: data_from + multiplicity: many_to_one + target_type: publication + required: true + +required: + - submitter_id + - file_name + - file_size + - md5sum + - data_format + +uniqueKeys: + - [ id ] + - [ project_id, submitter_id ] + +properties: + $ref: "_definitions.yaml#/data_file_properties" + type: + enum: [ "publication_file" ] + data_type: + term: + $ref: "_terms.yaml#/data_type" + type: string + enum: + - Journal Article + - White Paper + - Bulletin + - Map + data_format: + term: + $ref: "_terms.yaml#/data_format" + enum: + - PDF + - WORD + - TXT + - PS + - PNG + - JPG + data_category: + term: + $ref: "_terms.yaml#/data_category" + enum: + - Journal Article + - White Paper + - Bulletin + - Map + publications: + $ref: "_definitions.yaml#/to_many" diff --git a/gdcdictionary/schemas/spatiotemporal_file.yaml b/gdcdictionary/schemas/spatiotemporal_file.yaml index bd8d5d4..f597354 100644 --- a/gdcdictionary/schemas/spatiotemporal_file.yaml +++ b/gdcdictionary/schemas/spatiotemporal_file.yaml @@ -106,6 +106,11 @@ properties: - Radar - Time Series - Photograph + - Raw DEM + - Cleaned DEM + - Points of Interest + - Areas of Interest + - Lines of Interest data_format: term: $ref: "_terms.yaml#/data_format" @@ -117,6 +122,7 @@ properties: - NEXRAD2 - PNG - JPG + - SHP data_category: term: $ref: "_terms.yaml#/data_category" @@ -125,6 +131,8 @@ properties: - Satellite - Time Series - Photograph + - Digital Elevation Model + - Items of Interest passive_instruments: $ref: "_definitions.yaml#/to_many" derived_scenes: From 79f5b27ab4a12507ec88c1b9aee41910160cbf42 Mon Sep 17 00:00:00 2001 From: Zac Flamig Date: Mon, 19 Mar 2018 09:11:01 +0300 Subject: [PATCH 2/2] feat(links): More links between files & nodes --- gdcdictionary/schemas/publication_file.yaml | 9 ++++--- .../schemas/spatiotemporal_file.yaml | 26 ++++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/gdcdictionary/schemas/publication_file.yaml b/gdcdictionary/schemas/publication_file.yaml index 9a36575..d6e1198 100644 --- a/gdcdictionary/schemas/publication_file.yaml +++ b/gdcdictionary/schemas/publication_file.yaml @@ -57,6 +57,7 @@ properties: - White Paper - Bulletin - Map + - Fact Sheet data_format: term: $ref: "_terms.yaml#/data_format" @@ -71,9 +72,9 @@ properties: term: $ref: "_terms.yaml#/data_category" enum: - - Journal Article - - White Paper - - Bulletin - - Map + - Land Surface + - Instrument + - Risk + - Project Results publications: $ref: "_definitions.yaml#/to_many" diff --git a/gdcdictionary/schemas/spatiotemporal_file.yaml b/gdcdictionary/schemas/spatiotemporal_file.yaml index f597354..85776d0 100644 --- a/gdcdictionary/schemas/spatiotemporal_file.yaml +++ b/gdcdictionary/schemas/spatiotemporal_file.yaml @@ -62,6 +62,18 @@ links: multiplicity: many_to_one target_type: radar_location required: false + - name: stream_gauges + backref: spatiotemporal_files + label: data_from + multiplicity: many_to_one + target_type: stream_gauge + required: false + - name: projects + backref: spatiotemporal_files + label: member_of + target_type: project + multiplicity: many_to_one + required: true required: - submitter_id @@ -123,16 +135,14 @@ properties: - PNG - JPG - SHP + - CSV data_category: term: $ref: "_terms.yaml#/data_category" enum: - - Radar - - Satellite - - Time Series - - Photograph - - Digital Elevation Model - - Items of Interest + - Forecast + - Analysis + - Observation passive_instruments: $ref: "_definitions.yaml#/to_many" derived_scenes: @@ -145,3 +155,7 @@ properties: $ref: "_definitions.yaml#/to_many" radar_locations: $ref: "_definitions.yaml#/to_many" + stream_gauges: + $ref: "_definitions.yaml#/to_many" + projects: + $ref: "_definitions.yaml#/to_one"