Skip to content

Commit

Permalink
Extended schemas to accept a string a json-ld @context element.
Browse files Browse the repository at this point in the history
  • Loading branch information
agbeltran committed Nov 16, 2016
1 parent 0229dee commit 0592db4
Show file tree
Hide file tree
Showing 33 changed files with 345 additions and 48 deletions.
11 changes: 10 additions & 1 deletion json-schemas/access_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "Information about resources that provide the means to obtain an asset (a dataset or other research object).",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Access" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/activity_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A type of process scheduled in a study.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Activity" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/alternate_identifier_info_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "Information about an alternate identifier (other than the primary).",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "AlternateIdentifier" ]},
"identifier": {
"description": "An identifier or identifiers other than the primary Identifier applied to the resource being registered. (definition from DataCite)",
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/anatomical_part_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A structure that is part of a multicellular organism.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "AnatomicalPart" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/annotation_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A pair of value (string or numeric) with a corresponding ontology term (IRI), if applicable.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Annotation" ]},
"value": {
"oneOf": [
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/biological_entity_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A biological entity is a recognized entity covering biological process, molecular functions or cellular components (from: http://geneontology.org/).",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "BiologicalEntity" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/category_values_pair_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "Extension mechanism for DATS, which allows to add extra properties to the entities. It should be used only for cases where there are no specific properties to deal with the desired property.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "CategoryValuesPair" ]},
"category": {
"description": "A characteristic or property about the entity this object is associated with.",
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/data_acquisition_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "Process (or activity) of generating data through measurement made with specific techniques.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "DataAcquisition" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/data_analysis_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "Process (or activity) of transforming data and producing data.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "DataAnalysis" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/data_repository_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
"@type": "DataRepository",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "DataRepository" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/data_standard_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A format, reporting guideline, terminology. It is used to indicate whether the dataset conforms to a particular community norm or specification.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "DataStandard" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/data_type_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "The nature of the data, as determined for the information collected, the method used and the platform used.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "DataType" ]},
"information": {
"description": "The measurements or facts that the data is about.",
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/dataset_distribution_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "(From DCAT) Represents a specific available form of a dataset. Each dataset might be available in different forms, these forms might represent different formats of the dataset or different endpoints. Examples of distributions include a downloadable CSV file, an API or an RSS feed.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "DatasetDistribution" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/dataset_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A set of dimensions about an entity being observed. A collection of data, published or curated by a single agent, and available for access or download in one or more formats (from DCAT: http://www.w3.org/TR/vocab-dcat/#Class:_Dataset). A body of structured information describing some topic(s) of interest (from: http://schema.org/Dataset).",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Dataset"] },
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
41 changes: 25 additions & 16 deletions json-schemas/date_info_schema.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "DATS date information schema.",
"description": "Information about a calendar date or timestamp indicating day, month, year and time of an event.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@type": { "type": "string", "enum": [ "Date" ]},
"date": {
"description": "A date following the ISO8601 standard.",
"type" : "string",
"format": "date-time"
"$schema": "http://json-schema.org/draft-04/schema",
"title": "DATS date information schema.",
"description": "Information about a calendar date or timestamp indicating day, month, year and time of an event.",
"type": "object",
"properties": {
"@context": {
"anyOf": [
{
"type": "string"
},
"type": {
"description": "The type of date, used to specify the process which is being timestamped by the date attribute value, ideally comes from a controlled terminology.",
"$ref" : "annotation_schema.json#"
{
"type": "object"
}
]
},
"additionalProperties": false,
"required": ["date","type"]
"@type": { "type": "string", "enum": [ "Date" ]},
"date": {
"description": "A date following the ISO8601 standard.",
"type" : "string",
"format": "date-time"
},
"type": {
"description": "The type of date, used to specify the process which is being timestamped by the date attribute value, ideally comes from a controlled terminology.",
"$ref" : "annotation_schema.json#"
}
},
"additionalProperties": false,
"required": ["date","type"]
}
11 changes: 10 additions & 1 deletion json-schemas/dimension_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A feature of an entity, i.e. an individual measurable property (both quantitative or qualitative) of the entity being observed.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Dimension" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/disease_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "A disorder of structure or function in a human, animal, or plant, that produces specific symptoms or that affects a specific location.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Disease" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/grant_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "An allocated sum of funds given by a government or other organization for a particular purpose.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Grant" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/identifier_info_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "Information about the primary identifier.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Identifier" ]},
"identifier": {
"description": "A code uniquely identifying an entity locally to a system or globally.",
Expand Down
11 changes: 10 additions & 1 deletion json-schemas/instrument_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
"description": "An entity that helps an agent perform an activity.",
"type": "object",
"properties": {
"@context": { "type": "object"},
"@context": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
},
"@type": { "type": "string", "enum": [ "Instrument" ]},
"identifier": {
"$ref": "identifier_info_schema.json#"
Expand Down

0 comments on commit 0592db4

Please sign in to comment.