diff --git a/schema_registration/schema-valid.py b/schema_registration/schema-valid.py new file mode 100644 index 0000000000000000000000000000000000000000..dea124f681c6064d8896c19e1ea339f8f4a8d475 --- /dev/null +++ b/schema_registration/schema-valid.py @@ -0,0 +1,80 @@ +import os +import json +import jsonschema +import requests + +SCHEMA_SERVICE = "https://os-schema-jvmvia5dea-uc.a.run.app/api/schema-service/v1/schema" +TOKEN = "ya29.a0AfH6SMA4kxMGv_2uL5IzQ-nYQlG0Uk_J4aB9ghO3hqpE-7JNG6gqezdf0x1CGULozH_pH0E4VBLI13zLGvv1IULpGXcHH1BjEeMaix8KAqh2bDZwzmxcH8VnaqoGNY015Ie5RVYciICScQ5ooF6lWk6LcTG7wHr0Yv-DFg" +HEADERS = { + 'Content-type': 'application/json', + 'data-partition-id': "opendes", + 'AppKey': "", + "Authorization": f"Bearer {TOKEN}" +} +GENERIC_SCHEMA_TYPE = "osdu:osdu:MasterReferenceDataManifest:1.0.0" + +real_path = os.path.dirname(__file__) + +with open(f"{real_path}/test-data/wellbore-manifest.json", "r") as f: + manifest = json.load(f) + + +class OSDURefResolver(jsonschema.RefResolver): + + def resolve_fragment(self, document, fragment): + """ + Extend base resolve_fragment method. If a nested schema has 'definitions' field and there + is a schema under this 'definitions', jsonschema attempts to use the id field of this + double-nested schema as URI to get this schema later. So it has sense to replace this id + with a correct one. + """ + document = super().resolve_fragment(document, fragment) + split_fragment = fragment.split("/") # /definitions/<OsduID> -> [..., <OsduID>] + if len(split_fragment) > 1: + osdu_id = split_fragment[-1] + url = f"{SCHEMA_SERVICE}/{osdu_id}" + document["$id"] = url + return document + + +def get_abstract_schema_osdu(uri): + if uri.startswith("osdu"): + uri = f"{SCHEMA_SERVICE}/{uri}" + response = requests.get(uri, headers=HEADERS, timeout=30).json() + response["$id"] = uri + return response + + +def get_schema(kind): + manifest_schema_uri = f"{SCHEMA_SERVICE}/{kind}" + response = requests.get(manifest_schema_uri, headers=HEADERS, timeout=30) + if response.ok: + manifest_schema = response.json() + else: + raise Exception(response.json()) + return manifest_schema + + +handlers = {"osdu": get_abstract_schema_osdu, "https": get_abstract_schema_osdu} + + +def _validate_schema(schema, manifest): + resolver = OSDURefResolver(base_uri=schema.get("$id", ""), referrer=schema, + handlers=handlers, cache_remote=True) + validator = jsonschema.Draft7Validator(schema=schema, resolver=resolver) + validator.validate(manifest) + + +def validate_generic_manifest(manifest, generic_schema): + generic_schema = get_schema("") + _validate_schema(schema=generic_schema, manifest=manifest) + + +def validate_wellbore_manifest(manifest): + for m in manifest["manifest"]: + manifest_schema = get_schema(m["kind"]) + _validate_schema(manifest_schema, m) + + +validate_generic_manifest(manifest, GENERIC_SCHEMA_TYPE) +validate_wellbore_manifest(manifest) diff --git a/schema_registration/shared-schemas/AbstractAccessControlList.1.0.0.json b/schema_registration/shared-schemas/AbstractAccessControlList.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..2244bf37996e8936923a0cfa912534e8201a16ff --- /dev/null +++ b/schema_registration/shared-schemas/AbstractAccessControlList.1.0.0.json @@ -0,0 +1,44 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractAccessControlList", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAccessControlList.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Access Control List", + "description": "The access control tags associated with this entity.", + "type": "object", + "properties": { + "Owners": { + "title": "List of Owners", + "description": "The list of owners of this data record.", + "type": "array", + "items": { + "type": "string" + } + }, + "Viewers": { + "title": "List of Viewers", + "description": "The list of viewers to which this data record is accessible/visible/discoverable.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "Owners", + "Viewers" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractAliasNames.1.0.0.json b/schema_registration/shared-schemas/AbstractAliasNames.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..2f8be617ca43a087790268d43ba20481c9794b9d --- /dev/null +++ b/schema_registration/shared-schemas/AbstractAliasNames.1.0.0.json @@ -0,0 +1,47 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractAliasNames", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractAliasNames.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractAliasNames", + "description": "A list of alternative names for an object. The preferred name is in a separate, scalar property. It may or may not be repeated in the alias list, though a best practice is to include it if the list is present, but to omit the list if there are no other names. Note that the abstract entity is an array so the $ref to it is a simple property reference.", + "type": "object", + "properties": { + "AliasName": { + "description": "Alternative Name value of defined name type for an object.", + "type": "string" + }, + "AliasNameTypeID": { + "description": "A classification of alias names such as by role played or type of source, such as regulatory name, regulatory code, company code, international standard name, etc.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/AliasNameType:[^:]+:[0-9]*$" + }, + "DefinitionOrganisationID": { + "description": "Organisation that provided the name (the source).", + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/Organisation:[^:]+:[0-9]*$" + }, + "EffectiveDateTime": { + "description": "The date and time when an alias name becomes effective.", + "type": "string", + "format": "date-time" + }, + "TerminationDateTime": { + "description": "The data and time when an alias name is no longer in effect.", + "type": "string", + "format": "date-time" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractCoordinates.1.0.0.json b/schema_registration/shared-schemas/AbstractCoordinates.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..2fc7feeb4e6b7f212611a4faaaae2a48faf9099b --- /dev/null +++ b/schema_registration/shared-schemas/AbstractCoordinates.1.0.0.json @@ -0,0 +1,31 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractCoordinates", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractCoordinates.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractCoordinates", + "description": "A geographic position on the surface of the earth.", + "type": "object", + "properties": { + "x": { + "description": "x is Easting or Longitude.", + "type": "number" + }, + "y": { + "description": "y is Northing or Latitude.", + "type": "number" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractFacility.1.0.0.json b/schema_registration/shared-schemas/AbstractFacility.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..9ea727572626d93a4c885c84d0d4d778def0e39a --- /dev/null +++ b/schema_registration/shared-schemas/AbstractFacility.1.0.0.json @@ -0,0 +1,94 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractFacility", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFacility.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractFacility", + "description": "", + "type": "object", + "properties": { + "FacilityID": { + "description": "A system-specified unique identifier of a Facility.", + "type": "string" + }, + "FacilityTypeID": { + "description": "The definition of a kind of capability to perform a business function or a service.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/FacilityType:[^:]+:[0-9]*$" + }, + "FacilityOperator": { + "description": "The history of operator organizations of the facility.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractFacilityOperator:1.0.0" + } + }, + "DataSourceOrganisationID": { + "description": "The main source of the header information.", + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/Organisation:[^:]+:[0-9]*$" + }, + "SpatialLocation": { + "description": "The spatial location information such as coordinates,CRS information.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractSpatialLocation:1.0.0" + } + }, + "GeoContexts": { + "description": "List of geographic entities which provide context to the facility. This may include multiple types or multiple values of the same type.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractGeoContext:1.0.0" } + }, + "OperanmentID": { + "description": "Identifies the Facility's general location as being onshore vs. offshore.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/OperatingEnvironment:[^:]+:[0-9]*$" + }, + "FacilityName": { + "description": "Name of the Facility.", + "type": "string" + }, + "FacilityNameAlias": { + "description": "Alternative names, including historical, by which this facility is/has been known.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractAliasNames:1.0.0" + } + }, + "FacilityState": { + "description": "The history of life cycle states the facility has been through.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractFacilityState:1.0.0" + } + }, + "FacilityEvent": { + "description": "A list of key facility events.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractFacilityEvent:1.0.0" + } + }, + "FacilitySpecification": { + "description": "facilitySpecification maintains the specification like slot name, wellbore drilling permit number, rig name etc.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractFacilitySpecification:1.0.0" + } + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractFacilityEvent.1.0.0.json b/schema_registration/shared-schemas/AbstractFacilityEvent.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..ec0521c4010b0683177d794a4619f92c562abefa --- /dev/null +++ b/schema_registration/shared-schemas/AbstractFacilityEvent.1.0.0.json @@ -0,0 +1,38 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractFacilityEvent", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFacilityEvent.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractFacilityEvent", + "description": "A significant occurrence in the life of a facility, which often changes its state, or the state of one of its components.", + "type": "object", + "properties": { + "FacilityEventTypeID": { + "description": "The facility event type is a picklist. Examples: Propose, Completion, Entry Date etc.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/FacilityEventType:[^:]+:[0-9]*$" + }, + "EffectiveDateTime": { + "description": "The date and time at which the event becomes effective.", + "type": "string", + "format": "date-time" + }, + "TerminationDateTime": { + "description": "The date and time at which the event is no longer in effect.", + "type": "string", + "format": "date-time" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractFacilityOperator.1.0.0.json b/schema_registration/shared-schemas/AbstractFacilityOperator.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..730f4b65b59792e9b54c0107cf63cd6d48454bfe --- /dev/null +++ b/schema_registration/shared-schemas/AbstractFacilityOperator.1.0.0.json @@ -0,0 +1,38 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractFacilityOperator", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFacilityOperator.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractFacilityOperator", + "description": "The organisation that was responsible for a facility at some point in time.", + "type": "object", + "properties": { + "FacilityOperatorOrganisationID": { + "description": "The company that currently operates, or previously operated the facility", + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/Organisation:[^:]+:[0-9]*$" + }, + "EffectiveDateTime": { + "description": "The date and time at which the facility operator becomes effective.", + "type": "string", + "format": "date-time" + }, + "TerminationDateTime": { + "description": "The date and time at which the facility operator is no longer in effect.", + "type": "string", + "format": "date-time" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractFacilitySpecification.1.0.0.json b/schema_registration/shared-schemas/AbstractFacilitySpecification.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..ed15f1c1b1c34abd0c08109bb0c05209267106bd --- /dev/null +++ b/schema_registration/shared-schemas/AbstractFacilitySpecification.1.0.0.json @@ -0,0 +1,60 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractFacilitySpecification", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFacilitySpecification.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractFacilitySpecification", + "description": "A property, characteristic, or attribute about a facility that is not described explicitly elsewhere.", + "type": "object", + "properties": { + "EffectiveDateTime": { + "description": "The date and time at which the facility specification instance becomes effective.", + "type": "string", + "format": "date-time" + }, + "TerminationDateTime": { + "description": "The date and time at which the facility specification instance is no longer in effect.", + "format": "date-time", + "type": "string" + }, + "FacilitySpecificationQuantity": { + "description": "The value for the specified parameter type.", + "type": "number" + }, + "FacilitySpecificationDateTime": { + "description": "The actual date and time value of the parameter.", + "type": "string", + "format": "date-time" + }, + "FacilitySpecificationIndicator": { + "description": "The actual indicator value of the parameter.", + "type": "boolean" + }, + "FacilitySpecificationText": { + "description": "The actual text value of the parameter.", + "type": "string" + }, + "UnitOfMeasureID": { + "description": "The unit for the quantity parameter, like metre (m in SI units system) for quantity Length.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/UnitOfMeasure:[^:]+:[0-9]*$" + }, + "ParameterTypeID": { + "description": "Parameter type of property or characteristic.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/ParameterType:[^:]+:[0-9]*$" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractFacilityState.1.0.0.json b/schema_registration/shared-schemas/AbstractFacilityState.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..9a4bb393c0748d5862802195920057319e19acbf --- /dev/null +++ b/schema_registration/shared-schemas/AbstractFacilityState.1.0.0.json @@ -0,0 +1,38 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractFacilityState", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFacilityState.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractFacilityState", + "description": "The life cycle status of a facility at some point in time.", + "type": "object", + "properties": { + "EffectiveDateTime": { + "description": "The date and time at which the facility state becomes effective.", + "type": "string", + "format": "date-time" + }, + "TerminationDateTime": { + "description": "The date and time at which the facility state is no longer in effect.", + "type": "string", + "format": "date-time" + }, + "FacilityStateTypeID": { + "description": "The facility life cycle state from planning to abandonment.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/FacilityStateType:[^:]+:[0-9]*$" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractFacilityVerticalMeasurement.1.0.0.json b/schema_registration/shared-schemas/AbstractFacilityVerticalMeasurement.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..5d9cf97e9923be8f51dba0b631b04a25807dd753 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractFacilityVerticalMeasurement.1.0.0.json @@ -0,0 +1,79 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractFacilityVerticalMeasurement", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractFacilityVerticalMeasurement.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractFacilityVerticalMeasurement", + "description": "A location along a wellbore, _usually_ associated with some aspect of the drilling of the wellbore, but not with any intersecting _subsurface_ natural surfaces.", + "type": "object", + "properties": { + "VerticalMeasurementID": { + "description": "The ID for a distinct vertical measurement within the Facility array so that it may be referenced by other vertical measurements if necessary.", + "type": "string" + }, + "EffectiveDateTime": { + "description": "The date and time at which a vertical measurement instance becomes effective.", + "type": "string", + "format": "date-time" + }, + "VerticalMeasurement": { + "description": "The value of the elevation or depth. Depth is positive downwards from a vertical reference or geodetic datum along a path, which can be vertical; elevation is positive upwards from a geodetic datum along a vertical path. Either can be negative.", + "type": "number" + }, + "TerminationDateTime": { + "description": "The date and time at which a vertical measurement instance is no longer in effect.", + "type": "string", + "format": "date-time" + }, + "VerticalMeasurementTypeID": { + "description": "Specifies the type of vertical measurement (TD, Plugback, Kickoff, Drill Floor, Rotary Table...).", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/VerticalMeasurementType:[^:]+:[0-9]*$" + }, + "VerticalMeasurementPathID": { + "description": "Specifies Measured Depth, True Vertical Depth, or Elevation.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/VerticalMeasurementPath:[^:]+:[0-9]*$" + }, + "VerticalMeasurementSourceID": { + "description": "Specifies Driller vs Logger.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/VerticalMeasurementSource:[^:]+:[0-9]*$" + }, + "WellboreTVDTrajectoryID": { + "description": "Specifies what directional survey or wellpath was used to calculate the TVD.", + "type": "string", + "pattern": "^srn:<namespace>:work-product-component\\/WellboreTrajectory:[^:]+:[0-9]*$" + }, + "VerticalMeasurementUnitOfMeasureID": { + "description": "The unit of measure for the vertical measurement. If a unit of measure and a vertical CRS are provided, the unit of measure provided is taken over the unit of measure from the CRS.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/UnitOfMeasure:[^:]+:[0-9]*$" + }, + "VerticalCRSID": { + "description": "Vertical CRS. It is expected that a Vertical CRS or a Vertical Reference is provided, but not both.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/VerticalCRS:[^:]+:[0-9]*$" + }, + "VerticalReferenceID": { + "description": "The reference point from which the vertical measurement is made. Must resolve ultimately to a vertical CRS. It is expected that a Vertical CRS or a Vertical Reference is provided, but not both.", + "type": "string" + }, + "VerticalMeasurementDescription": { + "description": "Text which describes a vertical measurement in detail.", + "type": "string" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractGeoBasinContext.1.0.0.json b/schema_registration/shared-schemas/AbstractGeoBasinContext.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..46a87f64b484c8f3cdeba0d6f1f97ceabab0a138 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractGeoBasinContext.1.0.0.json @@ -0,0 +1,33 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractGeoBasinContext", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoBasinContext.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractGeoBasinContext", + "description": "A single, typed basin entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "type": "object", + "properties": { + "BasinID": { + "type": "string", + "description": "Reference to Basin.", + "pattern": "^srn:<namespace>:master-data\\/Basin:[^:]+:[0-9]*$" + }, + "GeoTypeID": { + "description": "The BasinType reference of the Basin (via BasinID) for application convenience.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/BasinType:[^:]+:[0-9]*$" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractGeoContext.1.0.0.json b/schema_registration/shared-schemas/AbstractGeoContext.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..ac7f70204dd74a6989bc3809c89fbc6a678efaaf --- /dev/null +++ b/schema_registration/shared-schemas/AbstractGeoContext.1.0.0.json @@ -0,0 +1,37 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractGeoContext", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoContext.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractGeoContext", + "description": "A geographic context to an entity. It can be either a reference to a GeoPoliticalEntity, Basin, Field, Play or Prospect.", + "oneOf": [ + { + "$ref": "osdu:osdu:AbstractGeoPoliticalContext:1.0.0" + }, + { + "$ref": "osdu:osdu:AbstractGeoBasinContext:1.0.0" + }, + { + "$ref": "osdu:osdu:AbstractGeoFieldContext:1.0.0" + }, + { + "$ref": "osdu:osdu:AbstractGeoPlayContext:1.0.0" + }, + { + "$ref": "osdu:osdu:AbstractGeoProspectContext:1.0.0" + } + ] + } +} diff --git a/schema_registration/shared-schemas/AbstractGeoFieldContext.1.0.0.json b/schema_registration/shared-schemas/AbstractGeoFieldContext.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..ce9605585099cfed777f0c5d7c5c1abcc3bd542d --- /dev/null +++ b/schema_registration/shared-schemas/AbstractGeoFieldContext.1.0.0.json @@ -0,0 +1,32 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractGeoFieldContext", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoFieldContext.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractGeoFieldContext", + "description": "A single, typed field entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "type": "object", + "properties": { + "FieldID": { + "type": "string", + "description": "Reference to Field.", + "pattern": "^srn:<namespace>:master-data\\/Field:[^:]+:[0-9]*$" + }, + "GeoTypeID": { + "const": "Field", + "description": "The fixed type 'Field' for this AbstractGeoFieldContext." + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractGeoPlayContext.1.0.0.json b/schema_registration/shared-schemas/AbstractGeoPlayContext.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..7675bf19eb6dc67a1c445283e90b2adc0d6de148 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractGeoPlayContext.1.0.0.json @@ -0,0 +1,33 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractGeoPlayContext", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoPlayContext.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractGeoPlayContext", + "description": "A single, typed Play entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "type": "object", + "properties": { + "PlayID": { + "type": "string", + "description": "Reference to the play.", + "pattern": "^srn:<namespace>:master-data\\/Play:[^:]+:[0-9]*$" + }, + "GeoTypeID": { + "type": "string", + "description": "The PlayType reference of the Play (via PlayID) for application convenience.", + "pattern": "^srn:<namespace>:reference-data\\/PlayType:[^:]+:[0-9]*$" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractGeoPoliticalContext.1.0.0.json b/schema_registration/shared-schemas/AbstractGeoPoliticalContext.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..5f127537d547740160b62586fc5a9328ff760e32 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractGeoPoliticalContext.1.0.0.json @@ -0,0 +1,33 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractGeoPoliticalContext", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoPoliticalContext.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractGeoPoliticalContext", + "description": "A single, typed geo-political entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "type": "object", + "properties": { + "GeoPoliticalEntityID": { + "type": "string", + "description": "Reference to GeoPoliticalEntity.", + "pattern": "^srn:<namespace>:master-data\\/GeoPoliticalEntity:[^:]+:[0-9]*$" + }, + "GeoTypeID": { + "type": "string", + "description": "The GeoPoliticalEntityType reference of the GeoPoliticalEntity (via GeoPoliticalEntityID) for application convenience.", + "pattern": "^srn:<namespace>:reference-data\\/GeoPoliticalEntityType:[^:]+:[0-9]*$" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractGeoProspectContext.1.0.0.json b/schema_registration/shared-schemas/AbstractGeoProspectContext.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..89179bf227c44c15e38d5a05d46ebd371db7abe1 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractGeoProspectContext.1.0.0.json @@ -0,0 +1,33 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractGeoProspectContext", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractGeoProspectContext.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractGeoProspectContext", + "description": "A single, typed Prospect entity reference, which is 'abstracted' to AbstractGeoContext and then aggregated by GeoContexts properties.", + "type": "object", + "properties": { + "ProspectID": { + "type": "string", + "description": "Reference to the prospect.", + "pattern": "^srn:<namespace>:master-data\\/Prospect:[^:]+:[0-9]*$" + }, + "GeoTypeID": { + "type": "string", + "description": "The ProspectType reference of the Prospect (via ProspectID) for application convenience.", + "pattern": "^srn:<namespace>:reference-data\\/ProspectType:[^:]+:[0-9]*$" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractLegalParentList.1.0.0.json b/schema_registration/shared-schemas/AbstractLegalParentList.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..98788713032e36ae1bf195e07b1f5ec03fe589de --- /dev/null +++ b/schema_registration/shared-schemas/AbstractLegalParentList.1.0.0.json @@ -0,0 +1,32 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractLegalParentList", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractLegalParentList.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parent List", + "description": "A list of entity IDs in the data ecosystem, which act as legal parents to the current entity.", + "type": "object", + "properties": { + "Parents": { + "description": "An array of none, one or many entity references in the data ecosystem, which identify the source of data in the legal sense. Example: the 'parents' will be queried when e.g. the subscription of source data services is terminated; access to the derivatives is also terminated.", + "items": { + "type": "string" + }, + "example": [], + "title": "Parents", + "type": "array" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractLegalTags.1.0.0.json b/schema_registration/shared-schemas/AbstractLegalTags.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..b517d54c47ac3faf2e4161926a7f47de4bf5c570 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractLegalTags.1.0.0.json @@ -0,0 +1,51 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractLegalTags", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractLegalTags.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Legal Meta Data", + "description": "Legal meta data like legal tags, relevant other countries, legal status.", + "type": "object", + "properties": { + "LegalTags": { + "title": "Legal Tags", + "description": "The list of legal tags.", + "type": "array", + "items": { + "type": "string" + } + }, + "OtherRelevantDataCountries": { + "title": "Other Relevant Data Countries", + "description": "The list of other relevant data countries.", + "type": "array", + "items": { + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/GeoPoliticalEntity:[^:]+:[0-9]*$" + } + }, + "Status": { + "title": "Legal Status", + "description": "The legal status.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/LegalStatus:[^:]+:[0-9]*$" + } + }, + "required": [ + "LegalTags", + "OtherRelevantDataCountries" + ], + "additionalProperties": false + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractMetaItem.1.0.0.json b/schema_registration/shared-schemas/AbstractMetaItem.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..ff719bb80c6ecd568367141f8636a8d2d5baa42d --- /dev/null +++ b/schema_registration/shared-schemas/AbstractMetaItem.1.0.0.json @@ -0,0 +1,85 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractMetaItem", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractMetaItem.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Frame of Reference Meta Data Item", + "description": "A meta data item, which allows the association of named properties or property values to a Unit/Measurement/CRS/Azimuth/Time context.", + "type": "object", + "properties": { + "Kind": { + "title": "Reference Kind", + "description": "The kind of reference, unit, measurement, CRS or azimuth reference.", + "type": "string", + "enum": [ + "CRS", + "Unit", + "Measurement", + "AzimuthReference", + "DateTime" + ] + }, + "Name": { + "title": "Name or Symbol", + "description": "The name of the CRS or the symbol/name of the unit.", + "type": "string", + "example": [ + "NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]", + "ft" + ] + }, + "PersistableReference": { + "title": "Persistable Reference", + "description": "The persistable reference string uniquely identifying the CRS or Unit.", + "type": "string", + "example": "{\"scaleOffset\":{\"scale\":0.3048006096012192,\"offset\":0.0},\"symbol\":\"ftUS\",\"baseMeasurement\":{\"ancestry\":\"Length\",\"type\":\"UM\"},\"type\":\"USO\"}" + }, + "PropertyNames": { + "title": "Property Names", + "description": "The list of property names, to which this meta data item provides Unit/CRS context to. Data structures, which come in a single frame of reference, can register the property name, others require a full path like \"data.structureA.propertyB\" to define a unique context.", + "type": "array", + "example": [ + "elevationFromMsl", + "totalDepthMdDriller", + "wellHeadProjected" + ], + "items": { + "type": "string" + } + }, + "PropertyValues": { + "title": "Property Values", + "description": "The list of property values, to which this meta data item provides Unit/CRS context to. Typically a unit symbol is a value to a data structure; this symbol is then registered in this propertyValues array and the persistableReference provides the absolute reference.", + "type": "array", + "example": [ + "F", + "ftUS", + "deg" + ], + "items": { + "type": "string" + } + }, + "Uncertainty": { + "title": "Uncertainty", + "description": "The uncertainty of the values measured given the unit or CRS unit.", + "type": "number" + } + }, + "required": [ + "Kind", + "PersistableReference" + ] + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractReferenceType.1.0.0.json b/schema_registration/shared-schemas/AbstractReferenceType.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..624950b2052290f6b15ace46a9cc5226d70d727d --- /dev/null +++ b/schema_registration/shared-schemas/AbstractReferenceType.1.0.0.json @@ -0,0 +1,62 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractReferenceType", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractReferenceType.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractReferenceType", + "description": "Generic reference object containing the universal properties of reference data, especially the ones commonly thought of as Types", + "type": "object", + "properties": { + "Name": { + "description": "The name of the entity instance.", + "type": "string" + }, + "NameAlias": { + "description": "Alternative names, including historical, by which this entity instance is/has been known.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractAliasNames:1.0.0" + } + }, + "ID": { + "description": "Surrogate key to uniquely identify an instance in a domain list.", + "type": "string" + }, + "InactiveIndicator": { + "description": "This is set to T (True) if the instance is no longer in use.", + "type": "boolean" + }, + "Description": { + "description": "The text which describes a NAME TYPE in detail.", + "type": "string" + }, + "Code": { + "description": "The abbreviation or mnemonic for a reference type if defined. Example: WELL and WLBR.", + "type": "string" + }, + "AttributionAuthority": { + "description": "Name of the authority, or organisation, which governs the entity value and from which it is sourced.", + "type": "string" + }, + "AttributionPublication": { + "description": "Name, URL, or other identifier of the publication, or repository, of the attribution source organisation from which the entity value is sourced.", + "type": "string" + }, + "AttributionRevision": { + "description": "The distinct instance of the attribution publication, by version number, sequence number, date of publication, etc., that was used for the entity value.", + "type": "string" + } + } + } +} diff --git a/schema_registration/shared-schemas/AbstractSpatialLocation.1.0.0.json b/schema_registration/shared-schemas/AbstractSpatialLocation.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..d275c96bca3fdad23a9b825715e31fc8dde4783e --- /dev/null +++ b/schema_registration/shared-schemas/AbstractSpatialLocation.1.0.0.json @@ -0,0 +1,91 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractSpatialLocation", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractSpatialLocation.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractSpatialLocation", + "description": "A geographic object which can be described by a set of points.", + "type": "object", + "properties": { + "SpatialLocationCoordinatesDate": { + "description": "Date when coordinates were measured or retrieved.", + "type": "string", + "format": "date-time" + }, + "QuantitativeAccuracyBandID": { + "description": "An approximate quantitative assessment of the quality of a location (accurate to > 500 m (i.e. not very accurate)), to < 1 m, etc.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/QuantitativeAccuracyBand:[^:]+:[0-9]*$" + }, + "QualitativeSpatialAccuracyTypeID": { + "description": "A qualitative description of the quality of a spatial location, e.g. unverifiable, not verified, basic validation.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/QualitativeSpatialAccuracyType:[^:]+:[0-9]*$" + }, + "CoordinateQualityCheckPerformedBy": { + "description": "The user who performed the Quality Check.", + "type": "string" + }, + "CoordinateQualityCheckDateTime": { + "description": "The date of the Quality Check.", + "type": "string", + "format": "date-time" + }, + "CoordinateQualityCheckRemark": { + "description": "Freetext remark on Quality Check.", + "type": "string" + }, + "Coordinates": { + "description": "Projected or geographic coordinates.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractCoordinates:1.0.0" + } + }, + "SpatialParameterTypeID": { + "description": "A type of spatial representation of an object, often general (e.g. an Outline, which could be applied to Field, Reservoir, Facility, etc.) or sometimes specific (e.g. Onshore Outline, State Offshore Outline, Federal Offshore Outline, 3 spatial representations that may be used by Countries).", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/SpatialParameterType:[^:]+:[0-9]*$" + }, + "SpatialGeometryTypeID": { + "description": "Indicates the expected look of the SPATIAL_PARAMETER_TYPE, e.g. a point, a line, a polyline (e.g. coastline, made up of vertexes), an area, a volume. E.g. a Well Surface is a point (an identifiable feature in its own right), a coastline could be a polyline.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/SpatialGeometryType:[^:]+:[0-9]*$" + }, + "VerticalCRSID": { + "description": "Vertical CRS.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/VerticalCRS:[^:]+:[0-9]*$" + }, + "HorizontalCRSID": { + "description": "Horizontal CRS.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/HorizontalCRS:[^:]+:[0-9]*$" + }, + "Elevation": { + "description": "The elevation of the measured coordinates above the datum expressed by the VerticalCRS.", + "type": "number" + }, + "HeightAboveGroundLevel": { + "description": "The height of the measured coordinates above the ground.", + "type": "number" + }, + "HeightAboveGroundLevelUOMID": { + "description": "Unit of Measure for the height above ground level.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/UnitOfMeasure:[^:]+:[0-9]*$" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractWPCGroupType.1.0.0.json b/schema_registration/shared-schemas/AbstractWPCGroupType.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..fab96a8405f89f6e7280d77b5de0ff451d368ae5 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractWPCGroupType.1.0.0.json @@ -0,0 +1,63 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractWPCGroupType", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractWPCGroupType.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractWPCGroupType", + "description": "Generic reference object containing the universal grouptype properties of a Work Product Component for inclusion in data type specific Work Product Component objects", + "type": "object", + "properties": { + "Files": { + "type": "array", + "items": { + "description": "The SRN which identifies this OSDU File resource.", + "type": "string", + "pattern": "^srn:<namespace>:file\\/File:[^:]+:[0-9]*$" + } + }, + "Artefacts": { + "type": "array", + "description": "An array of Artefacts - each artefact has a Role, Resource tuple. An artefact is distinct from the file, in the sense certain valuable information is generated during loading process (Artefact generation process). Examples include retrieving location data, performing an OCR which may result in the generation of artefacts which need to be preserved distinctly", + "items": { + "type": "object", + "properties": { + "RoleID": { + "description": "The SRN of this artefact's role.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/ArtefactRole:[^:]+:[0-9]*$" + }, + "ResourceTypeID": { + "description": "The SRN of the artefact's resource type.", + "type": "string", + "pattern": "^srn:<namespace>:file\\/File:[^:]+:[0-9]*$" + }, + "ResourceID": { + "description": "The SRN which identifies this OSDU Artefact resource.", + "type": "string", + "pattern": "^srn:<namespace>:file\\/File:[^:]+:[0-9]*$" + } + } + } + }, + "IsExtendedLoad": { + "type": "boolean", + "description": "A flag that indicates if the work product component is undergoing an extended load. It reflects the fact that the work product component is in an early stage and may be updated before finalization." + }, + "IsDiscoverable": { + "type": "boolean", + "description": "A flag that indicates if the work product component is searchable, which means covered in the search index." + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractWellboreDrillingReason.1.0.0.json b/schema_registration/shared-schemas/AbstractWellboreDrillingReason.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..60bc5d4bcca5dbab035a19999a2bd0876882843b --- /dev/null +++ b/schema_registration/shared-schemas/AbstractWellboreDrillingReason.1.0.0.json @@ -0,0 +1,38 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "AbstractWellboreDrillingReason", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractWellboreDrillingReason.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractWellboreDrillingReason", + "description": "Purpose for drilling a wellbore, which often is an indication of the level of risk.", + "type": "object", + "properties": { + "DrillingReasonTypeID": { + "description": "Identifier of the drilling reason type for the corresponding time period.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/DrillingReasonType:[^:]+:[0-9]*$" + }, + "EffectiveDateTime": { + "description": "The date and time at which the event becomes effective.", + "type": "string", + "format": "date-time" + }, + "TerminationDateTime": { + "description": "The date and time at which the event is no longer in effect.", + "type": "string", + "format": "date-time" + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/AbstractWorkProductComponent.1.0.0.json b/schema_registration/shared-schemas/AbstractWorkProductComponent.1.0.0.json new file mode 100644 index 0000000000000000000000000000000000000000..bf6aa78ec9a46e66d90793a6ff54205a8550c905 --- /dev/null +++ b/schema_registration/shared-schemas/AbstractWorkProductComponent.1.0.0.json @@ -0,0 +1,97 @@ +{ + "schemaInfo": { + "schemaIdentity": { + "authority": "osdu", + "source": "osdu", + "entityType": "abstractLegalParentList", + "schemaVersionMajor": 1, + "schemaVersionMinor": 0, + "schemaVersionPatch": 0 + }, + "status": "DEVELOPMENT" + }, + "schema": { + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractWorkProductComponent.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AbstractWorkProductComponent", + "description": "Generic reference object containing the universal properties of a Work Product Component for inclusion in data type specific Work Product Component objects", + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Name" + }, + "Description": { + "type": "string", + "description": "Description. Summary of the work product component. Not the same as Remark which captures thoughts of creator about the wpc." + }, + "CreationDateTime": { + "type": "string", + "format": "date-time", + "description": "Date that a resource (work product component here) is formed outside of OSDU before loading (e.g. publication date)." + }, + "Tags": { + "type": "array", + "description": "Array of key words to identify the work product, especially to help in search.", + "items": { + "type": "string" + } + }, + "SpatialPoint": { + "description": "A centroid point that reflects the locale of the content of the work product component (location of the subject matter).", + "$ref": "osdu:osdu:AbstractSpatialLocation:1.0.0" + }, + "SpatialArea": { + "description": "A polygon boundary that reflects the locale of the content of the work product component (location of the subject matter).", + "$ref": "osdu:osdu:AbstractSpatialLocation:1.0.0" + }, + "GeoContexts": { + "description": "List of geographic entities which provide context to the WPC. This may include multiple types or multiple values of the same type.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractGeoContext:1.0.0" + } + }, + "SubmitterName": { + "type": "string", + "description": "Name of the person that first submitted the work product component to OSDU." + }, + "BusinessActivities": { + "type": "array", + "description": "Array of business processes/workflows that the work product component has been through (ex. well planning, exploration).", + "items": { + "type": "string", + "description": "Business Activity" + } + }, + "AuthorIDs": { + "type": "array", + "description": "Array of Authors' names of the work product component. Could be a person or company entity.", + "items": { + "type": "string" + } + }, + "LineageAssertions": { + "type": "array", + "description": "Defines relationships with other objects (any kind of Resource) upon which this work product component depends. The assertion is directed only from the asserting WPC to ancestor objects, not children. It should not be used to refer to files or artefacts within the WPC -- the association within the WPC is sufficient and Artefacts are actually children of the main WPC file. They should be recorded in the Data.Artefacts[] array.", + "items": { + "type": "object", + "title": "LineageAssertion", + "properties": { + "ID": { + "type": "string", + "description": "The object reference identifying the DIRECT, INDIRECT, REFERENCE dependency.", + "pattern": "^srn:<namespace>:[A-Za-z-]+\\/[A-Za-z0-9]+:[^:]+:[0-9]*$" + }, + "LineageRelationshipType": { + "type": "string", + "description": "Used by LineageAssertion to describe the nature of the line of descent of a work product component from a prior Resource, such as DIRECT, INDIRECT, REFERENCE. It is not for proximity (number of nodes away), it is not to cover all the relationships in a full ontology or graph, and it is not to describe the type of activity that created the asserting WPC. LineageAssertion does not encompass a full provenance, process history, or activity model.", + "pattern": "^srn:<namespace>:reference-data\\/LineageRelationshipType:[^:]+:[0-9]*$" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schema_registration/shared-schemas/load_sequence.0.2.0.json b/schema_registration/shared-schemas/load_sequence.0.2.0.json new file mode 100644 index 0000000000000000000000000000000000000000..23e630d7c2cb4546fb2688ef6320bb485da9ab91 --- /dev/null +++ b/schema_registration/shared-schemas/load_sequence.0.2.0.json @@ -0,0 +1,96 @@ +[ + { + "kind": "osdu:osdu:AbstractAliasNames.1.0.0.json", + "relativePath": "AbstractAliasNames.1.0.0.json" + }, + { + "kind": "osdu:osdu:iwAbstractFacilityState.1.0.0.json", + "relativePath": "AbstractFacilityState.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractFacilityEvent.1.0.0.json", + "relativePath": "AbstractFacilityEvent.1.0.0.json" + },{ + "kind": "osdu:osdu:AbstractFacilityOperator.1.0.0.json", + "relativePath": "AbstractFacilityOperator.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractFacilitySpecification.1.0.0.json", + "relativePath": "AbstractFacilitySpecification.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractMetaItem.1.0.0", + "relativePath": "AbstractMetaItem.1.0.0.json" + },{ + "kind": "osdu:osdu:AbstractFacility.1.0.0.json", + "relativePath": "AbstractFacility.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractFacilityVerticalMeasurement.1.0.0.json", + "relativePath": "AbstractFacilityVerticalMeasurement.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractWellboreDrillingReason.1.0.0.json", + "relativePath": "AbstractWellboreDrillingReason.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractLegalParentList.1.0.0", + "relativePath": "AbstractLegalParentList.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractGeoPoliticalContext.1.0.0", + "relativePath": "AbstractGeoPoliticalContext.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractGeoPoliticalContext.1.0.0", + "relativePath": "AbstractGeoPoliticalContext.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractGeoBasinContext.1.0.0", + "relativePath": "AbstractGeoBasinContext.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractGeoFieldContext.1.0.0", + "relativePath": "AbstractGeoFieldContext.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractGeoPlayContext.1.0.0", + "relativePath": "AbstractGeoPlayContext.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractGeoProspectContext.1.0.0", + "relativePath": "AbstractGeoProspectContext.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractGeoContext.1.0.0", + "relativePath": "AbstractGeoContext.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractAccessControlList.1.0.0", + "relativePath": "AbstractAccessControlList.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractCoordinates.1.0.0", + "relativePath": "AbstractCoordinates.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractSpatialLocation.1.0.0", + "relativePath": "AbstractSpatialLocation.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractLegalTags.1.0.0", + "relativePath": "AbstractLegalTags.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractWPCGroupType.1.0.0", + "relativePath": "AbstractWPCGroupType.1.0.0.json" + }, + { + "kind": "osdu:osdu:AbstractWorkProductComponent.1.0.0", + "relativePath": "AbstractWorkProductComponent.1.0.0.json" + }, + { + "kind": "osdu:osdu:Wellbore_3501123498.1.0.0", + "relativePath": "Wellbore_3501123498.json" + } +] diff --git a/schema_registration/test-data/TesetReferenceManifest.json b/schema_registration/test-data/TesetReferenceManifest.json new file mode 100644 index 0000000000000000000000000000000000000000..e6a3583d33c2b7559524ec9dc167cf10fe89a915 --- /dev/null +++ b/schema_registration/test-data/TesetReferenceManifest.json @@ -0,0 +1,40 @@ +[ + { + "kind": "osdu:osdu:TestReference:1.0.0", + "id": "$$srn:NAMESPACE$$:type/Type:TestReference", + "groupType": "type", + "legal": { + "legaltags": [ + "$$LEGAL_TAG$$" + ], + "otherRelevantDataCountries": [ + "$$ISO_3166_ALPHA_2_CODE$$" + ] + }, + "acl": { + "owners": [ + "$$DATA_OWNERS_GROUP$$" + ], + "viewers": [ + "$$DATA_VIEWERS_GROUP$$" + ] + }, + "data": { + "Name": "TestReference", + "Description": "A meaningful description of this TestReference.", + "Schema": "http://json-schema.org/draft-07/schema#", + "SchemaID": "https://schema.osdu.opengroup.org/json/reference-data/TestReference.1.0.0.json", + "SchemaKind": "osdu:osdu:TestReference:1.0.0", + "GroupType": "reference-data", + "IsReferenceValueType": true, + "GovernanceAuthorities": [ + "$$srn:NAMESPACE$$:reference-data/OrganisationType:osdu" + ], + "NaturalKeys": [ + "data.Code", + "data.Name" + ], + "GovernanceModel": "LOCAL" + } + } +] \ No newline at end of file diff --git a/schema_registration/test-data/Wellbore_schema.json b/schema_registration/test-data/Wellbore_schema.json new file mode 100644 index 0000000000000000000000000000000000000000..bdbb4843f255d95318aaf9ddb4743f473697a24e --- /dev/null +++ b/schema_registration/test-data/Wellbore_schema.json @@ -0,0 +1,213 @@ +{ + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/master-data/Wellbore.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Wellbore", + "description": "A hole in the ground extending from a point at the earth's surface to the maximum point of penetration.", + "type": "object", + "properties": { + "id": { + "description": "The SRN which identifies this OSDU resource object without version.", + "title": "Entity ID", + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/Wellbore:[^:]+$", + "example": "srn:<namespace>:master-data/Wellbore:2adac27b-5d84-5bcd-89f2-93ee709c06d9" + }, + "kind": { + "description": "The schema identification for the OSDU resource object following the pattern <Namespace>:<Source>:<Type>:<VersionMajor>.<VersionMinor>.<VersionPatch>. The versioning scheme follows the semantic versioning, https://semver.org/.", + "title": "Entity Kind", + "type": "string", + "pattern": "^[A-Za-z0-9-_]+:[A-Za-z0-9-_]+:[A-Za-z0-9-_]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "namespace:osdu:Wellbore:2.7.112" + }, + "groupType": { + "description": "The OSDU GroupType assigned to this resource object.", + "title": "Group Type", + "const": "master-data" + }, + "version": { + "description": "The version number of this OSDU resource; set by the framework.", + "title": "Version Number", + "type": "integer", + "format": "int64", + "example": 1831253916104085 + }, + "acl": { + "description": "The access control tags associated with this entity.", + "title": "Access Control List", + "$ref": "osdu:osdu:AbstractAccessControlList:1.0.0" + }, + "legal": { + "description": "The entity's legal tags and compliance status.", + "title": "Legal Tags", + "$ref": "osdu:osdu:AbstractLegalTags:1.0.0" + }, + "resourceHomeRegionID": { + "description": "The name of the home [cloud environment] region for this OSDU resource object.", + "title": "Resource Home Region ID", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/OSDURegion:[^:]+:[0-9]*$" + }, + "resourceHostRegionIDs": { + "description": "The name of the host [cloud environment] region(s) for this OSDU resource object.", + "title": "Resource Host Region ID", + "type": "array", + "items": { + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/OSDURegion:[^:]+:[0-9]*$" + } + }, + "resourceObjectCreationDateTime": { + "description": "Timestamp of the time at which Version 1 of this OSDU resource object was originated.", + "title": "Resource Object Creation DateTime", + "type": "string", + "format": "date-time" + }, + "resourceVersionCreationDateTime": { + "description": "Timestamp of the time when the current version of this resource entered the OSDU.", + "title": "Resource Version Creation DateTime", + "type": "string", + "format": "date-time" + }, + "resourceCurationStatus": { + "description": "Describes the current Curation status.", + "title": "Resource Curation Status", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/ResourceCurationStatus:[^:]+:[0-9]*$" + }, + "resourceLifecycleStatus": { + "description": "Describes the current Resource Lifecycle status.", + "title": "Resource Lifecycle Status", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/ResourceLifecycleStatus:[^:]+:[0-9]*$" + }, + "resourceSecurityClassification": { + "description": "Classifies the security level of the resource.", + "title": "Resource Security Classification", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/ResourceSecurityClassification:[^:]+:[0-9]*$" + }, + "ancestry": { + "description": "The links to data, which constitute the inputs.", + "title": "Ancestry", + "$ref": "osdu:osdu:AbstractLegalParentList:1.0.0" + }, + "persistableReferences": { + "description": "The meta data section linking the 'unitKey', 'crsKey' to self-contained definitions.", + "title": "Frame of Reference Meta Data", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractMetaItem:1.0.0" + } + }, + "source": { + "description": "Where did the data resource originate? This could be many kinds of entities, such as company, agency, team or individual.", + "title": "Data Source", + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/Organisation:[^:]+:[0-9]*$" + }, + "existenceKind": { + "description": "Where does this data resource sit in the cradle-to-grave span of its existence?", + "title": "Existence Kind", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/ExistenceKind:[^:]+:[0-9]*$" + }, + "licenseState": { + "description": "Indicates what kind of ownership Company has over data.", + "title": "License State", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/LicenseState:[^:]+:[0-9]*$" + }, + "data": { + "allOf": [ + { + "$ref": "osdu:osdu:AbstractFacility:1.0.0" + }, + { + "type": "object", + "properties": { + "WellID": { + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/Well:[^:]+:[0-9]*$" + }, + "SequenceNumber": { + "description": "A number that indicates the order in which wellbores were drilled.", + "type": "integer" + }, + "VerticalMeasurements": { + "description": "List of all depths and elevations pertaining to the wellbore, like, plug back measured depth, total measured depth, KB elevation", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractFacilityVerticalMeasurement:1.0.0" + } + }, + "DrillingReason": { + "description": "The history of drilling reasons of the wellbore.", + "type": "array", + "items": { + "$ref": "osdu:osdu:AbstractWellboreDrillingReason:1.0.0" + } + }, + "KickOffWellbore": { + "description": "This is a pointer to the parent wellbore. The wellbore that starts from top has no parent.", + "type": "string", + "pattern": "^srn:<namespace>:master-data\\/Wellbore:[^:]+:[0-9]*$" + }, + "TrajectoryTypeID": { + "description": "Describes the predominant shapes the wellbore path can follow if deviated from vertical. Sample Values: Horizontal, Vertical, Directional.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/WellboreTrajectoryType:[^:]+:[0-9]*$" + }, + "DefinitiveTrajectoryID": { + "description": "SRN of Wellbore Trajectory which is considered the authoritative or preferred version.", + "type": "string", + "pattern": "^srn:<namespace>:work-product-component\\/WellboreTrajectory:[^:]+:[0-9]+$" + }, + "TargetFormation": { + "description": "The Formation of interest for which the Wellbore is drilled to interact with. The Wellbore may terminate in a lower formation if the requirement is to drill through the entirety of the target formation, therefore this is not necessarily the Formation at TD.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/GeologicalFormation:[^:]+:[0-9]*$" + }, + "PrimaryMaterialID": { + "description": "The primary material injected/produced from the wellbore.", + "type": "string", + "pattern": "^srn:<namespace>:reference-data\\/MaterialType:[^:]+:[0-9]*$" + }, + "DefaultVerticalMeasurementID": { + "description": "The default datum reference point, or zero depth point, used to determine other points vertically in a wellbore. References an entry in the Vertical Measurements array of this wellbore.", + "type": "string" + }, + "ProjectedBottomHoleLocation": { + "description": "Projected location at total depth.", + "$ref": "osdu:osdu:AbstractSpatialLocation:1.0.0" + }, + "GeographicBottomHoleLocation": { + "description": "Geographic location at total depth.", + "$ref": "osdu:osdu:AbstractSpatialLocation:1.0.0" + } + } + }, + { + "type": "object", + "properties": { + "ExtensionProperties": { + "type": "object", + "properties": {} + } + } + } + ] + } + }, + "required": [ + "id", + "kind", + "groupType", + "version", + "legal", + "resourceObjectCreationDateTime", + "resourceVersionCreationDateTime" + ], + "additionalProperties": false +} + diff --git a/schema_registration/test-data/generic_manifest_schema.json b/schema_registration/test-data/generic_manifest_schema.json new file mode 100644 index 0000000000000000000000000000000000000000..058dfb429b1608278f3c83b9f4f98800c2b3d199 --- /dev/null +++ b/schema_registration/test-data/generic_manifest_schema.json @@ -0,0 +1,29 @@ +{ + "x-osdu-license": "Copyright 2020, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.", + "$id": "https://schema.osdu.opengroup.org/json/generic-manifest.1.0.0.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GenericManifest", + "description": "This is a schema that describes common structure of manifests.", + "type": "object", + "properties": { + "kind": { + "description": "Some description.", + "title": "OSDU Kind", + "type": "string", + "pattern": "^[A-Za-z0-9-_]+:[A-Za-z0-9-_]+:[A-Za-z0-9-_]+:[0-9]+.[0-9]+.[0-9]+$", + "example": "opendes:osdu:WellLog:1:0:0" + }, + "manifest": { + "description": "List of manifests.", + "title": "Manifest", + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "manifest" + ], + "additionalProperties": true +} diff --git a/schema_registration/test-data/wellbore-manifest.json b/schema_registration/test-data/wellbore-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..ee9e6986829e10288a388a62442322d90949a412 --- /dev/null +++ b/schema_registration/test-data/wellbore-manifest.json @@ -0,0 +1,167 @@ +{ + "$schema": "https://schema.osdu.opengroup.org/json/master-data/Wellbore.1.0.0.json", + "$filename": "load_Wellbore.1.0.0_350112350400.json", + "manifest": [ + { + "id": "srn:<namespace>:master-data/Wellbore:350112350400", + "kind": "osdu:osdu:Wellbore:0.3.0", + "groupType": "master-data", + "version": 1, + "acl": { + "Owners": [ + "users@odes.osdu.joonix.net" + ], + "Viewers": [ + "users@odes.osdu.joonix.net" + ] + }, + "legal": { + "LegalTags": [ + "legaltag1" + ], + "OtherRelevantDataCountries": [ + "srn:<namespace>:master-data/GeoPoliticalEntity:USA:" + ], + "Status": "srn:<namespace>:reference-data/LegalStatus:public:" + }, + "resourceHostRegionIDs": [ + "srn:<namespace>:reference-data/OSDURegion:US-EAST:" + ], + "resourceObjectCreationDateTime": "2020-10-16T11:14:45-05:00", + "resourceVersionCreationDateTime": "2020-10-16T11:14:45-05:00", + "resourceSecurityClassification": "srn:<namespace>:reference-data/ResourceSecurityClassification:public:", + "source": "srn:<namespace>:master-data/Organisation:Oklahoma Corporation Commission:", + "existenceKind": "srn:<namespace>:reference-data/ExistenceKind:Active:", + "licenseState": "srn:<namespace>:reference-data/LicenseState:Unlicensed:", + "data": { + "FacilityTypeID": "srn:<namespace>:reference-data/FacilityType:Wellbore:", + "FacilityOperator": [ + { + "FacilityOperatorOrganisationID": "srn:<namespace>:master-data/Organisation:CONTINENTAL RESOURCES INC:" + } + ], + "DataSourceOrganisationID": "srn:<namespace>:master-data/Organisation:Oklahoma Corporation Commission:", + "SpatialLocation": [ + { + "Coordinates": [ + { + "x": -98.580887, + "y": 35.6381829999999 + } + ], + "SpatialGeometryTypeID": "srn:<namespace>:reference-data/SpatialGeometryType:Point:", + "VerticalCRSID": "srn:<namespace>:reference-data/VerticalCRS:MSL:", + "HorizontalCRSID": "srn:<namespace>:reference-data/HorizontalCRS:NAD27:", + "HeightAboveGroundLevelUOMID": "srn:<namespace>:reference-data/UnitOfMeasure:ft[US]:" + } + ], + "OperatingEnvironmentID": "srn:<namespace>:reference-data/OperatingEnvironment:onshore:", + "FacilityName": "IRETA 1-4-9XH", + "FacilityNameAlias": [ + { + "AliasName": " IRETA 1-4-9XH", + "AliasNameTypeID": "srn:<namespace>:reference-data/AliasNameType:Name:" + }, + { + "AliasName": "350112350400", + "AliasNameTypeID": "srn:<namespace>:reference-data/AliasNameType:UWBI:" + } + ], + "FacilityEvent": [ + { + "FacilityEventTypeID": "srn:<namespace>:reference-data/FacilityEventType:SPUD:", + "EffectiveDateTime": "2015-03-11T00:00:00-05:00" + }, + { + "FacilityEventTypeID": "srn:<namespace>:reference-data/FacilityEventType:DRILLING FINISH:", + "EffectiveDateTime": "2015-05-18T00:00:00-06:00" + } + ], + "WellID": "srn:<namespace>:master-data/Well:3501123504:", + "SequenceNumber": 1, + "VerticalMeasurements": [ + { + "VerticalMeasurementID": "TD_1", + "VerticalMeasurement": 0, + "VerticalMeasurementTypeID": "srn:<namespace>:reference-data/VerticalMeasurementType:Total Depth:", + "VerticalMeasurementPathID": "srn:<namespace>:reference-data/VerticalMeasurementPath:Measured Depth:", + "VerticalMeasurementUnitOfMeasureID": "srn:<namespace>:reference-data/UnitOfMeasure:ft[US]:", + "VerticalReferenceID": "Drill Floor" + }, + { + "VerticalMeasurementID": "TD_2", + "VerticalMeasurement": 0, + "VerticalMeasurementTypeID": "srn:<namespace>:reference-data/VerticalMeasurementType:Total Depth:", + "VerticalMeasurementPathID": "srn:<namespace>:reference-data/VerticalMeasurementPath:True Vertical Depth:", + "VerticalMeasurementUnitOfMeasureID": "srn:<namespace>:reference-data/UnitOfMeasure:ft[US]:", + "VerticalReferenceID": "Drill Floor" + }, + { + "VerticalMeasurementID": "Elev_1", + "VerticalMeasurement": 1636, + "VerticalMeasurementTypeID": "srn:<namespace>:reference-data/VerticalMeasurementType:Drill Floor:", + "VerticalMeasurementPathID": "srn:<namespace>:reference-data/VerticalMeasurementPath:Elevation:", + "VerticalMeasurementUnitOfMeasureID": "srn:<namespace>:reference-data/UnitOfMeasure:ft[US]:", + "VerticalCRSID": "srn:<namespace>:reference-data/VerticalCRS:MSL:" + }, + { + "VerticalMeasurementID": "Elev_2", + "VerticalMeasurement": 1606, + "VerticalMeasurementTypeID": "srn:<namespace>:reference-data/VerticalMeasurementType:Ground Level:", + "VerticalMeasurementPathID": "srn:<namespace>:reference-data/VerticalMeasurementPath:Elevation:", + "VerticalMeasurementUnitOfMeasureID": "srn:<namespace>:reference-data/UnitOfMeasure:ft[US]:", + "VerticalCRSID": "srn:<namespace>:reference-data/VerticalCRS:MSL:" + } + ], + "TrajectoryTypeID": "srn:<namespace>:reference-data/WellboreTrajectoryType:Horizontal:", + "DefaultVerticalMeasurementID": "", + "GeographicBottomHoleLocation": { + "Coordinates": [ + { + "x": -98.580887, + "y": 35.6381829999999 + } + ] + } + } + }, + { + "kind": "osdu:osdu:TestReference:1.0.0", + "id": "$$srn:NAMESPACE$$:type/Type:TestReference", + "groupType": "type", + "legal": { + "legaltags": [ + "$$LEGAL_TAG$$" + ], + "otherRelevantDataCountries": [ + "$$ISO_3166_ALPHA_2_CODE$$" + ] + }, + "acl": { + "owners": [ + "$$DATA_OWNERS_GROUP$$" + ], + "viewers": [ + "$$DATA_VIEWERS_GROUP$$" + ] + }, + "data": { + "Name": "TestReference", + "Description": "A meaningful description of this TestReference.", + "Schema": "http://json-schema.org/draft-07/schema#", + "SchemaID": "https://schema.osdu.opengroup.org/json/reference-data/TestReference.1.0.0.json", + "SchemaKind": "osdu:osdu:TestReference:1.0.0", + "GroupType": "reference-data", + "IsReferenceValueType": true, + "GovernanceAuthorities": [ + "$$srn:NAMESPACE$$:reference-data/OrganisationType:osdu" + ], + "NaturalKeys": [ + "data.Code", + "data.Name" + ], + "GovernanceModel": "LOCAL" + } + } + ] +}