diff --git a/Gemfile.lock b/Gemfile.lock index 58e4734..9f4666e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - adiwg-mdjson_schemas (2.10.1) + adiwg-mdjson_schemas (2.11.0) GEM remote: https://rubygems.org/ diff --git a/examples/algorithm.json b/examples/algorithm.json new file mode 100644 index 0000000..fbc23df --- /dev/null +++ b/examples/algorithm.json @@ -0,0 +1,4 @@ +{ + "citation": { }, + "description": "algorithm description" +} \ No newline at end of file diff --git a/examples/nominalResolution.json b/examples/nominalResolution.json new file mode 100644 index 0000000..85fd777 --- /dev/null +++ b/examples/nominalResolution.json @@ -0,0 +1,7 @@ +{ + "groundResolution": { + "type": "distance", + "value": 999.9, + "unitOfMeasure": "units" + } +} \ No newline at end of file diff --git a/examples/processParameter.json b/examples/processParameter.json new file mode 100644 index 0000000..81a8180 --- /dev/null +++ b/examples/processParameter.json @@ -0,0 +1,11 @@ +[ + { + "name": "parameter name", + "direction": "in", + "description": "description", + "optionality": true, + "repeatability": false, + "valuetype": "value", + "value": [ ] + } +] \ No newline at end of file diff --git a/examples/processStep.json b/examples/processStep.json index 774abfd..2f6fae8 100644 --- a/examples/processStep.json +++ b/examples/processStep.json @@ -96,5 +96,7 @@ { "title": "title" } - ] + ], + "processingInformation": { }, + "report": [ ] }] diff --git a/examples/processStepReport.json b/examples/processStepReport.json new file mode 100644 index 0000000..7942e16 --- /dev/null +++ b/examples/processStepReport.json @@ -0,0 +1,7 @@ +[ + { + "name": "process step report name", + "description": "process step report description", + "fileType": "process step report file type" + } +] \ No newline at end of file diff --git a/lib/adiwg/mdjson_schemas/version.rb b/lib/adiwg/mdjson_schemas/version.rb index 4b33cbd..11e1efa 100644 --- a/lib/adiwg/mdjson_schemas/version.rb +++ b/lib/adiwg/mdjson_schemas/version.rb @@ -1,6 +1,6 @@ module ADIWG module MdjsonSchemas # Current schema version number - VERSION = "2.10.1" + VERSION = "2.11.0" end end diff --git a/package-lock.json b/package-lock.json index 09f8d64..083d5fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mdjson-schemas", - "version": "2.10.1", + "version": "2.11.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mdjson-schemas", - "version": "2.10.1", + "version": "2.11.0", "license": "GPL-3.0", "devDependencies": { "ajv": "^6.5.0", diff --git a/package.json b/package.json index 90864e0..3fd7e69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mdjson-schemas", - "version": "2.10.1", + "version": "2.11.0", "description": "JSON schemas, examples, and templates for ADIwg metadata standards", "main": "index.js", "directories": { diff --git a/schema/algorithm.json b/schema/algorithm.json new file mode 100644 index 0000000..89d443e --- /dev/null +++ b/schema/algorithm.json @@ -0,0 +1,19 @@ +{ + "id": "algorithm.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "details of the methodology by which geographic information was derived from the instrument readings", + "example": "../examples/algorithm.json", + "additionalProperties": true, + "required": ["citation","description"], + "properties": { + "citation": { + "$ref": "./citation.json#", + "description": "information identifying the algorithm and version or date" + }, + "description": { + "type": "string", + "description": "information describing the algorithm used to generate the data" + } + } +} \ No newline at end of file diff --git a/schema/lineage.json b/schema/lineage.json index 0bcca75..6fa9c70 100644 --- a/schema/lineage.json +++ b/schema/lineage.json @@ -52,7 +52,7 @@ "ISO 19115-2": ["LI_Lineage > processStep > LI_ProcessStep"] }, "items": { - "$ref": "#/definitions/processStep" + "$ref": "./processStep.json#" } }, "source": { @@ -63,175 +63,7 @@ "FGDC CSDGM": ["dataqual > lineage > srcinfo"] }, "items": { - "$ref": "#/definitions/source" - } - } - }, - "definitions": { - - "processStep": { - "type": "object", - "description": "Process or methodology steps applied to development of the resource.", - "example": "../examples/processStep.json", - "translation": { - "ISO 19115-2": ["LI_ProcessStep"] - }, - "required": ["description"], - "additionalProperties": true, - "properties": { - "stepId": { - "type": "string", - "description": "Serial identifier used to order the sequence of steps used.", - "translation": { - "ISO 19115-2": ["LI_ProcessStep @ id"] - } - }, - "description": { - "type": "string", - "description": "Description of the process or methodology step.", - "translation": { - "ISO 19115-2": ["LI_ProcessStep > description"], - "FGDC CSDGM": ["dataqual > lineage > procstep > procdesc"] - } - }, - "rationale": { - "type": "string", - "description": "Requirement or purpose for the process or methodology step.", - "translation": { - "ISO 19115-2": ["LI_ProcessStep > rationale"] - } - }, - "timePeriod": { - "description": "Date, datetime, or period at which the process or methodology step occurred.", - "translation": { - "ISO 19115-2": ["LI_ProcessStep > dateTime"], - "FGDC CSDGM": ["dataqual > lineage > procstep > procdate"] - }, - "$ref": "./timePeriod.json#" - }, - "processor": { - "type": "array", - "description": "Identification of, and means of communication with, person(s) and organization(s) associated with the process or methodology step.", - "translation": { - "ISO 19115-2": ["LI_ProcessStep > processor > CI_ResponsibleParty"], - "FGDC CSDGM": ["dataqual > lineage > procstep > proccont > cntinfo"] - }, - "items": { - "$ref": "./responsibility.json#" - } - }, - "stepSource": { - "type": "array", - "description": "Information about the source data used in the process step.", - "translation": { - "ISO 19115-2": ["DQ_DataQuality > LI_Lineage > LI_ProcessStep > LI_source"], - "FGDC CSDGM": ["dataqual > lineage > procstep > srcused"] - }, - "items": { - "$ref": "#/definitions/source" - } - }, - "stepProduct": { - "type": "array", - "description": "Information about an intermediate data set that (1) is significant in the opinion of the data producer, (2) is generated in the processing step, and (3) is used in later processing steps.", - "translation": { - "ISO 19115-2": ["DQ_DataQuality > LI_Lineage > LI_ProcessStep > LI_source"], - "FGDC CSDGM": ["dataqual > lineage > procstep > srcprod"] - }, - "items": { - "$ref": "#/definitions/source" - } - }, - "reference": { - "type": "array", - "description": "Citation for process step documentation.", - "translation": {}, - "items": { - "$ref": "./citation.json#" - } - }, - "scope": { - "$ref": "./scope.json#", - "description": "Type of resource and/or extent to which the process information.", - "translation": {} - } - } - }, - "source": { - "type": "object", - "description": "Information about the source data used in creating the data identified by the data quality scope.", - "example": "../examples/source.json", - "translation": { - "ISO 19115-2": ["LI_Source"] - }, - "additionalProperties": true, - "anyOf": [{ - "title": "description is required", - "required": ["description"], - "description": "A description is required." - }, - { - "title": "scope is required", - "required": ["scope"], - "description": "At least one scope is required." - } - ], - "properties": { - "sourceId": { - "type": "string", - "description": "A unique identifier for the data source.", - "translation": { - "FGDC CSDGM": ["dataqual > lineage > srcinfo > srccitea"] - } - }, - "description": { - "type": "string", - "description": "A brief description about the source dataset used in creating the data identified by the data quality scope.", - "translation": { - "ISO 19115-2": ["LI_Source > description"] - } - }, - "sourceCitation": { - "description": "A citation providing information about the source dataset, including an online resource or other access instructions.", - "translation": { - "ISO 19115-2": ["LI_Source > sourceCitation > CI_Citation"], - "FGDC CSDGM": ["dataqual > lineage > srcinfo > srccite > citeinfo"] - }, - "$ref": "citation.json#" - }, - "metadataCitation": { - "type": "array", - "description": "Citation providing information about the metadata for the source.", - "translation": {}, - "items": { - "$ref": "citation.json#" - } - }, - "spatialResolution": { - "$ref": "./spatialResolution.json#", - "description": "The number below the line in a vulgar fraction", - "translation": {} - }, - "referenceSystem": { - "$ref": "./spatialReference.json#", - "description": "Spatial reference system used by the source.", - "translation": {} - }, - "sourceProcessStep": { - "type": "array", - "description": "A description of a non-trivial event or transformation taken to prepare the source data for use in creating the data identified by the data quality scope.", - "translation": { - "ISO 19115-2": ["LI_Source > sourceStep > LI_ProcessStep"] - }, - "items": { - "$ref": "#/definitions/processStep" - } - }, - "scope": { - "$ref": "./scope.json#", - "description": "Type of resource and/or extent to which the process information.", - "translation": {} - } + "$ref": "./source.json#" } } } diff --git a/schema/nominalResolution.json b/schema/nominalResolution.json new file mode 100644 index 0000000..e031a8e --- /dev/null +++ b/schema/nominalResolution.json @@ -0,0 +1,32 @@ +{ + "id": "nominalResolution.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "Information about the source data used in creating the data identified by the data quality scope.", + "example": "../examples/nominalResolution.json", + "additionalProperties": true, + "oneOf": [ + { + "title": "Scanning Resolution is required", + "required": [ + "scanningResolution" + ] + }, + { + "title": "Ground Resolution is required", + "required": [ + "groundResolution" + ] + } + ], + "properties": { + "scanningResolution": { + "$ref": "./measure.json#", + "description": "distance between consistent parts of (center, left side, right side) adjacent pixels in the scan plane" + }, + "groundResolution": { + "$ref": "./measure.json#", + "description": "consistent parts of (center, left side, right side) adjacent pixels in the object space" + } + } +} \ No newline at end of file diff --git a/schema/processParameter.json b/schema/processParameter.json new file mode 100644 index 0000000..2edf2f9 --- /dev/null +++ b/schema/processParameter.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "processParameter.json#", + "type": "object", + "description": "comprehensive information about the procedure(s), process(es) and algorithm(s) applied in the process step", + "example": "../examples/processParamter.json", + "required": ["name","direction","optionality","repeatability"], + "properties": { + "name": { + "type": "string", + "description": "name or type of parameter" + }, + "direction": { + "type": "string", + "description": "indication the parameter is an input to the process, an output or both", + "enum": [ + "in", + "out", + "in/out" + ] + }, + "description": { + "type": "string", + "description": "narrative explaining the role of the parameter" + }, + "optionality": { + "type": "boolean", + "description": "indication the parameter is required" + }, + "repeatability": { + "type": "boolean", + "description": "indication if more than one value of the parameter may be provided" + }, + "valuetype": { + "type": "string", + "description": "data type of the value" + }, + "value": { + "type": "string", + "description": "constant value" + }, + "resource": { + "type": "array", + "items": { + "$ref": "./source.json#" + }, + "description": "resource to be processed" + } + } +} \ No newline at end of file diff --git a/schema/processStep.json b/schema/processStep.json new file mode 100644 index 0000000..7fd0fb9 --- /dev/null +++ b/schema/processStep.json @@ -0,0 +1,125 @@ +{ + "id": "processStep.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "Information on the history of the resource.", + "example": "../examples/processStep.json", + "translation": { + "ISO 19115-2": [ + "LI_Lineage" + ] + }, + "properties": { + "stepId": { + "type": "string", + "description": "Serial identifier used to order the sequence of steps used.", + "translation": { + "ISO 19115-2": [ + "LI_ProcessStep @ id" + ] + } + }, + "description": { + "type": "string", + "description": "Description of the process or methodology step.", + "translation": { + "ISO 19115-2": [ + "LI_ProcessStep > description" + ], + "FGDC CSDGM": [ + "dataqual > lineage > procstep > procdesc" + ] + } + }, + "rationale": { + "type": "string", + "description": "Requirement or purpose for the process or methodology step.", + "translation": { + "ISO 19115-2": [ + "LI_ProcessStep > rationale" + ] + } + }, + "timePeriod": { + "description": "Date, datetime, or period at which the process or methodology step occurred.", + "translation": { + "ISO 19115-2": [ + "LI_ProcessStep > dateTime" + ], + "FGDC CSDGM": [ + "dataqual > lineage > procstep > procdate" + ] + }, + "$ref": "./timePeriod.json#" + }, + "processor": { + "type": "array", + "description": "Identification of, and means of communication with, person(s) and organization(s) associated with the process or methodology step.", + "translation": { + "ISO 19115-2": [ + "LI_ProcessStep > processor > CI_ResponsibleParty" + ], + "FGDC CSDGM": [ + "dataqual > lineage > procstep > proccont > cntinfo" + ] + }, + "items": { + "$ref": "./responsibility.json#" + } + }, + "stepSource": { + "type": "array", + "description": "Information about the source data used in the process step.", + "translation": { + "ISO 19115-2": [ + "DQ_DataQuality > LI_Lineage > LI_ProcessStep > LI_source" + ], + "FGDC CSDGM": [ + "dataqual > lineage > procstep > srcused" + ] + }, + "items": { + "$ref": "./source.json#" + } + }, + "stepProduct": { + "type": "array", + "description": "Information about an intermediate data set that (1) is significant in the opinion of the data producer, (2) is generated in the processing step, and (3) is used in later processing steps.", + "translation": { + "ISO 19115-2": [ + "DQ_DataQuality > LI_Lineage > LI_ProcessStep > LI_source" + ], + "FGDC CSDGM": [ + "dataqual > lineage > procstep > srcprod" + ] + }, + "items": { + "$ref": "./source.json#" + } + }, + "reference": { + "type": "array", + "description": "Citation for process step documentation.", + "translation": {}, + "items": { + "$ref": "./citation.json#" + } + }, + "scope": { + "$ref": "./scope.json#", + "description": "Type of resource and/or extent to which the process information.", + "translation": {} + }, + "processingInformation": { + "$ref": "./processing.json#", + "description": "comprehensive information about the procedure by which the algorithm was applied to derive geographic data from the raw instrument measurements, such as datasets, software used, and the processing environment" + }, + "report": { + "type": "array", + "items": { + "$ref": "./processStepReport.json#" + }, + "description": "report generated by the process step" + } + } +} \ No newline at end of file diff --git a/schema/processStepReport.json b/schema/processStepReport.json new file mode 100644 index 0000000..b8ac019 --- /dev/null +++ b/schema/processStepReport.json @@ -0,0 +1,22 @@ +{ + "id": "processStepReport.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "report of what occurred during the process step", + "example": "../examples/processStepReport.json", + "required": ["name"], + "properties": { + "name": { + "type": "string", + "description": "name of the processing report" + }, + "description": { + "type": "string", + "description": "textual description of what occurred during the process step" + }, + "fileType": { + "type": "string", + "description": "type of file that contains the processing report" + } + } +} \ No newline at end of file diff --git a/schema/processing.json b/schema/processing.json new file mode 100644 index 0000000..e394549 --- /dev/null +++ b/schema/processing.json @@ -0,0 +1,47 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "processing.json#", + "type": "object", + "description": "comprehensive information about the procedure(s), process(es) and algorithm(s) applied in the process step", + "example": "../examples/processing.json", + "required": ["identifier"], + "properties": { + "identifier": { + "$ref": "./identifier.json#", + "description": "information to identify the processing package that produced the data" + }, + "softwareReference": { + "$ref": "./citation.json#", + "description": "reference to document describing processing software" + }, + "procedureDescription": { + "type": "string", + "description": "additional details about the processing procedures" + }, + "documentation": { + "type": "array", + "items": { + "$ref": "./citation.json#" + }, + "description": "reference to documentation describing the processing" + }, + "runtimeParameters": { + "type": "string", + "description": "parameters to control the processing operations, entered at run time" + }, + "algorithm": { + "type": "array", + "items": { + "$ref": "./algorithm.json#" + }, + "description": "details of the methodology by which geographic information was derived from the instrument readings" + }, + "parameter": { + "type": "array", + "items": { + "$ref": "./processParameter.json#" + }, + "description": "details of the methodology by which geographic information was derived from the instrument readings" + } + } +} diff --git a/schema/schema.json b/schema/schema.json index 0a623d9..5c652b5 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1,7 +1,7 @@ { "id": "schema.json#", "$schema": "http://json-schema.org/draft-04/schema#", - "version": "2.10.1", + "version": "2.11.0", "description": "schema for ADIwg mdJSON metadata", "example": "../examples/mdJson.json", "type": "object", diff --git a/schema/source.json b/schema/source.json new file mode 100644 index 0000000..3afdcef --- /dev/null +++ b/schema/source.json @@ -0,0 +1,76 @@ +{ + "id": "source.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "Information about the source data used in creating the data identified by the data quality scope.", + "example": "../examples/source.json", + "translation": { + "ISO 19115-2": ["LI_Source"] + }, + "additionalProperties": true, + "properties": { + "sourceId": { + "type": "string", + "description": "A unique identifier for the data source.", + "translation": { + "FGDC CSDGM": ["dataqual > lineage > srcinfo > srccitea"] + } + }, + "description": { + "type": "string", + "description": "A brief description about the source dataset used in creating the data identified by the data quality scope.", + "translation": { + "ISO 19115-2": ["LI_Source > description"] + } + }, + "sourceCitation": { + "description": "A citation providing information about the source dataset, including an online resource or other access instructions.", + "translation": { + "ISO 19115-2": ["LI_Source > sourceCitation > CI_Citation"], + "FGDC CSDGM": ["dataqual > lineage > srcinfo > srccite > citeinfo"] + }, + "$ref": "citation.json#" + }, + "metadataCitation": { + "type": "array", + "description": "Citation providing information about the metadata for the source.", + "translation": {}, + "items": { + "$ref": "citation.json#" + } + }, + "spatialResolution": { + "$ref": "./spatialResolution.json#", + "description": "The number below the line in a vulgar fraction", + "translation": {} + }, + "referenceSystem": { + "$ref": "./spatialReference.json#", + "description": "Spatial reference system used by the source.", + "translation": {} + }, + "sourceProcessStep": { + "type": "array", + "description": "A description of a non-trivial event or transformation taken to prepare the source data for use in creating the data identified by the data quality scope.", + "translation": { + "ISO 19115-2": ["LI_Source > sourceStep > LI_ProcessStep"] + }, + "items": { + "$ref": "./processStep.json#" + } + }, + "scope": { + "$ref": "./scope.json#", + "description": "Type of resource and/or extent to which the process information.", + "translation": {} + }, + "processLevel": { + "$ref": "./identifier.json#", + "description": "processing level of the source data" + }, + "resolution": { + "$ref": "./nominalResolution.json#", + "description": "distance between consistent parts (centre, left side, right side) of two adjacent pixel" + } + } +}