Skip to content

Commit

Permalink
Merge pull request #4 from occ-data/feat/pubs
Browse files Browse the repository at this point in the history
feat(pubs): Publication file feature
  • Loading branch information
zflamig authored Mar 19, 2018
2 parents 800d8fe + 79f5b27 commit 3a45a7f
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 4 deletions.
4 changes: 4 additions & 0 deletions gdcdictionary/schemas/publication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ properties:
type: string
doi:
type: string
organization:
type: string
author:
type: string
projects:
$ref: "_definitions.yaml#/to_many"
project_id:
Expand Down
80 changes: 80 additions & 0 deletions gdcdictionary/schemas/publication_file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
$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
- Fact Sheet
data_format:
term:
$ref: "_terms.yaml#/data_format"
enum:
- PDF
- WORD
- TXT
- PS
- PNG
- JPG
data_category:
term:
$ref: "_terms.yaml#/data_category"
enum:
- Land Surface
- Instrument
- Risk
- Project Results
publications:
$ref: "_definitions.yaml#/to_many"
30 changes: 26 additions & 4 deletions gdcdictionary/schemas/spatiotemporal_file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -106,6 +118,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"
Expand All @@ -117,14 +134,15 @@ properties:
- NEXRAD2
- PNG
- JPG
- SHP
- CSV
data_category:
term:
$ref: "_terms.yaml#/data_category"
enum:
- Radar
- Satellite
- Time Series
- Photograph
- Forecast
- Analysis
- Observation
passive_instruments:
$ref: "_definitions.yaml#/to_many"
derived_scenes:
Expand All @@ -137,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"

0 comments on commit 3a45a7f

Please sign in to comment.