Skip to content

Commit

Permalink
feat(core): Add core metadata (#17)
Browse files Browse the repository at this point in the history
* feat(core): Add core metadata
  • Loading branch information
zflamig authored Jun 15, 2018
1 parent 9381177 commit 8f414ce
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gdcdictionary/schemas/_definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,24 @@ workflow_properties:
$ref: "#/datetime"
updated_datetime:
$ref: "#/datetime"

ubiquitous_properties:
type:
type: string
id:
$ref: "#/UUID"
systemAlias: node_id
submitter_id:
type:
- string
description: >
A project-specific identifier for a node. This property is the calling card/nickname/alias for
a unit of submission. It can be used in place of the UUID for identifying or recalling a node.
state:
$ref: "#/state"
project_id:
$ref: "#/project_id"
created_datetime:
$ref: "#/datetime"
updated_datetime:
$ref: "#/datetime"
8 changes: 8 additions & 0 deletions gdcdictionary/schemas/aligned_reads_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ links:
target_type: submitted_aligned_reads
multiplicity: one_to_one
required: true
- name: core_metadata_collections
backref: aligned_reads_indexes
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down Expand Up @@ -64,3 +70,5 @@ properties:
enum: [ "BAI" ]
submitted_aligned_reads_files:
$ref: "_definitions.yaml#/to_one"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"
113 changes: 113 additions & 0 deletions gdcdictionary/schemas/core_metadata_collection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
$schema: "http://json-schema.org/draft-04/schema#"

id: "core_metadata_collection"
title: Core Metadata Collection
type: object
namespace: https://dcp.bionimbus.org/
category: administrative
program: '*'
project: '*'
description: >
Structured description of a collection of several dataset
additionalProperties: false
submittable: true
validators: null

systemProperties:
- id
- project_id
- state
- created_datetime
- updated_datetime

links:
- name: projects
backref: core_metadata_collections
label: data_from
target_type: project
multiplicity: many_to_one
required: true

uniqueKeys:
- [id]
- [project_id, submitter_id]

required:
- submitter_id
- type
- projects

properties:
$ref: "_definitions.yaml#/ubiquitous_properties"

contributor:
description: >
An entity responsible for making contributions to the resource. Examples of a Contributor include a person, an organization, or a service. Typically, the name of a Contributor should be used to indicate the entity.
type: string

coverage:
description: >
The spatial or temporal topic of the resource, the spatial applicability of the resource, or the jurisdiction under which the resource is relevant. Spatial topic and spatial applicability may be a named place or a location specified by its geographic coordinates. Temporal topic may be a named period, date, or date range. A jurisdiction may be a named administrative entity or a geographic place to which the resource applies. Recommended best practice is to use a controlled vocabulary such as the Thesaurus of Geographic Names [TGN] (http://www.getty.edu/research/tools/vocabulary/tgn/index.html). Where appropriate, named places or time periods can be used in preference to numeric identifiers such as sets of coordinates or date ranges.
type: string

creator:
description: >
An entity primarily responsible for making the resource. Examples of a Creator include a person, an organization, or a service. Typically, the name of a Creator should be used to indicate the entity.
type: string

date:
$ref: "_definitions.yaml#/datetime"

description:
description: >
An account of the resource. Description may include but is not limited to: an abstract, a table of contents, a graphical representation, or a free-text account of the resource.
type: string

format:
description: >
The file format, physical medium, or dimensions of the resource. Examples of dimensions include size and duration. Recommended best practice is to use a controlled vocabulary such as the list of Internet Media Types [MIME] (http://www.iana.org/assignments/media-types/).
type: string

language:
description: >
A language of the resource. Recommended best practice is to use a controlled vocabulary such as RFC 4646 (http://www.ietf.org/rfc/rfc4646.txt).
type: string

publisher:
description: >
An entity responsible for making the resource available. Examples of a Publisher include a person, an organization, or a service. Typically, the name of a Publisher should be used to indicate the entity.
type: string

relation:
description: >
A related resource. Recommended best practice is to identify the related resource by means of a string conforming to a formal identification system. 
type: string

rights:
description: >
Information about rights held in and over the resource. Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights.
type: string

source:
description: >
A related resource from which the described resource is derived. The described resource may be derived from the related resource in whole or in part. Recommended best practice is to identify the related resource by means of a string conforming to a formal identification system.
type: string

subject:
description: >
The topic of the resource. Typically, the subject will be represented using keywords, key phrases, or classification codes. Recommended best practice is to use a controlled vocabulary.
type: string

title:
description: >
A name given to the resource. Typically, a Title will be a name by which the resource is formally known.
type: string

data_type:
description: >
The nature or genre of the resource. Recommended best practice is to use a controlled vocabulary such as the DCMI Type Vocabulary [DCMITYPE]. To describe the file format, physical medium, or dimensions of the resource, use the Format element.
type: string

projects:
$ref: "_definitions.yaml#/to_one"

8 changes: 8 additions & 0 deletions gdcdictionary/schemas/slide_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ links:
target_type: slide
multiplicity: many_to_one
required: true
- name: core_metadata_collections
backref: slide_images
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down Expand Up @@ -96,3 +102,5 @@ properties:
type: string
slides:
$ref: "_definitions.yaml#/to_one"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"
8 changes: 8 additions & 0 deletions gdcdictionary/schemas/submitted_aligned_reads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ links:
target_type: read_group
multiplicity: one_to_many
required: true
- name: core_metadata_collections
backref: submitted_aligned_reads_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down Expand Up @@ -82,3 +88,5 @@ properties:
- DNA Panel
read_groups:
$ref: "_definitions.yaml#/to_many"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"
8 changes: 8 additions & 0 deletions gdcdictionary/schemas/submitted_unaligned_reads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ links:
target_type: read_group
multiplicity: many_to_one
required: true
- name: core_metadata_collections
backref: submitted_unaligned_reads_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down Expand Up @@ -79,3 +85,5 @@ properties:
- DNA Panel
read_groups:
$ref: "_definitions.yaml#/to_one"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"

0 comments on commit 8f414ce

Please sign in to comment.