diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a517a19..c2526d0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -11,7 +11,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + # python-version: ["3.9", "3.10", "3.11", "3.12"] # re-enable when linkml-runtime has https://github.com/linkml/linkml-runtime/pull/357 + python-version: ["3.11", "3.12"] fail-fast: false steps: diff --git a/.linkmllint.yaml b/.linkmllint.yaml index 8f63692..5de48f8 100644 --- a/.linkmllint.yaml +++ b/.linkmllint.yaml @@ -3,3 +3,6 @@ extends: recommended rules: standard_naming: permissible_values_upper_case: true + canonical_prefixes: + # Superfluous warnings for https-refixes, https://github.com/linkml/linkml/issues/2492 + level: disabled diff --git a/Makefile b/Makefile index 8222e1d..50cd17a 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,7 @@ test-schema: $(RUN) gen-project ${CONFIG_YAML} -d tmp $(SOURCE_SCHEMA_PATH) test-python: - $(RUN) python -m unittest discover + $(RUN) python -m pytest lint: $(RUN) linkml-lint $(SOURCE_SCHEMA_PATH) diff --git a/examples/PID4CatRecord-001.yaml b/examples/PID4CatRecord-001.yaml index ef1689a..83a9c4d 100644 --- a/examples/PID4CatRecord-001.yaml +++ b/examples/PID4CatRecord-001.yaml @@ -1,26 +1,86 @@ -# Example data object ---- contains_pids: -- id: lik-123 - landing_page_url: https://pid4cat.example.org/lik-123 - status: REGISTERED - pid_schema_version: 0.1.0 - record_version: 20240219v-0 - resource_info: - label: Resource label - description: Resource description - resource_category: SAMPLE - rdf_url: https://example.org/resource - rdf_type: TURTLE - schema_url: https://example.org/schema - schema_type: XSD - dc_rights: CC0-1.0 - curation_contact: datafuzzi@example.org - change_log: - - datetime_log: '2024-02-19T00:00:00Z' - has_agent: - name: Data Fuzzi - person_orcid: 0000-0000-0000-0000 - role: TRUSTEE - changed_field: STATUS - description: 'as requested in issue #123' +- responseCode: 1 + handle: 21.T12995/lik-1 + values: + - index: 1 + type: URL + data: + format: string + value: https://pid4cat.example.org/lik-1 + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' + - index: 2 + type: STATUS + data: + format: string + value: REGISTERED + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' + - index: 3 + type: SCHEMA_VER + data: + format: string + value: v0.1.0 + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' + - index: 4 + type: LICENSE + data: + format: string + value: CC0-1.0 + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' + - index: 5 + type: EMAIL + data: + format: string + value: datafuzzi@example.org + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' + - index: 6 + type: RESOURCE_INFO + data: + format: string + value: + - resource_info: + label: Resource label + description: Resource description + resource_category: SAMPLE + representation_variants: + - url: https://example.org/resource + media_type: text/turtle + encoding_format: UTF-8 + size: 12345 + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' + - index: 7 + type: RELATED + data: + format: string + value: + - related_identifiers: + - relation_type: IS_PART_OF + related_identifier: https://example.org/collection + datetime_log: '2024-02-19T00:00:00Z' + - relation_type: IS_REFERENCED_BY + related_identifier: https://example.org/referenced + datetime_log: '2024-02-19T00:00:00Z' + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' + - index: 8 + type: LOG + data: + format: string + value: + - change_log: + - datetime_log: '2024-02-19T00:00:00Z' + has_agent: + name: Data Fuzzi + email: datafuzzi@example.org + orcid: 0000-0000-0000-0000 + affiliation_ror: https://ror.org/029hg0311 + role: TRUSTEE + changed_field: STATUS + description: 'as requested in issue #123' + ttl: 86400 + timestamp: '2024-05-15T15:51:15Z' diff --git a/examples/example_p1.json b/examples/example_p1.json index 5639a9c..86a418c 100644 --- a/examples/example_p1.json +++ b/examples/example_p1.json @@ -1,60 +1,91 @@ { - "id": "lik-1", - "landing_page_url": "https://pid4cat.example.org/lik-1", - "status": "REGISTERED", - "pid_schema_version": "0.1.0", - "license": "CC0-1.0", - "curation_contact_email": "datafuzzi@example.org", - "resource_info": { - "label": "Resource label", - "description": "Resource description", - "resource_category": "SAMPLE", - "representation_variants": [ - { - "url": "https://example.org/resource", - "media_type": "text/turtle", - "encoding_format": "UTF-8", - "size": 12345 - } - ] - }, - "related_identifiers": [ + "contains_pids": [ { - "relation_type": "IS_PART_OF", - "related_identifier": "https://example.org/collection", - "datetime_log": "2024-02-19T00:00:00+00:00" - }, - { - "relation_type": "IS_REFERENCED_BY", - "related_identifier": "https://example.org/referenced", - "datetime_log": "2024-02-19T00:00:00+00:00" - } - ], - "change_log": [ - { - "datetime_log": "2024-02-19T00:00:00+00:00", - "has_agent": { - "name": "Data Fuzzi", - "email": "data.fuzzi@example.org", - "orcid": "0000-0000-0000-0000", - "affiliation_ror": "https://ror.org/01abcde", - "role": "TRUSTEE" - }, - "changed_field": "STATUS", - "description": "Registration completed." - }, - { - "datetime_log": "2024-05-15T15:51:15+00:00", - "has_agent": { - "name": "Data Fuzzi", - "email": "data.fuzzi@example.org", - "orcid": "0000-0000-0000-0000", - "affiliation_ror": "https://ror.org/01abcde", - "role": "TRUSTEE" - }, - "changed_field": "RESOURCE_INFO", - "description": "as requested in issue #234" + "responseCode": 1, + "handle": "21.T12995/lik-1", + "values": [ + { + "index": 1, + "type": "URL", + "data": { + "format": "string", + "value": "https://pid4cat.example.org/lik-1" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + }, + { + "index": 2, + "type": "STATUS", + "data": { + "format": "string", + "value": "PermissibleValue({\n 'text': 'REGISTERED',\n 'description': 'The PID4CatRecord links to a concrete resource.'\n})" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + }, + { + "index": 3, + "type": "SCHEMA_VER", + "data": { + "format": "string", + "value": "v0.1.0" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + }, + { + "index": 4, + "type": "LICENSE", + "data": { + "format": "string", + "value": "CC0-1.0" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + }, + { + "index": 5, + "type": "EMAIL", + "data": { + "format": "string", + "value": "datafuzzi@example.org" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + }, + { + "index": 6, + "type": "RESOURCE_INFO", + "data": { + "format": "string", + "value": "ResourceInfo({\n 'label': 'Resource label',\n 'description': 'Resource description',\n 'resource_category': ResourceCategory(text='SAMPLE', description='A representative part of an entity of interest on which observations may be made.'),\n 'representation_variants': [RepresentationVariant({\n 'url': 'https://example.org/resource',\n 'media_type': 'text/turtle',\n 'encoding_format': 'UTF-8',\n 'size': 12345\n })]\n})" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + }, + { + "index": 7, + "type": "RELATED", + "data": { + "format": "string", + "value": "[PID4CatRelation({\n 'relation_type': RelationType(text='IS_PART_OF', description='The resource is part of another resource.', meaning='https://purl.org/dc/terms/isPartOf'),\n 'related_identifier': 'https://example.org/collection',\n 'datetime_log': '2024-02-19T00:00:00+00:00'\n}), PID4CatRelation({\n 'relation_type': RelationType(text='IS_REFERENCED_BY', description='The resource is referenced by another resource.', meaning='https://purl.org/dc/terms/isReferencedBy'),\n 'related_identifier': 'https://example.org/referenced',\n 'datetime_log': '2024-02-19T00:00:00+00:00'\n})]" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + }, + { + "index": 8, + "type": "LOG", + "data": { + "format": "string", + "value": "[LogRecord({\n 'datetime_log': '2024-02-19T00:00:00+00:00',\n 'has_agent': Agent({\n 'name': 'Data Fuzzi',\n 'email': 'data.fuzzi@example.org',\n 'orcid': '0000-0000-0000-0000',\n 'affiliation_ror': 'https://ror.org/01abcde',\n 'role': PID4CatAgentRole(text='TRUSTEE', description='The agent is the trustee of the resource.')\n }),\n 'changed_field': ChangeLogField(text='STATUS', description='The status of the PID4CatRecord was changed.'),\n 'description': 'Registration completed.'\n}), LogRecord({\n 'datetime_log': '2024-05-15T15:51:15+00:00',\n 'has_agent': Agent({\n 'name': 'Data Fuzzi',\n 'email': 'data.fuzzi@example.org',\n 'orcid': '0000-0000-0000-0000',\n 'affiliation_ror': 'https://ror.org/01abcde',\n 'role': PID4CatAgentRole(text='TRUSTEE', description='The agent is the trustee of the resource.')\n }),\n 'changed_field': ChangeLogField(text='RESOURCE_INFO', description='The resource info of the PID4CatRecord was changed.'),\n 'description': 'as requested in issue #234'\n})]" + }, + "ttl": 86400, + "timestamp": "2024-05-15T15:51:15+00:00" + } + ] } ], - "@type": "dict" + "@type": "HandleRecordContainer" } \ No newline at end of file diff --git a/examples/example_p1_dataclasses.py b/examples/example_p1_dataclasses.py index 84f891e..ea8ba74 100644 --- a/examples/example_p1_dataclasses.py +++ b/examples/example_p1_dataclasses.py @@ -1,12 +1,15 @@ +from pathlib import Path import sys from datetime import datetime -from linkml_runtime.dumpers import json_dumper +from linkml_runtime.dumpers import json_dumper, yaml_dumper from pid4cat_model.datamodel import pid4cat_model as p4c # Demonstrate the use of Python DataClass-based model if sys.version_info < (3, 11): - raise RuntimeError("Python 3.11 or higher is required due to the use of datetime.fromisoformat") + raise RuntimeError( + "Python >= 3.11 is required until merging of https://github.com/linkml/linkml-runtime/pull/357" + ) p1_Agent = p4c.Agent( name="Data Fuzzi", @@ -61,20 +64,105 @@ ), ] -p1 = p4c.PID4CatRecord( - id="lik-1", - landing_page_url="https://pid4cat.example.org/lik-1", - status=p4c.PID4CatStatus.REGISTERED, - pid_schema_version="0.1.0", - license="CC0-1.0", - curation_contact_email="datafuzzi@example.org", - resource_info=p1_res_info, - related_identifiers=p1_related, - change_log=p1_log, +# HandleData + +p1_api = p4c.HandleAPIRecord( + responseCode = 1, + handle = "21.T12995/lik-1", + values = [ + p4c.HandleRecord( + index = 1, + type = p4c.HandleDataType.URL, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "https://pid4cat.example.org/lik-1", + ), + ), + p4c.HandleRecord( + index = 2, + type = p4c.HandleDataType.STATUS, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p4c.PID4CatStatus.REGISTERED, + ), + ), + p4c.HandleRecord( + index = 3, + type = p4c.HandleDataType.SCHEMA_VER, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "v0.1.0", + ), + ), + p4c.HandleRecord( + index = 4, + type = p4c.HandleDataType.LICENSE, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "CC0-1.0", + ), + ), + p4c.HandleRecord( + index = 5, + type = p4c.HandleDataType.EMAIL, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "datafuzzi@example.org", + ), + ), + p4c.HandleRecord( + index = 6, + type = p4c.HandleDataType.RESOURCE_INFO, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p1_res_info, + ), + ), + p4c.HandleRecord( + index = 7, + type = p4c.HandleDataType.RELATED, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p1_related, + ), + ), + p4c.HandleRecord( + index = 8, + type = p4c.HandleDataType.LOG, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p1_log, + ), + ), + ], ) -print(p1) +print(p1_api) + +print(json_dumper.dumps(p1_api)) + +container = p4c.HandleRecordContainer(contains_pids=[p1_api]) -print(json_dumper.dumps(p1)) +# write json to file +script_folder = Path(__file__).parent +with open(script_folder / "example_p1.json", "w", encoding="utf-8") as f: + f.write(json_dumper.dumps(container)) +with open(script_folder / "example_p1.yaml", "w", encoding="utf-8") as f: + f.write(yaml_dumper.dumps(container)) -c = p4c.Container(contains_pids=[p1]) diff --git a/examples/example_p1_pydantic.py b/examples/example_p1_pydantic.py index dcafae9..6da0b79 100644 --- a/examples/example_p1_pydantic.py +++ b/examples/example_p1_pydantic.py @@ -7,7 +7,9 @@ # Demonstrate the use of Pydantic models if sys.version_info < (3, 11): - raise RuntimeError("Python 3.11 or higher is required due to the use of datetime.fromisoformat") + raise RuntimeError( + "Python >= 3.11 is required until merging of https://github.com/linkml/linkml-runtime/pull/357" + ) p1_Agent = p4c.Agent( name="Data Fuzzi", @@ -62,28 +64,104 @@ ), ] -p1 = p4c.PID4CatRecord( - id="lik-1", - landing_page_url="https://pid4cat.example.org/lik-1", - status=p4c.PID4CatStatus.REGISTERED, - pid_schema_version="0.1.0", - license="CC0-1.0", - curation_contact_email="datafuzzi@example.org", - resource_info=p1_res_info, - related_identifiers=p1_related, - change_log=p1_log, +# HandleData + +p1_api = p4c.HandleAPIRecord( + responseCode = 1, + handle = "21.T12995/lik-1", + values = [ + p4c.HandleRecord( + index = 1, + type = p4c.HandleDataType.URL, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "https://pid4cat.example.org/lik-1", + ), + ), + p4c.HandleRecord( + index = 2, + type = p4c.HandleDataType.STATUS, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p4c.PID4CatStatus.REGISTERED, + ), + ), + p4c.HandleRecord( + index = 3, + type = p4c.HandleDataType.SCHEMA_VER, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "v0.1.0", + ), + ), + p4c.HandleRecord( + index = 4, + type = p4c.HandleDataType.LICENSE, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "CC0-1.0", + ), + ), + p4c.HandleRecord( + index = 5, + type = p4c.HandleDataType.EMAIL, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = "datafuzzi@example.org", + ), + ), + p4c.HandleRecord( + index = 6, + type = p4c.HandleDataType.RESOURCE_INFO, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p1_res_info, + ), + ), + p4c.HandleRecord( + index = 7, + type = p4c.HandleDataType.RELATED, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p1_related, + ), + ), + p4c.HandleRecord( + index = 8, + type = p4c.HandleDataType.LOG, + ttl = 86400, + timestamp = datetime.fromisoformat("2024-05-15T15:51:15Z"), + data = p4c.HandleData( + format = "string", + value = p1_log, + ), + ), + ], ) -c = p4c.Container(contains_pids=[p1]) +c = p4c.Container(contains_pids=[p1_api]) -print(p1) +print(p1_api) print(yaml_dumper.dumps(c)) -print(json_dumper.dumps(p1)) +print(json_dumper.dumps(p1_api)) # write json to file script_folder = Path(__file__).parent - with open(script_folder / "example_p1.json", "w", encoding="utf-8") as f: - f.write(json_dumper.dumps(p1)) + f.write(json_dumper.dumps(p1_api)) diff --git a/justfile b/justfile index 5e4f2d6..9ec64ea 100644 --- a/justfile +++ b/justfile @@ -118,7 +118,7 @@ _test-schema: # Run Python unit tests _test-python: - poetry run python -m unittest discover + poetry run python -m pytest # Run example tests _test-examples: _ensure_examples_output diff --git a/nfdi4cat_details.md b/nfdi4cat_details.md index de147e5..02b7242 100644 --- a/nfdi4cat_details.md +++ b/nfdi4cat_details.md @@ -89,7 +89,7 @@ The PID4Cat schema is mapped to the handle record as follows: |-------|------|-----------|------|-----------| | 1 | URL | 2024-01-01 10:47:38Z | https://pid4cat.example.org/lik-dfi345 | *landing pageURL* | | 2 | STATUS | 2024-02-19 13:40:02Z | REGISTERED | *status* | -| 3 | SCHEMA_VER | 2024-01-01 10:47:38Z | 1.0.0 | *pid_schema_version* | +| 3 | SCHEMA_VER | 2024-01-01 10:47:38Z | v1.0.0 | *pid_schema_version* | | 4 | LICENSE | 2024-01-01 10:47:38Z | CC0-1.0 | *license* | | 5 | EMAIL | 2024-01-01 10:47:38Z | datafuzzi@example.org | *curation_contact_email* | | 6 | RESOURCE_INFO | 2024-01-01 10:47:38Z | {json} | *resource_info* | diff --git a/poetry.lock b/poetry.lock index c95053c..aae0b70 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -396,22 +396,6 @@ files = [ {file = "et_xmlfile-1.1.0.tar.gz", hash = "sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c"}, ] -[[package]] -name = "exceptiongroup" -version = "1.2.2" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -groups = ["main"] -markers = "python_version < \"3.11\"" -files = [ - {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, - {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, -] - -[package.extras] -test = ["pytest (>=6)"] - [[package]] name = "fqdn" version = "1.5.1" @@ -787,31 +771,6 @@ files = [ [package.extras] all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] -[[package]] -name = "importlib-metadata" -version = "8.5.0" -description = "Read metadata from Python packages" -optional = true -python-versions = ">=3.8" -groups = ["main"] -markers = "extra == \"docs\" and python_version < \"3.10\" or extra == \"dev\" and python_version < \"3.10\"" -files = [ - {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, - {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, -] - -[package.dependencies] -zipp = ">=3.20" - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] -type = ["pytest-mypy"] - [[package]] name = "iniconfig" version = "2.0.0" @@ -828,10 +787,10 @@ files = [ name = "isodate" version = "0.7.2" description = "An ISO 8601 date/time/duration parser and formatter" -optional = false +optional = true python-versions = ">=3.7" groups = ["main"] -markers = "extra == \"docs\" or extra == \"dev\" or python_version < \"3.11\"" +markers = "extra == \"docs\" or extra == \"dev\"" files = [ {file = "isodate-0.7.2-py3-none-any.whl", hash = "sha256:28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15"}, {file = "isodate-0.7.2.tar.gz", hash = "sha256:4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6"}, @@ -1026,7 +985,7 @@ name = "linkml" version = "1.8.5" description = "Linked Open Data Modeling Language" optional = true -python-versions = "<4.0.0,>=3.8.1" +python-versions = ">=3.8.1,<4.0.0" groups = ["main"] markers = "extra == \"docs\" or extra == \"dev\"" files = [ @@ -1091,7 +1050,7 @@ name = "linkml-runtime" version = "1.8.3" description = "Runtime environment for LinkML, the Linked open data modeling language" optional = false -python-versions = "<4.0,>=3.8" +python-versions = ">=3.8,<4.0" groups = ["main"] files = [ {file = "linkml_runtime-1.8.3-py3-none-any.whl", hash = "sha256:0750920f1348fffa903d99e7b5834ce425a2a538285aff9068dbd96d05caabd1"}, @@ -1126,9 +1085,6 @@ files = [ {file = "markdown-3.7.tar.gz", hash = "sha256:2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2"}, ] -[package.dependencies] -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} - [package.extras] docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] testing = ["coverage", "pyyaml"] @@ -1235,7 +1191,6 @@ files = [ click = ">=7.0" colorama = {version = ">=0.4", markers = "platform_system == \"Windows\""} ghp-import = ">=1.0" -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} jinja2 = ">=2.11.1" markdown = ">=3.3.6" markupsafe = ">=2.0.1" @@ -1265,7 +1220,6 @@ files = [ ] [package.dependencies] -importlib-metadata = {version = ">=4.3", markers = "python_version < \"3.10\""} mergedeep = ">=1.3.4" platformdirs = ">=2.2.0" pyyaml = ">=5.1" @@ -1513,7 +1467,7 @@ name = "prefixmaps" version = "0.2.6" description = "A python library for retrieving semantic prefix maps" optional = false -python-versions = "<4.0,>=3.8" +python-versions = ">=3.8,<4.0" groups = ["main"] files = [ {file = "prefixmaps-0.2.6-py3-none-any.whl", hash = "sha256:f6cef28a7320fc6337cf411be212948ce570333a0ce958940ef684c7fb192a62"}, @@ -1723,9 +1677,9 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pygments" version = "2.18.0" -description = "Pygments is a syntax highlighting package written in Python." +description = "" optional = true -python-versions = ">=3.8" +python-versions = "*" groups = ["main"] markers = "extra == \"docs\" or extra == \"dev\"" files = [ @@ -1733,9 +1687,6 @@ files = [ {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] -[package.extras] -windows-terminal = ["colorama (>=0.4.6)"] - [[package]] name = "pyjsg" version = "0.11.10" @@ -1873,11 +1824,9 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=1.5,<2" -tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -1992,7 +1941,7 @@ files = [ [[package]] name = "pyyaml-env-tag" version = "0.1" -description = "A custom YAML tag for referencing environment variables in YAML files. " +description = "A custom YAML tag for referencing environment variables in YAML files." optional = true python-versions = ">=3.6" groups = ["main"] @@ -2010,7 +1959,7 @@ name = "rdflib" version = "7.1.0" description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information." optional = false -python-versions = "<4.0.0,>=3.8.1" +python-versions = ">=3.8.1,<4.0.0" groups = ["main"] files = [ {file = "rdflib-7.1.0-py3-none-any.whl", hash = "sha256:240c25c6e1b573ffa67aed23aae128e253c443c15291c9a01d8d392ea80c05b6"}, @@ -2019,7 +1968,6 @@ files = [ [package.dependencies] html5lib-modern = ">=1.2,<2.0" -isodate = {version = ">=0.7.2,<1.0.0", markers = "python_version < \"3.11\""} pyparsing = ">=2.1.0,<4" [package.extras] @@ -2560,7 +2508,7 @@ typing-extensions = ">=4.6.0" [package.extras] aiomysql = ["aiomysql (>=0.2.0)", "greenlet (!=0.4.17)"] aioodbc = ["aioodbc", "greenlet (!=0.4.17)"] -aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing_extensions (!=3.10.0.1)"] +aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing-extensions (!=3.10.0.1)"] asyncio = ["greenlet (!=0.4.17)"] asyncmy = ["asyncmy (>=0.2.3,!=0.2.4,!=0.2.6)", "greenlet (!=0.4.17)"] mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2,!=1.1.5,!=1.1.10)"] @@ -2570,7 +2518,7 @@ mssql-pyodbc = ["pyodbc"] mypy = ["mypy (>=0.910)"] mysql = ["mysqlclient (>=1.4.0)"] mysql-connector = ["mysql-connector-python"] -oracle = ["cx_oracle (>=8)"] +oracle = ["cx-oracle (>=8)"] oracle-oracledb = ["oracledb (>=1.0.1)"] postgresql = ["psycopg2 (>=2.7)"] postgresql-asyncpg = ["asyncpg", "greenlet (!=0.4.17)"] @@ -2580,7 +2528,7 @@ postgresql-psycopg2binary = ["psycopg2-binary"] postgresql-psycopg2cffi = ["psycopg2cffi"] postgresql-psycopgbinary = ["psycopg[binary] (>=3.0.7)"] pymysql = ["pymysql"] -sqlcipher = ["sqlcipher3_binary"] +sqlcipher = ["sqlcipher3-binary"] [[package]] name = "tabulate" @@ -2614,19 +2562,6 @@ files = [ [package.extras] tests = ["pytest", "pytest-cov"] -[[package]] -name = "tomli" -version = "2.0.2" -description = "A lil' TOML parser" -optional = false -python-versions = ">=3.8" -groups = ["main"] -markers = "python_version < \"3.11\"" -files = [ - {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"}, - {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"}, -] - [[package]] name = "tqdm" version = "4.66.5" @@ -2862,32 +2797,11 @@ files = [ {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, ] -[[package]] -name = "zipp" -version = "3.21.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = true -python-versions = ">=3.9" -groups = ["main"] -markers = "extra == \"docs\" and python_version < \"3.10\" or extra == \"dev\" and python_version < \"3.10\"" -files = [ - {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, - {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, -] - -[package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] -cover = ["pytest-cov"] -doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] -type = ["pytest-mypy"] - [extras] dev = ["linkml", "mkdocs-material", "mkdocs-mermaid2-plugin", "schemasheets"] docs = ["mkdocs-material", "mkdocs-mermaid2-plugin", "schemasheets"] [metadata] lock-version = "2.1" -python-versions = ">=3.9,<4.0" -content-hash = "74910983e92e50abf390b3fd35e77cbe05a5587da6a432b78dd19ae07a4d0a29" +python-versions = ">=3.11,<4.0" +content-hash = "4af7be8a96ff2d11a7bff81d52e19ed3da0b94fb517a36fa48b26972c2ffc523" diff --git a/project/excel/pid4cat_model.xlsx b/project/excel/pid4cat_model.xlsx index 91ea56a..ae10962 100644 Binary files a/project/excel/pid4cat_model.xlsx and b/project/excel/pid4cat_model.xlsx differ diff --git a/project/graphql/pid4cat_model.graphql b/project/graphql/pid4cat_model.graphql index 1581be1..156446e 100644 --- a/project/graphql/pid4cat_model.graphql +++ b/project/graphql/pid4cat_model.graphql @@ -9,6 +9,18 @@ enum ChangeLogField LICENSE } +enum HandleDataType + { + URL + STATUS + SCHEMA_VER + LICENSE + EMAIL + RESOURCE_INFO + RELATED + LOG + } + enum PID4CatAgentRole { TRUSTEE @@ -80,9 +92,31 @@ type Agent role: PID4CatAgentRole } -type Container +type HandleAPIRecord + { + responseCode: Integer + handle: String + values: [HandleRecord] + } + +type HandleData { - containsPids: [PID4CatRecord] + format: String + value: String + } + +type HandleRecord + { + index: Integer + type: HandleDataType + data: HandleData + ttl: Integer + timestamp: Datetime + } + +type HandleRecordContainer + { + containsPids: [HandleAPIRecord] } type LogRecord @@ -93,19 +127,6 @@ type LogRecord description: String } -type PID4CatRecord - { - id: Uriorcurie! - landingPageUrl: Uri - status: PID4CatStatus - pidSchemaVersion: String - license: String - curationContactEmail: String - resourceInfo: ResourceInfo - relatedIdentifiers: [PID4CatRelation] - changeLog: [LogRecord]! - } - type PID4CatRelation { relationType: RelationType diff --git a/project/jsonld/pid4cat_model.context.jsonld b/project/jsonld/pid4cat_model.context.jsonld index 8f9acb3..2de5161 100644 --- a/project/jsonld/pid4cat_model.context.jsonld +++ b/project/jsonld/pid4cat_model.context.jsonld @@ -1,17 +1,17 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2025-01-09T12:28:44", + "generation_date": "2025-01-16T23:37:48", "source": "pid4cat_model.yaml" }, "@context": { "xsd": "http://www.w3.org/2001/XMLSchema#", - "DCAT": "http://www.w3.org/ns/dcat#", - "DataCite": "http://purl.org/spar/datacite/", - "dcterms": "http://purl.org/dc/terms/", + "DataCite": "https://purl.org/spar/datacite/", + "dcat": "https://www.w3.org/ns/dcat#", + "dcterms": "https://purl.org/dc/terms/", "linkml": "https://w3id.org/linkml/", "pid4cat_model": "https://w3id.org/nfdi4cat/pid4cat-model/", - "prov": "http://example.org/UNKNOWN/prov/", + "prov": "https://www.w3.org/ns/prov#", "schema": "http://schema.org/", "skos": "http://www.w3.org/2004/02/skos/core#", "@vocab": "https://w3id.org/nfdi4cat/pid4cat-model/", @@ -31,13 +31,13 @@ }, "@id": "changed_field" }, - "contains_pids": { - "@type": "@id", - "@id": "contains_pids" - }, "curation_contact_email": { "@id": "curation_contact_email" }, + "data": { + "@type": "@id", + "@id": "data" + }, "datetime_log": { "@type": "xsd:dateTime", "@id": "datetime_log" @@ -51,11 +51,25 @@ "encoding_format": { "@id": "encoding_format" }, + "format": { + "@id": "format" + }, + "handle": { + "@id": "handle" + }, + "contains_pids": { + "@type": "@id", + "@id": "contains_pids" + }, "has_agent": { "@type": "@id", "@id": "has_agent" }, "id": "@id", + "index": { + "@type": "xsd:integer", + "@id": "index" + }, "label": { "@id": "label" }, @@ -110,6 +124,10 @@ "@type": "@id", "@id": "resource_info" }, + "responseCode": { + "@type": "xsd:integer", + "@id": "responseCode" + }, "role": { "@context": { "text": "skos:notation", @@ -130,22 +148,51 @@ }, "@id": "status" }, + "timestamp": { + "@type": "xsd:dateTime", + "@id": "timestamp" + }, + "ttl": { + "@type": "xsd:integer", + "@id": "ttl" + }, + "type": { + "@context": { + "text": "skos:notation", + "description": "skos:prefLabel", + "meaning": "@id" + }, + "@id": "type" + }, "url": { "@type": "xsd:anyURI", "@id": "url" }, + "value": { + "@id": "value" + }, + "values": { + "@type": "@id", + "@id": "values" + }, "Agent": { "@id": "prov:Agent" }, - "Container": { - "@id": "Container" + "HandleAPIRecord": { + "@id": "HandleAPIRecord" + }, + "HandleData": { + "@id": "HandleData" + }, + "HandleRecord": { + "@id": "HandleRecord" + }, + "HandleRecordContainer": { + "@id": "HandleRecordContainer" }, "LogRecord": { "@id": "LogRecord" }, - "PID4CatRecord": { - "@id": "PID4CatRecord" - }, "PID4CatRelation": { "@id": "PID4CatRelation" }, diff --git a/project/jsonld/pid4cat_model.jsonld b/project/jsonld/pid4cat_model.jsonld index 8b3bfa4..5495f44 100644 --- a/project/jsonld/pid4cat_model.jsonld +++ b/project/jsonld/pid4cat_model.jsonld @@ -24,21 +24,21 @@ "prefix_prefix": "linkml", "prefix_reference": "https://w3id.org/linkml/" }, - { - "prefix_prefix": "schema", - "prefix_reference": "http://schema.org/" - }, { "prefix_prefix": "dcterms", - "prefix_reference": "http://purl.org/dc/terms/" + "prefix_reference": "https://purl.org/dc/terms/" }, { - "prefix_prefix": "DCAT", - "prefix_reference": "http://www.w3.org/ns/dcat#" + "prefix_prefix": "dcat", + "prefix_reference": "https://www.w3.org/ns/dcat#" }, { "prefix_prefix": "DataCite", - "prefix_reference": "http://purl.org/spar/datacite/" + "prefix_reference": "https://purl.org/spar/datacite/" + }, + { + "prefix_prefix": "prov", + "prefix_reference": "https://www.w3.org/ns/prov#" } ], "default_prefix": "pid4cat_model", @@ -387,12 +387,12 @@ { "text": "DATA_OBJECT", "description": "A collection of data available for access or download. A data set might be a data file, a data set, a data collection.", - "meaning": "DCAT:dataset" + "meaning": "dcat:dataset" }, { "text": "DATA_SERVICE", "description": "An organized system of operations that provide data processing functions or access to datasets.", - "meaning": "DCAT:DataService" + "meaning": "dcat:DataService" } ] }, @@ -702,9 +702,209 @@ "description": "The license of the PID4CatRecord was changed." } ] + }, + { + "name": "HandleDataType", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleDataType", + "description": "The type of the handle record element.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "permissible_values": [ + { + "text": "URL", + "description": "The handle record element is of type URL." + }, + { + "text": "STATUS", + "description": "The handle record element is of custom type STATUS." + }, + { + "text": "SCHEMA_VER", + "description": "The handle record element is of type SCHEMA_VER." + }, + { + "text": "LICENSE", + "description": "The handle record element is of type LICENSE." + }, + { + "text": "EMAIL", + "description": "The handle record element is of type EMAIL." + }, + { + "text": "RESOURCE_INFO", + "description": "The handle record element is of custom type JSON." + }, + { + "text": "RELATED", + "description": "The handle record element is of custom type JSON." + }, + { + "text": "LOG", + "description": "The handle record element is of custom type JSON." + } + ] } ], "slots": [ + { + "name": "response_code", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/response_code", + "description": "The response code of the handle API.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/responseCode", + "alias": "responseCode", + "owner": "HandleAPIRecord", + "domain_of": [ + "HandleAPIRecord" + ], + "range": "integer", + "@type": "SlotDefinition" + }, + { + "name": "handle", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/handle", + "description": "The handle of the PID4CatRecord.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/handle", + "owner": "HandleAPIRecord", + "domain_of": [ + "HandleAPIRecord" + ], + "range": "string", + "@type": "SlotDefinition" + }, + { + "name": "values", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/values", + "description": "The values of the PID4CatRecord.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/values", + "owner": "HandleAPIRecord", + "domain_of": [ + "HandleAPIRecord" + ], + "range": "HandleRecord", + "multivalued": true, + "inlined": true, + "@type": "SlotDefinition" + }, + { + "name": "index", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/index", + "description": "The index of the handle record.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/index", + "owner": "HandleRecord", + "domain_of": [ + "HandleRecord" + ], + "range": "integer", + "@type": "SlotDefinition" + }, + { + "name": "type", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/type", + "description": "The type of the handle record.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/type", + "owner": "HandleRecord", + "domain_of": [ + "HandleRecord" + ], + "range": "HandleDataType", + "@type": "SlotDefinition" + }, + { + "name": "data", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/data", + "description": "The meta data stored in PID4CatRecord.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/data", + "owner": "HandleRecord", + "domain_of": [ + "HandleRecord" + ], + "range": "HandleData", + "inlined": true, + "@type": "SlotDefinition" + }, + { + "name": "ttl", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/ttl", + "description": "A time to live in seconds for the handle record. Typically: 86400 => 1 day\nTODO: Research details of ttl meaning for handle API.\n", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/ttl", + "owner": "HandleRecord", + "domain_of": [ + "HandleRecord" + ], + "range": "integer", + "@type": "SlotDefinition" + }, + { + "name": "timestamp", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/timestamp", + "description": "The iso datetime for the last update of the handle data.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/timestamp", + "owner": "HandleRecord", + "domain_of": [ + "HandleRecord" + ], + "range": "datetime", + "@type": "SlotDefinition" + }, + { + "name": "format", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/format", + "description": "The format of the handle data.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/format", + "owner": "HandleData", + "domain_of": [ + "HandleData" + ], + "range": "string", + "@type": "SlotDefinition" + }, + { + "name": "value", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/value", + "description": "The value of the handle data.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/value", + "owner": "HandleData", + "domain_of": [ + "HandleData" + ], + "range": "string", + "exactly_one_of": [ + { + "range": "PID4CatStatus", + "@type": "AnonymousSlotExpression" + }, + { + "range": "string", + "@type": "AnonymousSlotExpression" + }, + { + "range": "PID4CatRelation", + "@type": "AnonymousSlotExpression" + }, + { + "range": "ResourceInfo", + "@type": "AnonymousSlotExpression" + }, + { + "range": "PID4CatRelation", + "@type": "AnonymousSlotExpression" + }, + { + "range": "LogRecord", + "@type": "AnonymousSlotExpression" + } + ], + "@type": "SlotDefinition" + }, { "name": "id", "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/id", @@ -715,10 +915,6 @@ ], "slot_uri": "http://schema.org/identifier", "identifier": true, - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "uriorcurie", "required": true, "@type": "SlotDefinition" @@ -733,10 +929,6 @@ ], "rank": 10, "slot_uri": "http://schema.org/url", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "uri", "@type": "SlotDefinition" }, @@ -746,10 +938,6 @@ "description": "The status of the PID4CatRecord.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/status", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "PID4CatStatus", "@type": "SlotDefinition" }, @@ -759,10 +947,6 @@ "description": "The version of the PID4Cat schema used for the PID4CatRecord.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/pid_schema_version", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "string", "@type": "SlotDefinition" }, @@ -772,10 +956,6 @@ "description": "Information about the resource.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/resource_info", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "ResourceInfo", "inlined": true, "@type": "SlotDefinition" @@ -786,10 +966,6 @@ "description": "Relations of the resource to other identifiers.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/related_identifiers", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "PID4CatRelation", "multivalued": true, "inlined": true, @@ -801,10 +977,6 @@ "description": "The license for the metadata contained in the PID4Cat record.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/license", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "string", "@type": "SlotDefinition" }, @@ -814,10 +986,6 @@ "description": "The email address of a person or institution currently responsible for the curation of the PID record.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/curation_contact_email", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "string", "@type": "SlotDefinition" }, @@ -827,10 +995,6 @@ "description": "Change log of PID4Cat record.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/change_log", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], "range": "LogRecord", "required": true, "multivalued": true, @@ -1078,40 +1242,21 @@ "@type": "SlotDefinition" }, { - "name": "container__contains_pids", - "description": "The PID4CatRecords contained in the container.", + "name": "handleRecordContainer__contains_pids", + "description": "The HandleRecords contained in the container.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/contains_pids", "alias": "contains_pids", - "owner": "Container", + "owner": "HandleRecordContainer", "domain_of": [ - "Container" + "HandleRecordContainer" ], - "range": "PID4CatRecord", + "range": "HandleAPIRecord", "multivalued": true, "inlined": true, "inlined_as_list": true, "@type": "SlotDefinition" }, - { - "name": "PID4CatRecord_curation_contact_email", - "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/curation_contact_email", - "description": "The email address of a person or institution currently responsible for the curation of the PID record.", - "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", - "is_a": "curation_contact_email", - "domain": "PID4CatRecord", - "slot_uri": "https://w3id.org/nfdi4cat/pid4cat-model/curation_contact_email", - "alias": "curation_contact_email", - "owner": "PID4CatRecord", - "domain_of": [ - "PID4CatRecord" - ], - "is_usage_slot": true, - "usage_slot_name": "curation_contact_email", - "range": "string", - "pattern": "^\\S+@[\\S+\\.]+\\S+", - "@type": "SlotDefinition" - }, { "name": "Agent_email", "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/email", @@ -1134,23 +1279,69 @@ ], "classes": [ { - "name": "PID4CatRecord", - "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/PID4CatRecord", - "description": "Represents a PID4CatRecord", + "name": "HandleAPIRecord", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleAPIRecord", + "description": "A handle record for a PID4CatRecord.", "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", "slots": [ - "id", - "landing_page_url", - "status", - "pid_schema_version", - "license", - "PID4CatRecord_curation_contact_email", - "resource_info", - "related_identifiers", - "change_log" + "response_code", + "handle", + "values" ], "slot_usage": {}, - "class_uri": "https://w3id.org/nfdi4cat/pid4cat-model/PID4CatRecord", + "class_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleAPIRecord", + "@type": "ClassDefinition" + }, + { + "name": "HandleRecord", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleRecord", + "description": "A handle record for a PID4CatRecord.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slots": [ + "index", + "type", + "data", + "ttl", + "timestamp" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleRecord", + "@type": "ClassDefinition" + }, + { + "name": "HandleData", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleData", + "description": "The data element in the handle API.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slots": [ + "format", + "value" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleData", + "@type": "ClassDefinition" + }, + { + "name": "HandleRecordContainer", + "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleRecordContainer", + "description": "A container for all HandleRecords.", + "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", + "slots": [ + "handleRecordContainer__contains_pids" + ], + "slot_usage": {}, + "attributes": [ + { + "name": "contains_pids", + "description": "The HandleRecords contained in the container.", + "range": "HandleAPIRecord", + "multivalued": true, + "inlined_as_list": true, + "@type": "SlotDefinition" + } + ], + "class_uri": "https://w3id.org/nfdi4cat/pid4cat-model/HandleRecordContainer", + "tree_root": true, "@type": "ClassDefinition" }, { @@ -1213,7 +1404,7 @@ "role" ], "slot_usage": {}, - "class_uri": "http://example.org/UNKNOWN/prov/Agent", + "class_uri": "https://www.w3.org/ns/prov#Agent", "@type": "ClassDefinition" }, { @@ -1230,36 +1421,13 @@ "slot_usage": {}, "class_uri": "https://w3id.org/nfdi4cat/pid4cat-model/RepresentationVariant", "@type": "ClassDefinition" - }, - { - "name": "Container", - "definition_uri": "https://w3id.org/nfdi4cat/pid4cat-model/Container", - "description": "A container for all PID4Cat instances.", - "from_schema": "https://w3id.org/nfdi4cat/pid4cat-model", - "slots": [ - "container__contains_pids" - ], - "slot_usage": {}, - "attributes": [ - { - "name": "contains_pids", - "description": "The PID4CatRecords contained in the container.", - "range": "PID4CatRecord", - "multivalued": true, - "inlined_as_list": true, - "@type": "SlotDefinition" - } - ], - "class_uri": "https://w3id.org/nfdi4cat/pid4cat-model/Container", - "tree_root": true, - "@type": "ClassDefinition" } ], "metamodel_version": "1.7.0", "source_file": "pid4cat_model.yaml", - "source_file_date": "2025-01-09T12:28:13", - "source_file_size": 16356, - "generation_date": "2025-01-09T12:28:45", + "source_file_date": "2025-01-15T23:58:29", + "source_file_size": 20015, + "generation_date": "2025-01-16T23:37:48", "@type": "SchemaDefinition", "@context": [ "project/jsonld/pid4cat_model.context.jsonld", diff --git a/project/jsonschema/pid4cat_model.schema.json b/project/jsonschema/pid4cat_model.schema.json index 9bb66a2..3b9767d 100644 --- a/project/jsonschema/pid4cat_model.schema.json +++ b/project/jsonschema/pid4cat_model.schema.json @@ -54,14 +54,28 @@ "title": "ChangeLogField", "type": "string" }, - "Container": { + "HandleAPIRecord": { "additionalProperties": false, - "description": "A container for all PID4Cat instances.", + "description": "A handle record for a PID4CatRecord.", "properties": { - "contains_pids": { - "description": "The PID4CatRecords contained in the container.", + "handle": { + "description": "The handle of the PID4CatRecord.", + "type": [ + "string", + "null" + ] + }, + "responseCode": { + "description": "The response code of the handle API.", + "type": [ + "integer", + "null" + ] + }, + "values": { + "description": "The values of the PID4CatRecord.", "items": { - "$ref": "#/$defs/PID4CatRecord" + "$ref": "#/$defs/HandleRecord" }, "type": [ "array", @@ -69,136 +83,173 @@ ] } }, - "title": "Container", + "title": "HandleAPIRecord", "type": "object" }, - "LogRecord": { + "HandleData": { "additionalProperties": false, - "description": "A log record for changes made on a PID4CatRecord starting from registration.", + "description": "The data element in the handle API.", "properties": { - "changed_field": { - "$ref": "#/$defs/ChangeLogField", - "description": "The field that was changed" - }, - "datetime_log": { - "description": "The date and time of a log record.", - "format": "date-time", - "type": [ - "string", - "null" - ] - }, - "description": { - "description": "A human-readable description for a resource.", + "format": { + "description": "The format of the handle data.", "type": [ "string", "null" ] }, - "has_agent": { - "anyOf": [ + "value": { + "description": "The value of the handle data.", + "oneOf": [ { - "$ref": "#/$defs/Agent" + "$ref": "#/$defs/PID4CatStatus" }, { - "type": "null" + "type": "string" + }, + { + "$ref": "#/$defs/PID4CatRelation" + }, + { + "$ref": "#/$defs/ResourceInfo" + }, + { + "$ref": "#/$defs/PID4CatRelation" + }, + { + "$ref": "#/$defs/LogRecord" } ], - "description": "The person who registered or modified the PID record." + "type": "string" } }, - "title": "LogRecord", + "title": "HandleData", "type": "object" }, - "PID4CatAgentRole": { - "description": "The role of an agent relative to the resource.", + "HandleDataType": { + "description": "The type of the handle record element.", "enum": [ - "TRUSTEE", - "OWNER" + "URL", + "STATUS", + "SCHEMA_VER", + "LICENSE", + "EMAIL", + "RESOURCE_INFO", + "RELATED", + "LOG" ], - "title": "PID4CatAgentRole", + "title": "HandleDataType", "type": "string" }, - "PID4CatRecord": { + "HandleRecord": { "additionalProperties": false, - "description": "Represents a PID4CatRecord", + "description": "A handle record for a PID4CatRecord.", "properties": { - "change_log": { - "description": "Change log of PID4Cat record.", - "items": { - "$ref": "#/$defs/LogRecord" - }, - "type": "array" + "data": { + "anyOf": [ + { + "$ref": "#/$defs/HandleData" + }, + { + "type": "null" + } + ], + "description": "The meta data stored in PID4CatRecord." }, - "curation_contact_email": { - "description": "The email address of a person or institution currently responsible for the curation of the PID record.", - "pattern": "^\\S+@[\\S+\\.]+\\S+", + "index": { + "description": "The index of the handle record.", "type": [ - "string", + "integer", "null" ] }, - "id": { - "description": "A unique identifier for a thing.", + "timestamp": { + "description": "The iso datetime for the last update of the handle data.", + "format": "date-time", "type": [ "string", "null" ] }, - "landing_page_url": { - "description": "The URL of the landing page for the resource.", + "ttl": { + "description": "A time to live in seconds for the handle record. Typically: 86400 => 1 day\nTODO: Research details of ttl meaning for handle API.\n", "type": [ - "string", + "integer", "null" ] }, - "license": { - "description": "The license for the metadata contained in the PID4Cat record.", + "type": { + "$ref": "#/$defs/HandleDataType", + "description": "The type of the handle record." + } + }, + "title": "HandleRecord", + "type": "object" + }, + "HandleRecordContainer": { + "additionalProperties": false, + "description": "A container for all HandleRecords.", + "properties": { + "contains_pids": { + "description": "The HandleRecords contained in the container.", + "items": { + "$ref": "#/$defs/HandleAPIRecord" + }, "type": [ - "string", + "array", "null" ] + } + }, + "title": "HandleRecordContainer", + "type": "object" + }, + "LogRecord": { + "additionalProperties": false, + "description": "A log record for changes made on a PID4CatRecord starting from registration.", + "properties": { + "changed_field": { + "$ref": "#/$defs/ChangeLogField", + "description": "The field that was changed" }, - "pid_schema_version": { - "description": "The version of the PID4Cat schema used for the PID4CatRecord.", + "datetime_log": { + "description": "The date and time of a log record.", + "format": "date-time", "type": [ "string", "null" ] }, - "related_identifiers": { - "description": "Relations of the resource to other identifiers.", - "items": { - "$ref": "#/$defs/PID4CatRelation" - }, + "description": { + "description": "A human-readable description for a resource.", "type": [ - "array", + "string", "null" ] }, - "resource_info": { + "has_agent": { "anyOf": [ { - "$ref": "#/$defs/ResourceInfo" + "$ref": "#/$defs/Agent" }, { "type": "null" } ], - "description": "Information about the resource." - }, - "status": { - "$ref": "#/$defs/PID4CatStatus", - "description": "The status of the PID4CatRecord." + "description": "The person who registered or modified the PID record." } }, - "required": [ - "id", - "change_log" - ], - "title": "PID4CatRecord", + "title": "LogRecord", "type": "object" }, + "PID4CatAgentRole": { + "description": "The role of an agent relative to the resource.", + "enum": [ + "TRUSTEE", + "OWNER" + ], + "title": "PID4CatAgentRole", + "type": "string" + }, "PID4CatRelation": { "additionalProperties": false, "description": "A relation between PID4CatRecords or between a PID4CatRecord and other resources with a PID.", @@ -368,13 +419,13 @@ "$id": "https://w3id.org/nfdi4cat/pid4cat-model", "$schema": "https://json-schema.org/draft/2019-09/schema", "additionalProperties": true, - "description": "A container for all PID4Cat instances.", + "description": "A container for all HandleRecords.", "metamodel_version": "1.7.0", "properties": { "contains_pids": { - "description": "The PID4CatRecords contained in the container.", + "description": "The HandleRecords contained in the container.", "items": { - "$ref": "#/$defs/PID4CatRecord" + "$ref": "#/$defs/HandleAPIRecord" }, "type": [ "array", diff --git a/project/owl/pid4cat_model.owl.ttl b/project/owl/pid4cat_model.owl.ttl index b45bc93..571ba06 100644 --- a/project/owl/pid4cat_model.owl.ttl +++ b/project/owl/pid4cat_model.owl.ttl @@ -1,9 +1,11 @@ -@prefix DCAT: . +@prefix dcat1: . @prefix dcmitype: . @prefix dcterms: . +@prefix dcterms1: . @prefix linkml: . @prefix owl: . @prefix pid4cat_model: . +@prefix prov1: . @prefix rdf: . @prefix rdfs: . @prefix sh: . @@ -11,100 +13,110 @@ @prefix sosa: . @prefix xsd: . -pid4cat_model:Container a owl:Class, +pid4cat_model:HandleRecordContainer a owl:Class, linkml:ClassDefinition ; - rdfs:label "Container" ; + rdfs:label "HandleRecordContainer" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:PID4CatRecord ; + owl:minCardinality 0 ; owl:onProperty pid4cat_model:contains_pids ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom pid4cat_model:HandleAPIRecord ; owl:onProperty pid4cat_model:contains_pids ] ; - skos:definition "A container for all PID4Cat instances." ; + skos:definition "A container for all HandleRecords." ; + skos:inScheme . + +pid4cat_model:change_log a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "change_log" ; + rdfs:range pid4cat_model:LogRecord ; + skos:definition "Change log of PID4Cat record." ; + skos:inScheme . + +pid4cat_model:curation_contact_email a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "curation_contact_email" ; + rdfs:range linkml:String ; + skos:definition "The email address of a person or institution currently responsible for the curation of the PID record." ; + skos:inScheme . + +pid4cat_model:id a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "id" ; + rdfs:range linkml:Uriorcurie ; + skos:definition "A unique identifier for a thing." ; + skos:inScheme . + +pid4cat_model:landing_page_url a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "landing_page_url" ; + rdfs:range linkml:Uri ; + skos:definition "The URL of the landing page for the resource." ; + skos:inScheme ; + sh:order 10 . + +pid4cat_model:license a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "license" ; + rdfs:range linkml:String ; + skos:definition "The license for the metadata contained in the PID4Cat record." ; + skos:inScheme . + +pid4cat_model:pid_schema_version a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "pid_schema_version" ; + rdfs:range linkml:String ; + skos:definition "The version of the PID4Cat schema used for the PID4CatRecord." ; + skos:inScheme . + +pid4cat_model:related_identifiers a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "related_identifiers" ; + rdfs:range pid4cat_model:PID4CatRelation ; + skos:definition "Relations of the resource to other identifiers." ; + skos:inScheme . + +pid4cat_model:resource_info a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "resource_info" ; + rdfs:range pid4cat_model:ResourceInfo ; + skos:definition "Information about the resource." ; + skos:inScheme . + +pid4cat_model:status a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "status" ; + rdfs:range pid4cat_model:PID4CatStatus ; + skos:definition "The status of the PID4CatRecord." ; skos:inScheme . -pid4cat_model:PID4CatRecord a owl:Class, +pid4cat_model:HandleAPIRecord a owl:Class, linkml:ClassDefinition ; - rdfs:label "PID4CatRecord" ; + rdfs:label "HandleAPIRecord" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:status ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty pid4cat_model:id ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:pid_schema_version ], - [ a owl:Restriction ; - owl:allValuesFrom [ a rdfs:Datatype ; - owl:intersectionOf ( linkml:String [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; - owl:withRestrictions ( [ xsd:pattern "^\\S+@[\\S+\\.]+\\S+" ] ) ] ) ] ; - owl:onProperty pid4cat_model:curation_contact_email ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:landing_page_url ], - [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:PID4CatStatus ; - owl:onProperty pid4cat_model:status ], - [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:PID4CatRelation ; - owl:onProperty pid4cat_model:related_identifiers ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uri ; - owl:onProperty pid4cat_model:landing_page_url ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:curation_contact_email ], - [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:landing_page_url ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:pid_schema_version ], + owl:onProperty pid4cat_model:handle ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:license ], + owl:onProperty pid4cat_model:response_code ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty pid4cat_model:change_log ], - [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:LogRecord ; - owl:onProperty pid4cat_model:change_log ], + owl:allValuesFrom linkml:String ; + owl:onProperty pid4cat_model:handle ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:curation_contact_email ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:status ], + owl:onProperty pid4cat_model:response_code ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:resource_info ], + owl:allValuesFrom linkml:Integer ; + owl:onProperty pid4cat_model:response_code ], [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:ResourceInfo ; - owl:onProperty pid4cat_model:resource_info ], + owl:allValuesFrom pid4cat_model:HandleRecord ; + owl:onProperty pid4cat_model:values ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:license ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty pid4cat_model:pid_schema_version ], + owl:onProperty pid4cat_model:handle ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:related_identifiers ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty pid4cat_model:id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:resource_info ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty pid4cat_model:license ] ; - skos:definition "Represents a PID4CatRecord" ; + owl:onProperty pid4cat_model:values ] ; + skos:definition "A handle record for a PID4CatRecord." ; skos:inScheme . dcmitype:Collection a owl:Class, @@ -112,109 +124,99 @@ dcmitype:Collection a owl:Class, rdfs:label "COLLECTION" ; rdfs:subClassOf pid4cat_model:ResourceCategory . -dcterms:hasPart a owl:Class, +sosa:Sample a owl:Class, + pid4cat_model:ResourceCategory ; + rdfs:label "SAMPLE" ; + rdfs:subClassOf pid4cat_model:ResourceCategory . + +dcterms1:hasPart a owl:Class, pid4cat_model:RelationType ; rdfs:label "HAS_PART" ; rdfs:subClassOf pid4cat_model:RelationType . -dcterms:hasVersion a owl:Class, +dcterms1:hasVersion a owl:Class, pid4cat_model:RelationType ; rdfs:label "HAS_VERSION" ; rdfs:subClassOf pid4cat_model:RelationType . -dcterms:isPartOf a owl:Class, +dcterms1:isPartOf a owl:Class, pid4cat_model:RelationType ; rdfs:label "IS_PART_OF" ; rdfs:subClassOf pid4cat_model:RelationType . -dcterms:isReferencedBy a owl:Class, +dcterms1:isReferencedBy a owl:Class, pid4cat_model:RelationType ; rdfs:label "IS_REFERENCED_BY" ; rdfs:subClassOf pid4cat_model:RelationType . -dcterms:isRequiredBy a owl:Class, +dcterms1:isRequiredBy a owl:Class, pid4cat_model:RelationType ; rdfs:label "IS_REQUIRED_BY" ; rdfs:subClassOf pid4cat_model:RelationType . -dcterms:isVersionOf a owl:Class, +dcterms1:isVersionOf a owl:Class, pid4cat_model:RelationType ; rdfs:label "IS_VERSION_OF" ; rdfs:subClassOf pid4cat_model:RelationType . -dcterms:requires a owl:Class, +dcterms1:requires a owl:Class, pid4cat_model:RelationType ; rdfs:label "REQUIRES" ; rdfs:subClassOf pid4cat_model:RelationType . -DCAT:DataService a owl:Class, - pid4cat_model:ResourceCategory ; - rdfs:label "DATA_SERVICE" ; - rdfs:subClassOf pid4cat_model:ResourceCategory . - -DCAT:dataset a owl:Class, - pid4cat_model:ResourceCategory ; - rdfs:label "DATA_OBJECT" ; - rdfs:subClassOf pid4cat_model:ResourceCategory . - -sosa:Sample a owl:Class, - pid4cat_model:ResourceCategory ; - rdfs:label "SAMPLE" ; - rdfs:subClassOf pid4cat_model:ResourceCategory . - pid4cat_model:Agent a owl:Class, linkml:ClassDefinition ; rdfs:label "Agent" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:PID4CatAgentRole ; - owl:onProperty pid4cat_model:role ], + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:name ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:name ], [ a owl:Restriction ; owl:allValuesFrom linkml:Uri ; owl:onProperty pid4cat_model:affiliation_ror ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:affiliation_ror ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; owl:onProperty pid4cat_model:orcid ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:affiliation_ror ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom pid4cat_model:PID4CatAgentRole ; owl:onProperty pid4cat_model:role ], - [ a owl:Restriction ; - owl:allValuesFrom [ a rdfs:Datatype ; - owl:intersectionOf ( linkml:String [ a rdfs:Datatype ; - owl:onDatatype xsd:string ; - owl:withRestrictions ( [ xsd:pattern "^\\S+@[\\S+\\.]+\\S+" ] ) ] ) ] ; - owl:onProperty pid4cat_model:email ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:email ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty pid4cat_model:email ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty pid4cat_model:role ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; owl:onProperty pid4cat_model:name ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom linkml:String ; owl:onProperty pid4cat_model:orcid ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty pid4cat_model:name ], + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:email ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:name ], + owl:onProperty pid4cat_model:affiliation_ror ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:orcid ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:role ], + owl:onProperty pid4cat_model:affiliation_ror ], + [ a owl:Restriction ; + owl:allValuesFrom [ a rdfs:Datatype ; + owl:intersectionOf ( linkml:String [ a rdfs:Datatype ; + owl:onDatatype xsd:string ; + owl:withRestrictions ( [ xsd:pattern "^\\S+@[\\S+\\.]+\\S+" ] ) ] ) ] ; + owl:onProperty pid4cat_model:email ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:orcid ] ; + owl:onProperty pid4cat_model:role ] ; skos:definition "Person who plays a role relative to PID creation or curation." ; - skos:exactMatch ; + skos:exactMatch prov1:Agent ; skos:inScheme . a owl:Class, @@ -247,46 +249,120 @@ pid4cat_model:Agent a owl:Class, rdfs:label "STATUS" ; rdfs:subClassOf pid4cat_model:ChangeLogField . -pid4cat_model:LogRecord a owl:Class, +pid4cat_model:HandleData a owl:Class, linkml:ClassDefinition ; - rdfs:label "LogRecord" ; + rdfs:label "HandleData" ; rdfs:subClassOf [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:format ], + [ a owl:Restriction ; + owl:allValuesFrom [ owl:unionOf ( [ owl:intersectionOf ( pid4cat_model:PID4CatStatus [ owl:complementOf [ owl:unionOf ( linkml:String pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ a rdfs:Datatype ; + owl:intersectionOf ( linkml:String [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:PID4CatRelation [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:ResourceInfo [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:PID4CatRelation pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:PID4CatRelation [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:LogRecord [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation ) ] ] ) ] ) ] ; + owl:onProperty pid4cat_model:value ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty pid4cat_model:format ], + [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:description ], + owl:onProperty pid4cat_model:format ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:value ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:has_agent ], + owl:onProperty pid4cat_model:value ] ; + skos:definition "The data element in the handle API." ; + skos:inScheme . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "EMAIL" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "LICENSE" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "LOG" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "RELATED" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "RESOURCE_INFO" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "SCHEMA_VER" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "STATUS" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + + a owl:Class, + pid4cat_model:HandleDataType ; + rdfs:label "URL" ; + rdfs:subClassOf pid4cat_model:HandleDataType . + +pid4cat_model:HandleRecord a owl:Class, + linkml:ClassDefinition ; + rdfs:label "HandleRecord" ; + rdfs:subClassOf [ a owl:Restriction ; + owl:allValuesFrom linkml:Integer ; + owl:onProperty pid4cat_model:index ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:datetime_log ], + owl:onProperty pid4cat_model:index ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:changed_field ], + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:type ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Integer ; + owl:onProperty pid4cat_model:ttl ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:has_agent ], + owl:onProperty pid4cat_model:data ], [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:Agent ; - owl:onProperty pid4cat_model:has_agent ], + owl:allValuesFrom pid4cat_model:HandleDataType ; + owl:onProperty pid4cat_model:type ], [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:ChangeLogField ; - owl:onProperty pid4cat_model:changed_field ], + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:data ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:type ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:timestamp ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:changed_field ], + owl:onProperty pid4cat_model:ttl ], + [ a owl:Restriction ; + owl:allValuesFrom pid4cat_model:HandleData ; + owl:onProperty pid4cat_model:data ], [ a owl:Restriction ; owl:allValuesFrom linkml:Datetime ; - owl:onProperty pid4cat_model:datetime_log ], + owl:onProperty pid4cat_model:timestamp ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:description ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty pid4cat_model:description ], + owl:onProperty pid4cat_model:ttl ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:datetime_log ] ; - skos:definition "A log record for changes made on a PID4CatRecord starting from registration." ; + owl:onProperty pid4cat_model:index ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:timestamp ] ; + skos:definition "A handle record for a PID4CatRecord." ; skos:inScheme . a owl:Class, @@ -299,39 +375,6 @@ pid4cat_model:LogRecord a owl:Class, rdfs:label "TRUSTEE" ; rdfs:subClassOf pid4cat_model:PID4CatAgentRole . -pid4cat_model:PID4CatRelation a owl:Class, - linkml:ClassDefinition ; - rdfs:label "PID4CatRelation" ; - rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:RelationType ; - owl:onProperty pid4cat_model:relation_type ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:related_identifier ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uri ; - owl:onProperty pid4cat_model:related_identifier ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:datetime_log ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Datetime ; - owl:onProperty pid4cat_model:datetime_log ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:relation_type ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:datetime_log ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:related_identifier ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:relation_type ] ; - skos:definition "A relation between PID4CatRecords or between a PID4CatRecord and other resources with a PID." ; - skos:inScheme . - a owl:Class, pid4cat_model:PID4CatStatus ; rdfs:label "DEPRECATED" ; @@ -492,31 +535,16 @@ pid4cat_model:RepresentationVariant a owl:Class, rdfs:label "RepresentationVariant" ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:media_type ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty pid4cat_model:media_type ], + owl:onProperty pid4cat_model:encoding_format ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty pid4cat_model:size ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:encoding_format ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:media_type ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:url ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty pid4cat_model:size ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Uri ; - owl:onProperty pid4cat_model:url ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:url ], + owl:allValuesFrom linkml:String ; + owl:onProperty pid4cat_model:encoding_format ], [ a owl:Restriction ; owl:allValuesFrom [ a rdfs:Datatype ; owl:intersectionOf ( linkml:Integer [ a rdfs:Datatype ; @@ -524,11 +552,26 @@ pid4cat_model:RepresentationVariant a owl:Class, owl:withRestrictions ( [ xsd:minInclusive 0 ] ) ] ) ] ; owl:onProperty pid4cat_model:size ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:url ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty pid4cat_model:encoding_format ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty pid4cat_model:encoding_format ] ; + owl:onProperty pid4cat_model:url ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uri ; + owl:onProperty pid4cat_model:url ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty pid4cat_model:media_type ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:media_type ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:media_type ] ; skos:definition "A representation of the resource in other media types than text/html which is the default for landing_page_url." ; skos:inScheme . @@ -542,63 +585,10 @@ pid4cat_model:RepresentationVariant a owl:Class, rdfs:label "MATERIAL" ; rdfs:subClassOf pid4cat_model:ResourceCategory . -pid4cat_model:ResourceInfo a owl:Class, - linkml:ClassDefinition ; - rdfs:label "ResourceInfo" ; - rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:resource_category ], - [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:RepresentationVariant ; - owl:onProperty pid4cat_model:representation_variants ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:representation_variants ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:label ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty pid4cat_model:description ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:resource_category ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty pid4cat_model:description ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty pid4cat_model:label ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:description ], - [ a owl:Restriction ; - owl:allValuesFrom pid4cat_model:ResourceCategory ; - owl:onProperty pid4cat_model:resource_category ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty pid4cat_model:label ] ; - skos:definition "Data object to hold information about the resource and its representation." ; - skos:inScheme . - -pid4cat_model:change_log a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "change_log" ; - rdfs:range pid4cat_model:LogRecord ; - skos:definition "Change log of PID4Cat record." ; - skos:inScheme . - pid4cat_model:contains_pids a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "contains_pids" ; - skos:definition "The PID4CatRecords contained in the container." ; - skos:inScheme . - -pid4cat_model:related_identifiers a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "related_identifiers" ; - rdfs:range pid4cat_model:PID4CatRelation ; - skos:definition "Relations of the resource to other identifiers." ; + skos:definition "The HandleRecords contained in the container." ; skos:inScheme . pid4cat_model:representation_variants a owl:ObjectProperty, @@ -608,6 +598,23 @@ pid4cat_model:representation_variants a owl:ObjectProperty, skos:definition "The representations of the resource in other media types than text/html." ; skos:inScheme . +pid4cat_model:values a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "values" ; + rdfs:range pid4cat_model:HandleRecord ; + skos:definition "The values of the PID4CatRecord." ; + skos:inScheme . + +dcat1:DataService a owl:Class, + pid4cat_model:ResourceCategory ; + rdfs:label "DATA_SERVICE" ; + rdfs:subClassOf pid4cat_model:ResourceCategory . + +dcat1:dataset a owl:Class, + pid4cat_model:ResourceCategory ; + rdfs:label "DATA_OBJECT" ; + rdfs:subClassOf pid4cat_model:ResourceCategory . + pid4cat_model:affiliation_ror a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "affiliation_ror" ; @@ -622,11 +629,11 @@ pid4cat_model:changed_field a owl:ObjectProperty, skos:definition "The field that was changed" ; skos:inScheme . -pid4cat_model:curation_contact_email a owl:ObjectProperty, +pid4cat_model:data a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "curation_contact_email" ; - rdfs:range linkml:String ; - skos:definition "The email address of a person or institution currently responsible for the curation of the PID record." ; + rdfs:label "data" ; + rdfs:range pid4cat_model:HandleData ; + skos:definition "The meta data stored in PID4CatRecord." ; skos:inScheme . pid4cat_model:email a owl:ObjectProperty, @@ -643,6 +650,20 @@ pid4cat_model:encoding_format a owl:ObjectProperty, skos:definition "The encoding of the representation. https://encoding.spec.whatwg.org/#names-and-labels" ; skos:inScheme . +pid4cat_model:format a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "format" ; + rdfs:range linkml:String ; + skos:definition "The format of the handle data." ; + skos:inScheme . + +pid4cat_model:handle a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "handle" ; + rdfs:range linkml:String ; + skos:definition "The handle of the PID4CatRecord." ; + skos:inScheme . + pid4cat_model:has_agent a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "has_agent" ; @@ -650,11 +671,11 @@ pid4cat_model:has_agent a owl:ObjectProperty, skos:definition "The person who registered or modified the PID record." ; skos:inScheme . -pid4cat_model:id a owl:ObjectProperty, +pid4cat_model:index a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "id" ; - rdfs:range linkml:Uriorcurie ; - skos:definition "A unique identifier for a thing." ; + rdfs:label "index" ; + rdfs:range linkml:Integer ; + skos:definition "The index of the handle record." ; skos:inScheme . pid4cat_model:label a owl:ObjectProperty, @@ -664,21 +685,6 @@ pid4cat_model:label a owl:ObjectProperty, skos:definition "A human-readable name for a resource." ; skos:inScheme . -pid4cat_model:landing_page_url a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "landing_page_url" ; - rdfs:range linkml:Uri ; - skos:definition "The URL of the landing page for the resource." ; - skos:inScheme ; - sh:order 10 . - -pid4cat_model:license a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "license" ; - rdfs:range linkml:String ; - skos:definition "The license for the metadata contained in the PID4Cat record." ; - skos:inScheme . - pid4cat_model:media_type a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "media_type" ; @@ -700,13 +706,6 @@ pid4cat_model:orcid a owl:ObjectProperty, skos:definition "The ORCID of the person" ; skos:inScheme . -pid4cat_model:pid_schema_version a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "pid_schema_version" ; - rdfs:range linkml:String ; - skos:definition "The version of the PID4Cat schema used for the PID4CatRecord." ; - skos:inScheme . - pid4cat_model:related_identifier a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "related_identifier" ; @@ -728,12 +727,13 @@ pid4cat_model:resource_category a owl:ObjectProperty, skos:definition "The category of the resource." ; skos:inScheme . -pid4cat_model:resource_info a owl:ObjectProperty, +pid4cat_model:response_code a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "resource_info" ; - rdfs:range pid4cat_model:ResourceInfo ; - skos:definition "Information about the resource." ; - skos:inScheme . + rdfs:label "response_code" ; + rdfs:range linkml:Integer ; + skos:definition "The response code of the handle API." ; + skos:inScheme ; + skos:prefLabel "responseCode" . pid4cat_model:role a owl:ObjectProperty, linkml:SlotDefinition ; @@ -752,11 +752,27 @@ pid4cat_model:size a owl:ObjectProperty, skos:definition "The size of the representation in bytes." ; skos:inScheme . -pid4cat_model:status a owl:ObjectProperty, +pid4cat_model:timestamp a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "status" ; - rdfs:range pid4cat_model:PID4CatStatus ; - skos:definition "The status of the PID4CatRecord." ; + rdfs:label "timestamp" ; + rdfs:range linkml:Datetime ; + skos:definition "The iso datetime for the last update of the handle data." ; + skos:inScheme . + +pid4cat_model:ttl a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "ttl" ; + rdfs:range linkml:Integer ; + skos:definition """A time to live in seconds for the handle record. Typically: 86400 => 1 day +TODO: Research details of ttl meaning for handle API. +""" ; + skos:inScheme . + +pid4cat_model:type a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "type" ; + rdfs:range pid4cat_model:HandleDataType ; + skos:definition "The type of the handle record." ; skos:inScheme . pid4cat_model:url a owl:ObjectProperty, @@ -766,6 +782,14 @@ pid4cat_model:url a owl:ObjectProperty, skos:definition "The URL of the representation." ; skos:inScheme . +pid4cat_model:value a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "value" ; + rdfs:range [ owl:unionOf ( [ owl:intersectionOf ( pid4cat_model:PID4CatStatus [ owl:complementOf [ owl:unionOf ( linkml:String pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ a rdfs:Datatype ; + owl:intersectionOf ( linkml:String [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:PID4CatRelation [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:ResourceInfo [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:PID4CatRelation pid4cat_model:PID4CatRelation pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:PID4CatRelation [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:LogRecord ) ] ] ) ] [ owl:intersectionOf ( pid4cat_model:LogRecord [ owl:complementOf [ owl:unionOf ( pid4cat_model:PID4CatStatus linkml:String pid4cat_model:PID4CatRelation pid4cat_model:ResourceInfo pid4cat_model:PID4CatRelation ) ] ] ) ] ) ] ; + skos:definition "The value of the handle data." ; + skos:inScheme . + pid4cat_model:PID4CatAgentRole a owl:Class, linkml:EnumDefinition ; owl:unionOf ( ) ; @@ -786,13 +810,86 @@ pid4cat_model:description a owl:ObjectProperty, skos:definition "A human-readable description for a resource." ; skos:inScheme . -pid4cat_model:PID4CatStatus a owl:Class, - linkml:EnumDefinition ; - owl:unionOf ( ) ; - linkml:permissible_values , - , - , - . +pid4cat_model:LogRecord a owl:Class, + linkml:ClassDefinition ; + rdfs:label "LogRecord" ; + rdfs:subClassOf [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:changed_field ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:description ], + [ a owl:Restriction ; + owl:allValuesFrom pid4cat_model:Agent ; + owl:onProperty pid4cat_model:has_agent ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty pid4cat_model:description ], + [ a owl:Restriction ; + owl:allValuesFrom pid4cat_model:ChangeLogField ; + owl:onProperty pid4cat_model:changed_field ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Datetime ; + owl:onProperty pid4cat_model:datetime_log ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:description ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:datetime_log ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:changed_field ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:has_agent ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:datetime_log ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:has_agent ] ; + skos:definition "A log record for changes made on a PID4CatRecord starting from registration." ; + skos:inScheme . + +pid4cat_model:ResourceInfo a owl:Class, + linkml:ClassDefinition ; + rdfs:label "ResourceInfo" ; + rdfs:subClassOf [ a owl:Restriction ; + owl:allValuesFrom pid4cat_model:ResourceCategory ; + owl:onProperty pid4cat_model:resource_category ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:representation_variants ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:label ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:description ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:resource_category ], + [ a owl:Restriction ; + owl:allValuesFrom pid4cat_model:RepresentationVariant ; + owl:onProperty pid4cat_model:representation_variants ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:description ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty pid4cat_model:description ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:label ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:resource_category ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty pid4cat_model:label ] ; + skos:definition "Data object to hold information about the resource and its representation." ; + skos:inScheme . pid4cat_model:ChangeLogField a owl:Class, linkml:EnumDefinition ; @@ -806,13 +903,66 @@ pid4cat_model:ChangeLogField a owl:Class, pid4cat_model:ResourceCategory a owl:Class, linkml:EnumDefinition ; - owl:unionOf ( dcmitype:Collection sosa:Sample DCAT:dataset DCAT:DataService ) ; + owl:unionOf ( dcmitype:Collection sosa:Sample dcat1:dataset dcat1:DataService ) ; linkml:permissible_values dcmitype:Collection, - DCAT:DataService, - DCAT:dataset, sosa:Sample, , - . + , + dcat1:DataService, + dcat1:dataset . + +pid4cat_model:HandleDataType a owl:Class, + linkml:EnumDefinition ; + owl:unionOf ( ) ; + linkml:permissible_values , + , + , + , + , + , + , + . + +pid4cat_model:PID4CatStatus a owl:Class, + linkml:EnumDefinition ; + owl:unionOf ( ) ; + linkml:permissible_values , + , + , + . + +pid4cat_model:PID4CatRelation a owl:Class, + linkml:ClassDefinition ; + rdfs:label "PID4CatRelation" ; + rdfs:subClassOf [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:datetime_log ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:related_identifier ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:relation_type ], + [ a owl:Restriction ; + owl:allValuesFrom pid4cat_model:RelationType ; + owl:onProperty pid4cat_model:relation_type ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:relation_type ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty pid4cat_model:related_identifier ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uri ; + owl:onProperty pid4cat_model:related_identifier ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty pid4cat_model:datetime_log ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Datetime ; + owl:onProperty pid4cat_model:datetime_log ] ; + skos:definition "A relation between PID4CatRecords or between a PID4CatRecord and other resources with a PID." ; + skos:inScheme . a owl:Ontology ; rdfs:label "pid4cat-model" ; @@ -824,14 +974,14 @@ The model describes metadata for the PID itself and how to access the identified pid4cat_model:RelationType a owl:Class, linkml:EnumDefinition ; - owl:unionOf ( dcterms:hasVersion dcterms:isVersionOf dcterms:isPartOf dcterms:hasPart dcterms:isReferencedBy dcterms:isRequiredBy dcterms:requires ) ; - linkml:permissible_values dcterms:hasPart, - dcterms:hasVersion, - dcterms:isPartOf, - dcterms:isReferencedBy, - dcterms:isRequiredBy, - dcterms:isVersionOf, - dcterms:requires, + owl:unionOf ( dcterms1:hasVersion dcterms1:isVersionOf dcterms1:isPartOf dcterms1:hasPart dcterms1:isReferencedBy dcterms1:isRequiredBy dcterms1:requires ) ; + linkml:permissible_values dcterms1:hasPart, + dcterms1:hasVersion, + dcterms1:isPartOf, + dcterms1:isReferencedBy, + dcterms1:isRequiredBy, + dcterms1:isVersionOf, + dcterms1:requires, , , , diff --git a/project/prefixmap/pid4cat_model.yaml b/project/prefixmap/pid4cat_model.yaml index e4149bc..4bdcbe1 100644 --- a/project/prefixmap/pid4cat_model.yaml +++ b/project/prefixmap/pid4cat_model.yaml @@ -1,10 +1,10 @@ { - "DCAT": "http://www.w3.org/ns/dcat#", - "DataCite": "http://purl.org/spar/datacite/", - "dcterms": "http://purl.org/dc/terms/", + "DataCite": "https://purl.org/spar/datacite/", + "dcat": "https://www.w3.org/ns/dcat#", + "dcterms": "https://purl.org/dc/terms/", "linkml": "https://w3id.org/linkml/", "pid4cat_model": "https://w3id.org/nfdi4cat/pid4cat-model/", - "prov": "http://example.org/UNKNOWN/prov/", + "prov": "https://www.w3.org/ns/prov#", "schema": "http://schema.org/", "Agent": { "@id": "prov:Agent" diff --git a/project/protobuf/pid4cat_model.proto b/project/protobuf/pid4cat_model.proto index 3ff3daa..d47acba 100644 --- a/project/protobuf/pid4cat_model.proto +++ b/project/protobuf/pid4cat_model.proto @@ -10,10 +10,32 @@ message Agent uri affiliationRor = 0 pID4CatAgentRole role = 0 } -// A container for all PID4Cat instances. -message Container +// A handle record for a PID4CatRecord. +message HandleAPIRecord { - repeated pID4CatRecord containsPids = 0 + integer responseCode = 0 + string handle = 0 + repeated handleRecord values = 0 + } +// The data element in the handle API. +message HandleData + { + string format = 0 + string value = 0 + } +// A handle record for a PID4CatRecord. +message HandleRecord + { + integer index = 0 + handleDataType type = 0 + handleData data = 0 + integer ttl = 0 + datetime timestamp = 0 + } +// A container for all HandleRecords. +message HandleRecordContainer + { + repeated handleAPIRecord containsPids = 0 } // A log record for changes made on a PID4CatRecord starting from registration. message LogRecord @@ -23,19 +45,6 @@ message LogRecord changeLogField changedField = 0 string description = 0 } -// Represents a PID4CatRecord -message PID4CatRecord - { - uriorcurie id = 0 - uri landingPageUrl = 10 - pID4CatStatus status = 0 - string pidSchemaVersion = 0 - string license = 0 - string curationContactEmail = 0 - resourceInfo resourceInfo = 0 - repeated pID4CatRelation relatedIdentifiers = 0 - repeated logRecord changeLog = 0 - } // A relation between PID4CatRecords or between a PID4CatRecord and other resources with a PID. message PID4CatRelation { diff --git a/project/shacl/pid4cat_model.shacl.ttl b/project/shacl/pid4cat_model.shacl.ttl index 6c812aa..175dadb 100644 --- a/project/shacl/pid4cat_model.shacl.ttl +++ b/project/shacl/pid4cat_model.shacl.ttl @@ -1,34 +1,29 @@ -@prefix DCAT: . +@prefix dcat1: . @prefix dcmitype: . -@prefix dcterms: . +@prefix dcterms1: . @prefix pid4cat_model: . +@prefix prov1: . @prefix rdf: . -@prefix schema1: . @prefix sh: . @prefix sosa: . @prefix xsd: . -pid4cat_model:Container a sh:NodeShape ; +pid4cat_model:HandleRecordContainer a sh:NodeShape ; sh:closed true ; - sh:description "A container for all PID4Cat instances." ; + sh:description "A container for all HandleRecords." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class pid4cat_model:PID4CatRecord ; - sh:description "The PID4CatRecords contained in the container." ; - sh:nodeKind sh:IRI ; + sh:property [ sh:class pid4cat_model:HandleAPIRecord ; + sh:description "The HandleRecords contained in the container." ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:order 0 ; sh:path pid4cat_model:contains_pids ] ; - sh:targetClass pid4cat_model:Container . + sh:targetClass pid4cat_model:HandleRecordContainer . pid4cat_model:LogRecord a sh:NodeShape ; sh:closed true ; sh:description "A log record for changes made on a PID4CatRecord starting from registration." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The field that was changed" ; - sh:in ( "STATUS" "LANDING_PAGE" "RESOURCE_INFO" "RELATED_IDS" "CONTACT" "LICENSE" ) ; - sh:maxCount 1 ; - sh:order 2 ; - sh:path pid4cat_model:changed_field ], - [ sh:class ; + sh:property [ sh:class prov1:Agent ; sh:description "The person who registered or modified the PID record." ; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; @@ -45,102 +40,148 @@ pid4cat_model:LogRecord a sh:NodeShape ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 0 ; - sh:path pid4cat_model:datetime_log ] ; + sh:path pid4cat_model:datetime_log ], + [ sh:description "The field that was changed" ; + sh:in ( "STATUS" "LANDING_PAGE" "RESOURCE_INFO" "RELATED_IDS" "CONTACT" "LICENSE" ) ; + sh:maxCount 1 ; + sh:order 2 ; + sh:path pid4cat_model:changed_field ] ; sh:targetClass pid4cat_model:LogRecord . -pid4cat_model:PID4CatRecord a sh:NodeShape ; +pid4cat_model:PID4CatRelation a sh:NodeShape ; sh:closed true ; - sh:description "Represents a PID4CatRecord" ; + sh:description "A relation between PID4CatRecords or between a PID4CatRecord and other resources with a PID." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class pid4cat_model:LogRecord ; - sh:description "Change log of PID4Cat record." ; - sh:minCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 8 ; - sh:path pid4cat_model:change_log ], - [ sh:class pid4cat_model:ResourceInfo ; - sh:description "Information about the resource." ; + sh:property [ sh:description "Relation type between the resources." ; + sh:in ( "IS_CITED_BY" "CITES" "IS_SUPPLEMENT_TO" "IS_SUPPLEMENTED_BY" "IS_CONTINUED_BY" "CONTINUES" "HAS_METADATA" "IS_METADATA_FOR" dcterms1:hasVersion dcterms1:isVersionOf "IS_NEW_VERSION_OF" "IS_PREVIOUS_VERSION_OF" dcterms1:isPartOf dcterms1:hasPart "IS_DESCRIBED_BY" "DESCRIBES" "IS_PUBLISHED_IN" dcterms1:isReferencedBy "REFERENCES" "IS_DOCUMENTED_BY" "DOCUMENTS" "IS_COMPILED_BY" "COMPILES" "IS_VARIANT_FORM_OF" "IS_ORIGINAL_FORM_OF" "IS_IDENTICAL_TO" "IS_DERIVED_FROM" "IS_SOURCE_OF" "IS_COLLECTED_BY" "COLLECTS" dcterms1:isRequiredBy dcterms1:requires "IS_OBSOLETED_BY" "OBSOLETES" ) ; sh:maxCount 1 ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 6 ; - sh:path pid4cat_model:resource_info ], - [ sh:description "The status of the PID4CatRecord." ; - sh:in ( "SUBMITTED" "REGISTERED" "OBSOLETED" "DEPRECATED" ) ; + sh:order 0 ; + sh:path pid4cat_model:relation_type ], + [ sh:datatype ; + sh:description "The date and time of a log record." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 2 ; - sh:path pid4cat_model:status ], - [ sh:datatype ; - sh:description "The version of the PID4Cat schema used for the PID4CatRecord." ; + sh:path pid4cat_model:datetime_log ], + [ sh:datatype ; + sh:description "Related identifiers for the resource." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path pid4cat_model:pid_schema_version ], + sh:order 1 ; + sh:path pid4cat_model:related_identifier ] ; + sh:targetClass pid4cat_model:PID4CatRelation . + +pid4cat_model:ResourceInfo a sh:NodeShape ; + sh:closed true ; + sh:description "Data object to hold information about the resource and its representation." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype ; + sh:description "A human-readable name for a resource." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path pid4cat_model:label ], [ sh:datatype ; - sh:description "The license for the metadata contained in the PID4Cat record." ; + sh:description "A human-readable description for a resource." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path pid4cat_model:license ], - [ sh:class pid4cat_model:PID4CatRelation ; - sh:description "Relations of the resource to other identifiers." ; + sh:order 1 ; + sh:path pid4cat_model:description ], + [ sh:description "The category of the resource." ; + sh:in ( dcmitype:Collection sosa:Sample "MATERIAL" "DEVICE" dcat1:dataset dcat1:DataService ) ; + sh:maxCount 1 ; + sh:order 2 ; + sh:path pid4cat_model:resource_category ], + [ sh:class pid4cat_model:RepresentationVariant ; + sh:description "The representations of the resource in other media types than text/html." ; sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 7 ; - sh:path pid4cat_model:related_identifiers ], - [ sh:datatype ; - sh:description "A unique identifier for a thing." ; + sh:order 3 ; + sh:path pid4cat_model:representation_variants ] ; + sh:targetClass pid4cat_model:ResourceInfo . + +pid4cat_model:HandleAPIRecord a sh:NodeShape ; + sh:closed true ; + sh:description "A handle record for a PID4CatRecord." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype ; + sh:description "The response code of the handle API." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 0 ; - sh:path schema1:identifier ], - [ sh:datatype ; - sh:description "The URL of the landing page for the resource." ; + sh:path pid4cat_model:response_code ], + [ sh:datatype ; + sh:description "The handle of the PID4CatRecord." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; - sh:path schema1:url ], + sh:path pid4cat_model:handle ], + [ sh:class pid4cat_model:HandleRecord ; + sh:description "The values of the PID4CatRecord." ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 2 ; + sh:path pid4cat_model:values ] ; + sh:targetClass pid4cat_model:HandleAPIRecord . + +pid4cat_model:HandleData a sh:NodeShape ; + sh:closed true ; + sh:description "The data element in the handle API." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype ; + sh:description "The format of the handle data." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path pid4cat_model:format ], [ sh:datatype ; - sh:description "The email address of a person or institution currently responsible for the curation of the PID record." ; + sh:description "The value of the handle data." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path pid4cat_model:curation_contact_email ; - sh:pattern "^\\S+@[\\S+\\.]+\\S+" ] ; - sh:targetClass pid4cat_model:PID4CatRecord . + sh:order 1 ; + sh:path pid4cat_model:value ] ; + sh:targetClass pid4cat_model:HandleData . -pid4cat_model:PID4CatRelation a sh:NodeShape ; +pid4cat_model:HandleRecord a sh:NodeShape ; sh:closed true ; - sh:description "A relation between PID4CatRecords or between a PID4CatRecord and other resources with a PID." ; + sh:description "A handle record for a PID4CatRecord." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype ; - sh:description "Related identifiers for the resource." ; + sh:property [ sh:datatype ; + sh:description """A time to live in seconds for the handle record. Typically: 86400 => 1 day +TODO: Research details of ttl meaning for handle API. +""" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path pid4cat_model:related_identifier ], + sh:order 3 ; + sh:path pid4cat_model:ttl ], [ sh:datatype ; - sh:description "The date and time of a log record." ; + sh:description "The iso datetime for the last update of the handle data." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path pid4cat_model:timestamp ], + [ sh:class pid4cat_model:HandleData ; + sh:description "The meta data stored in PID4CatRecord." ; + sh:maxCount 1 ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:order 2 ; - sh:path pid4cat_model:datetime_log ], - [ sh:description "Relation type between the resources." ; - sh:in ( "IS_CITED_BY" "CITES" "IS_SUPPLEMENT_TO" "IS_SUPPLEMENTED_BY" "IS_CONTINUED_BY" "CONTINUES" "HAS_METADATA" "IS_METADATA_FOR" dcterms:hasVersion dcterms:isVersionOf "IS_NEW_VERSION_OF" "IS_PREVIOUS_VERSION_OF" dcterms:isPartOf dcterms:hasPart "IS_DESCRIBED_BY" "DESCRIBES" "IS_PUBLISHED_IN" dcterms:isReferencedBy "REFERENCES" "IS_DOCUMENTED_BY" "DOCUMENTS" "IS_COMPILED_BY" "COMPILES" "IS_VARIANT_FORM_OF" "IS_ORIGINAL_FORM_OF" "IS_IDENTICAL_TO" "IS_DERIVED_FROM" "IS_SOURCE_OF" "IS_COLLECTED_BY" "COLLECTS" dcterms:isRequiredBy dcterms:requires "IS_OBSOLETED_BY" "OBSOLETES" ) ; + sh:path pid4cat_model:data ], + [ sh:description "The type of the handle record." ; + sh:in ( "URL" "STATUS" "SCHEMA_VER" "LICENSE" "EMAIL" "RESOURCE_INFO" "RELATED" "LOG" ) ; + sh:maxCount 1 ; + sh:order 1 ; + sh:path pid4cat_model:type ], + [ sh:datatype ; + sh:description "The index of the handle record." ; sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 0 ; - sh:path pid4cat_model:relation_type ] ; - sh:targetClass pid4cat_model:PID4CatRelation . + sh:path pid4cat_model:index ] ; + sh:targetClass pid4cat_model:HandleRecord . pid4cat_model:RepresentationVariant a sh:NodeShape ; sh:closed true ; sh:description "A representation of the resource in other media types than text/html which is the default for landing_page_url." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype ; - sh:description "The URL of the representation." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path pid4cat_model:url ], - [ sh:datatype ; + sh:property [ sh:datatype ; sh:description "The encoding of the representation. https://encoding.spec.whatwg.org/#names-and-labels" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -158,42 +199,33 @@ pid4cat_model:RepresentationVariant a sh:NodeShape ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; - sh:path pid4cat_model:media_type ] ; + sh:path pid4cat_model:media_type ], + [ sh:datatype ; + sh:description "The URL of the representation." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path pid4cat_model:url ] ; sh:targetClass pid4cat_model:RepresentationVariant . -pid4cat_model:ResourceInfo a sh:NodeShape ; +prov1:Agent a sh:NodeShape ; sh:closed true ; - sh:description "Data object to hold information about the resource and its representation." ; + sh:description "Person who plays a role relative to PID creation or curation." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The category of the resource." ; - sh:in ( dcmitype:Collection sosa:Sample "MATERIAL" "DEVICE" DCAT:dataset DCAT:DataService ) ; - sh:maxCount 1 ; - sh:order 2 ; - sh:path pid4cat_model:resource_category ], - [ sh:class pid4cat_model:RepresentationVariant ; - sh:description "The representations of the resource in other media types than text/html." ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:order 3 ; - sh:path pid4cat_model:representation_variants ], - [ sh:datatype ; - sh:description "A human-readable name for a resource." ; + sh:property [ sh:datatype ; + sh:description "The ROR of the agent's affiliation." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path pid4cat_model:label ], + sh:order 3 ; + sh:path pid4cat_model:affiliation_ror ], [ sh:datatype ; - sh:description "A human-readable description for a resource." ; + sh:description "Email address of the agent that created or modified the PID record." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; - sh:path pid4cat_model:description ] ; - sh:targetClass pid4cat_model:ResourceInfo . - - a sh:NodeShape ; - sh:closed true ; - sh:description "Person who plays a role relative to PID creation or curation." ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype ; + sh:path pid4cat_model:email ; + sh:pattern "^\\S+@[\\S+\\.]+\\S+" ], + [ sh:datatype ; sh:description "The ORCID of the person" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -209,19 +241,6 @@ pid4cat_model:ResourceInfo a sh:NodeShape ; sh:in ( "TRUSTEE" "OWNER" ) ; sh:maxCount 1 ; sh:order 4 ; - sh:path pid4cat_model:role ], - [ sh:datatype ; - sh:description "The ROR of the agent's affiliation." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path pid4cat_model:affiliation_ror ], - [ sh:datatype ; - sh:description "Email address of the agent that created or modified the PID record." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path pid4cat_model:email ; - sh:pattern "^\\S+@[\\S+\\.]+\\S+" ] ; - sh:targetClass . + sh:path pid4cat_model:role ] ; + sh:targetClass prov1:Agent . diff --git a/project/shex/pid4cat_model.shex b/project/shex/pid4cat_model.shex index 8615a62..b0afb9d 100644 --- a/project/shex/pid4cat_model.shex +++ b/project/shex/pid4cat_model.shex @@ -1,14 +1,13 @@ # metamodel_version: 1.7.0 BASE PREFIX dcmitype: -PREFIX dcterms: PREFIX sosa: PREFIX rdf: PREFIX xsd: PREFIX linkml: -PREFIX schema1: -PREFIX DCAT: -PREFIX prov1: +PREFIX dcterms1: +PREFIX dcat1: +PREFIX prov1: linkml:String xsd:string @@ -61,9 +60,44 @@ linkml:Sparqlpath xsd:string ) } - CLOSED { - ( $ @ * ; - rdf:type [ ] ? + CLOSED { + ( $ ( @linkml:Integer ? ; + @linkml:String ? ; + @ * + ) ; + rdf:type [ ] ? + ) +} + + CLOSED { + ( $ ( @linkml:String ? ; + @linkml:String ? + ) ; + rdf:type [ ] ? + ) +} + + CLOSED { + ( $ ( @linkml:Integer ? ; + [ + + + + + + + ] ? ; + @ ? ; + @linkml:Integer ? ; + @linkml:Datetime ? + ) ; + rdf:type [ ] ? + ) +} + + CLOSED { + ( $ @ * ; + rdf:type [ ] ? ) } @@ -82,23 +116,6 @@ linkml:Sparqlpath xsd:string ) } - CLOSED { - ( $ ( schema1:url @linkml:Uri ? ; - [ - - - ] ? ; - @linkml:String ? ; - @linkml:String ? ; - @linkml:String ? ; - @ ? ; - @ * ; - @ + - ) ; - rdf:type [ ] - ) -} - CLOSED { ( $ ( [ @@ -107,12 +124,12 @@ linkml:Sparqlpath xsd:string - dcterms:hasVersion dcterms:isVersionOf + dcterms1:hasVersion dcterms1:isVersionOf - dcterms:isPartOf dcterms:hasPart + dcterms1:isPartOf dcterms1:hasPart - dcterms:isReferencedBy + dcterms1:isReferencedBy @@ -124,7 +141,7 @@ linkml:Sparqlpath xsd:string - dcterms:isRequiredBy dcterms:requires + dcterms1:isRequiredBy dcterms1:requires ] ? ; @linkml:Uri ? ; @@ -148,7 +165,7 @@ linkml:Sparqlpath xsd:string ( $ (