From 316c98854f0f1a60e9f9179a392ba8b1fc053a64 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Tue, 6 Feb 2024 12:35:21 +0200 Subject: [PATCH 1/6] Add curie_map element to data model --- src/sssom_schema/schema/sssom_schema.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index ee8be21f..1e134dc6 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -69,6 +69,16 @@ types: uri: rdfs:Resource slots: + prefix_name: + key: true + range: ncname + prefix_url: + range: uri + curie_map: + description: A dictionary that contains prefixes as keys and their URI expansions as values. + range: prefix + multivalued: true + inlined: true mirror_from: description: A URL location from which to obtain a resource, such as a mapping set. range: uri @@ -576,6 +586,7 @@ classes: license: required: true slots: + - curie_map - mappings - mapping_set_id - mapping_set_version @@ -719,3 +730,7 @@ classes: - mapping_set_group - last_updated - local_name + prefix: + slots: + - prefix_name + - prefix_url From d5a9ce26f8a0cf058ec967380d3fa42d54834834 Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Wed, 24 Jul 2024 11:44:55 +0100 Subject: [PATCH 2/6] Update the spec to account for curie_map being a proper slot. Now that the SSSOM model formally includes a `curie_map` slot, we can amend the spec to: 1. describe the purpose of that slot in the general description of the model; 2. rephrase the section about that slot in the specification of the SSSOM/TSV format, to remove the notion that this slot is a "supplementary slot" that is specific to the TSV format. --- CHANGELOG.md | 1 + src/docs/spec-formats-tsv.md | 7 ++----- src/docs/spec-model.md | 9 +++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ab083c2..cb437eea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next - Add the concept of "propagatable slots". +- Add the `curie_map` to the model (instead of it being a specificity of the SSSOM/TSV format). ## SSSOM version 0.15.1 diff --git a/src/docs/spec-formats-tsv.md b/src/docs/spec-formats-tsv.md index 6a12dc7f..fe7b0f3d 100644 --- a/src/docs/spec-formats-tsv.md +++ b/src/docs/spec-formats-tsv.md @@ -106,11 +106,9 @@ SSSOM/TSV files MUST be encoded in UTF-8 ([RFC 3629](https://datatracker.ietf.or All identifiers in a SSSOM/TSV file, that is, all the values of slots typed as [EntityReference](EntityReference.md), MUST be serialised in [CURIE syntax](https://www.w3.org/TR/curie/). SSSOM/TSV parsers SHOULD reject files containing identifiers serialised as IRIs. -To allow unambiguous resolution of all CURIEs present in a SSSOM/TSV file, the metadata block MUST contain an additional `curie_map` field, which is a map of prefix names to IRI prefixes. The `curie_map` field SHOULD appear at the beginning of the metadata block. +As stated in the description of the model ([Identifiers section](spec-model.md#identifiers)), all prefix names used in CURIEs MUST be declared in the `curie_map` slot of the mapping set object, unless the prefix is a “built-in” prefix (in which case it MAY be omitted). SSSOM/TSV parsers MUST reject a file with undeclared, non-built-in prefix names. -Any prefix name used in a SSSOM/TSV file MUST be declared with a corresponding entry in the CURIE map. SSSOM/TSV parsers MUST reject a file with undeclared prefix names. - -Prefix names listed in the table found in the [IRI prefixes](spec-intro.md#iri-prefixes) section are considered “built-in”. As such, they MAY be omitted from the CURIE map. If they are not omitted, they MUST point to the same IRI prefixes as in the aforementioned table. +A SSSOM/TSV writer SHOULD refuse to serialise a mapping set that contains IRIs that cannot be contracted into CURIEs because there is no suitable prefix declaration in its CURIE map. The use of a custom, ad-hoc logic to infer a possible prefix name where none has been provided (e.g., “if the IRI ends with a `ZZZ_NNNNNNN` pattern, turn it into a `ZZZ:NNNNNNN` CURIE”) is strongly discouraged. ## Propagatable slots @@ -203,7 +201,6 @@ When writing the metadata block, a canonical SSSOM/TSV writer: * MUST serialise multi-valued slots as YAML “block sequences” ([YAML Specification §8.2.1](https://yaml.org/spec/1.2.2/#821-block-sequences)) – even when the list of values contains only one item; * MUST serialise scalar values in YAML “plain style” ([YAML Specification §7.3.3](https://yaml.org/spec/1.2.2/#733-plain-style)) whenever possible, otherwise in “double-quoted style” ([YAML Specification §7.3.1](https://yaml.org/spec/1.2.2/#731-double-quoted-style)); * MUST serialise the slots in the order they appear in the [“Slots” table](MappingSet.md#slots), in the documentation for the `MappingSet` class; -* MUST write the `curie_map` at the beginning of the block, before any other slots; * MUST NOT include in the CURIE map the prefix names that are considered “built-in”; * MUST NOT include in the CURIE map any prefix name that is not used anywhere in the set; * MUST sort the prefix names in the CURIE map in lexicographical order. diff --git a/src/docs/spec-model.md b/src/docs/spec-model.md index b99f5c3b..50349689 100644 --- a/src/docs/spec-model.md +++ b/src/docs/spec-model.md @@ -23,6 +23,15 @@ The `MappingSet` class represents, well, a set of individual mappings, which are Of note, within a set, a mapping may not necessarily be uniquely identified by the combination of its four mandatory slots (`subject_id`, `predicate_id`, `object_id`, and `mapping_justification`). A set may very well contain several mappings with the same subject, predicate, object, and justification, but that differ on some of the other, complementary slots. +## Identifiers + +Throughout the model, identifiers to external resources are represented using the custom type [`EntityReference`](EntityReference.md) (based on the LinkML type [`uriorcurie`](https://w3id.org/linkml/Uriorcurie)), which accepts both full-length IRIs and [CURIEs](https://www.w3.org/TR/curie/) as possible identifier formats. (Note however that serialisation formats may mandate the use of one identifier format over the other; for example, the [SSSOM/TSV](spec-formats-tsv.md) format requires the systematic use of CURIEs, whereas the [OWL/RDF](spec-formats-owl.md) format conversely requires the systematic use of IRIs). + +Whenever the CURIE syntax is used in a mapping set (whether this is by choice of the SSSOM producer, or because it is mandated by the serialisation format), all CURIEs MUST be unambiguously resolvable into corresponding full-length IRIs without requiring any external resources. This means that any prefix name used MUST be properly declared in the set’s `curie_map` slot, which is a dictionary associating a prefix name to an IRI prefix. + +By exception, prefix names listed in the table found in the [IRI prefixes](spec-intro.md#iri-prefixes) section are considered “built-in”. As such, they MAY be omitted from the `curie_map`. If they are not omitted, they MUST point to the same IRI prefixes as in the aforementioned table. + + ## Propagation of mapping set slots As mentioned briefly above, there are two different types of slots in the `MappingSet` class: From ea2d40be7c5033f4b65ac9bab11cdcc4d296525c Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Wed, 24 Jul 2024 11:54:28 +0100 Subject: [PATCH 3/6] Add link to GitHub issue in description of the `curie_map` slot. --- src/sssom_schema/schema/sssom_schema.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 3c653633..1915917f 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -82,6 +82,8 @@ slots: range: prefix multivalued: true inlined: true + see_also: + - https://github.com/mapping-commons/sssom/issues/225 mirror_from: description: A URL location from which to obtain a resource, such as a mapping set. range: uri From ff17a808e78c13858b9a118e747ffeb2238f5c83 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Sat, 3 Aug 2024 09:52:15 +0300 Subject: [PATCH 4/6] Adding curie_map example just for completeness of requirements --- examples/schema/curie_map.sssom.tsv | 13 +++++++++++++ src/sssom_schema/schema/sssom_schema.yaml | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 examples/schema/curie_map.sssom.tsv diff --git a/examples/schema/curie_map.sssom.tsv b/examples/schema/curie_map.sssom.tsv new file mode 100644 index 00000000..7fb2fc7c --- /dev/null +++ b/examples/schema/curie_map.sssom.tsv @@ -0,0 +1,13 @@ +#curie_map: +# HP: http://purl.obolibrary.org/obo/HP_ +# MP: http://purl.obolibrary.org/obo/MP_ +# orcid: https://orcid.org/ +#mapping_set_id: https://w3id.org/sssom/commons/examples/curie_map.sssom.tsv +#license: "https://creativecommons.org/publicdomain/zero/1.0/" +#creator_id: orcid:0000-0002-7356-1779 +#mapping_provider: "https://w3id.org/sssom/core_team" +#comment: This is an example file for the SSSOM for illustration only. Its contents are entirely fabricated. +subject_id predicate_id object_id mapping_justification +HP:0009124 skos:exactMatch MP:0000003 semapv:ManualMappingCuration +HP:0008551 skos:exactMatch MP:0000018 semapv:ManualMappingCuration +HP:0000411 skos:exactMatch MP:0000021 semapv:ManualMappingCuration diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 1915917f..374075b5 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -84,6 +84,8 @@ slots: inlined: true see_also: - https://github.com/mapping-commons/sssom/issues/225 + - https://github.com/mapping-commons/sssom/pull/349 + - https://github.com/mapping-commons/sssom/blob/master/examples/schema/curie_map.sssom.tsv mirror_from: description: A URL location from which to obtain a resource, such as a mapping set. range: uri From ece5aa59aab4d9a6f67859077b3af9c7f6a902d1 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Sat, 3 Aug 2024 14:02:36 +0300 Subject: [PATCH 5/6] update curie_map example to use multival yaml syntax While the single value is allowed, we want to discourage it. Thanks @gouttegd for the note about this! --- examples/schema/curie_map.sssom.tsv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/schema/curie_map.sssom.tsv b/examples/schema/curie_map.sssom.tsv index 7fb2fc7c..1dfc3549 100644 --- a/examples/schema/curie_map.sssom.tsv +++ b/examples/schema/curie_map.sssom.tsv @@ -4,7 +4,8 @@ # orcid: https://orcid.org/ #mapping_set_id: https://w3id.org/sssom/commons/examples/curie_map.sssom.tsv #license: "https://creativecommons.org/publicdomain/zero/1.0/" -#creator_id: orcid:0000-0002-7356-1779 +#creator_id: +# - orcid:0000-0002-7356-1779 #mapping_provider: "https://w3id.org/sssom/core_team" #comment: This is an example file for the SSSOM for illustration only. Its contents are entirely fabricated. subject_id predicate_id object_id mapping_justification From 367058eebab633e5b7cc077f7a0e90301bb6380d Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Mon, 5 Aug 2024 10:23:37 +0100 Subject: [PATCH 6/6] Commit re-generated files. --- project/excel/sssom_schema.xlsx | Bin 7038 -> 9438 bytes project/graphql/sssom_schema.graphql | 53 + project/jsonld/sssom_schema.context.jsonld | 215 ++- project/jsonld/sssom_schema.jsonld | 673 +++++++- project/jsonschema/sssom_schema.schema.json | 1370 ++++++++++------- project/prefixmap/sssom_schema.yaml | 4 + project/protobuf/sssom_schema.proto | 52 + project/shacl/sssom_schema.shacl.ttl | 704 ++++++--- project/shex/sssom_schema.shex | 86 +- project/sqlschema/sssom_schema.sql | 550 ++++++- .../context/sssom_schema.context.jsonld | 215 ++- src/sssom_schema/context/sssom_schema.jsonld | 673 +++++++- src/sssom_schema/datamodel/sssom_schema.py | 384 ++++- 13 files changed, 3926 insertions(+), 1053 deletions(-) diff --git a/project/excel/sssom_schema.xlsx b/project/excel/sssom_schema.xlsx index 682cb48693b9647ceb74f8fca987ebff40de9e7a..c86f276f9f9a36ff193bd6681e1c0bbe2e635c96 100644 GIT binary patch delta 5616 zcmZ8l1z1$k)*U*B24U##A*7_cbLf%o?vxmi5)cpuP&yNB;6A;*s=Yl3ZVwxG zYi%!g4{shz4-asFtBXdW22Kwzf&7i??vk7S5gi}h)a#X@AZ1~p7dCQ!QJ2BGh@=Ja zFTBrNNr#R482tsK`$|Izhm-(~IEuY;ljRgj%pgZ28tJjXc;Y$xKBgLV%0UzhQuT*p zS(nt`8br6L+6C9xcPpBrUS<2dbmC(>f9ZUh7&X&Q+vxtw60HkRbKa%EiFu@S5ZF2 z89cwaoHHoGlWii*v!>)t>95~0U5Afbj^fG70GL9gOCgd3p_u-zK5^0Zi*ni*a{Gj; zW9|rg_Seb?wviqe8`k29I{x4RJ0f!6Y`&ZpR$O}+3`dRJ^rFsE)$W~^UrB5Ahc>6R z=mhM5peMl@=^rb#irN(o)Lus=mX#&^2+$GvnGjh~C_Z`(&Ns#-Mx{ono_iEnbwJxl zY4Eb$#O@NjF8sKY$d>v1YlzR)P8X)B^S80&Dt@=Re$kJouZA43oM!Br$Zn zJ6{e@uWDW+0|2Tx@GD#j7~h@$_S4OE7kF{IyHvp+sT^C5x1Ts3=0_pOpCiItc_f5& zDBmWg&0$k7hkD84Y-X1PE$h1UOR1!%Djy?{F4_S|E{D<@uXq_bp6J-XalI`4YXPI~ zB@SLP?Sggh$uNKn!^%k!f zjPbugouC8v;U0t?;GhRkR(&tx$8cr-+TC4GOXD9j*b6F86jwHy72fM!vU@7xpA}zE z>zA#YPe)%WceIWbou8`PUws)m0qTVMZY=zOTp5!Be!4So;p#{Xr@jjfAVFtWS18{h zd$4`vReojoKnGsg#ciQ#K32npWJ;&C zRuvRCpI>S?(>uqb1}o?>U5)w>%OjN%3-NERlxoj9q0I}?3oEBhLXxB#IMX4-hN;A0 zxz)~8mY)Sx0_QUsHtXf6o4?&?9-q`_Tz|34ULf6OM{@pkL4zg*9cen2qNE0p}DYk_pOp@p?rOs~9Q#l9?Sb`9Uce9zV@<1q?sprqkIA}+zb z1)SwBsNd9wjxV-Nr>hP(M`3L)(ecR$t4N%EQ7`7^aRn7aD#*bl=W02h!x!wRwenSY zEQz-)XlJmU7*(j%2R8=xv>iNIlQKG;o_Xq~H*hkT#{f3(cax#)mwQA7f{^{wOp|!3 zPtsrYPW(-=8?3i?z?H;o4ueIyAK=PY%Vquzt4`%i;g&`7BJeTurpFnW>kgZKR8@o3 z?CCQ>9eX#mmorA4#IsKZ+KKE~TEa-xTSCR!V#Lcbp4e3gM=Fr!U=dlGaX-xUMKq&a zhQ=w=S0rRn7_OhL@cgZq$TaT@1PTDaPH?Xh{(F_Y(r{l8A&9<-%dgX!Q|z*sMb9pp zvuoP5%h8zMvKpV7wbJm^^CA(x35|h#V?lC6Q<#{{l~24J!DT<8{)()9s9%Tnt~6&NSV z10hdeW9%S*R8SM#=fwf8cLTVL&t}q-dD;WZN1v~I$>osMkeR%6oQcc;?juA#y2btJ zas!H(mT+JV6;SI-ILzLJ*B`=>fhq0yh@{6N=v5t@nwtw9GvAf;v?N^)7xRROyMJ*< zMOaVe>1p;eg=Dcjs+6yCOk6ngfJv1ZN@hu)cb zGG(?t`IS~@S{9s5xV>7H(O#O^%Eq0ZkFw(VfDH`++BXf8h^=kM_S!^vygO`dF={Pc za)@n#vezJ8B#|dzl>7|AAW{2K86n173mX`R=%w-R_0P-`;-{D%tpP>OVVqmiQ+oM8 z{O@uYB$PXW&+9xsETA&1O8QyVhQS7vhrY_yuA2Jj)Oy_XNmntc5um;ZoT)Bs z^Tc!Jl-ua~$oQbi!Zcvi#J6%rd3c7}NMK#-BQieIWsCDmJu-KF8oj4HrY-{eSzriu z7AIqU;rMi}!jF(aVk-yIF<2qd4S_hXXi{Z9hI(>O+fZhYmgZ7Sny2t6;y zueSCU*^}rOD<*w%dN;=zc!g2j$AJ?sQgBLDi=#HHYCVWtkA5rc$->^NVfB2rl$zjJ z1(3;#;mS-f6l7NfP8iV(cjgnO(u+emUc}|&jTWZKS`A?=vZ@KJPp%zc&ePBaF2p*M zWwjg6gOiOYf1dG&TsZj`Nl+(hVqCp+H}41>9b80iVkN5}UIf9I+;Htn-t1;eJ*4e8 z8}Oel3~?aIOxjn1zJh6Z>z#eJOmW(L#`v34rmEi}GgMx6aIRBojE0p|%}bJM6lR{% z{5f{2rzO|Dp+aJ{*etxbZD6Y|*oAO_uHli?J4zkdTsAl-SfXKEqDkgP-)M{D>s;{W zdFLmxmyI*%ZkZ zPsc8d5*^QDm2NUoi$e1A>FjTlA$p=TyM0{wzk_J@AD zp2jCbM@WxqeH_^1l&mr9$#vFREgjz|4CqF*?k6^i)8qmEC0A~mx@BX;Ge@kE#>6YT zNx_FzIvmHn!HaC1`YqOt^2j1d)<|*)LiW^xUJd_1BvIE2OR|;K(;=bQM1_~;`yK)4 zrPMj^mCLfcH2oWQMiC{ygso{5380MggaG9211YFlyNVD3YlrU$Y$IK-S8(hO`yPTy zGQSf;FxCw$6-8alQLv zf#iEqzXO>Lk^3(nA>;60pRlcnUbzKeQd18jB7v8L*~%#iPLx^wgQTDy*gUq=|<*? ze7A#wwjc@Fo0MT6&7XMIJg%e*@V|P*K{FPK$#u-St=k9TF8B;}8aRbW z_jPN85mH&q?cb6pcNrN;ur3Ba?LQ;IU5D~2w}lE7VgUZt27Q;X;CI{ z=Dey4CIaPCJyw9c@m}LZN;4Cf8kRJ9FhHzTs}-D>lw*T(Vd{XyHurd477Q(P1KYAa zuHi7T#7J~^`ffm2+L>H%n*S!*CZSz(^08x@U*UU2m(6(GApUv8Fl#}R!LK|taw;!A zVkHY$RaUy9G?{TJXco}ntG=R_>%-xSKuZ80Yj3Yv3Yn`vuU#|kB>=B6;ngWD_HPsq zD}W@z!&3?)*VZZ1E!6d_Sj{nXJl#MUFOPMu9kcWHUG>A5Gx1Gzvf_i1^|UL#jDuqA zMMiwQ8_&y>NizoNk3DA@IIRgDdlmS3s!%$dJa;~jM{{qS{;gHYWs@?i9BCVv&wX9+ znkpts zyTqhj|LYz!W52JTV~Ro1ZILUb0n3m-zKZSDiw zqnD4TXLL|&$mU5OjALK#?IFMEHwM|oG;6IiuBa=T0S9Z4)F==*c7Ji)< z(7#Ulc=B=b(#qYQp>jNAKKeIAqO3A}nu^NZBRG6gy~!|MD_TRJAd#ZjvZ7E^#)&;v zsEFA$BNEc|DYhb9+s~3bQ?~A0xw3lmSl*O9cqrc++O>i9@VIVT<-A)ajL%a#R`yt`d;qmO2^9gto z2`!9y7-gKVk)CB3i1{iKfV3v*y!080m$uHgvg-*2a*%RVL-RT>HLp)Y^7lm}tDg8z z4>E7I+PS40lf{FwW0eY!cp5lfJmjKxeW$H&)UD6vhbL}7Ib@SeXw*v{Tv;32`uZw{ zloDBY02G$9uRWGO^I#jpHmT@cC<%F-4+J(`GQ!y-c`Z<+-C@}$2;E3BX}Te+_u83Q zWle3#bs*iV=>kUPA?j*BqMY?4JRBMG8ZL5pfgS?;R{eAjb5V;6=PN+Bb!Sn z3DFjeVhGe)Mjdt>_rE{4;srOlj0`+ub}{eW#oVY5y66ph>D3u?V&=g|+7}XKBo#70 zm^-#LXutL@r{QHv(2+kPbs1f>`3AIx^S8rFH$R6=-u4>o(csi%^sp&0ydGX$^py(v zM}TO^upBqBnqePW;hLoUf_yEZN6;I75;a_|XX?qWn`gq0B&?j9Yb8D>F!~rqBFHd~`_hB(Kx{&1CPYaBL%27BYTgv)}A# zj776CtN@hUAWC6QZw~_<>`$?f=k>cNPjg7w&u?!>863ImFv;rx3X2K2Q3(2FNigW3 zSQ8uo9R_(7Kw$$x6^xxBv|gEbTR;9P%lu$_l}B@L@Z@tUhP@br^y23$;=kWlK(a>Z z;q7V!VgLZdx9|N}&fU$&*3HLUFVMr*8)kYJ5k~bt+=gF*%QUtb4o`M%rm649CIuLw z-Aq{napos(Y8PiNL{Ka}=o`9ZwaNf{`vI|(j)0}W?lQi4D>6g*YctFdPF^D2ZG=~` z4?=luxrWSatHC7Vl}4#|vY46$dqFy*8JMOZl~Q9uw|Ai|dvpx|THh(aXoSLyxjJSz zUiSIcHuMXpZRpZ(j^Rb5orqXUQ^md}GTl{*3R(X^CaaAm&q=Xk42q6b#3{-_SJ(2U z^4uMUY-%?LTQ@T+&`OgTA-$Mz)DnHfs3C5%(`6U|^buesrD(+-V=N_G@#+ZSa`j)! zz(g*87$dICf3`v_n-zf6@7}K!*mDS;GG$?FwLO2;wH3V5HTB+wOR;*;YQv68(QVMm zMv{!t|Hg4+wB_Qh`?jA(g5FOHX`i<%C%1Je5;6(OKV3JtE4d);T@d)IrFBdDe?MVJ zHMb2ex_g@plWax;bO0cm^*^rpV>6mU!EkT#r~Lx}kpFl5_8brMr97pUv;T zHnKQyBp@j~hl23l@K5dhui+#7TSE|hhXVIMq0EH>guF-u_rwRm!64jw@SlYKFSv^2 z?kRkNcPr^%QvM|Se^E|k_o(~y|1auK*7_H<```{mdY{MsMZqOOAY>B?I21%_e8)?Z z(q3HmEmvf>?K7PJ{J(%bRPZqn^*tYd;s^i$ w`pd|l22M{#W%%!1{}tkYF=0qgY5$ewy(+cU&~6vU-4yTvYqwL`qPx5LKQyqgE&u=k delta 3286 zcmZ8j2Q*w;7oO33ucONly|*B0l)(r>A_$%y45I}hGlWc{htVTSv>?$-#8XE}z%>pSOsd!PNCy{91OGAstVxOj8`0DuT!7j@V}(bsnB`;4mICszrv={M%x#q?~T`*!~s0*F#+lET*IPLqn_W9%lg05>0u2tkwwze+dvtM52 zGLxfj3TB(xS~Lt}Uh6nYgiGQE5gyWG#W5Bq(h4;G6jb}vAH)5T+{bhqk4nS)C0UyU zpBWK`7V>R0bMt3wH-rB=wXtK&?ThF~hPp8@k&kAzrE|yo6U!!wjUGB;(u5Y6#$SL? zTpX(@x-1D>2YZJSq8U}sz(X!}Moe8kDjFhRR=APu3c%^`If;{^Acq8AxO{*`h0Bha zdvzTlZ_&HLig#ayRy`lcoEHDk*j1`U>`jLbr#zWH$N14}0~^nw2%O(zQ!x&_O+azE zkA9kacLs3)00J_!Atf_fnFt>ll?b~xE=JbTs3Xc@&0jZ;@qlgOL^jLF+$V4iKzp%O ziOU%}2nq+Dd=?%={<1KZsZ%xC&8WE!8j9vI>+nZMyVlYHW74mCI?Q)Fev(>WICNsT#$4_h-tL}q3?cbZ zSR>UoM6AfV+J%nL3LmsXF2JSXvz6#rijYzsq|+E&mvO;wa!X%o`)mzWFASCL3_Bw# zszqc{7{!}NmQrtt;X7-Ts`zsJ5d%)l&XfQ~Dx7e2K{nX)`v?RjWoNkew8Gli9t6Y% zfgjwZorsP&17}68$`6QizL}!sh=annG|2)J$=;_sdvAvzAS%dy)gEwnbKC%4=z0UM z_+yMaO~J!w+VWHW;c?X`BEiE>iJY%E2aNCcJ!6~~F-q&0T46exx3{asTbdX5N_q95 zd9etO_i5l6H~b|=`QF3+TNbGTg?NodAC?a`=?W5x^ol-YnL0DRYjF2hi`4joOXt)J z-r+<4ZqS|F_=C1M(qQ-q;lOc6J5-}=WVHKev$D@zc@g=&$dCTSE$N5|eq;6M95-KFYV% zxm|}bsVCm>SzLs&R!#?G*_Xro;;Yr~8bGho+yF{cP|y|tuas~*8XhQ*Rf0JYRtfA_ z6^whn5u-v`y_f|)A4p;64M{0`n+F-MES?0z+?kjevdv13&E|fr*R{ONk!+dkjO(pA z_O04dn0hyrOcV6HF`=+aPADujf=}Whae|oRs7lvelEDPd^i>}_5IOf|rjAC5X11&$ zj~yGYM~%z~BvP3FA;y9*@1sCgMqVZou0YX)!L+Cq>#j1q1G}|?5>vJ&Zc*L=wtiS`QmM3PdvKS-i%(_fH-W6tANUMj$3}4-E>SyV#*?=hov&r1 zdh*S777wY;3k3l`&53a(jVUGaJy{z_Ls&`r1k7d*KnIX|M4}(RHn^-EmWhN_L(;wn z-;R^*9J~J*k~+eZaR3Q{wCo@Uv@Q{z) zO{$F?YH0A{^Ac3ktz^A#sEJkOy%%3TMG#lj*^MaagwgX6`pp}%nzrdUObi!?Dj&?| zJv#d#qrXz%;gJz&v3VBAu9=Qpju~$t@-y0Dq#Q0f{K>f$I#XLx1d580AY8X@JTg`D z-fy!Z@>SdI?^t?n(RMu5A-x_xZZKMt7gN7mMS!HPkPrs*jVO3;*5(iFg>1r~a5dzU zMb7TA0TF)DzqXYF@Buk$%-&*+$4rm)NckVf!qQ;UD?WHR{m{K*Rg@lm9q(Ds9amLC zt8xE0=}Ggfk#d>f=g-xnx~Iy$R^EoK^M*nl`vt)*g)E7#=b7sS2usd>4;$#-A(H!u z@LHQcE-P+E;}VD)aWWjRwFc1-Y5Tj znEKQtIQG1A$XdPF+YbElb#;NDu5qcivwM@LJculhKR7Y6`ak(L+JTGF zl+jyjLb~;a3zglirO-cd#S1xhc*g?KweEC@NAd@0VJn;fU2qRn1C!Le095nfZRZ-R zs8jD!(fta)>t>ZbDU;l*IrcM~S)+#cKIls;`h%^%6m_dfA81Zx6oWSzQGQ=8n>4M@DvcaYDc%soWTo;U3lFC#vm@2Q8aig^v&)}(hqTQr^EjEPB)8>3 zn66}I-@;QrT1)$qeORyMS~j|Eq^WMY{1ET=oq=?cy0u)kF}MH#2y6XZMXfyTUA@q6 z*=dpJTNEK;R2n5VM*uxjHEN&?ZF!#z--d0+>5Jh9S5}?67{d)ISY`Xh{6*PHWBEH5Dsv3 zY*&a|a#x^CuGBOa>PLN1CJMI4)wJ1AG%X$!VS)sb3C`NrCJItjtn69Fchi`5zMt1- z+`ajJQS;u;#E!IpV}w*tyOjT0@Z0;bI-6AjJV=j6uCRS|o)e=lwURcahU_=Vv}rvI zxDyd3qp}TdTzDp`*V% zfa$-OU=nl>*GpVDuDaA>H}pKq`{yrfX0^)tK)OOF9tDoOuK6BvW_>`FYM zB9{`nKKcL8H!OF`-v;{8p+&%KSG=$5@gH0e5T60<0_M}br0{PZUytSm1GavvySsVY fyLnp~`@`+M9{uenJ~sFO02%hC!Y*%m6}$fdd&8VH diff --git a/project/graphql/sssom_schema.graphql b/project/graphql/sssom_schema.graphql index 5cdac918..77054087 100644 --- a/project/graphql/sssom_schema.graphql +++ b/project/graphql/sssom_schema.graphql @@ -1,3 +1,44 @@ +type LiteralMapping + { + literal: String! + literalDatatype: Uri + predicateId: EntityReference! + predicateLabel: String + predicateModifier: PredicateModifierEnum + objectId: EntityReference! + objectLabel: String + objectCategory: String + mappingJustification: EntityReference! + authorId: [EntityReference] + authorLabel: [String] + reviewerId: [EntityReference] + reviewerLabel: [String] + creatorId: [EntityReference] + creatorLabel: [String] + license: Uri + literalSource: EntityReference + literalSourceVersion: String + objectType: EntityTypeEnum + objectSource: EntityReference + objectSourceVersion: String + mappingProvider: Uri + mappingSource: EntityReference + mappingCardinality: MappingCardinalityEnum + mappingTool: String + mappingToolVersion: String + mappingDate: Date + confidence: Double + objectMatchField: [EntityReference] + matchString: [String] + literalPreprocessing: [EntityReference] + objectPreprocessing: [EntityReference] + similarityScore: Double + similarityMeasure: String + seeAlso: [String] + other: String + comment: String + } + type Mapping { subjectId: EntityReference! @@ -60,6 +101,7 @@ type MappingRegistry type MappingSet { + curieMap: [Prefix] mappings: [Mapping] mappingSetId: Uri! mappingSetVersion: String @@ -100,3 +142,14 @@ type MappingSetReference localName: String } +type Prefix + { + prefixName: Ncname! + prefixUrl: Uri + } + +type Propagatable + { + propagated: Boolean + } + diff --git a/project/jsonld/sssom_schema.context.jsonld b/project/jsonld/sssom_schema.context.jsonld index fc8fd2bf..be606a5f 100644 --- a/project/jsonld/sssom_schema.context.jsonld +++ b/project/jsonld/sssom_schema.context.jsonld @@ -1,5 +1,9 @@ { - "_comments": "Auto generated from sssom_schema.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2023-07-31T17:42:54\n Schema: sssom\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/sssom/schema/\n description: Datamodel for Simple Standard for Sharing Ontological Mappings (SSSOM)\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ", + "comments": { + "description": "Auto generated by LinkML jsonld context generator", + "generation_date": "2024-08-05T10:23:03", + "source": "sssom_schema.yaml" + }, "@context": { "dcterms": "http://purl.org/dc/terms/", "linkml": "https://w3id.org/linkml/", @@ -12,75 +16,133 @@ "semapv": "https://w3id.org/semapv/vocab/", "skos": "http://www.w3.org/2004/02/skos/core#", "sssom": "https://w3id.org/sssom/", + "xsd": "http://www.w3.org/2001/XMLSchema#", "@vocab": "https://w3id.org/sssom/", "author_id": { "@type": "rdfs:Resource", "@id": "pav:authoredBy" }, + "author_label": { + "@id": "author_label" + }, "comment": { "@id": "rdfs:comment" }, "confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "confidence" }, "creator_id": { "@type": "rdfs:Resource", "@id": "dcterms:creator" }, + "creator_label": { + "@id": "creator_label" + }, "curation_rule": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "curation_rule" + }, + "curation_rule_text": { + "@id": "curation_rule_text" + }, + "curie_map": { + "@type": "@id", + "@id": "curie_map" }, "documentation": { - "@type": "@id" + "@type": "@id", + "@id": "documentation" }, "homepage": { - "@type": "@id" + "@type": "@id", + "@id": "homepage" }, "imports": { - "@type": "@id" + "@type": "@id", + "@id": "imports" }, "issue_tracker": { - "@type": "@id" + "@type": "@id", + "@id": "issue_tracker" }, "issue_tracker_item": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "issue_tracker_item" }, "last_updated": { - "@type": "xsd:date" + "@type": "xsd:date", + "@id": "last_updated" }, "license": { "@type": "@id", "@id": "dcterms:license" }, + "literal": { + "@id": "owl:annotatedTarget" + }, + "literal_datatype": { + "@type": "@id", + "@id": "rdf:datatype" + }, + "literal_preprocessing": { + "@type": "rdfs:Resource", + "@id": "literal_preprocessing" + }, + "literal_source": { + "@type": "rdfs:Resource", + "@id": "literal_source" + }, + "literal_source_version": { + "@id": "literal_source_version" + }, + "local_name": { + "@id": "local_name" + }, "mapping_cardinality": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "mapping_cardinality" }, "mapping_date": { "@type": "xsd:date", "@id": "pav:authoredOn" }, "mapping_justification": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_justification" }, "mapping_provider": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_provider" + }, + "mapping_registry_description": { + "@id": "mapping_registry_description" }, "mapping_registry_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_registry_id" + }, + "mapping_registry_title": { + "@id": "mapping_registry_title" }, "mapping_set_description": { "@id": "dcterms:description" }, + "mapping_set_group": { + "@id": "mapping_set_group" + }, "mapping_set_id": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_id" }, "mapping_set_references": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_references" }, "mapping_set_source": { "@type": "@id", @@ -93,26 +155,50 @@ "@id": "owl:versionInfo" }, "mapping_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_source" + }, + "mapping_tool": { + "@id": "mapping_tool" + }, + "mapping_tool_version": { + "@id": "mapping_tool_version" }, "mappings": { - "@type": "@id" + "@type": "@id", + "@id": "mappings" + }, + "match_string": { + "@id": "match_string" }, "mirror_from": { - "@type": "@id" + "@type": "@id", + "@id": "mirror_from" + }, + "object_category": { + "@id": "object_category" }, "object_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedTarget" }, + "object_label": { + "@id": "object_label" + }, "object_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_match_field" }, "object_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_preprocessing" }, "object_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_source" + }, + "object_source_version": { + "@id": "object_source_version" }, "object_type": { "@context": { @@ -120,19 +206,27 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "object_type" + }, + "other": { + "@id": "other" }, "predicate_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedProperty" }, + "predicate_label": { + "@id": "predicate_label" + }, "predicate_modifier": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_modifier" }, "predicate_type": { "@context": { @@ -140,36 +234,76 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_type" + }, + "prefix_name": { + "@id": "prefix_name" + }, + "prefix_url": { + "@type": "@id", + "@id": "prefix_url" + }, + "propagated": { + "@type": "xsd:boolean", + "@id": "propagated" }, "publication_date": { "@type": "xsd:date", "@id": "dcterms:created" }, "registry_confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "registry_confidence" }, "reviewer_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "reviewer_id" + }, + "reviewer_label": { + "@id": "reviewer_label" }, "see_also": { "@id": "rdfs:seeAlso" }, + "semantic_similarity_measure": { + "@id": "semantic_similarity_measure" + }, "semantic_similarity_score": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "semantic_similarity_score" + }, + "similarity_measure": { + "@id": "similarity_measure" + }, + "similarity_score": { + "@type": "xsd:double", + "@id": "similarity_score" + }, + "subject_category": { + "@id": "subject_category" }, "subject_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedSource" }, + "subject_label": { + "@id": "subject_label" + }, "subject_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_match_field" }, "subject_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_preprocessing" }, "subject_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_source" + }, + "subject_source_version": { + "@id": "subject_source_version" }, "subject_type": { "@context": { @@ -177,10 +311,29 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "subject_type" + }, + "LiteralMapping": { + "@id": "owl:Axiom" }, "Mapping": { "@id": "owl:Axiom" + }, + "MappingRegistry": { + "@id": "MappingRegistry" + }, + "MappingSet": { + "@id": "MappingSet" + }, + "MappingSetReference": { + "@id": "MappingSetReference" + }, + "Prefix": { + "@id": "Prefix" + }, + "Propagatable": { + "@id": "Propagatable" } } } diff --git a/project/jsonld/sssom_schema.jsonld b/project/jsonld/sssom_schema.jsonld index 47844e72..193f66d0 100644 --- a/project/jsonld/sssom_schema.jsonld +++ b/project/jsonld/sssom_schema.jsonld @@ -47,6 +47,10 @@ "prefix_prefix": "skos", "prefix_reference": "http://www.w3.org/2004/02/skos/core#" }, + { + "prefix_prefix": "xsd", + "prefix_reference": "http://www.w3.org/2001/XMLSchema#" + }, { "prefix_prefix": "semapv", "prefix_reference": "https://w3id.org/semapv/vocab/" @@ -62,8 +66,11 @@ { "name": "EntityReference", "definition_uri": "https://w3id.org/sssom/EntityReference", - "description": "A reference to a mapped entity. This is represented internally as a string, and as a resource in RDF", + "description": "A reference to an entity involved in the mapping.\n", "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://mapping-commons.github.io/sssom/spec/#tsv" + ], "typeof": "uriorcurie", "base": "str", "uri": "http://www.w3.org/2000/01/rdf-schema#Resource", @@ -74,6 +81,9 @@ "name": "string", "definition_uri": "https://w3id.org/linkml/String", "description": "A character string", + "notes": [ + "In RDF serializations, a slot with range of string is treated as a literal or type xsd:string. If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"string\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -87,6 +97,9 @@ "name": "integer", "definition_uri": "https://w3id.org/linkml/Integer", "description": "An integer", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"integer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -100,6 +113,9 @@ "name": "boolean", "definition_uri": "https://w3id.org/linkml/Boolean", "description": "A binary (true or false) value", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"boolean\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -114,6 +130,9 @@ "name": "float", "definition_uri": "https://w3id.org/linkml/Float", "description": "A real number that conforms to the xsd:float specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"float\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -127,6 +146,9 @@ "name": "double", "definition_uri": "https://w3id.org/linkml/Double", "description": "A real number that conforms to the xsd:double specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"double\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "close_mappings": [ @@ -140,6 +162,9 @@ "name": "decimal", "definition_uri": "https://w3id.org/linkml/Decimal", "description": "A real number with arbitrary precision that conforms to the xsd:decimal specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"decimal\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "broad_mappings": [ @@ -154,7 +179,8 @@ "definition_uri": "https://w3id.org/linkml/Time", "description": "A time object represents a (local) time of day, independent of any particular day", "notes": [ - "URI is dateTime because OWL reasoners do not work with straight date or time" + "URI is dateTime because OWL reasoners do not work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"time\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -171,7 +197,8 @@ "definition_uri": "https://w3id.org/linkml/Date", "description": "a date (year, month and day) in an idealized calendar", "notes": [ - "URI is dateTime because OWL reasoners don't work with straight date or time" + "URI is dateTime because OWL reasoners don't work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -187,6 +214,9 @@ "name": "datetime", "definition_uri": "https://w3id.org/linkml/Datetime", "description": "The combination of a date and time", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -201,6 +231,9 @@ "name": "date_or_datetime", "definition_uri": "https://w3id.org/linkml/DateOrDatetime", "description": "Either a date or a datetime", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date_or_datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -212,6 +245,9 @@ "name": "uriorcurie", "definition_uri": "https://w3id.org/linkml/Uriorcurie", "description": "a URI or a CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uriorcurie\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "URIorCURIE", @@ -224,6 +260,9 @@ "definition_uri": "https://w3id.org/linkml/Curie", "conforms_to": "https://www.w3.org/TR/curie/", "description": "a compact URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"curie\"." + ], "comments": [ "in RDF serializations this MUST be expanded to a URI", "in non-RDF serializations MAY be serialized as the compact representation" @@ -240,6 +279,9 @@ "definition_uri": "https://w3id.org/linkml/Uri", "conforms_to": "https://www.ietf.org/rfc/rfc3987.txt", "description": "a complete URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uri\"." + ], "comments": [ "in RDF serializations a slot with range of uri is treated as a literal or type xsd:anyURI unless it is an identifier or a reference to an identifier, in which case it is translated directly to a node" ], @@ -257,6 +299,9 @@ "name": "ncname", "definition_uri": "https://w3id.org/linkml/Ncname", "description": "Prefix part of CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"ncname\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NCName", @@ -268,6 +313,9 @@ "name": "objectidentifier", "definition_uri": "https://w3id.org/linkml/Objectidentifier", "description": "A URI or CURIE that represents an object in the model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"objectidentifier\"." + ], "comments": [ "Used for inheritance and type checking" ], @@ -282,6 +330,9 @@ "name": "nodeidentifier", "definition_uri": "https://w3id.org/linkml/Nodeidentifier", "description": "A URI, CURIE or BNODE that represents a node in a model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"nodeidentifier\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NodeIdentifier", @@ -294,6 +345,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpointer", "conforms_to": "https://datatracker.ietf.org/doc/html/rfc6901", "description": "A string encoding a JSON Pointer. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to a valid object within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpointer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -306,6 +360,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpath", "conforms_to": "https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html", "description": "A string encoding a JSON Path. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -318,6 +375,9 @@ "definition_uri": "https://w3id.org/linkml/Sparqlpath", "conforms_to": "https://www.w3.org/TR/sparql11-query/#propertypaths", "description": "A string encoding a SPARQL Property Path. The value of the string MUST conform to SPARQL syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded as RDF.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"sparqlpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -422,6 +482,52 @@ } ], "slots": [ + { + "name": "prefix_name", + "definition_uri": "https://w3id.org/sssom/prefix_name", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_name", + "key": true, + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "prefix_url", + "definition_uri": "https://w3id.org/sssom/prefix_url", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_url", + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "uri", + "@type": "SlotDefinition" + }, + { + "name": "curie_map", + "definition_uri": "https://w3id.org/sssom/curie_map", + "description": "A dictionary that contains prefixes as keys and their URI expansions as values.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/225", + "https://github.com/mapping-commons/sssom/pull/349", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/curie_map.sssom.tsv" + ], + "slot_uri": "https://w3id.org/sssom/curie_map", + "multivalued": true, + "owner": "MappingSet", + "domain_of": [ + "MappingSet" + ], + "range": "Prefix", + "inlined": true, + "@type": "SlotDefinition" + }, { "name": "mirror_from", "definition_uri": "https://w3id.org/sssom/mirror_from", @@ -612,6 +718,55 @@ "required": true, "@type": "SlotDefinition" }, + { + "name": "literal", + "definition_uri": "https://w3id.org/sssom/literal", + "description": "The literal being mapped", + "examples": [ + { + "value": "Alzheimer", + "description": "A string referring to some thing.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "mappings": [ + "http://www.w3.org/2002/07/owl#annotatedTarget", + "http://www.w3.org/2002/07/owl#annotatedSource" + ], + "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "literal_datatype", + "definition_uri": "https://w3id.org/sssom/literal_datatype", + "description": "The datatype of the literal being mapped", + "examples": [ + { + "value": "xsd:string", + "description": "A string referring to some thing.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "mappings": [ + "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype" + ], + "slot_uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "uri", + "@type": "SlotDefinition" + }, { "name": "subject_label", "definition_uri": "https://w3id.org/sssom/subject_label", @@ -669,6 +824,16 @@ { "name": "subject_type", "definition_uri": "https://w3id.org/sssom/subject_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -702,9 +867,10 @@ "http://www.w3.org/2002/07/owl#annotatedProperty" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -726,9 +892,10 @@ "https://github.com/mapping-commons/sssom/issues/107" ], "slot_uri": "https://w3id.org/sssom/predicate_modifier", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "predicate_modifier_enum", "@type": "SlotDefinition" @@ -801,9 +968,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/predicate_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -844,9 +1012,10 @@ "http://www.w3.org/2002/07/owl#annotatedTarget" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -864,9 +1033,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "recommended": true, @@ -899,9 +1069,10 @@ "https://github.com/mapping-commons/sssom/issues/256" ], "slot_uri": "https://w3id.org/sssom/object_category", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -922,9 +1093,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_justification", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -972,6 +1144,16 @@ { "name": "object_type", "definition_uri": "https://w3id.org/sssom/object_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -981,10 +1163,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_type", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "entity_type_enum", "@type": "SlotDefinition" @@ -1106,10 +1289,11 @@ ], "slot_uri": "http://purl.org/dc/terms/creator", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1121,10 +1305,11 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/creator_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1139,9 +1324,10 @@ ], "slot_uri": "http://purl.org/pav/authoredBy", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1153,9 +1339,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/author_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1167,9 +1354,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_id", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1181,9 +1369,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1197,10 +1386,11 @@ "http://purl.org/dc/terms/license" ], "slot_uri": "http://purl.org/dc/terms/license", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1208,6 +1398,16 @@ { "name": "subject_source", "definition_uri": "https://w3id.org/sssom/subject_source", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the subject.", "examples": [ { @@ -1234,6 +1434,16 @@ { "name": "subject_source_version", "definition_uri": "https://w3id.org/sssom/subject_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the subject term.", "examples": [ { @@ -1252,9 +1462,64 @@ "range": "string", "@type": "SlotDefinition" }, + { + "name": "literal_source", + "definition_uri": "https://w3id.org/sssom/literal_source", + "description": "URI of ontology source for the literal.", + "examples": [ + { + "value": "obo:mondo.owl", + "description": "A persistent OBO CURIE pointing to the latest version of the Mondo ontology.", + "@type": "Example" + }, + { + "value": "wikidata:Q7876491", + "description": "A Wikidata identifier for the Uberon ontology resource.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/literal_source", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "EntityReference", + "@type": "SlotDefinition" + }, + { + "name": "literal_source_version", + "definition_uri": "https://w3id.org/sssom/literal_source_version", + "description": "Version IRI or version string of the source of the literal.", + "examples": [ + { + "value": "http://purl.obolibrary.org/obo/mondo/releases/2021-01-30/mondo.owl", + "description": "(A persistent Version IRI pointing to the Mondo version '2021-01-30')", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/literal_source_version", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "@type": "SlotDefinition" + }, { "name": "object_source", "definition_uri": "https://w3id.org/sssom/object_source", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the object.", "examples": [ { @@ -1270,10 +1535,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1281,6 +1547,16 @@ { "name": "object_source_version", "definition_uri": "https://w3id.org/sssom/object_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the object term.", "examples": [ { @@ -1291,10 +1567,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1302,13 +1579,24 @@ { "name": "mapping_provider", "definition_uri": "https://w3id.org/sssom/mapping_provider", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_provider", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1349,9 +1637,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1362,9 +1651,10 @@ "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_cardinality", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "mapping_cardinality_enum", "@type": "SlotDefinition" @@ -1372,6 +1662,16 @@ { "name": "mapping_tool", "definition_uri": "https://w3id.org/sssom/mapping_tool", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", "examples": [ { @@ -1381,10 +1681,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1392,6 +1693,16 @@ { "name": "mapping_tool_version", "definition_uri": "https://w3id.org/sssom/mapping_tool_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version string that denotes the version of the mapping tool used.", "examples": [ { @@ -1401,10 +1712,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1412,16 +1724,27 @@ { "name": "mapping_date", "definition_uri": "https://w3id.org/sssom/mapping_date", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", "from_schema": "https://w3id.org/sssom/schema/", "mappings": [ "http://purl.org/pav/authoredOn" ], "slot_uri": "http://purl.org/pav/authoredOn", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "date", "@type": "SlotDefinition" @@ -1449,16 +1772,29 @@ "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/confidence", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { "name": "subject_match_field", "definition_uri": "https://w3id.org/sssom/subject_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the subject) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/subject_match_field", @@ -1474,14 +1810,25 @@ { "name": "object_match_field", "definition_uri": "https://w3id.org/sssom/object_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the object) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_match_field", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1489,13 +1836,14 @@ { "name": "match_string", "definition_uri": "https://w3id.org/sssom/match_string", - "description": "Strings that are shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", + "description": "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/match_string", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1503,6 +1851,16 @@ { "name": "subject_preprocessing", "definition_uri": "https://w3id.org/sssom/subject_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", "examples": [ { @@ -1528,6 +1886,16 @@ { "name": "object_preprocessing", "definition_uri": "https://w3id.org/sssom/object_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", "examples": [ { @@ -1542,10 +1910,35 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_preprocessing", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" + ], + "range": "EntityReference", + "@type": "SlotDefinition" + }, + { + "name": "literal_preprocessing", + "definition_uri": "https://w3id.org/sssom/literal_preprocessing", + "description": "Method of preprocessing applied to the literal.", + "examples": [ + { + "value": "semapv:Stemming", + "@type": "Example" + }, + { + "value": "semapv:StopWordRemoval", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/literal_preprocessing", + "multivalued": true, + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1599,6 +1992,8 @@ "Mapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { @@ -1621,6 +2016,41 @@ "range": "string", "@type": "SlotDefinition" }, + { + "name": "similarity_score", + "definition_uri": "https://w3id.org/sssom/similarity_score", + "description": "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/similarity_score", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, + "@type": "SlotDefinition" + }, + { + "name": "similarity_measure", + "definition_uri": "https://w3id.org/sssom/similarity_measure", + "description": "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", + "examples": [ + { + "value": "https://www.wikidata.org/wiki/Q865360", + "description": "(the Wikidata identifier for the Jaccard index measure).", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/similarity_measure", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "@type": "SlotDefinition" + }, { "name": "issue_tracker_item", "definition_uri": "https://w3id.org/sssom/issue_tracker_item", @@ -1682,10 +2112,11 @@ ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#seeAlso", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1696,10 +2127,11 @@ "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/other", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1713,14 +2145,28 @@ "http://www.w3.org/2000/01/rdf-schema#comment" ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#comment", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" }, + { + "name": "propagatable__propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/propagated", + "alias": "propagated", + "owner": "Propagatable", + "domain_of": [ + "Propagatable" + ], + "range": "boolean", + "@type": "SlotDefinition" + }, { "name": "mapping_set_license", "definition_uri": "https://w3id.org/sssom/license", @@ -1751,6 +2197,7 @@ "description": "Represents a set of mappings", "from_schema": "https://w3id.org/sssom/schema/", "slots": [ + "curie_map", "mappings", "mapping_set_id", "mapping_set_version", @@ -1842,6 +2289,60 @@ "class_uri": "http://www.w3.org/2002/07/owl#Axiom", "@type": "ClassDefinition" }, + { + "name": "LiteralMapping", + "definition_uri": "https://w3id.org/sssom/LiteralMapping", + "description": "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://mapping-commons.github.io/sssom/sssom-profiles/" + ], + "mappings": [ + "owl:Axiom" + ], + "slots": [ + "literal", + "literal_datatype", + "predicate_id", + "predicate_label", + "predicate_modifier", + "object_id", + "object_label", + "object_category", + "mapping_justification", + "author_id", + "author_label", + "reviewer_id", + "reviewer_label", + "creator_id", + "creator_label", + "license", + "literal_source", + "literal_source_version", + "object_type", + "object_source", + "object_source_version", + "mapping_provider", + "mapping_source", + "mapping_cardinality", + "mapping_tool", + "mapping_tool_version", + "mapping_date", + "confidence", + "object_match_field", + "match_string", + "literal_preprocessing", + "object_preprocessing", + "similarity_score", + "similarity_measure", + "see_also", + "other", + "comment" + ], + "slot_usage": {}, + "class_uri": "http://www.w3.org/2002/07/owl#Axiom", + "@type": "ClassDefinition" + }, { "name": "MappingRegistry", "definition_uri": "https://w3id.org/sssom/MappingRegistry", @@ -1877,13 +2378,51 @@ "slot_usage": {}, "class_uri": "https://w3id.org/sssom/MappingSetReference", "@type": "ClassDefinition" + }, + { + "name": "Prefix", + "definition_uri": "https://w3id.org/sssom/Prefix", + "from_schema": "https://w3id.org/sssom/schema/", + "slots": [ + "prefix_name", + "prefix_url" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/sssom/Prefix", + "@type": "ClassDefinition" + }, + { + "name": "Propagatable", + "definition_uri": "https://w3id.org/sssom/Propagatable", + "description": "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/305" + ], + "mappings": [ + "sssom:Propagatable" + ], + "slots": [ + "propagatable__propagated" + ], + "slot_usage": {}, + "attributes": [ + { + "name": "propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "range": "boolean", + "@type": "SlotDefinition" + } + ], + "class_uri": "https://w3id.org/sssom/Propagatable", + "@type": "ClassDefinition" } ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2023-07-31T17:42:04", - "source_file_size": 26565, - "generation_date": "2023-07-31T17:42:55", + "source_file_date": "2024-08-05T10:22:55", + "source_file_size": 31884, + "generation_date": "2024-08-05T10:23:03", "@type": "SchemaDefinition", "@context": [ "project/jsonld/sssom_schema.context.jsonld", diff --git a/project/jsonschema/sssom_schema.schema.json b/project/jsonschema/sssom_schema.schema.json index a278a7b8..d77b8ecb 100644 --- a/project/jsonschema/sssom_schema.schema.json +++ b/project/jsonschema/sssom_schema.schema.json @@ -1,525 +1,847 @@ { - "$defs": { - "EntityTypeEnum": { - "description": "", - "enum": [ - "owl class", - "owl object property", - "owl data property", - "owl annotation property", - "owl named individual", - "skos concept", - "rdfs resource", - "rdfs class", - "rdfs literal", - "rdfs datatype", - "rdf property" - ], - "title": "EntityTypeEnum", - "type": "string" - }, - "Mapping": { - "additionalProperties": false, - "description": "Represents an individual mapping between a pair of entities", - "properties": { - "author_id": { - "description": "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "author_label": { - "description": "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead.", - "items": { - "type": "string" - }, - "type": "array" - }, - "comment": { - "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", - "type": "string" - }, - "confidence": { - "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", - "type": "number" - }, - "creator_id": { - "description": "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creator_label": { - "description": "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead.", - "items": { - "type": "string" - }, - "type": "array" - }, - "curation_rule": { - "description": "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule is captured as a resource rather than a string, which enables higher levels of transparency and sharing across mapping sets. The URI representation of the curation rule is expected to be a resolvable identifier which provides details about the nature of the curation rule.", - "items": { - "type": "string" - }, - "type": "array" - }, - "curation_rule_text": { - "description": "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule should be captured as a resource (entity reference) rather than a string (see curation_rule element), which enables higher levels of transparency and sharing across mapping sets. The textual representation of curation rule is intended to be used in cases where (1) the creation of a resource is not practical from the perspective of the mapping_provider and (2) as an additional piece of metadata to augment the curation_rule element with a human readable text.", - "items": { - "type": "string" - }, - "type": "array" - }, - "issue_tracker_item": { - "description": "The issue tracker item discussing this mapping.", - "type": "string" - }, - "license": { - "description": "A url to the license of the mapping. In absence of a license we assume no license.", - "type": "string" - }, - "mapping_cardinality": { - "$ref": "#/$defs/MappingCardinalityEnum", - "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." - }, - "mapping_date": { - "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", - "format": "date", - "type": "string" - }, - "mapping_justification": { - "description": "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable.", - "pattern": "^semapv:(MappingReview|ManualMappingCuration|LogicalReasoning|LexicalMatching|CompositeMatching|UnspecifiedMatching|SemanticSimilarityThresholdMatching|LexicalSimilarityThresholdMatching|MappingChaining)$", - "type": "string" - }, - "mapping_provider": { - "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", - "type": "string" - }, - "mapping_source": { - "description": "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another.", - "type": "string" - }, - "mapping_tool": { - "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", - "type": "string" - }, - "mapping_tool_version": { - "description": "Version string that denotes the version of the mapping tool used.", - "type": "string" - }, - "match_string": { - "description": "Strings that are shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_category": { - "description": "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases.", - "type": "string" - }, - "object_id": { - "description": "The ID of the object of the mapping.", - "type": "string" - }, - "object_label": { - "description": "The label of object of the mapping", - "type": "string" - }, - "object_match_field": { - "description": "A list of properties (term annotations on the object) that was used for the match.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_preprocessing": { - "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_source": { - "description": "URI of vocabulary or identifier source for the object.", - "type": "string" - }, - "object_source_version": { - "description": "Version IRI or version string of the source of the object term.", - "type": "string" - }, - "object_type": { - "$ref": "#/$defs/EntityTypeEnum", - "description": "The type of entity that is being mapped." - }, - "other": { - "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", - "type": "string" - }, - "predicate_id": { - "description": "The ID of the predicate or relation that relates the subject and object of this match.", - "type": "string" - }, - "predicate_label": { - "description": "The label of the predicate/relation of the mapping", - "type": "string" - }, - "predicate_modifier": { - "$ref": "#/$defs/PredicateModifierEnum", - "description": "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" - }, - "publication_date": { - "description": "The date the mapping was published. This is different from the date the mapping was asserted.", - "format": "date", - "type": "string" - }, - "reviewer_id": { - "description": "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "reviewer_label": { - "description": "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead.", - "items": { - "type": "string" - }, - "type": "array" - }, - "see_also": { - "description": "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment", - "items": { - "type": "string" - }, - "type": "array" - }, - "semantic_similarity_measure": { - "description": "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", - "type": "string" - }, - "semantic_similarity_score": { - "description": "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence.", - "type": "number" - }, - "subject_category": { - "description": "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases.", - "type": "string" - }, - "subject_id": { - "description": "The ID of the subject of the mapping.", - "type": "string" - }, - "subject_label": { - "description": "The label of subject of the mapping", - "type": "string" - }, - "subject_match_field": { - "description": "A list of properties (term annotations on the subject) that was used for the match.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_preprocessing": { - "description": "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_source": { - "description": "URI of vocabulary or identifier source for the subject.", - "type": "string" - }, - "subject_source_version": { - "description": "Version IRI or version string of the source of the subject term.", - "type": "string" - }, - "subject_type": { - "$ref": "#/$defs/EntityTypeEnum", - "description": "The type of entity that is being mapped." - } - }, - "required": [ - "subject_id", - "predicate_id", - "object_id", - "mapping_justification" - ], - "title": "Mapping", - "type": "object" - }, - "MappingCardinalityEnum": { - "description": "", - "enum": [ - "1:1", - "1:n", - "n:1", - "1:0", - "0:1", - "n:n" - ], - "title": "MappingCardinalityEnum", - "type": "string" - }, - "MappingRegistry": { - "additionalProperties": false, - "description": "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries.", - "properties": { - "documentation": { - "description": "A URL to the documentation of this mapping commons.", - "type": "string" - }, - "homepage": { - "description": "A URL to a homepage of this mapping commons.", - "type": "string" - }, - "imports": { - "description": "A list of registries that should be imported into this one.", - "items": { - "type": "string" - }, - "type": "array" - }, - "issue_tracker": { - "description": "A URL location of the issue tracker for this entity.", - "type": "string" - }, - "mapping_registry_description": { - "description": "The description of a mapping registry.", - "type": "string" - }, - "mapping_registry_id": { - "description": "The unique identifier of a mapping registry.", - "type": "string" - }, - "mapping_registry_title": { - "description": "The title of a mapping registry.", - "type": "string" - }, - "mapping_set_references": { - "description": "A list of mapping set references.", - "items": { - "$ref": "#/$defs/MappingSetReference" - }, - "type": "array" - } - }, - "required": [ - "mapping_registry_id" - ], - "title": "MappingRegistry", - "type": "object" - }, - "MappingSet": { - "additionalProperties": false, - "description": "Represents a set of mappings", - "properties": { - "comment": { - "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", - "type": "string" - }, - "creator_id": { - "description": "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creator_label": { - "description": "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead.", - "items": { - "type": "string" - }, - "type": "array" - }, - "issue_tracker": { - "description": "A URL location of the issue tracker for this entity.", - "type": "string" - }, - "license": { - "description": "A url to the license of the mapping. In absence of a license we assume no license.", - "type": "string" - }, - "mapping_date": { - "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", - "format": "date", - "type": "string" - }, - "mapping_provider": { - "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", - "type": "string" - }, - "mapping_set_description": { - "description": "A description of the mapping set.", - "type": "string" - }, - "mapping_set_id": { - "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", - "type": "string" - }, - "mapping_set_source": { - "description": "A mapping set or set of mapping set that was used to derive the mapping set.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mapping_set_title": { - "description": "The display name of a mapping set.", - "type": "string" - }, - "mapping_set_version": { - "description": "A version string for the mapping.", - "type": "string" - }, - "mapping_tool": { - "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", - "type": "string" - }, - "mapping_tool_version": { - "description": "Version string that denotes the version of the mapping tool used.", - "type": "string" - }, - "mappings": { - "description": "Contains a list of mapping objects", - "items": { - "$ref": "#/$defs/Mapping" - }, - "type": "array" - }, - "object_match_field": { - "description": "A list of properties (term annotations on the object) that was used for the match.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_preprocessing": { - "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", - "items": { - "type": "string" - }, - "type": "array" - }, - "object_source": { - "description": "URI of vocabulary or identifier source for the object.", - "type": "string" - }, - "object_source_version": { - "description": "Version IRI or version string of the source of the object term.", - "type": "string" - }, - "object_type": { - "$ref": "#/$defs/EntityTypeEnum", - "description": "The type of entity that is being mapped." - }, - "other": { - "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", - "type": "string" - }, - "publication_date": { - "description": "The date the mapping was published. This is different from the date the mapping was asserted.", - "format": "date", - "type": "string" - }, - "see_also": { - "description": "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_match_field": { - "description": "A list of properties (term annotations on the subject) that was used for the match.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_preprocessing": { - "description": "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", - "items": { - "type": "string" - }, - "type": "array" - }, - "subject_source": { - "description": "URI of vocabulary or identifier source for the subject.", - "type": "string" - }, - "subject_source_version": { - "description": "Version IRI or version string of the source of the subject term.", - "type": "string" - }, - "subject_type": { - "$ref": "#/$defs/EntityTypeEnum", - "description": "The type of entity that is being mapped." - } - }, - "required": [ - "mapping_set_id", - "license" - ], - "title": "MappingSet", - "type": "object" - }, - "MappingSetReference": { - "additionalProperties": false, - "description": "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping.", - "properties": { - "last_updated": { - "description": "The date this reference was last updated.", - "format": "date", - "type": "string" - }, - "local_name": { - "description": "The local name assigned to file that corresponds to the downloaded mapping set.", - "type": "string" - }, - "mapping_set_group": { - "description": "Set by the owners of the mapping registry. A way to group .", - "type": "string" - }, - "mapping_set_id": { - "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", - "type": "string" - }, - "mirror_from": { - "description": "A URL location from which to obtain a resource, such as a mapping set.", - "type": "string" - }, - "registry_confidence": { - "description": "This value is set by the registry that indexes the mapping set. It reflects the confidence the registry has in the correctness of the mappings in the mapping set.", - "type": "number" - } - }, - "required": [ - "mapping_set_id" - ], - "title": "MappingSetReference", - "type": "object" - }, - "PredicateModifierEnum": { - "description": "", - "enum": [ - "Not" - ], - "title": "PredicateModifierEnum", - "type": "string" - } - }, - "$id": "https://w3id.org/sssom/schema/", - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": true, - "metamodel_version": "1.7.0", - "properties": {}, - "required": [], - "title": "sssom", - "type": "object", - "version": null -} + "$defs": { + "EntityTypeEnum": { + "description": "", + "enum": [ + "owl class", + "owl object property", + "owl data property", + "owl annotation property", + "owl named individual", + "skos concept", + "rdfs resource", + "rdfs class", + "rdfs literal", + "rdfs datatype", + "rdf property" + ], + "title": "EntityTypeEnum", + "type": "string" + }, + "LiteralMapping": { + "additionalProperties": false, + "description": "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", + "properties": { + "author_id": { + "description": "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "author_label": { + "description": "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "comment": { + "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", + "type": "string" + }, + "confidence": { + "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", + "maximum": 1.0, + "minimum": 0.0, + "type": "number" + }, + "creator_id": { + "description": "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "creator_label": { + "description": "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "license": { + "description": "A url to the license of the mapping. In absence of a license we assume no license.", + "type": "string" + }, + "literal": { + "description": "The literal being mapped", + "type": "string" + }, + "literal_datatype": { + "description": "The datatype of the literal being mapped", + "type": "string" + }, + "literal_preprocessing": { + "description": "Method of preprocessing applied to the literal.", + "items": { + "type": "string" + }, + "type": "array" + }, + "literal_source": { + "description": "URI of ontology source for the literal.", + "type": "string" + }, + "literal_source_version": { + "description": "Version IRI or version string of the source of the literal.", + "type": "string" + }, + "mapping_cardinality": { + "$ref": "#/$defs/MappingCardinalityEnum", + "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." + }, + "mapping_date": { + "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", + "format": "date", + "type": "string" + }, + "mapping_justification": { + "anyOf": [ + { + "const": "semapv:LexicalMatching" + }, + { + "const": "semapv:LogicalReasoning" + }, + { + "const": "semapv:CompositeMatching" + }, + { + "const": "semapv:UnspecifiedMatching" + }, + { + "const": "semapv:SemanticSimilarityThresholdMatching" + }, + { + "const": "semapv:LexicalSimilarityThresholdMatching" + }, + { + "const": "semapv:MappingChaining" + }, + { + "const": "semapv:MappingReview" + }, + { + "const": "semapv:ManualMappingCuration" + } + ], + "description": "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable.", + "pattern": "^semapv:(MappingReview|ManualMappingCuration|LogicalReasoning|LexicalMatching|CompositeMatching|UnspecifiedMatching|SemanticSimilarityThresholdMatching|LexicalSimilarityThresholdMatching|MappingChaining)$", + "type": "string" + }, + "mapping_provider": { + "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", + "type": "string" + }, + "mapping_source": { + "description": "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another.", + "type": "string" + }, + "mapping_tool": { + "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", + "type": "string" + }, + "mapping_tool_version": { + "description": "Version string that denotes the version of the mapping tool used.", + "type": "string" + }, + "match_string": { + "description": "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_category": { + "description": "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases.", + "type": "string" + }, + "object_id": { + "description": "The ID of the object of the mapping.", + "type": "string" + }, + "object_label": { + "description": "The label of object of the mapping", + "type": "string" + }, + "object_match_field": { + "description": "A list of properties (term annotations on the object) that was used for the match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_preprocessing": { + "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_source": { + "description": "URI of vocabulary or identifier source for the object.", + "type": "string" + }, + "object_source_version": { + "description": "Version IRI or version string of the source of the object term.", + "type": "string" + }, + "object_type": { + "$ref": "#/$defs/EntityTypeEnum", + "description": "The type of entity that is being mapped." + }, + "other": { + "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", + "type": "string" + }, + "predicate_id": { + "description": "The ID of the predicate or relation that relates the subject and object of this match.", + "type": "string" + }, + "predicate_label": { + "description": "The label of the predicate/relation of the mapping", + "type": "string" + }, + "predicate_modifier": { + "$ref": "#/$defs/PredicateModifierEnum", + "description": "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" + }, + "reviewer_id": { + "description": "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "reviewer_label": { + "description": "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "see_also": { + "description": "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment", + "items": { + "type": "string" + }, + "type": "array" + }, + "similarity_measure": { + "description": "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", + "type": "string" + }, + "similarity_score": { + "description": "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence.", + "maximum": 1.0, + "minimum": 0.0, + "type": "number" + } + }, + "required": [ + "literal", + "predicate_id", + "object_id", + "mapping_justification" + ], + "title": "LiteralMapping", + "type": "object" + }, + "Mapping": { + "additionalProperties": false, + "description": "Represents an individual mapping between a pair of entities", + "properties": { + "author_id": { + "description": "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "author_label": { + "description": "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "comment": { + "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", + "type": "string" + }, + "confidence": { + "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", + "maximum": 1.0, + "minimum": 0.0, + "type": "number" + }, + "creator_id": { + "description": "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "creator_label": { + "description": "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "curation_rule": { + "description": "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule is captured as a resource rather than a string, which enables higher levels of transparency and sharing across mapping sets. The URI representation of the curation rule is expected to be a resolvable identifier which provides details about the nature of the curation rule.", + "items": { + "type": "string" + }, + "type": "array" + }, + "curation_rule_text": { + "description": "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule should be captured as a resource (entity reference) rather than a string (see curation_rule element), which enables higher levels of transparency and sharing across mapping sets. The textual representation of curation rule is intended to be used in cases where (1) the creation of a resource is not practical from the perspective of the mapping_provider and (2) as an additional piece of metadata to augment the curation_rule element with a human readable text.", + "items": { + "type": "string" + }, + "type": "array" + }, + "issue_tracker_item": { + "description": "The issue tracker item discussing this mapping.", + "type": "string" + }, + "license": { + "description": "A url to the license of the mapping. In absence of a license we assume no license.", + "type": "string" + }, + "mapping_cardinality": { + "$ref": "#/$defs/MappingCardinalityEnum", + "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." + }, + "mapping_date": { + "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", + "format": "date", + "type": "string" + }, + "mapping_justification": { + "anyOf": [ + { + "const": "semapv:LexicalMatching" + }, + { + "const": "semapv:LogicalReasoning" + }, + { + "const": "semapv:CompositeMatching" + }, + { + "const": "semapv:UnspecifiedMatching" + }, + { + "const": "semapv:SemanticSimilarityThresholdMatching" + }, + { + "const": "semapv:LexicalSimilarityThresholdMatching" + }, + { + "const": "semapv:MappingChaining" + }, + { + "const": "semapv:MappingReview" + }, + { + "const": "semapv:ManualMappingCuration" + } + ], + "description": "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable.", + "pattern": "^semapv:(MappingReview|ManualMappingCuration|LogicalReasoning|LexicalMatching|CompositeMatching|UnspecifiedMatching|SemanticSimilarityThresholdMatching|LexicalSimilarityThresholdMatching|MappingChaining)$", + "type": "string" + }, + "mapping_provider": { + "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", + "type": "string" + }, + "mapping_source": { + "description": "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another.", + "type": "string" + }, + "mapping_tool": { + "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", + "type": "string" + }, + "mapping_tool_version": { + "description": "Version string that denotes the version of the mapping tool used.", + "type": "string" + }, + "match_string": { + "description": "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_category": { + "description": "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases.", + "type": "string" + }, + "object_id": { + "description": "The ID of the object of the mapping.", + "type": "string" + }, + "object_label": { + "description": "The label of object of the mapping", + "type": "string" + }, + "object_match_field": { + "description": "A list of properties (term annotations on the object) that was used for the match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_preprocessing": { + "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_source": { + "description": "URI of vocabulary or identifier source for the object.", + "type": "string" + }, + "object_source_version": { + "description": "Version IRI or version string of the source of the object term.", + "type": "string" + }, + "object_type": { + "$ref": "#/$defs/EntityTypeEnum", + "description": "The type of entity that is being mapped." + }, + "other": { + "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", + "type": "string" + }, + "predicate_id": { + "description": "The ID of the predicate or relation that relates the subject and object of this match.", + "type": "string" + }, + "predicate_label": { + "description": "The label of the predicate/relation of the mapping", + "type": "string" + }, + "predicate_modifier": { + "$ref": "#/$defs/PredicateModifierEnum", + "description": "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" + }, + "publication_date": { + "description": "The date the mapping was published. This is different from the date the mapping was asserted.", + "format": "date", + "type": "string" + }, + "reviewer_id": { + "description": "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "reviewer_label": { + "description": "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "see_also": { + "description": "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment", + "items": { + "type": "string" + }, + "type": "array" + }, + "semantic_similarity_measure": { + "description": "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", + "type": "string" + }, + "semantic_similarity_score": { + "description": "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence.", + "maximum": 1.0, + "minimum": 0.0, + "type": "number" + }, + "subject_category": { + "description": "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases.", + "type": "string" + }, + "subject_id": { + "description": "The ID of the subject of the mapping.", + "type": "string" + }, + "subject_label": { + "description": "The label of subject of the mapping", + "type": "string" + }, + "subject_match_field": { + "description": "A list of properties (term annotations on the subject) that was used for the match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_preprocessing": { + "description": "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_source": { + "description": "URI of vocabulary or identifier source for the subject.", + "type": "string" + }, + "subject_source_version": { + "description": "Version IRI or version string of the source of the subject term.", + "type": "string" + }, + "subject_type": { + "$ref": "#/$defs/EntityTypeEnum", + "description": "The type of entity that is being mapped." + } + }, + "required": [ + "subject_id", + "predicate_id", + "object_id", + "mapping_justification" + ], + "title": "Mapping", + "type": "object" + }, + "MappingCardinalityEnum": { + "description": "", + "enum": [ + "1:1", + "1:n", + "n:1", + "1:0", + "0:1", + "n:n" + ], + "title": "MappingCardinalityEnum", + "type": "string" + }, + "MappingRegistry": { + "additionalProperties": false, + "description": "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries.", + "properties": { + "documentation": { + "description": "A URL to the documentation of this mapping commons.", + "type": "string" + }, + "homepage": { + "description": "A URL to a homepage of this mapping commons.", + "type": "string" + }, + "imports": { + "description": "A list of registries that should be imported into this one.", + "items": { + "type": "string" + }, + "type": "array" + }, + "issue_tracker": { + "description": "A URL location of the issue tracker for this entity.", + "type": "string" + }, + "mapping_registry_description": { + "description": "The description of a mapping registry.", + "type": "string" + }, + "mapping_registry_id": { + "description": "The unique identifier of a mapping registry.", + "type": "string" + }, + "mapping_registry_title": { + "description": "The title of a mapping registry.", + "type": "string" + }, + "mapping_set_references": { + "description": "A list of mapping set references.", + "items": { + "$ref": "#/$defs/MappingSetReference" + }, + "type": "array" + } + }, + "required": [ + "mapping_registry_id" + ], + "title": "MappingRegistry", + "type": "object" + }, + "MappingSet": { + "additionalProperties": false, + "description": "Represents a set of mappings", + "properties": { + "comment": { + "description": "Free text field containing either curator notes or text generated by tool providing additional informative information.", + "type": "string" + }, + "creator_id": { + "description": "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "creator_label": { + "description": "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "curie_map": { + "additionalProperties": { + "anyOf": [ + { + "$ref": "#/$defs/Prefix__identifier_optional" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "description": "A dictionary that contains prefixes as keys and their URI expansions as values.", + "type": "object" + }, + "issue_tracker": { + "description": "A URL location of the issue tracker for this entity.", + "type": "string" + }, + "license": { + "description": "A url to the license of the mapping. In absence of a license we assume no license.", + "type": "string" + }, + "mapping_date": { + "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", + "format": "date", + "type": "string" + }, + "mapping_provider": { + "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", + "type": "string" + }, + "mapping_set_description": { + "description": "A description of the mapping set.", + "type": "string" + }, + "mapping_set_id": { + "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", + "type": "string" + }, + "mapping_set_source": { + "description": "A mapping set or set of mapping set that was used to derive the mapping set.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mapping_set_title": { + "description": "The display name of a mapping set.", + "type": "string" + }, + "mapping_set_version": { + "description": "A version string for the mapping.", + "type": "string" + }, + "mapping_tool": { + "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", + "type": "string" + }, + "mapping_tool_version": { + "description": "Version string that denotes the version of the mapping tool used.", + "type": "string" + }, + "mappings": { + "description": "Contains a list of mapping objects", + "items": { + "$ref": "#/$defs/Mapping" + }, + "type": "array" + }, + "object_match_field": { + "description": "A list of properties (term annotations on the object) that was used for the match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_preprocessing": { + "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", + "items": { + "type": "string" + }, + "type": "array" + }, + "object_source": { + "description": "URI of vocabulary or identifier source for the object.", + "type": "string" + }, + "object_source_version": { + "description": "Version IRI or version string of the source of the object term.", + "type": "string" + }, + "object_type": { + "$ref": "#/$defs/EntityTypeEnum", + "description": "The type of entity that is being mapped." + }, + "other": { + "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", + "type": "string" + }, + "publication_date": { + "description": "The date the mapping was published. This is different from the date the mapping was asserted.", + "format": "date", + "type": "string" + }, + "see_also": { + "description": "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_match_field": { + "description": "A list of properties (term annotations on the subject) that was used for the match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_preprocessing": { + "description": "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_source": { + "description": "URI of vocabulary or identifier source for the subject.", + "type": "string" + }, + "subject_source_version": { + "description": "Version IRI or version string of the source of the subject term.", + "type": "string" + }, + "subject_type": { + "$ref": "#/$defs/EntityTypeEnum", + "description": "The type of entity that is being mapped." + } + }, + "required": [ + "mapping_set_id", + "license" + ], + "title": "MappingSet", + "type": "object" + }, + "MappingSetReference": { + "additionalProperties": false, + "description": "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping.", + "properties": { + "last_updated": { + "description": "The date this reference was last updated.", + "format": "date", + "type": "string" + }, + "local_name": { + "description": "The local name assigned to file that corresponds to the downloaded mapping set.", + "type": "string" + }, + "mapping_set_group": { + "description": "Set by the owners of the mapping registry. A way to group .", + "type": "string" + }, + "mapping_set_id": { + "description": "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable.", + "type": "string" + }, + "mirror_from": { + "description": "A URL location from which to obtain a resource, such as a mapping set.", + "type": "string" + }, + "registry_confidence": { + "description": "This value is set by the registry that indexes the mapping set. It reflects the confidence the registry has in the correctness of the mappings in the mapping set.", + "type": "number" + } + }, + "required": [ + "mapping_set_id" + ], + "title": "MappingSetReference", + "type": "object" + }, + "PredicateModifierEnum": { + "description": "", + "enum": [ + "Not" + ], + "title": "PredicateModifierEnum", + "type": "string" + }, + "Prefix": { + "additionalProperties": false, + "description": "", + "properties": { + "prefix_name": { + "type": "string" + }, + "prefix_url": { + "type": "string" + } + }, + "required": [ + "prefix_name" + ], + "title": "Prefix", + "type": "object" + }, + "Prefix__identifier_optional": { + "additionalProperties": false, + "description": "", + "properties": { + "prefix_name": { + "type": "string" + }, + "prefix_url": { + "type": "string" + } + }, + "required": [], + "title": "Prefix", + "type": "object" + }, + "Propagatable": { + "additionalProperties": false, + "description": "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class.", + "properties": { + "propagated": { + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "type": "boolean" + } + }, + "title": "Propagatable", + "type": "object" + } + }, + "$id": "https://w3id.org/sssom/schema/", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "additionalProperties": true, + "metamodel_version": "1.7.0", + "title": "sssom", + "type": "object", + "version": null +} \ No newline at end of file diff --git a/project/prefixmap/sssom_schema.yaml b/project/prefixmap/sssom_schema.yaml index f886e67d..52f4e269 100644 --- a/project/prefixmap/sssom_schema.yaml +++ b/project/prefixmap/sssom_schema.yaml @@ -10,6 +10,10 @@ "semapv": "https://w3id.org/semapv/vocab/", "skos": "http://www.w3.org/2004/02/skos/core#", "sssom": "https://w3id.org/sssom/", + "xsd": "http://www.w3.org/2001/XMLSchema#", + "LiteralMapping": { + "@id": "owl:Axiom" + }, "Mapping": { "@id": "owl:Axiom" } diff --git a/project/protobuf/sssom_schema.proto b/project/protobuf/sssom_schema.proto index 334b2c66..583b59ae 100644 --- a/project/protobuf/sssom_schema.proto +++ b/project/protobuf/sssom_schema.proto @@ -1,3 +1,44 @@ +// Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change. +message LiteralMapping + { + string literal = 0 + uri literalDatatype = 0 + entityReference predicateId = 0 + string predicateLabel = 0 + predicateModifierEnum predicateModifier = 0 + entityReference objectId = 0 + string objectLabel = 0 + string objectCategory = 0 + entityReference mappingJustification = 0 + repeated entityReference authorId = 0 + repeated string authorLabel = 0 + repeated entityReference reviewerId = 0 + repeated string reviewerLabel = 0 + repeated entityReference creatorId = 0 + repeated string creatorLabel = 0 + uri license = 0 + entityReference literalSource = 0 + string literalSourceVersion = 0 + entityTypeEnum objectType = 0 + entityReference objectSource = 0 + string objectSourceVersion = 0 + uri mappingProvider = 0 + entityReference mappingSource = 0 + mappingCardinalityEnum mappingCardinality = 0 + string mappingTool = 0 + string mappingToolVersion = 0 + date mappingDate = 0 + double confidence = 0 + repeated entityReference objectMatchField = 0 + repeated string matchString = 0 + repeated entityReference literalPreprocessing = 0 + repeated entityReference objectPreprocessing = 0 + double similarityScore = 0 + string similarityMeasure = 0 + repeated string seeAlso = 0 + string other = 0 + string comment = 0 + } // Represents an individual mapping between a pair of entities message Mapping { @@ -61,6 +102,7 @@ message MappingRegistry // Represents a set of mappings message MappingSet { + repeated prefix curieMap = 0 repeated mapping mappings = 0 uri mappingSetId = 0 string mappingSetVersion = 0 @@ -100,3 +142,13 @@ message MappingSetReference date lastUpdated = 0 string localName = 0 } +message Prefix + { + ncname prefixName = 0 + uri prefixUrl = 0 + } +// Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class. +message Propagatable + { + boolean propagated = 0 + } diff --git a/project/shacl/sssom_schema.shacl.ttl b/project/shacl/sssom_schema.shacl.ttl index 13a29f40..41b0312c 100644 --- a/project/shacl/sssom_schema.shacl.ttl +++ b/project/shacl/sssom_schema.shacl.ttl @@ -13,361 +13,621 @@ sssom:MappingRegistry a sh:NodeShape ; sh:closed true ; sh:description "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "A URL location of the issue tracker for this entity." ; + sh:property [ sh:datatype xsd:anyURI ; + sh:description "A URL to a homepage of this mapping commons." ; sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:issue_tracker ], - [ sh:description "The description of a mapping registry." ; - sh:maxCount 1 ; - sh:order 2 ; - sh:path sssom:mapping_registry_description ], + sh:order 6 ; + sh:path sssom:homepage ], [ sh:description "The unique identifier of a mapping registry." ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 0 ; sh:path sssom:mapping_registry_id ], - [ sh:description "The title of a mapping registry." ; + [ sh:datatype xsd:anyURI ; + sh:description "A URL to the documentation of this mapping commons." ; + sh:maxCount 1 ; + sh:order 5 ; + sh:path sssom:documentation ], + [ sh:datatype xsd:string ; + sh:description "The description of a mapping registry." ; + sh:maxCount 1 ; + sh:order 2 ; + sh:path sssom:mapping_registry_description ], + [ sh:datatype xsd:string ; + sh:description "The title of a mapping registry." ; sh:maxCount 1 ; sh:order 1 ; sh:path sssom:mapping_registry_title ], - [ sh:description "A URL to the documentation of this mapping commons." ; + [ sh:datatype xsd:anyURI ; + sh:description "A URL location of the issue tracker for this entity." ; sh:maxCount 1 ; - sh:order 5 ; - sh:path sssom:documentation ], - [ sh:description "A list of registries that should be imported into this one." ; + sh:order 7 ; + sh:path sssom:issue_tracker ], + [ sh:datatype xsd:anyURI ; + sh:description "A list of registries that should be imported into this one." ; sh:order 3 ; sh:path sssom:imports ], [ sh:class sssom:MappingSetReference ; sh:description "A list of mapping set references." ; - sh:nodeKind sh:BlankNode ; + sh:nodeKind sh:BlankNodeOrIRI ; sh:order 4 ; - sh:path sssom:mapping_set_references ], - [ sh:description "A URL to a homepage of this mapping commons." ; - sh:maxCount 1 ; - sh:order 6 ; - sh:path sssom:homepage ] ; + sh:path sssom:mapping_set_references ] ; sh:targetClass sssom:MappingRegistry . sssom:MappingSet a sh:NodeShape ; sh:closed true ; sh:description "Represents a set of mappings" ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class owl:Axiom ; - sh:description "Contains a list of mapping objects" ; - sh:nodeKind sh:BlankNode ; - sh:order 0 ; - sh:path sssom:mappings ], - [ sh:description "Version IRI or version string of the source of the subject term." ; + sh:property [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the object term." ; sh:maxCount 1 ; - sh:order 11 ; - sh:path sssom:subject_source_version ], - [ sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; + sh:order 15 ; + sh:path sssom:object_source_version ], + [ sh:datatype xsd:string ; + sh:description "The display name of a mapping set." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path sssom:mapping_set_id ], - [ sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; + sh:order 5 ; + sh:path dcterms:title ], + [ sh:datatype xsd:anyURI ; + sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; sh:maxCount 1 ; - sh:minCount 1 ; + sh:order 16 ; + sh:path sssom:mapping_provider ], + [ sh:datatype xsd:string ; + sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; sh:order 8 ; - sh:path dcterms:license ], - [ sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; - sh:maxCount 1 ; - sh:order 19 ; - sh:path dcterms:created ], - [ sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; + sh:path sssom:creator_label ], + [ sh:datatype xsd:string ; + sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; sh:maxCount 1 ; - sh:order 16 ; + sh:order 17 ; sh:path sssom:mapping_tool ], [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 6 ; + sh:order 7 ; sh:path dcterms:creator ], - [ sh:description "A description of the mapping set." ; + [ sh:datatype xsd:anyURI ; + sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; sh:maxCount 1 ; - sh:order 5 ; - sh:path dcterms:description ], - [ sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; - sh:order 24 ; - sh:path rdfs:seeAlso ], + sh:minCount 1 ; + sh:order 9 ; + sh:path dcterms:license ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the subject term." ; + sh:maxCount 1 ; + sh:order 12 ; + sh:path sssom:subject_source_version ], + [ sh:description "URI of vocabulary or identifier source for the object." ; + sh:maxCount 1 ; + sh:order 14 ; + sh:path sssom:object_source ], + [ sh:datatype xsd:anyURI ; + sh:description "A URL location of the issue tracker for this entity." ; + sh:maxCount 1 ; + sh:order 26 ; + sh:path sssom:issue_tracker ], + [ sh:datatype xsd:string ; + sh:description "Version string that denotes the version of the mapping tool used." ; + sh:maxCount 1 ; + sh:order 18 ; + sh:path sssom:mapping_tool_version ], [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; - sh:order 20 ; + sh:order 21 ; sh:path sssom:subject_match_field ], + [ sh:datatype xsd:string ; + sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + sh:maxCount 1 ; + sh:order 27 ; + sh:path sssom:other ], + [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; + sh:order 24 ; + sh:path sssom:object_preprocessing ], [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; - sh:order 21 ; + sh:order 22 ; sh:path sssom:object_match_field ], - [ sh:description "A mapping set or set of mapping set that was used to derive the mapping set." ; - sh:order 3 ; + [ sh:datatype xsd:anyURI ; + sh:description "A mapping set or set of mapping set that was used to derive the mapping set." ; + sh:order 4 ; sh:path prov:wasDerivedFrom ], - [ sh:description "Version IRI or version string of the source of the object term." ; - sh:maxCount 1 ; - sh:order 14 ; - sh:path sssom:object_source_version ], [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 22 ; + sh:order 23 ; sh:path sssom:subject_preprocessing ], - [ sh:description "Version string that denotes the version of the mapping tool used." ; - sh:maxCount 1 ; - sh:order 17 ; - sh:path sssom:mapping_tool_version ], - [ sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; + [ sh:description "The type of entity that is being mapped." ; + sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; - sh:order 15 ; - sh:path sssom:mapping_provider ], - [ sh:description "URI of vocabulary or identifier source for the object." ; + sh:order 10 ; + sh:path sssom:subject_type ], + [ sh:datatype xsd:date ; + sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; sh:maxCount 1 ; - sh:order 13 ; - sh:path sssom:object_source ], - [ sh:description "A version string for the mapping." ; + sh:order 19 ; + sh:path pav:authoredOn ], + [ sh:datatype xsd:anyURI ; + sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; sh:maxCount 1 ; + sh:minCount 1 ; sh:order 2 ; - sh:path owl:versionInfo ], - [ sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + sh:path sssom:mapping_set_id ], + [ sh:datatype xsd:string ; + sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; + sh:order 25 ; + sh:path rdfs:seeAlso ], + [ sh:datatype xsd:string ; + sh:description "A description of the mapping set." ; sh:maxCount 1 ; - sh:order 27 ; + sh:order 6 ; + sh:path dcterms:description ], + [ sh:datatype xsd:string ; + sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + sh:maxCount 1 ; + sh:order 28 ; sh:path rdfs:comment ], - [ sh:description "A URL location of the issue tracker for this entity." ; + [ sh:datatype xsd:date ; + sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; sh:maxCount 1 ; - sh:order 25 ; - sh:path sssom:issue_tracker ], + sh:order 20 ; + sh:path dcterms:created ], + [ sh:datatype xsd:string ; + sh:description "A version string for the mapping." ; + sh:maxCount 1 ; + sh:order 3 ; + sh:path owl:versionInfo ], + [ sh:description "URI of vocabulary or identifier source for the subject." ; + sh:maxCount 1 ; + sh:order 11 ; + sh:path sssom:subject_source ], [ sh:description "The type of entity that is being mapped." ; sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; - sh:order 12 ; + sh:order 13 ; sh:path sssom:object_type ], - [ sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + [ sh:class sssom:Prefix ; + sh:description "A dictionary that contains prefixes as keys and their URI expansions as values." ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 0 ; + sh:path sssom:curie_map ], + [ sh:class owl:Axiom ; + sh:description "Contains a list of mapping objects" ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:order 1 ; + sh:path sssom:mappings ] ; + sh:targetClass sssom:MappingSet . + +sssom:Propagatable a sh:NodeShape ; + sh:closed true ; + sh:description "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:boolean ; + sh:description "Indicates whether a slot can be propagated from a mapping down to individual mappings." ; sh:maxCount 1 ; - sh:order 26 ; + sh:order 0 ; + sh:path sssom:propagated ] ; + sh:targetClass sssom:Propagatable . + +owl:Axiom a sh:NodeShape ; + sh:closed true ; + sh:description "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", + "Represents an individual mapping between a pair of entities" ; + sh:ignoredProperties ( rdf:type ), + ( rdf:type ) ; + sh:property [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the subject term." ; + sh:maxCount 1 ; + sh:order 19 ; + sh:path sssom:subject_source_version ], + [ sh:description "URI of ontology source for the literal." ; + sh:maxCount 1 ; + sh:order 16 ; + sh:path sssom:literal_source ], + [ sh:description "The ID of the object of the mapping." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 6 ; + sh:path owl:annotatedTarget ], + [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; + sh:order 28 ; + sh:path sssom:object_match_field ], + [ sh:datatype xsd:string ; + sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; + sh:maxCount 1 ; + sh:order 24 ; + sh:path sssom:mapping_tool ], + [ sh:datatype xsd:string ; + sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; + sh:maxCount 1 ; + sh:order 8 ; + sh:path sssom:object_category ], + [ sh:datatype xsd:anyURI ; + sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; + sh:maxCount 1 ; + sh:order 15 ; + sh:path dcterms:license ], + [ sh:datatype xsd:string ; + sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + sh:maxCount 1 ; + sh:order 35 ; sh:path sssom:other ], - [ sh:description "The type of entity that is being mapped." ; - sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; + [ sh:datatype xsd:string ; + sh:description "Version string that denotes the version of the mapping tool used." ; sh:maxCount 1 ; + sh:order 25 ; + sh:path sssom:mapping_tool_version ], + [ sh:description "URI of vocabulary or identifier source for the object." ; + sh:maxCount 1 ; + sh:order 19 ; + sh:path sssom:object_source ], + [ sh:datatype xsd:double ; + sh:description "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence." ; + sh:maxCount 1 ; + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:order 38 ; + sh:path sssom:semantic_similarity_score ], + [ sh:datatype xsd:string ; + sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + sh:maxCount 1 ; + sh:order 42 ; + sh:path sssom:other ], + [ sh:datatype xsd:string ; + sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; + sh:order 34 ; + sh:path rdfs:seeAlso ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the object term." ; + sh:maxCount 1 ; + sh:order 20 ; + sh:path sssom:object_source_version ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the literal." ; + sh:maxCount 1 ; + sh:order 17 ; + sh:path sssom:literal_source_version ], + [ sh:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; sh:order 9 ; - sh:path sssom:subject_type ], - [ sh:description "The display name of a mapping set." ; + sh:path pav:authoredBy ], + [ sh:description "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another." ; sh:maxCount 1 ; - sh:order 4 ; - sh:path dcterms:title ], - [ sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; + sh:order 22 ; + sh:path sssom:mapping_source ], + [ sh:description "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." ; + sh:in ( "1:1" "1:n" "n:1" "1:0" "0:1" "n:n" ) ; sh:maxCount 1 ; - sh:order 18 ; - sh:path pav:authoredOn ], + sh:order 23 ; + sh:path sssom:mapping_cardinality ], + [ sh:datatype xsd:string ; + sh:description "Version IRI or version string of the source of the object term." ; + sh:maxCount 1 ; + sh:order 22 ; + sh:path sssom:object_source_version ], + [ sh:description "Method of preprocessing applied to the literal." ; + sh:order 30 ; + sh:path sssom:literal_preprocessing ], [ sh:description "URI of vocabulary or identifier source for the subject." ; sh:maxCount 1 ; - sh:order 10 ; + sh:order 18 ; sh:path sssom:subject_source ], - [ sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; - sh:order 7 ; + [ sh:datatype xsd:string ; + sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; + sh:order 14 ; sh:path sssom:creator_label ], - [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 23 ; - sh:path sssom:object_preprocessing ] ; - sh:targetClass sssom:MappingSet . - -owl:Axiom a sh:NodeShape ; - sh:closed true ; - sh:description "Represents an individual mapping between a pair of entities" ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "URI of vocabulary or identifier source for the subject." ; + [ sh:datatype xsd:string ; + sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; sh:maxCount 1 ; - sh:order 18 ; - sh:path sssom:subject_source ], - [ sh:description "Version string that denotes the version of the mapping tool used." ; + sh:order 7 ; + sh:path sssom:object_category ], + [ sh:datatype xsd:string ; + sh:description "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead." ; + sh:order 13 ; + sh:path sssom:reviewer_label ], + [ sh:datatype xsd:string ; + sh:description "The label of subject of the mapping" ; sh:maxCount 1 ; - sh:order 27 ; - sh:path sssom:mapping_tool_version ], - [ sh:description "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable." ; + sh:order 1 ; + sh:path sssom:subject_label ], + [ sh:description "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable." ; sh:maxCount 1 ; - sh:order 39 ; - sh:path sssom:semantic_similarity_measure ], + sh:minCount 1 ; + sh:or ( [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] ) ; + sh:order 9 ; + sh:path sssom:mapping_justification ], + [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 14 ; + sh:path dcterms:creator ], + [ sh:datatype xsd:double ; + sh:description "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence." ; + sh:maxCount 1 ; + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:order 30 ; + sh:path sssom:confidence ], + [ sh:datatype xsd:string ; + sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; + sh:order 15 ; + sh:path sssom:creator_label ], [ sh:description "The ID of the subject of the mapping." ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 0 ; sh:path owl:annotatedSource ], - [ sh:description "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead." ; - sh:order 11 ; - sh:path sssom:author_label ], - [ sh:description "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data." ; + [ sh:datatype xsd:anyURI ; + sh:description "The datatype of the literal being mapped" ; sh:maxCount 1 ; - sh:order 42 ; - sh:path sssom:other ], - [ sh:description "The label of the predicate/relation of the mapping" ; + sh:order 1 ; + sh:path rdf:datatype ], + [ sh:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 10 ; + sh:path pav:authoredBy ], + [ sh:description "The ID of the predicate or relation that relates the subject and object of this match." ; sh:maxCount 1 ; - sh:order 4 ; - sh:path sssom:predicate_label ], - [ sh:description "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 12 ; - sh:path sssom:reviewer_id ], - [ sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; + sh:minCount 1 ; + sh:order 3 ; + sh:path owl:annotatedProperty ], + [ sh:description "The ID of the predicate or relation that relates the subject and object of this match." ; sh:maxCount 1 ; - sh:order 16 ; - sh:path dcterms:license ], - [ sh:description "The type of entity that is being mapped." ; - sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; + sh:minCount 1 ; + sh:order 2 ; + sh:path owl:annotatedProperty ], + [ sh:datatype xsd:string ; + sh:description "The label of the predicate/relation of the mapping" ; sh:maxCount 1 ; - sh:order 20 ; - sh:path sssom:object_type ], + sh:order 4 ; + sh:path sssom:predicate_label ], [ sh:description "The type of entity that is being mapped." ; sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; sh:order 17 ; sh:path sssom:subject_type ], - [ sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; - sh:maxCount 1 ; - sh:order 43 ; - sh:path rdfs:comment ], - [ sh:description "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another." ; + [ sh:datatype xsd:double ; + sh:description "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence." ; sh:maxCount 1 ; - sh:order 24 ; - sh:path sssom:mapping_source ], - [ sh:description "Version IRI or version string of the source of the subject term." ; - sh:maxCount 1 ; - sh:order 19 ; - sh:path sssom:subject_source_version ], - [ sh:description "A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead." ; - sh:order 15 ; - sh:path sssom:creator_label ], - [ sh:description "The ID of the object of the mapping." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 6 ; - sh:path owl:annotatedTarget ], - [ sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; - sh:order 40 ; - sh:path rdfs:seeAlso ], + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:order 32 ; + sh:path sssom:similarity_score ], [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 37 ; + sh:order 31 ; sh:path sssom:object_preprocessing ], + [ sh:datatype xsd:anyURI ; + sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; + sh:maxCount 1 ; + sh:order 21 ; + sh:path sssom:mapping_provider ], + [ sh:datatype xsd:string ; + sh:description "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; + sh:order 35 ; + sh:path sssom:match_string ], [ sh:description "The issue tracker item discussing this mapping." ; sh:maxCount 1 ; sh:order 41 ; sh:path sssom:issue_tracker_item ], - [ sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; - sh:maxCount 1 ; - sh:order 8 ; - sh:path sssom:object_category ], - [ sh:description "The label of object of the mapping" ; - sh:maxCount 1 ; - sh:order 7 ; - sh:path sssom:object_label ], - [ sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; + [ sh:description "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." ; + sh:in ( "1:1" "1:n" "n:1" "1:0" "0:1" "n:n" ) ; sh:maxCount 1 ; - sh:order 28 ; - sh:path pav:authoredOn ], - [ sh:description "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead." ; + sh:order 25 ; + sh:path sssom:mapping_cardinality ], + [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; sh:order 13 ; - sh:path sssom:reviewer_label ], + sh:path dcterms:creator ], [ sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule is captured as a resource rather than a string, which enables higher levels of transparency and sharing across mapping sets. The URI representation of the curation rule is expected to be a resolvable identifier which provides details about the nature of the curation rule." ; sh:order 31 ; sh:path sssom:curation_rule ], + [ sh:datatype xsd:anyURI ; + sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; + sh:maxCount 1 ; + sh:order 23 ; + sh:path sssom:mapping_provider ], + [ sh:description "The type of entity that is being mapped." ; + sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; + sh:maxCount 1 ; + sh:order 20 ; + sh:path sssom:object_type ], + [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; + sh:order 33 ; + sh:path sssom:subject_match_field ], + [ sh:datatype xsd:string ; + sh:description "Version string that denotes the version of the mapping tool used." ; + sh:maxCount 1 ; + sh:order 27 ; + sh:path sssom:mapping_tool_version ], + [ sh:datatype xsd:string ; + sh:description "A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead." ; + sh:order 12 ; + sh:path sssom:reviewer_label ], + [ sh:datatype xsd:string ; + sh:description "The label of the predicate/relation of the mapping" ; + sh:maxCount 1 ; + sh:order 3 ; + sh:path sssom:predicate_label ], + [ sh:datatype xsd:string ; + sh:description "The label of object of the mapping" ; + sh:maxCount 1 ; + sh:order 7 ; + sh:path sssom:object_label ], [ sh:description "A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable." ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 9 ; - sh:path sssom:mapping_justification ; - sh:pattern "^semapv:(MappingReview|ManualMappingCuration|LogicalReasoning|LexicalMatching|CompositeMatching|UnspecifiedMatching|SemanticSimilarityThresholdMatching|LexicalSimilarityThresholdMatching|MappingChaining)$" ], - [ sh:description "The ID of the predicate or relation that relates the subject and object of this match." ; + sh:or ( [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] ) ; + sh:order 8 ; + sh:path sssom:mapping_justification ], + [ sh:datatype xsd:string ; + sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; + sh:maxCount 1 ; + sh:order 26 ; + sh:path sssom:mapping_tool ], + [ sh:datatype xsd:string ; + sh:description "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; + sh:order 29 ; + sh:path sssom:match_string ], + [ sh:datatype xsd:string ; + sh:description "The literal being mapped" ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 3 ; - sh:path owl:annotatedProperty ], - [ sh:description "The label of subject of the mapping" ; + sh:order 0 ; + sh:path owl:annotatedTarget ], + [ sh:datatype xsd:string ; + sh:description "The label of object of the mapping" ; sh:maxCount 1 ; - sh:order 1 ; - sh:path sssom:subject_label ], - [ sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule should be captured as a resource (entity reference) rather than a string (see curation_rule element), which enables higher levels of transparency and sharing across mapping sets. The textual representation of curation rule is intended to be used in cases where (1) the creation of a resource is not practical from the perspective of the mapping_provider and (2) as an additional piece of metadata to augment the curation_rule element with a human readable text." ; + sh:order 6 ; + sh:path sssom:object_label ], + [ sh:datatype xsd:string ; + sh:description "A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment" ; + sh:order 40 ; + sh:path rdfs:seeAlso ], + [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; + sh:order 36 ; + sh:path sssom:subject_preprocessing ], + [ sh:datatype xsd:date ; + sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; + sh:maxCount 1 ; + sh:order 28 ; + sh:path pav:authoredOn ], + [ sh:datatype xsd:double ; + sh:description "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence." ; + sh:maxCount 1 ; + sh:maxInclusive 1e+00 ; + sh:minInclusive 0e+00 ; + sh:order 27 ; + sh:path sssom:confidence ], + [ sh:datatype xsd:date ; + sh:description "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file." ; + sh:maxCount 1 ; + sh:order 26 ; + sh:path pav:authoredOn ], + [ sh:datatype xsd:string ; + sh:description "A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule should be captured as a resource (entity reference) rather than a string (see curation_rule element), which enables higher levels of transparency and sharing across mapping sets. The textual representation of curation rule is intended to be used in cases where (1) the creation of a resource is not practical from the perspective of the mapping_provider and (2) as an additional piece of metadata to augment the curation_rule element with a human readable text." ; sh:order 32 ; sh:path sssom:curation_rule_text ], - [ sh:description "Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; - sh:order 14 ; - sh:path dcterms:creator ], [ sh:description "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" ; sh:in ( "Not" ) ; sh:maxCount 1 ; sh:order 5 ; sh:path sssom:predicate_modifier ], - [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; - sh:order 34 ; - sh:path sssom:object_match_field ], - [ sh:description "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text." ; - sh:maxCount 1 ; - sh:order 26 ; - sh:path sssom:mapping_tool ], - [ sh:description "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; - sh:order 36 ; - sh:path sssom:subject_preprocessing ], - [ sh:description "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set." ; - sh:in ( "1:1" "1:n" "n:1" "1:0" "0:1" "n:n" ) ; + [ sh:description "URI of vocabulary or identifier source for the object." ; sh:maxCount 1 ; - sh:order 25 ; - sh:path sssom:mapping_cardinality ], - [ sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; + sh:order 21 ; + sh:path sssom:object_source ], + [ sh:datatype xsd:date ; + sh:description "The date the mapping was published. This is different from the date the mapping was asserted." ; sh:maxCount 1 ; sh:order 29 ; sh:path dcterms:created ], - [ sh:description "Strings that are shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots." ; - sh:order 35 ; - sh:path sssom:match_string ], - [ sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; + [ sh:description "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows." ; + sh:order 37 ; + sh:path sssom:object_preprocessing ], + [ sh:description "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 11 ; + sh:path sssom:reviewer_id ], + [ sh:datatype xsd:string ; + sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; + sh:maxCount 1 ; + sh:order 43 ; + sh:path rdfs:comment ], + [ sh:description "A list of properties (term annotations on the object) that was used for the match." ; + sh:order 34 ; + sh:path sssom:object_match_field ], + [ sh:description "Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:order 12 ; + sh:path sssom:reviewer_id ], + [ sh:datatype xsd:string ; + sh:description "The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases." ; sh:maxCount 1 ; sh:order 2 ; sh:path sssom:subject_category ], - [ sh:description "URI of vocabulary or identifier source for the object." ; + [ sh:datatype xsd:string ; + sh:description "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead." ; + sh:order 11 ; + sh:path sssom:author_label ], + [ sh:datatype xsd:anyURI ; + sh:description "A url to the license of the mapping. In absence of a license we assume no license." ; + sh:maxCount 1 ; + sh:order 16 ; + sh:path dcterms:license ], + [ sh:description "A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion" ; + sh:in ( "Not" ) ; + sh:maxCount 1 ; + sh:order 4 ; + sh:path sssom:predicate_modifier ], + [ sh:datatype xsd:string ; + sh:description "The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable." ; + sh:maxCount 1 ; + sh:order 39 ; + sh:path sssom:semantic_similarity_measure ], + [ sh:datatype xsd:string ; + sh:description "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable." ; sh:maxCount 1 ; - sh:order 21 ; - sh:path sssom:object_source ], - [ sh:description "A list of properties (term annotations on the subject) that was used for the match." ; sh:order 33 ; - sh:path sssom:subject_match_field ], - [ sh:description "A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence." ; + sh:path sssom:similarity_measure ], + [ sh:description "The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another." ; sh:maxCount 1 ; - sh:order 38 ; - sh:path sssom:semantic_similarity_score ], - [ sh:description "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived." ; + sh:order 24 ; + sh:path sssom:mapping_source ], + [ sh:description "The ID of the object of the mapping." ; sh:maxCount 1 ; - sh:order 23 ; - sh:path sssom:mapping_provider ], - [ sh:description "Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs." ; + sh:minCount 1 ; + sh:order 5 ; + sh:path owl:annotatedTarget ], + [ sh:datatype xsd:string ; + sh:description "A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead." ; sh:order 10 ; - sh:path pav:authoredBy ], - [ sh:description "Version IRI or version string of the source of the object term." ; + sh:path sssom:author_label ], + [ sh:datatype xsd:string ; + sh:description "Free text field containing either curator notes or text generated by tool providing additional informative information." ; sh:maxCount 1 ; - sh:order 22 ; - sh:path sssom:object_source_version ], - [ sh:description "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence." ; + sh:order 36 ; + sh:path rdfs:comment ], + [ sh:description "The type of entity that is being mapped." ; + sh:in ( owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ) ; sh:maxCount 1 ; - sh:order 30 ; - sh:path sssom:confidence ] ; + sh:order 18 ; + sh:path sssom:object_type ] ; sh:targetClass owl:Axiom . sssom:MappingSetReference a sh:NodeShape ; sh:closed true ; sh:description "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The local name assigned to file that corresponds to the downloaded mapping set." ; + sh:property [ sh:datatype xsd:string ; + sh:description "Set by the owners of the mapping registry. A way to group ." ; sh:maxCount 1 ; - sh:order 5 ; - sh:path sssom:local_name ], - [ sh:description "The date this reference was last updated." ; + sh:order 3 ; + sh:path sssom:mapping_set_group ], + [ sh:datatype xsd:date ; + sh:description "The date this reference was last updated." ; sh:maxCount 1 ; sh:order 4 ; sh:path sssom:last_updated ], - [ sh:description "Set by the owners of the mapping registry. A way to group ." ; - sh:maxCount 1 ; - sh:order 3 ; - sh:path sssom:mapping_set_group ], - [ sh:description "A URL location from which to obtain a resource, such as a mapping set." ; + [ sh:datatype xsd:anyURI ; + sh:description "A URL location from which to obtain a resource, such as a mapping set." ; sh:maxCount 1 ; sh:order 1 ; sh:path sssom:mirror_from ], - [ sh:description "This value is set by the registry that indexes the mapping set. It reflects the confidence the registry has in the correctness of the mappings in the mapping set." ; + [ sh:datatype xsd:string ; + sh:description "The local name assigned to file that corresponds to the downloaded mapping set." ; + sh:maxCount 1 ; + sh:order 5 ; + sh:path sssom:local_name ], + [ sh:datatype xsd:double ; + sh:description "This value is set by the registry that indexes the mapping set. It reflects the confidence the registry has in the correctness of the mappings in the mapping set." ; sh:maxCount 1 ; sh:order 2 ; sh:path sssom:registry_confidence ], - [ sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; + [ sh:datatype xsd:anyURI ; + sh:description "A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable." ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 0 ; sh:path sssom:mapping_set_id ] ; sh:targetClass sssom:MappingSetReference . +sssom:Prefix a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:anyURI ; + sh:maxCount 1 ; + sh:order 1 ; + sh:path sssom:prefix_url ], + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:order 0 ; + sh:path sssom:prefix_name ] ; + sh:targetClass sssom:Prefix . + diff --git a/project/shex/sssom_schema.shex b/project/shex/sssom_schema.shex index b2eacce5..2a8a2fe4 100644 --- a/project/shex/sssom_schema.shex +++ b/project/shex/sssom_schema.shex @@ -1,6 +1,7 @@ BASE -PREFIX owl: PREFIX prov: +PREFIX skos: +PREFIX owl: PREFIX rdf: PREFIX rdfs: PREFIX xsd: @@ -49,13 +50,60 @@ linkml:Jsonpath xsd:string linkml:Sparqlpath xsd:string + CLOSED { + ( $ ( owl:annotatedTarget @linkml:String ; + rdf:datatype @linkml:Uri ? ; + owl:annotatedProperty @ ; + @linkml:String ? ; + [ ] ? ; + owl:annotatedTarget @ ; + @linkml:String ? ; + @linkml:String ? ; + @ ; + pav:authoredBy @ * ; + @linkml:String * ; + @ * ; + @linkml:String * ; + dc1:creator @ * ; + @linkml:String * ; + dc1:license @linkml:Uri ? ; + @ ? ; + @linkml:String ? ; + [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept + rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; + @ ? ; + @linkml:String ? ; + @linkml:Uri ? ; + @ ? ; + [ + + + ] ? ; + @linkml:String ? ; + @linkml:String ? ; + pav:authoredOn @linkml:Date ? ; + @linkml:Double ? ; + @ * ; + @linkml:String * ; + @ * ; + @ * ; + @linkml:Double ? ; + @linkml:String ? ; + rdfs:seeAlso @linkml:String * ; + @linkml:String ? ; + rdfs:comment @linkml:String ? + ) ; + rdf:type [ owl:Axiom ] ? + ) +} + CLOSED { ( $ ( owl:annotatedSource @ ; @linkml:String ? ; @linkml:String ? ; owl:annotatedProperty @ ; @linkml:String ? ; - @ ? ; + [ ] ? ; owl:annotatedTarget @ ; @linkml:String ? ; @linkml:String ? ; @@ -67,15 +115,20 @@ linkml:Sparqlpath xsd:string dc1:creator @ * ; @linkml:String * ; dc1:license @linkml:Uri ? ; - @ ? ; + [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept + rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; @ ? ; @linkml:String ? ; - @ ? ; + [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept + rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; @ ? ; @linkml:String ? ; @linkml:Uri ? ; @ ? ; - @ ? ; + [ + + + ] ? ; @linkml:String ? ; @linkml:String ? ; pav:authoredOn @linkml:Date ? ; @@ -114,7 +167,8 @@ linkml:Sparqlpath xsd:string } CLOSED { - ( $ ( @ * ; + ( $ ( @ * ; + @ * ; @linkml:Uri ; owl:versionInfo @linkml:String ? ; prov:wasDerivedFrom @linkml:Uri * ; @@ -123,10 +177,12 @@ linkml:Sparqlpath xsd:string dc1:creator @ * ; @linkml:String * ; dc1:license @linkml:Uri ; - @ ? ; + [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept + rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; @ ? ; @linkml:String ? ; - @ ? ; + [ owl:Class owl:ObjectProperty owl:DataProperty owl:AnnotationProperty owl:NamedIndividual skos:Concept + rdfs:Resource rdfs:Class rdfs:Literal rdfs:Datatype rdf:Property ] ? ; @ ? ; @linkml:String ? ; @linkml:Uri ? ; @@ -159,4 +215,18 @@ linkml:Sparqlpath xsd:string ) } + CLOSED { + ( $ ( @linkml:Ncname ; + @linkml:Uri ? + ) ; + rdf:type [ ] + ) +} + + CLOSED { + ( $ @linkml:Boolean ? ; + rdf:type [ ] ? + ) +} + diff --git a/project/sqlschema/sssom_schema.sql b/project/sqlschema/sssom_schema.sql index f05799c9..dd613bd2 100644 --- a/project/sqlschema/sssom_schema.sql +++ b/project/sqlschema/sssom_schema.sql @@ -1,9 +1,241 @@ +-- # Class: "mapping set" Description: "Represents a set of mappings" +-- * Slot: id Description: +-- * Slot: mapping_set_id Description: A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable. +-- * Slot: mapping_set_version Description: A version string for the mapping. +-- * Slot: mapping_set_title Description: The display name of a mapping set. +-- * Slot: mapping_set_description Description: A description of the mapping set. +-- * Slot: license Description: A url to the license of the mapping. In absence of a license we assume no license. +-- * Slot: subject_type Description: The type of entity that is being mapped. +-- * Slot: subject_source Description: URI of vocabulary or identifier source for the subject. +-- * Slot: subject_source_version Description: Version IRI or version string of the source of the subject term. +-- * Slot: object_type Description: The type of entity that is being mapped. +-- * Slot: object_source Description: URI of vocabulary or identifier source for the object. +-- * Slot: object_source_version Description: Version IRI or version string of the source of the object term. +-- * Slot: mapping_provider Description: URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived. +-- * Slot: mapping_tool Description: A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text. +-- * Slot: mapping_tool_version Description: Version string that denotes the version of the mapping tool used. +-- * Slot: mapping_date Description: The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file. +-- * Slot: publication_date Description: The date the mapping was published. This is different from the date the mapping was asserted. +-- * Slot: issue_tracker Description: A URL location of the issue tracker for this entity. +-- * Slot: other Description: Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data. +-- * Slot: comment Description: Free text field containing either curator notes or text generated by tool providing additional informative information. +-- # Class: "mapping" Description: "Represents an individual mapping between a pair of entities" +-- * Slot: id Description: +-- * Slot: subject_id Description: The ID of the subject of the mapping. +-- * Slot: subject_label Description: The label of subject of the mapping +-- * Slot: subject_category Description: The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases. +-- * Slot: predicate_id Description: The ID of the predicate or relation that relates the subject and object of this match. +-- * Slot: predicate_label Description: The label of the predicate/relation of the mapping +-- * Slot: predicate_modifier Description: A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion +-- * Slot: object_id Description: The ID of the object of the mapping. +-- * Slot: object_label Description: The label of object of the mapping +-- * Slot: object_category Description: The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases. +-- * Slot: mapping_justification Description: A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable. +-- * Slot: license Description: A url to the license of the mapping. In absence of a license we assume no license. +-- * Slot: subject_type Description: The type of entity that is being mapped. +-- * Slot: subject_source Description: URI of vocabulary or identifier source for the subject. +-- * Slot: subject_source_version Description: Version IRI or version string of the source of the subject term. +-- * Slot: object_type Description: The type of entity that is being mapped. +-- * Slot: object_source Description: URI of vocabulary or identifier source for the object. +-- * Slot: object_source_version Description: Version IRI or version string of the source of the object term. +-- * Slot: mapping_provider Description: URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived. +-- * Slot: mapping_source Description: The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another. +-- * Slot: mapping_cardinality Description: A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set. +-- * Slot: mapping_tool Description: A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text. +-- * Slot: mapping_tool_version Description: Version string that denotes the version of the mapping tool used. +-- * Slot: mapping_date Description: The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file. +-- * Slot: publication_date Description: The date the mapping was published. This is different from the date the mapping was asserted. +-- * Slot: confidence Description: A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence. +-- * Slot: semantic_similarity_score Description: A score between 0 and 1 to denote the semantic similarity, where 1 denotes equivalence. +-- * Slot: semantic_similarity_measure Description: The measure used for computing the the semantic similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable. +-- * Slot: issue_tracker_item Description: The issue tracker item discussing this mapping. +-- * Slot: other Description: Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data. +-- * Slot: comment Description: Free text field containing either curator notes or text generated by tool providing additional informative information. +-- * Slot: mapping set_id Description: Autocreated FK slot +-- # Class: "literal mapping" Description: "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change." +-- * Slot: id Description: +-- * Slot: literal Description: The literal being mapped +-- * Slot: literal_datatype Description: The datatype of the literal being mapped +-- * Slot: predicate_id Description: The ID of the predicate or relation that relates the subject and object of this match. +-- * Slot: predicate_label Description: The label of the predicate/relation of the mapping +-- * Slot: predicate_modifier Description: A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion +-- * Slot: object_id Description: The ID of the object of the mapping. +-- * Slot: object_label Description: The label of object of the mapping +-- * Slot: object_category Description: The conceptual category to which the subject belongs to. This can be a string denoting the category or a term from a controlled vocabulary. This slot is deliberately underspecified. Conceptual categories can range from those that are found in general upper ontologies such as BFO (e.g. process, temporal region, etc) to those that serve as upper ontologies in specific domains, such as COB or BioLink (e.g. gene, disease, chemical entity). The purpose of this optional field is documentation for human reviewers - when a category is known and documented clearly, the cost of interpreting and evaluating the mapping decreases. +-- * Slot: mapping_justification Description: A mapping justification is an action (or the written representation of that action) of showing a mapping to be right or reasonable. +-- * Slot: license Description: A url to the license of the mapping. In absence of a license we assume no license. +-- * Slot: literal_source Description: URI of ontology source for the literal. +-- * Slot: literal_source_version Description: Version IRI or version string of the source of the literal. +-- * Slot: object_type Description: The type of entity that is being mapped. +-- * Slot: object_source Description: URI of vocabulary or identifier source for the object. +-- * Slot: object_source_version Description: Version IRI or version string of the source of the object term. +-- * Slot: mapping_provider Description: URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived. +-- * Slot: mapping_source Description: The mapping set this mapping was originally defined in. mapping_source is used for example when merging multiple mapping sets or deriving one mapping set from another. +-- * Slot: mapping_cardinality Description: A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set. +-- * Slot: mapping_tool Description: A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text. +-- * Slot: mapping_tool_version Description: Version string that denotes the version of the mapping tool used. +-- * Slot: mapping_date Description: The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file. +-- * Slot: confidence Description: A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence. +-- * Slot: similarity_score Description: A score between 0 and 1 to denote the similarity, where 1 denotes equivalence. +-- * Slot: similarity_measure Description: The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable. +-- * Slot: other Description: Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data. +-- * Slot: comment Description: Free text field containing either curator notes or text generated by tool providing additional informative information. +-- # Class: "mapping registry" Description: "A registry for managing mapping sets. It holds a set of mapping set references, and can import other registries." +-- * Slot: id Description: +-- * Slot: mapping_registry_id Description: The unique identifier of a mapping registry. +-- * Slot: mapping_registry_title Description: The title of a mapping registry. +-- * Slot: mapping_registry_description Description: The description of a mapping registry. +-- * Slot: documentation Description: A URL to the documentation of this mapping commons. +-- * Slot: homepage Description: A URL to a homepage of this mapping commons. +-- * Slot: issue_tracker Description: A URL location of the issue tracker for this entity. +-- # Class: "mapping set reference" Description: "A reference to a mapping set. It allows to augment mapping set metadata from the perspective of the registry, for example, providing confidence, or a local filename or a grouping." +-- * Slot: id Description: +-- * Slot: mapping_set_id Description: A globally unique identifier for the mapping set (not each individual mapping). Should be IRI, ideally resolvable. +-- * Slot: mirror_from Description: A URL location from which to obtain a resource, such as a mapping set. +-- * Slot: registry_confidence Description: This value is set by the registry that indexes the mapping set. It reflects the confidence the registry has in the correctness of the mappings in the mapping set. +-- * Slot: mapping_set_group Description: Set by the owners of the mapping registry. A way to group . +-- * Slot: last_updated Description: The date this reference was last updated. +-- * Slot: local_name Description: The local name assigned to file that corresponds to the downloaded mapping set. +-- # Class: "prefix" Description: "" +-- * Slot: prefix_name Description: +-- * Slot: prefix_url Description: +-- * Slot: mapping set_id Description: Autocreated FK slot +-- # Class: "Propagatable" Description: "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class." +-- * Slot: id Description: +-- * Slot: propagated Description: Indicates whether a slot can be propagated from a mapping down to individual mappings. +-- # Class: "mapping set_mapping_set_source" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: mapping_set_source Description: A mapping set or set of mapping set that was used to derive the mapping set. +-- # Class: "mapping set_creator_id" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: creator_id Description: Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs. +-- # Class: "mapping set_creator_label" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: creator_label Description: A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead. +-- # Class: "mapping set_subject_match_field" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: subject_match_field Description: A list of properties (term annotations on the subject) that was used for the match. +-- # Class: "mapping set_object_match_field" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: object_match_field Description: A list of properties (term annotations on the object) that was used for the match. +-- # Class: "mapping set_subject_preprocessing" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: subject_preprocessing Description: Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows. +-- # Class: "mapping set_object_preprocessing" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: object_preprocessing Description: Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows. +-- # Class: "mapping set_see_also" Description: "" +-- * Slot: mapping set_id Description: Autocreated FK slot +-- * Slot: see_also Description: A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment +-- # Class: "mapping_author_id" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: author_id Description: Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs. +-- # Class: "mapping_author_label" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: author_label Description: A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead. +-- # Class: "mapping_reviewer_id" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: reviewer_id Description: Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs. +-- # Class: "mapping_reviewer_label" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: reviewer_label Description: A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead. +-- # Class: "mapping_creator_id" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: creator_id Description: Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs. +-- # Class: "mapping_creator_label" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: creator_label Description: A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead. +-- # Class: "mapping_curation_rule" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: curation_rule Description: A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule is captured as a resource rather than a string, which enables higher levels of transparency and sharing across mapping sets. The URI representation of the curation rule is expected to be a resolvable identifier which provides details about the nature of the curation rule. +-- # Class: "mapping_curation_rule_text" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: curation_rule_text Description: A curation rule is a (potentially) complex condition executed by an agent that led to the establishment of a mapping. Curation rules often involve complex domain-specific considerations, which are hard to capture in an automated fashion. The curation rule should be captured as a resource (entity reference) rather than a string (see curation_rule element), which enables higher levels of transparency and sharing across mapping sets. The textual representation of curation rule is intended to be used in cases where (1) the creation of a resource is not practical from the perspective of the mapping_provider and (2) as an additional piece of metadata to augment the curation_rule element with a human readable text. +-- # Class: "mapping_subject_match_field" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: subject_match_field Description: A list of properties (term annotations on the subject) that was used for the match. +-- # Class: "mapping_object_match_field" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: object_match_field Description: A list of properties (term annotations on the object) that was used for the match. +-- # Class: "mapping_match_string" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: match_string Description: String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots. +-- # Class: "mapping_subject_preprocessing" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: subject_preprocessing Description: Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows. +-- # Class: "mapping_object_preprocessing" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: object_preprocessing Description: Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows. +-- # Class: "mapping_see_also" Description: "" +-- * Slot: mapping_id Description: Autocreated FK slot +-- * Slot: see_also Description: A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment +-- # Class: "literal mapping_author_id" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: author_id Description: Identifies the persons or groups responsible for asserting the mappings. Recommended to be a list of ORCIDs or otherwise identifying URIs. +-- # Class: "literal mapping_author_label" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: author_label Description: A string identifying the author of this mapping. In the spirit of provenance, consider using author_id instead. +-- # Class: "literal mapping_reviewer_id" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: reviewer_id Description: Identifies the persons or groups that reviewed and confirmed the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs. +-- # Class: "literal mapping_reviewer_label" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: reviewer_label Description: A string identifying the reviewer of this mapping. In the spirit of provenance, consider using reviewer_id instead. +-- # Class: "literal mapping_creator_id" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: creator_id Description: Identifies the persons or groups responsible for the creation of the mapping. The creator is the agent that put the mapping in its published form, which may be different from the author, which is a person that was actively involved in the assertion of the mapping. Recommended to be a list of ORCIDs or otherwise identifying URIs. +-- # Class: "literal mapping_creator_label" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: creator_label Description: A string identifying the creator of this mapping. In the spirit of provenance, consider using creator_id instead. +-- # Class: "literal mapping_object_match_field" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: object_match_field Description: A list of properties (term annotations on the object) that was used for the match. +-- # Class: "literal mapping_match_string" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: match_string Description: String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots. +-- # Class: "literal mapping_literal_preprocessing" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: literal_preprocessing Description: Method of preprocessing applied to the literal. +-- # Class: "literal mapping_object_preprocessing" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: object_preprocessing Description: Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows. +-- # Class: "literal mapping_see_also" Description: "" +-- * Slot: literal mapping_id Description: Autocreated FK slot +-- * Slot: see_also Description: A URL specific for the mapping instance. E.g. for kboom we have a per-mapping image that shows surrounding axioms that drive probability. Could also be a github issue URL that discussed a complicated alignment +-- # Class: "mapping registry_imports" Description: "" +-- * Slot: mapping registry_id Description: Autocreated FK slot +-- * Slot: imports Description: A list of registries that should be imported into this one. +-- # Class: "mapping registry_mapping_set_references" Description: "" +-- * Slot: mapping registry_id Description: Autocreated FK slot +-- * Slot: mapping_set_references_id Description: A list of mapping set references. - -CREATE TABLE mapping ( - subject_id TEXT NOT NULL, - subject_label TEXT, - subject_category TEXT, +CREATE TABLE "mapping set" ( + id INTEGER NOT NULL, + mapping_set_id TEXT NOT NULL, + mapping_set_version TEXT, + mapping_set_title TEXT, + mapping_set_description TEXT, + license TEXT NOT NULL, + subject_type VARCHAR(23), + subject_source TEXT, + subject_source_version TEXT, + object_type VARCHAR(23), + object_source TEXT, + object_source_version TEXT, + mapping_provider TEXT, + mapping_tool TEXT, + mapping_tool_version TEXT, + mapping_date DATE, + publication_date DATE, + issue_tracker TEXT, + other TEXT, + comment TEXT, + PRIMARY KEY (id) +); +CREATE TABLE "literal mapping" ( + id INTEGER NOT NULL, + literal TEXT NOT NULL, + literal_datatype TEXT, predicate_id TEXT NOT NULL, predicate_label TEXT, predicate_modifier VARCHAR(3), @@ -11,16 +243,9 @@ CREATE TABLE mapping ( object_label TEXT, object_category TEXT, mapping_justification TEXT NOT NULL, - author_id TEXT, - author_label TEXT, - reviewer_id TEXT, - reviewer_label TEXT, - creator_id TEXT, - creator_label TEXT, license TEXT, - subject_type VARCHAR(23), - subject_source TEXT, - subject_source_version TEXT, + literal_source TEXT, + literal_source_version TEXT, object_type VARCHAR(23), object_source TEXT, object_source_version TEXT, @@ -30,46 +255,51 @@ CREATE TABLE mapping ( mapping_tool TEXT, mapping_tool_version TEXT, mapping_date DATE, - publication_date DATE, confidence FLOAT, - curation_rule TEXT, - curation_rule_text TEXT, - subject_match_field TEXT, - object_match_field TEXT, - match_string TEXT, - subject_preprocessing TEXT, - object_preprocessing TEXT, - semantic_similarity_score FLOAT, - semantic_similarity_measure TEXT, - see_also TEXT, - issue_tracker_item TEXT, + similarity_score FLOAT, + similarity_measure TEXT, other TEXT, comment TEXT, - PRIMARY KEY (subject_id, subject_label, subject_category, predicate_id, predicate_label, predicate_modifier, object_id, object_label, object_category, mapping_justification, author_id, author_label, reviewer_id, reviewer_label, creator_id, creator_label, license, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_source, mapping_cardinality, mapping_tool, mapping_tool_version, mapping_date, publication_date, confidence, curation_rule, curation_rule_text, subject_match_field, object_match_field, match_string, subject_preprocessing, object_preprocessing, semantic_similarity_score, semantic_similarity_measure, see_also, issue_tracker_item, other, comment) + PRIMARY KEY (id) ); - -CREATE TABLE mapping_registry ( +CREATE TABLE "mapping registry" ( + id INTEGER NOT NULL, mapping_registry_id TEXT NOT NULL, mapping_registry_title TEXT, mapping_registry_description TEXT, - imports TEXT, - mapping_set_references TEXT, documentation TEXT, homepage TEXT, issue_tracker TEXT, - PRIMARY KEY (mapping_registry_id, mapping_registry_title, mapping_registry_description, imports, mapping_set_references, documentation, homepage, issue_tracker) + PRIMARY KEY (id) ); - -CREATE TABLE mapping_set ( - mappings TEXT, +CREATE TABLE "mapping set reference" ( + id INTEGER NOT NULL, mapping_set_id TEXT NOT NULL, - mapping_set_version TEXT, - mapping_set_source TEXT, - mapping_set_title TEXT, - mapping_set_description TEXT, - creator_id TEXT, - creator_label TEXT, - license TEXT NOT NULL, + mirror_from TEXT, + registry_confidence FLOAT, + mapping_set_group TEXT, + last_updated DATE, + local_name TEXT, + PRIMARY KEY (id) +); +CREATE TABLE "Propagatable" ( + id INTEGER NOT NULL, + propagated BOOLEAN, + PRIMARY KEY (id) +); +CREATE TABLE mapping ( + id INTEGER NOT NULL, + subject_id TEXT NOT NULL, + subject_label TEXT, + subject_category TEXT, + predicate_id TEXT NOT NULL, + predicate_label TEXT, + predicate_modifier VARCHAR(3), + object_id TEXT NOT NULL, + object_label TEXT, + object_category TEXT, + mapping_justification TEXT NOT NULL, + license TEXT, subject_type VARCHAR(23), subject_source TEXT, subject_source_version TEXT, @@ -77,27 +307,237 @@ CREATE TABLE mapping_set ( object_source TEXT, object_source_version TEXT, mapping_provider TEXT, + mapping_source TEXT, + mapping_cardinality VARCHAR(3), mapping_tool TEXT, mapping_tool_version TEXT, mapping_date DATE, publication_date DATE, + confidence FLOAT, + semantic_similarity_score FLOAT, + semantic_similarity_measure TEXT, + issue_tracker_item TEXT, + other TEXT, + comment TEXT, + "mapping set_id" INTEGER, + PRIMARY KEY (id), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE prefix ( + prefix_name TEXT NOT NULL, + prefix_url TEXT, + "mapping set_id" INTEGER, + PRIMARY KEY (prefix_name, prefix_url, "mapping set_id"), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_mapping_set_source" ( + "mapping set_id" INTEGER, + mapping_set_source TEXT, + PRIMARY KEY ("mapping set_id", mapping_set_source), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_creator_id" ( + "mapping set_id" INTEGER, + creator_id TEXT, + PRIMARY KEY ("mapping set_id", creator_id), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_creator_label" ( + "mapping set_id" INTEGER, + creator_label TEXT, + PRIMARY KEY ("mapping set_id", creator_label), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_subject_match_field" ( + "mapping set_id" INTEGER, subject_match_field TEXT, + PRIMARY KEY ("mapping set_id", subject_match_field), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_object_match_field" ( + "mapping set_id" INTEGER, object_match_field TEXT, + PRIMARY KEY ("mapping set_id", object_match_field), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_subject_preprocessing" ( + "mapping set_id" INTEGER, subject_preprocessing TEXT, + PRIMARY KEY ("mapping set_id", subject_preprocessing), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_object_preprocessing" ( + "mapping set_id" INTEGER, object_preprocessing TEXT, + PRIMARY KEY ("mapping set_id", object_preprocessing), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) +); +CREATE TABLE "mapping set_see_also" ( + "mapping set_id" INTEGER, see_also TEXT, - issue_tracker TEXT, - other TEXT, - comment TEXT, - PRIMARY KEY (mappings, mapping_set_id, mapping_set_version, mapping_set_source, mapping_set_title, mapping_set_description, creator_id, creator_label, license, subject_type, subject_source, subject_source_version, object_type, object_source, object_source_version, mapping_provider, mapping_tool, mapping_tool_version, mapping_date, publication_date, subject_match_field, object_match_field, subject_preprocessing, object_preprocessing, see_also, issue_tracker, other, comment) + PRIMARY KEY ("mapping set_id", see_also), + FOREIGN KEY("mapping set_id") REFERENCES "mapping set" (id) ); - -CREATE TABLE mapping_set_reference ( - mapping_set_id TEXT NOT NULL, - mirror_from TEXT, - registry_confidence FLOAT, - mapping_set_group TEXT, - last_updated DATE, - local_name TEXT, - PRIMARY KEY (mapping_set_id, mirror_from, registry_confidence, mapping_set_group, last_updated, local_name) +CREATE TABLE "literal mapping_author_id" ( + "literal mapping_id" INTEGER, + author_id TEXT, + PRIMARY KEY ("literal mapping_id", author_id), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_author_label" ( + "literal mapping_id" INTEGER, + author_label TEXT, + PRIMARY KEY ("literal mapping_id", author_label), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) ); +CREATE TABLE "literal mapping_reviewer_id" ( + "literal mapping_id" INTEGER, + reviewer_id TEXT, + PRIMARY KEY ("literal mapping_id", reviewer_id), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_reviewer_label" ( + "literal mapping_id" INTEGER, + reviewer_label TEXT, + PRIMARY KEY ("literal mapping_id", reviewer_label), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_creator_id" ( + "literal mapping_id" INTEGER, + creator_id TEXT, + PRIMARY KEY ("literal mapping_id", creator_id), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_creator_label" ( + "literal mapping_id" INTEGER, + creator_label TEXT, + PRIMARY KEY ("literal mapping_id", creator_label), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_object_match_field" ( + "literal mapping_id" INTEGER, + object_match_field TEXT, + PRIMARY KEY ("literal mapping_id", object_match_field), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_match_string" ( + "literal mapping_id" INTEGER, + match_string TEXT, + PRIMARY KEY ("literal mapping_id", match_string), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_literal_preprocessing" ( + "literal mapping_id" INTEGER, + literal_preprocessing TEXT, + PRIMARY KEY ("literal mapping_id", literal_preprocessing), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_object_preprocessing" ( + "literal mapping_id" INTEGER, + object_preprocessing TEXT, + PRIMARY KEY ("literal mapping_id", object_preprocessing), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "literal mapping_see_also" ( + "literal mapping_id" INTEGER, + see_also TEXT, + PRIMARY KEY ("literal mapping_id", see_also), + FOREIGN KEY("literal mapping_id") REFERENCES "literal mapping" (id) +); +CREATE TABLE "mapping registry_imports" ( + "mapping registry_id" INTEGER, + imports TEXT, + PRIMARY KEY ("mapping registry_id", imports), + FOREIGN KEY("mapping registry_id") REFERENCES "mapping registry" (id) +); +CREATE TABLE "mapping registry_mapping_set_references" ( + "mapping registry_id" INTEGER, + mapping_set_references_id INTEGER, + PRIMARY KEY ("mapping registry_id", mapping_set_references_id), + FOREIGN KEY("mapping registry_id") REFERENCES "mapping registry" (id), + FOREIGN KEY(mapping_set_references_id) REFERENCES "mapping set reference" (id) +); +CREATE TABLE mapping_author_id ( + mapping_id INTEGER, + author_id TEXT, + PRIMARY KEY (mapping_id, author_id), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_author_label ( + mapping_id INTEGER, + author_label TEXT, + PRIMARY KEY (mapping_id, author_label), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_reviewer_id ( + mapping_id INTEGER, + reviewer_id TEXT, + PRIMARY KEY (mapping_id, reviewer_id), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_reviewer_label ( + mapping_id INTEGER, + reviewer_label TEXT, + PRIMARY KEY (mapping_id, reviewer_label), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_creator_id ( + mapping_id INTEGER, + creator_id TEXT, + PRIMARY KEY (mapping_id, creator_id), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_creator_label ( + mapping_id INTEGER, + creator_label TEXT, + PRIMARY KEY (mapping_id, creator_label), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_curation_rule ( + mapping_id INTEGER, + curation_rule TEXT, + PRIMARY KEY (mapping_id, curation_rule), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_curation_rule_text ( + mapping_id INTEGER, + curation_rule_text TEXT, + PRIMARY KEY (mapping_id, curation_rule_text), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_subject_match_field ( + mapping_id INTEGER, + subject_match_field TEXT, + PRIMARY KEY (mapping_id, subject_match_field), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_object_match_field ( + mapping_id INTEGER, + object_match_field TEXT, + PRIMARY KEY (mapping_id, object_match_field), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_match_string ( + mapping_id INTEGER, + match_string TEXT, + PRIMARY KEY (mapping_id, match_string), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_subject_preprocessing ( + mapping_id INTEGER, + subject_preprocessing TEXT, + PRIMARY KEY (mapping_id, subject_preprocessing), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_object_preprocessing ( + mapping_id INTEGER, + object_preprocessing TEXT, + PRIMARY KEY (mapping_id, object_preprocessing), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); +CREATE TABLE mapping_see_also ( + mapping_id INTEGER, + see_also TEXT, + PRIMARY KEY (mapping_id, see_also), + FOREIGN KEY(mapping_id) REFERENCES mapping (id) +); \ No newline at end of file diff --git a/src/sssom_schema/context/sssom_schema.context.jsonld b/src/sssom_schema/context/sssom_schema.context.jsonld index fc8fd2bf..be606a5f 100644 --- a/src/sssom_schema/context/sssom_schema.context.jsonld +++ b/src/sssom_schema/context/sssom_schema.context.jsonld @@ -1,5 +1,9 @@ { - "_comments": "Auto generated from sssom_schema.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2023-07-31T17:42:54\n Schema: sssom\n metamodel version: 1.7.0\n model version: None\n \n id: https://w3id.org/sssom/schema/\n description: Datamodel for Simple Standard for Sharing Ontological Mappings (SSSOM)\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ", + "comments": { + "description": "Auto generated by LinkML jsonld context generator", + "generation_date": "2024-08-05T10:23:03", + "source": "sssom_schema.yaml" + }, "@context": { "dcterms": "http://purl.org/dc/terms/", "linkml": "https://w3id.org/linkml/", @@ -12,75 +16,133 @@ "semapv": "https://w3id.org/semapv/vocab/", "skos": "http://www.w3.org/2004/02/skos/core#", "sssom": "https://w3id.org/sssom/", + "xsd": "http://www.w3.org/2001/XMLSchema#", "@vocab": "https://w3id.org/sssom/", "author_id": { "@type": "rdfs:Resource", "@id": "pav:authoredBy" }, + "author_label": { + "@id": "author_label" + }, "comment": { "@id": "rdfs:comment" }, "confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "confidence" }, "creator_id": { "@type": "rdfs:Resource", "@id": "dcterms:creator" }, + "creator_label": { + "@id": "creator_label" + }, "curation_rule": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "curation_rule" + }, + "curation_rule_text": { + "@id": "curation_rule_text" + }, + "curie_map": { + "@type": "@id", + "@id": "curie_map" }, "documentation": { - "@type": "@id" + "@type": "@id", + "@id": "documentation" }, "homepage": { - "@type": "@id" + "@type": "@id", + "@id": "homepage" }, "imports": { - "@type": "@id" + "@type": "@id", + "@id": "imports" }, "issue_tracker": { - "@type": "@id" + "@type": "@id", + "@id": "issue_tracker" }, "issue_tracker_item": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "issue_tracker_item" }, "last_updated": { - "@type": "xsd:date" + "@type": "xsd:date", + "@id": "last_updated" }, "license": { "@type": "@id", "@id": "dcterms:license" }, + "literal": { + "@id": "owl:annotatedTarget" + }, + "literal_datatype": { + "@type": "@id", + "@id": "rdf:datatype" + }, + "literal_preprocessing": { + "@type": "rdfs:Resource", + "@id": "literal_preprocessing" + }, + "literal_source": { + "@type": "rdfs:Resource", + "@id": "literal_source" + }, + "literal_source_version": { + "@id": "literal_source_version" + }, + "local_name": { + "@id": "local_name" + }, "mapping_cardinality": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "mapping_cardinality" }, "mapping_date": { "@type": "xsd:date", "@id": "pav:authoredOn" }, "mapping_justification": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_justification" }, "mapping_provider": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_provider" + }, + "mapping_registry_description": { + "@id": "mapping_registry_description" }, "mapping_registry_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_registry_id" + }, + "mapping_registry_title": { + "@id": "mapping_registry_title" }, "mapping_set_description": { "@id": "dcterms:description" }, + "mapping_set_group": { + "@id": "mapping_set_group" + }, "mapping_set_id": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_id" }, "mapping_set_references": { - "@type": "@id" + "@type": "@id", + "@id": "mapping_set_references" }, "mapping_set_source": { "@type": "@id", @@ -93,26 +155,50 @@ "@id": "owl:versionInfo" }, "mapping_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "mapping_source" + }, + "mapping_tool": { + "@id": "mapping_tool" + }, + "mapping_tool_version": { + "@id": "mapping_tool_version" }, "mappings": { - "@type": "@id" + "@type": "@id", + "@id": "mappings" + }, + "match_string": { + "@id": "match_string" }, "mirror_from": { - "@type": "@id" + "@type": "@id", + "@id": "mirror_from" + }, + "object_category": { + "@id": "object_category" }, "object_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedTarget" }, + "object_label": { + "@id": "object_label" + }, "object_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_match_field" }, "object_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_preprocessing" }, "object_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "object_source" + }, + "object_source_version": { + "@id": "object_source_version" }, "object_type": { "@context": { @@ -120,19 +206,27 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "object_type" + }, + "other": { + "@id": "other" }, "predicate_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedProperty" }, + "predicate_label": { + "@id": "predicate_label" + }, "predicate_modifier": { "@context": { "@vocab": "@null", "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_modifier" }, "predicate_type": { "@context": { @@ -140,36 +234,76 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "predicate_type" + }, + "prefix_name": { + "@id": "prefix_name" + }, + "prefix_url": { + "@type": "@id", + "@id": "prefix_url" + }, + "propagated": { + "@type": "xsd:boolean", + "@id": "propagated" }, "publication_date": { "@type": "xsd:date", "@id": "dcterms:created" }, "registry_confidence": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "registry_confidence" }, "reviewer_id": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "reviewer_id" + }, + "reviewer_label": { + "@id": "reviewer_label" }, "see_also": { "@id": "rdfs:seeAlso" }, + "semantic_similarity_measure": { + "@id": "semantic_similarity_measure" + }, "semantic_similarity_score": { - "@type": "xsd:double" + "@type": "xsd:double", + "@id": "semantic_similarity_score" + }, + "similarity_measure": { + "@id": "similarity_measure" + }, + "similarity_score": { + "@type": "xsd:double", + "@id": "similarity_score" + }, + "subject_category": { + "@id": "subject_category" }, "subject_id": { "@type": "rdfs:Resource", "@id": "owl:annotatedSource" }, + "subject_label": { + "@id": "subject_label" + }, "subject_match_field": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_match_field" }, "subject_preprocessing": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_preprocessing" }, "subject_source": { - "@type": "rdfs:Resource" + "@type": "rdfs:Resource", + "@id": "subject_source" + }, + "subject_source_version": { + "@id": "subject_source_version" }, "subject_type": { "@context": { @@ -177,10 +311,29 @@ "text": "skos:notation", "description": "skos:prefLabel", "meaning": "@id" - } + }, + "@id": "subject_type" + }, + "LiteralMapping": { + "@id": "owl:Axiom" }, "Mapping": { "@id": "owl:Axiom" + }, + "MappingRegistry": { + "@id": "MappingRegistry" + }, + "MappingSet": { + "@id": "MappingSet" + }, + "MappingSetReference": { + "@id": "MappingSetReference" + }, + "Prefix": { + "@id": "Prefix" + }, + "Propagatable": { + "@id": "Propagatable" } } } diff --git a/src/sssom_schema/context/sssom_schema.jsonld b/src/sssom_schema/context/sssom_schema.jsonld index 47844e72..193f66d0 100644 --- a/src/sssom_schema/context/sssom_schema.jsonld +++ b/src/sssom_schema/context/sssom_schema.jsonld @@ -47,6 +47,10 @@ "prefix_prefix": "skos", "prefix_reference": "http://www.w3.org/2004/02/skos/core#" }, + { + "prefix_prefix": "xsd", + "prefix_reference": "http://www.w3.org/2001/XMLSchema#" + }, { "prefix_prefix": "semapv", "prefix_reference": "https://w3id.org/semapv/vocab/" @@ -62,8 +66,11 @@ { "name": "EntityReference", "definition_uri": "https://w3id.org/sssom/EntityReference", - "description": "A reference to a mapped entity. This is represented internally as a string, and as a resource in RDF", + "description": "A reference to an entity involved in the mapping.\n", "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://mapping-commons.github.io/sssom/spec/#tsv" + ], "typeof": "uriorcurie", "base": "str", "uri": "http://www.w3.org/2000/01/rdf-schema#Resource", @@ -74,6 +81,9 @@ "name": "string", "definition_uri": "https://w3id.org/linkml/String", "description": "A character string", + "notes": [ + "In RDF serializations, a slot with range of string is treated as a literal or type xsd:string. If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"string\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -87,6 +97,9 @@ "name": "integer", "definition_uri": "https://w3id.org/linkml/Integer", "description": "An integer", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"integer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -100,6 +113,9 @@ "name": "boolean", "definition_uri": "https://w3id.org/linkml/Boolean", "description": "A binary (true or false) value", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"boolean\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -114,6 +130,9 @@ "name": "float", "definition_uri": "https://w3id.org/linkml/Float", "description": "A real number that conforms to the xsd:float specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"float\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -127,6 +146,9 @@ "name": "double", "definition_uri": "https://w3id.org/linkml/Double", "description": "A real number that conforms to the xsd:double specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"double\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "close_mappings": [ @@ -140,6 +162,9 @@ "name": "decimal", "definition_uri": "https://w3id.org/linkml/Decimal", "description": "A real number with arbitrary precision that conforms to the xsd:decimal specification", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"decimal\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "broad_mappings": [ @@ -154,7 +179,8 @@ "definition_uri": "https://w3id.org/linkml/Time", "description": "A time object represents a (local) time of day, independent of any particular day", "notes": [ - "URI is dateTime because OWL reasoners do not work with straight date or time" + "URI is dateTime because OWL reasoners do not work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"time\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -171,7 +197,8 @@ "definition_uri": "https://w3id.org/linkml/Date", "description": "a date (year, month and day) in an idealized calendar", "notes": [ - "URI is dateTime because OWL reasoners don't work with straight date or time" + "URI is dateTime because OWL reasoners don't work with straight date or time", + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date\"." ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", @@ -187,6 +214,9 @@ "name": "datetime", "definition_uri": "https://w3id.org/linkml/Datetime", "description": "The combination of a date and time", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "exact_mappings": [ @@ -201,6 +231,9 @@ "name": "date_or_datetime", "definition_uri": "https://w3id.org/linkml/DateOrDatetime", "description": "Either a date or a datetime", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"date_or_datetime\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -212,6 +245,9 @@ "name": "uriorcurie", "definition_uri": "https://w3id.org/linkml/Uriorcurie", "description": "a URI or a CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uriorcurie\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "URIorCURIE", @@ -224,6 +260,9 @@ "definition_uri": "https://w3id.org/linkml/Curie", "conforms_to": "https://www.w3.org/TR/curie/", "description": "a compact URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"curie\"." + ], "comments": [ "in RDF serializations this MUST be expanded to a URI", "in non-RDF serializations MAY be serialized as the compact representation" @@ -240,6 +279,9 @@ "definition_uri": "https://w3id.org/linkml/Uri", "conforms_to": "https://www.ietf.org/rfc/rfc3987.txt", "description": "a complete URI", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"uri\"." + ], "comments": [ "in RDF serializations a slot with range of uri is treated as a literal or type xsd:anyURI unless it is an identifier or a reference to an identifier, in which case it is translated directly to a node" ], @@ -257,6 +299,9 @@ "name": "ncname", "definition_uri": "https://w3id.org/linkml/Ncname", "description": "Prefix part of CURIE", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"ncname\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NCName", @@ -268,6 +313,9 @@ "name": "objectidentifier", "definition_uri": "https://w3id.org/linkml/Objectidentifier", "description": "A URI or CURIE that represents an object in the model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"objectidentifier\"." + ], "comments": [ "Used for inheritance and type checking" ], @@ -282,6 +330,9 @@ "name": "nodeidentifier", "definition_uri": "https://w3id.org/linkml/Nodeidentifier", "description": "A URI, CURIE or BNODE that represents a node in a model.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"nodeidentifier\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "NodeIdentifier", @@ -294,6 +345,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpointer", "conforms_to": "https://datatracker.ietf.org/doc/html/rfc6901", "description": "A string encoding a JSON Pointer. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to a valid object within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpointer\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -306,6 +360,9 @@ "definition_uri": "https://w3id.org/linkml/Jsonpath", "conforms_to": "https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html", "description": "A string encoding a JSON Path. The value of the string MUST conform to JSON Point syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded in tree form.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"jsonpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -318,6 +375,9 @@ "definition_uri": "https://w3id.org/linkml/Sparqlpath", "conforms_to": "https://www.w3.org/TR/sparql11-query/#propertypaths", "description": "A string encoding a SPARQL Property Path. The value of the string MUST conform to SPARQL syntax and SHOULD dereference to zero or more valid objects within the current instance document when encoded as RDF.", + "notes": [ + "If you are authoring schemas in LinkML YAML, the type is referenced with the lower case \"sparqlpath\"." + ], "from_schema": "https://w3id.org/linkml/types", "imported_from": "linkml:types", "base": "str", @@ -422,6 +482,52 @@ } ], "slots": [ + { + "name": "prefix_name", + "definition_uri": "https://w3id.org/sssom/prefix_name", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_name", + "key": true, + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "ncname", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "prefix_url", + "definition_uri": "https://w3id.org/sssom/prefix_url", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/prefix_url", + "owner": "Prefix", + "domain_of": [ + "Prefix" + ], + "range": "uri", + "@type": "SlotDefinition" + }, + { + "name": "curie_map", + "definition_uri": "https://w3id.org/sssom/curie_map", + "description": "A dictionary that contains prefixes as keys and their URI expansions as values.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/225", + "https://github.com/mapping-commons/sssom/pull/349", + "https://github.com/mapping-commons/sssom/blob/master/examples/schema/curie_map.sssom.tsv" + ], + "slot_uri": "https://w3id.org/sssom/curie_map", + "multivalued": true, + "owner": "MappingSet", + "domain_of": [ + "MappingSet" + ], + "range": "Prefix", + "inlined": true, + "@type": "SlotDefinition" + }, { "name": "mirror_from", "definition_uri": "https://w3id.org/sssom/mirror_from", @@ -612,6 +718,55 @@ "required": true, "@type": "SlotDefinition" }, + { + "name": "literal", + "definition_uri": "https://w3id.org/sssom/literal", + "description": "The literal being mapped", + "examples": [ + { + "value": "Alzheimer", + "description": "A string referring to some thing.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "mappings": [ + "http://www.w3.org/2002/07/owl#annotatedTarget", + "http://www.w3.org/2002/07/owl#annotatedSource" + ], + "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "required": true, + "@type": "SlotDefinition" + }, + { + "name": "literal_datatype", + "definition_uri": "https://w3id.org/sssom/literal_datatype", + "description": "The datatype of the literal being mapped", + "examples": [ + { + "value": "xsd:string", + "description": "A string referring to some thing.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "mappings": [ + "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype" + ], + "slot_uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "uri", + "@type": "SlotDefinition" + }, { "name": "subject_label", "definition_uri": "https://w3id.org/sssom/subject_label", @@ -669,6 +824,16 @@ { "name": "subject_type", "definition_uri": "https://w3id.org/sssom/subject_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -702,9 +867,10 @@ "http://www.w3.org/2002/07/owl#annotatedProperty" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedProperty", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -726,9 +892,10 @@ "https://github.com/mapping-commons/sssom/issues/107" ], "slot_uri": "https://w3id.org/sssom/predicate_modifier", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "predicate_modifier_enum", "@type": "SlotDefinition" @@ -801,9 +968,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/predicate_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -844,9 +1012,10 @@ "http://www.w3.org/2002/07/owl#annotatedTarget" ], "slot_uri": "http://www.w3.org/2002/07/owl#annotatedTarget", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -864,9 +1033,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_label", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "recommended": true, @@ -899,9 +1069,10 @@ "https://github.com/mapping-commons/sssom/issues/256" ], "slot_uri": "https://w3id.org/sssom/object_category", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -922,9 +1093,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_justification", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "required": true, @@ -972,6 +1144,16 @@ { "name": "object_type", "definition_uri": "https://w3id.org/sssom/object_type", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The type of entity that is being mapped.", "examples": [ { @@ -981,10 +1163,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_type", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "entity_type_enum", "@type": "SlotDefinition" @@ -1106,10 +1289,11 @@ ], "slot_uri": "http://purl.org/dc/terms/creator", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1121,10 +1305,11 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/creator_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1139,9 +1324,10 @@ ], "slot_uri": "http://purl.org/pav/authoredBy", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1153,9 +1339,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/author_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1167,9 +1354,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_id", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1181,9 +1369,10 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/reviewer_label", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1197,10 +1386,11 @@ "http://purl.org/dc/terms/license" ], "slot_uri": "http://purl.org/dc/terms/license", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1208,6 +1398,16 @@ { "name": "subject_source", "definition_uri": "https://w3id.org/sssom/subject_source", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the subject.", "examples": [ { @@ -1234,6 +1434,16 @@ { "name": "subject_source_version", "definition_uri": "https://w3id.org/sssom/subject_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the subject term.", "examples": [ { @@ -1252,9 +1462,64 @@ "range": "string", "@type": "SlotDefinition" }, + { + "name": "literal_source", + "definition_uri": "https://w3id.org/sssom/literal_source", + "description": "URI of ontology source for the literal.", + "examples": [ + { + "value": "obo:mondo.owl", + "description": "A persistent OBO CURIE pointing to the latest version of the Mondo ontology.", + "@type": "Example" + }, + { + "value": "wikidata:Q7876491", + "description": "A Wikidata identifier for the Uberon ontology resource.", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/literal_source", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "EntityReference", + "@type": "SlotDefinition" + }, + { + "name": "literal_source_version", + "definition_uri": "https://w3id.org/sssom/literal_source_version", + "description": "Version IRI or version string of the source of the literal.", + "examples": [ + { + "value": "http://purl.obolibrary.org/obo/mondo/releases/2021-01-30/mondo.owl", + "description": "(A persistent Version IRI pointing to the Mondo version '2021-01-30')", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/literal_source_version", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "@type": "SlotDefinition" + }, { "name": "object_source", "definition_uri": "https://w3id.org/sssom/object_source", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URI of vocabulary or identifier source for the object.", "examples": [ { @@ -1270,10 +1535,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1281,6 +1547,16 @@ { "name": "object_source_version", "definition_uri": "https://w3id.org/sssom/object_source_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version IRI or version string of the source of the object term.", "examples": [ { @@ -1291,10 +1567,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_source_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1302,13 +1579,24 @@ { "name": "mapping_provider", "definition_uri": "https://w3id.org/sssom/mapping_provider", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "URL pointing to the source that provided the mapping, for example an ontology that already contains the mappings, or a database from which it was derived.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_provider", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "uri", "@type": "SlotDefinition" @@ -1349,9 +1637,10 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_source", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1362,9 +1651,10 @@ "description": "A string indicating whether this mapping is from a 1:1 (the subject_id maps to a single object_id), 1:n (the subject maps to more than one object_id), n:1, 1:0, 0:1 or n:n group. Note that this is a convenience field that should be derivable from the mapping set.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_cardinality", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "mapping_cardinality_enum", "@type": "SlotDefinition" @@ -1372,6 +1662,16 @@ { "name": "mapping_tool", "definition_uri": "https://w3id.org/sssom/mapping_tool", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A reference to the tool or algorithm that was used to generate the mapping. Should be a URL pointing to more info about it, but can be free text.", "examples": [ { @@ -1381,10 +1681,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1392,6 +1693,16 @@ { "name": "mapping_tool_version", "definition_uri": "https://w3id.org/sssom/mapping_tool_version", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Version string that denotes the version of the mapping tool used.", "examples": [ { @@ -1401,10 +1712,11 @@ ], "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/mapping_tool_version", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1412,16 +1724,27 @@ { "name": "mapping_date", "definition_uri": "https://w3id.org/sssom/mapping_date", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "The date the mapping was asserted. This is different from the date the mapping was published or compiled in a SSSOM file.", "from_schema": "https://w3id.org/sssom/schema/", "mappings": [ "http://purl.org/pav/authoredOn" ], "slot_uri": "http://purl.org/pav/authoredOn", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "date", "@type": "SlotDefinition" @@ -1449,16 +1772,29 @@ "description": "A score between 0 and 1 to denote the confidence or probability that the match is correct, where 1 denotes total confidence.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/confidence", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { "name": "subject_match_field", "definition_uri": "https://w3id.org/sssom/subject_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the subject) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/subject_match_field", @@ -1474,14 +1810,25 @@ { "name": "object_match_field", "definition_uri": "https://w3id.org/sssom/object_match_field", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "A list of properties (term annotations on the object) that was used for the match.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_match_field", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1489,13 +1836,14 @@ { "name": "match_string", "definition_uri": "https://w3id.org/sssom/match_string", - "description": "Strings that are shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", + "description": "String that is shared by subj/obj. It is recommended to indicate the fields for the match using the object and subject_match_field slots.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/match_string", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1503,6 +1851,16 @@ { "name": "subject_preprocessing", "definition_uri": "https://w3id.org/sssom/subject_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Method of preprocessing applied to the fields of the subject. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", "examples": [ { @@ -1528,6 +1886,16 @@ { "name": "object_preprocessing", "definition_uri": "https://w3id.org/sssom/object_preprocessing", + "instantiates": [ + "sssom:Propagatable" + ], + "annotations": [ + { + "tag": "propagated", + "value": true, + "@type": "Annotation" + } + ], "description": "Method of preprocessing applied to the fields of the object. If different preprocessing steps were performed on different fields, it is recommended to store the match in separate rows.", "examples": [ { @@ -1542,10 +1910,35 @@ "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/object_preprocessing", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" + ], + "range": "EntityReference", + "@type": "SlotDefinition" + }, + { + "name": "literal_preprocessing", + "definition_uri": "https://w3id.org/sssom/literal_preprocessing", + "description": "Method of preprocessing applied to the literal.", + "examples": [ + { + "value": "semapv:Stemming", + "@type": "Example" + }, + { + "value": "semapv:StopWordRemoval", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/literal_preprocessing", + "multivalued": true, + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" ], "range": "EntityReference", "@type": "SlotDefinition" @@ -1599,6 +1992,8 @@ "Mapping" ], "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, "@type": "SlotDefinition" }, { @@ -1621,6 +2016,41 @@ "range": "string", "@type": "SlotDefinition" }, + { + "name": "similarity_score", + "definition_uri": "https://w3id.org/sssom/similarity_score", + "description": "A score between 0 and 1 to denote the similarity, where 1 denotes equivalence.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/similarity_score", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "double", + "minimum_value": 0.0, + "maximum_value": 1.0, + "@type": "SlotDefinition" + }, + { + "name": "similarity_measure", + "definition_uri": "https://w3id.org/sssom/similarity_measure", + "description": "The measure used for computing the the similarity score. To make processing this field as unambiguous as possible, we recommend using wikidata identifiers, but wikipedia pages could also be acceptable.", + "examples": [ + { + "value": "https://www.wikidata.org/wiki/Q865360", + "description": "(the Wikidata identifier for the Jaccard index measure).", + "@type": "Example" + } + ], + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/similarity_measure", + "owner": "LiteralMapping", + "domain_of": [ + "LiteralMapping" + ], + "range": "string", + "@type": "SlotDefinition" + }, { "name": "issue_tracker_item", "definition_uri": "https://w3id.org/sssom/issue_tracker_item", @@ -1682,10 +2112,11 @@ ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#seeAlso", "multivalued": true, - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1696,10 +2127,11 @@ "description": "Pipe separated list of key value pairs for properties not part of the SSSOM spec. Can be used to encode additional provenance data.", "from_schema": "https://w3id.org/sssom/schema/", "slot_uri": "https://w3id.org/sssom/other", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" @@ -1713,14 +2145,28 @@ "http://www.w3.org/2000/01/rdf-schema#comment" ], "slot_uri": "http://www.w3.org/2000/01/rdf-schema#comment", - "owner": "Mapping", + "owner": "LiteralMapping", "domain_of": [ "MappingSet", - "Mapping" + "Mapping", + "LiteralMapping" ], "range": "string", "@type": "SlotDefinition" }, + { + "name": "propagatable__propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "from_schema": "https://w3id.org/sssom/schema/", + "slot_uri": "https://w3id.org/sssom/propagated", + "alias": "propagated", + "owner": "Propagatable", + "domain_of": [ + "Propagatable" + ], + "range": "boolean", + "@type": "SlotDefinition" + }, { "name": "mapping_set_license", "definition_uri": "https://w3id.org/sssom/license", @@ -1751,6 +2197,7 @@ "description": "Represents a set of mappings", "from_schema": "https://w3id.org/sssom/schema/", "slots": [ + "curie_map", "mappings", "mapping_set_id", "mapping_set_version", @@ -1842,6 +2289,60 @@ "class_uri": "http://www.w3.org/2002/07/owl#Axiom", "@type": "ClassDefinition" }, + { + "name": "LiteralMapping", + "definition_uri": "https://w3id.org/sssom/LiteralMapping", + "description": "Represents an individual mapping between a literal and an entity. Note that this schema has been created on 01.08.2023 and is subject to change.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://mapping-commons.github.io/sssom/sssom-profiles/" + ], + "mappings": [ + "owl:Axiom" + ], + "slots": [ + "literal", + "literal_datatype", + "predicate_id", + "predicate_label", + "predicate_modifier", + "object_id", + "object_label", + "object_category", + "mapping_justification", + "author_id", + "author_label", + "reviewer_id", + "reviewer_label", + "creator_id", + "creator_label", + "license", + "literal_source", + "literal_source_version", + "object_type", + "object_source", + "object_source_version", + "mapping_provider", + "mapping_source", + "mapping_cardinality", + "mapping_tool", + "mapping_tool_version", + "mapping_date", + "confidence", + "object_match_field", + "match_string", + "literal_preprocessing", + "object_preprocessing", + "similarity_score", + "similarity_measure", + "see_also", + "other", + "comment" + ], + "slot_usage": {}, + "class_uri": "http://www.w3.org/2002/07/owl#Axiom", + "@type": "ClassDefinition" + }, { "name": "MappingRegistry", "definition_uri": "https://w3id.org/sssom/MappingRegistry", @@ -1877,13 +2378,51 @@ "slot_usage": {}, "class_uri": "https://w3id.org/sssom/MappingSetReference", "@type": "ClassDefinition" + }, + { + "name": "Prefix", + "definition_uri": "https://w3id.org/sssom/Prefix", + "from_schema": "https://w3id.org/sssom/schema/", + "slots": [ + "prefix_name", + "prefix_url" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/sssom/Prefix", + "@type": "ClassDefinition" + }, + { + "name": "Propagatable", + "definition_uri": "https://w3id.org/sssom/Propagatable", + "description": "Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the Mapping class.", + "from_schema": "https://w3id.org/sssom/schema/", + "see_also": [ + "https://github.com/mapping-commons/sssom/issues/305" + ], + "mappings": [ + "sssom:Propagatable" + ], + "slots": [ + "propagatable__propagated" + ], + "slot_usage": {}, + "attributes": [ + { + "name": "propagated", + "description": "Indicates whether a slot can be propagated from a mapping down to individual mappings.", + "range": "boolean", + "@type": "SlotDefinition" + } + ], + "class_uri": "https://w3id.org/sssom/Propagatable", + "@type": "ClassDefinition" } ], "metamodel_version": "1.7.0", "source_file": "sssom_schema.yaml", - "source_file_date": "2023-07-31T17:42:04", - "source_file_size": 26565, - "generation_date": "2023-07-31T17:42:55", + "source_file_date": "2024-08-05T10:22:55", + "source_file_size": 31884, + "generation_date": "2024-08-05T10:23:03", "@type": "SchemaDefinition", "@context": [ "project/jsonld/sssom_schema.context.jsonld", diff --git a/src/sssom_schema/datamodel/sssom_schema.py b/src/sssom_schema/datamodel/sssom_schema.py index eb2969f5..f547782a 100644 --- a/src/sssom_schema/datamodel/sssom_schema.py +++ b/src/sssom_schema/datamodel/sssom_schema.py @@ -1,5 +1,5 @@ -# Auto generated from sssom_schema.yaml by pythongen.py version: 0.9.0 -# Generation date: 2023-07-31T17:42:59 +# Auto generated from sssom_schema.yaml by pythongen.py version: 0.0.1 +# Generation date: 2024-08-05T10:23:04 # Schema: sssom # # id: https://w3id.org/sssom/schema/ @@ -7,11 +7,11 @@ # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses -import sys import re from jsonasobj2 import JsonObj, as_dict from typing import Optional, List, Union, Dict, ClassVar, Any from dataclasses import dataclass +from datetime import date, datetime from linkml_runtime.linkml_model.meta import EnumDefinition, PermissibleValue, PvFormulaOptions from linkml_runtime.utils.slot import Slot @@ -22,8 +22,8 @@ from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import Namespace, URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Date, Double, String, Uri, Uriorcurie -from linkml_runtime.utils.metamodelcore import URI, URIorCURIE, XSDDate +from linkml_runtime.linkml_model.types import Boolean, Date, Double, Ncname, String, Uri, Uriorcurie +from linkml_runtime.utils.metamodelcore import Bool, NCName, URI, URIorCURIE, XSDDate metamodel_version = "1.7.0" version = None @@ -43,20 +43,23 @@ SEMAPV = CurieNamespace('semapv', 'https://w3id.org/semapv/vocab/') SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#') SSSOM = CurieNamespace('sssom', 'https://w3id.org/sssom/') +XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#') DEFAULT_ = SSSOM # Types class EntityReference(Uriorcurie): - """ A reference to a mapped entity. This is represented internally as a string, and as a resource in RDF """ - type_class_uri = RDFS.Resource + """ A reference to an entity involved in the mapping. + """ + type_class_uri = RDFS["Resource"] type_class_curie = "rdfs:Resource" type_name = "EntityReference" type_model_uri = SSSOM.EntityReference # Class references - +class PrefixPrefixName(NCName): + pass @dataclass @@ -66,13 +69,14 @@ class MappingSet(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = SSSOM.MappingSet + class_class_uri: ClassVar[URIRef] = SSSOM["MappingSet"] class_class_curie: ClassVar[str] = "sssom:MappingSet" class_name: ClassVar[str] = "mapping set" class_model_uri: ClassVar[URIRef] = SSSOM.MappingSet mapping_set_id: Union[str, URI] = None license: Union[str, URI] = None + curie_map: Optional[Union[Dict[Union[str, PrefixPrefixName], Union[dict, "Prefix"]], List[Union[dict, "Prefix"]]]] = empty_dict() mappings: Optional[Union[Union[dict, "Mapping"], List[Union[dict, "Mapping"]]]] = empty_list() mapping_set_version: Optional[str] = None mapping_set_source: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list() @@ -111,6 +115,8 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.license, URI): self.license = URI(self.license) + self._normalize_inlined_as_dict(slot_name="curie_map", slot_type=Prefix, key_name="prefix_name", keyed=True) + if not isinstance(self.mappings, list): self.mappings = [self.mappings] if self.mappings is not None else [] self.mappings = [v if isinstance(v, Mapping) else Mapping(**as_dict(v)) for v in self.mappings] @@ -208,7 +214,7 @@ class Mapping(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = OWL.Axiom + class_class_uri: ClassVar[URIRef] = OWL["Axiom"] class_class_curie: ClassVar[str] = "owl:Axiom" class_name: ClassVar[str] = "mapping" class_model_uri: ClassVar[URIRef] = SSSOM.Mapping @@ -416,6 +422,191 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): super().__post_init__(**kwargs) +@dataclass +class LiteralMapping(YAMLRoot): + """ + Represents an individual mapping between a literal and an entity. Note that this schema has been created on + 01.08.2023 and is subject to change. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = OWL["Axiom"] + class_class_curie: ClassVar[str] = "owl:Axiom" + class_name: ClassVar[str] = "literal mapping" + class_model_uri: ClassVar[URIRef] = SSSOM.LiteralMapping + + literal: str = None + predicate_id: Union[str, EntityReference] = None + object_id: Union[str, EntityReference] = None + mapping_justification: Union[str, EntityReference] = None + literal_datatype: Optional[Union[str, URI]] = None + predicate_label: Optional[str] = None + predicate_modifier: Optional[Union[str, "PredicateModifierEnum"]] = None + object_label: Optional[str] = None + object_category: Optional[str] = None + author_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() + author_label: Optional[Union[str, List[str]]] = empty_list() + reviewer_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() + reviewer_label: Optional[Union[str, List[str]]] = empty_list() + creator_id: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() + creator_label: Optional[Union[str, List[str]]] = empty_list() + license: Optional[Union[str, URI]] = None + literal_source: Optional[Union[str, EntityReference]] = None + literal_source_version: Optional[str] = None + object_type: Optional[Union[str, "EntityTypeEnum"]] = None + object_source: Optional[Union[str, EntityReference]] = None + object_source_version: Optional[str] = None + mapping_provider: Optional[Union[str, URI]] = None + mapping_source: Optional[Union[str, EntityReference]] = None + mapping_cardinality: Optional[Union[str, "MappingCardinalityEnum"]] = None + mapping_tool: Optional[str] = None + mapping_tool_version: Optional[str] = None + mapping_date: Optional[Union[str, XSDDate]] = None + confidence: Optional[float] = None + object_match_field: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() + match_string: Optional[Union[str, List[str]]] = empty_list() + literal_preprocessing: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() + object_preprocessing: Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]] = empty_list() + similarity_score: Optional[float] = None + similarity_measure: Optional[str] = None + see_also: Optional[Union[str, List[str]]] = empty_list() + other: Optional[str] = None + comment: Optional[str] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self._is_empty(self.literal): + self.MissingRequiredField("literal") + if not isinstance(self.literal, str): + self.literal = str(self.literal) + + if self._is_empty(self.predicate_id): + self.MissingRequiredField("predicate_id") + if not isinstance(self.predicate_id, EntityReference): + self.predicate_id = EntityReference(self.predicate_id) + + if self._is_empty(self.object_id): + self.MissingRequiredField("object_id") + if not isinstance(self.object_id, EntityReference): + self.object_id = EntityReference(self.object_id) + + if self._is_empty(self.mapping_justification): + self.MissingRequiredField("mapping_justification") + if not isinstance(self.mapping_justification, EntityReference): + self.mapping_justification = EntityReference(self.mapping_justification) + + if self.literal_datatype is not None and not isinstance(self.literal_datatype, URI): + self.literal_datatype = URI(self.literal_datatype) + + if self.predicate_label is not None and not isinstance(self.predicate_label, str): + self.predicate_label = str(self.predicate_label) + + if self.predicate_modifier is not None and not isinstance(self.predicate_modifier, PredicateModifierEnum): + self.predicate_modifier = PredicateModifierEnum(self.predicate_modifier) + + if self.object_label is not None and not isinstance(self.object_label, str): + self.object_label = str(self.object_label) + + if self.object_category is not None and not isinstance(self.object_category, str): + self.object_category = str(self.object_category) + + if not isinstance(self.author_id, list): + self.author_id = [self.author_id] if self.author_id is not None else [] + self.author_id = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.author_id] + + if not isinstance(self.author_label, list): + self.author_label = [self.author_label] if self.author_label is not None else [] + self.author_label = [v if isinstance(v, str) else str(v) for v in self.author_label] + + if not isinstance(self.reviewer_id, list): + self.reviewer_id = [self.reviewer_id] if self.reviewer_id is not None else [] + self.reviewer_id = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.reviewer_id] + + if not isinstance(self.reviewer_label, list): + self.reviewer_label = [self.reviewer_label] if self.reviewer_label is not None else [] + self.reviewer_label = [v if isinstance(v, str) else str(v) for v in self.reviewer_label] + + if not isinstance(self.creator_id, list): + self.creator_id = [self.creator_id] if self.creator_id is not None else [] + self.creator_id = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.creator_id] + + if not isinstance(self.creator_label, list): + self.creator_label = [self.creator_label] if self.creator_label is not None else [] + self.creator_label = [v if isinstance(v, str) else str(v) for v in self.creator_label] + + if self.license is not None and not isinstance(self.license, URI): + self.license = URI(self.license) + + if self.literal_source is not None and not isinstance(self.literal_source, EntityReference): + self.literal_source = EntityReference(self.literal_source) + + if self.literal_source_version is not None and not isinstance(self.literal_source_version, str): + self.literal_source_version = str(self.literal_source_version) + + if self.object_type is not None and not isinstance(self.object_type, EntityTypeEnum): + self.object_type = EntityTypeEnum(self.object_type) + + if self.object_source is not None and not isinstance(self.object_source, EntityReference): + self.object_source = EntityReference(self.object_source) + + if self.object_source_version is not None and not isinstance(self.object_source_version, str): + self.object_source_version = str(self.object_source_version) + + if self.mapping_provider is not None and not isinstance(self.mapping_provider, URI): + self.mapping_provider = URI(self.mapping_provider) + + if self.mapping_source is not None and not isinstance(self.mapping_source, EntityReference): + self.mapping_source = EntityReference(self.mapping_source) + + if self.mapping_cardinality is not None and not isinstance(self.mapping_cardinality, MappingCardinalityEnum): + self.mapping_cardinality = MappingCardinalityEnum(self.mapping_cardinality) + + if self.mapping_tool is not None and not isinstance(self.mapping_tool, str): + self.mapping_tool = str(self.mapping_tool) + + if self.mapping_tool_version is not None and not isinstance(self.mapping_tool_version, str): + self.mapping_tool_version = str(self.mapping_tool_version) + + if self.mapping_date is not None and not isinstance(self.mapping_date, XSDDate): + self.mapping_date = XSDDate(self.mapping_date) + + if self.confidence is not None and not isinstance(self.confidence, float): + self.confidence = float(self.confidence) + + if not isinstance(self.object_match_field, list): + self.object_match_field = [self.object_match_field] if self.object_match_field is not None else [] + self.object_match_field = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.object_match_field] + + if not isinstance(self.match_string, list): + self.match_string = [self.match_string] if self.match_string is not None else [] + self.match_string = [v if isinstance(v, str) else str(v) for v in self.match_string] + + if not isinstance(self.literal_preprocessing, list): + self.literal_preprocessing = [self.literal_preprocessing] if self.literal_preprocessing is not None else [] + self.literal_preprocessing = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.literal_preprocessing] + + if not isinstance(self.object_preprocessing, list): + self.object_preprocessing = [self.object_preprocessing] if self.object_preprocessing is not None else [] + self.object_preprocessing = [v if isinstance(v, EntityReference) else EntityReference(v) for v in self.object_preprocessing] + + if self.similarity_score is not None and not isinstance(self.similarity_score, float): + self.similarity_score = float(self.similarity_score) + + if self.similarity_measure is not None and not isinstance(self.similarity_measure, str): + self.similarity_measure = str(self.similarity_measure) + + if not isinstance(self.see_also, list): + self.see_also = [self.see_also] if self.see_also is not None else [] + self.see_also = [v if isinstance(v, str) else str(v) for v in self.see_also] + + if self.other is not None and not isinstance(self.other, str): + self.other = str(self.other) + + if self.comment is not None and not isinstance(self.comment, str): + self.comment = str(self.comment) + + super().__post_init__(**kwargs) + + @dataclass class MappingRegistry(YAMLRoot): """ @@ -423,7 +614,7 @@ class MappingRegistry(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = SSSOM.MappingRegistry + class_class_uri: ClassVar[URIRef] = SSSOM["MappingRegistry"] class_class_curie: ClassVar[str] = "sssom:MappingRegistry" class_name: ClassVar[str] = "mapping registry" class_model_uri: ClassVar[URIRef] = SSSOM.MappingRegistry @@ -475,7 +666,7 @@ class MappingSetReference(YAMLRoot): """ _inherited_slots: ClassVar[List[str]] = [] - class_class_uri: ClassVar[URIRef] = SSSOM.MappingSetReference + class_class_uri: ClassVar[URIRef] = SSSOM["MappingSetReference"] class_class_curie: ClassVar[str] = "sssom:MappingSetReference" class_name: ClassVar[str] = "mapping set reference" class_model_uri: ClassVar[URIRef] = SSSOM.MappingSetReference @@ -511,6 +702,52 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): super().__post_init__(**kwargs) +@dataclass +class Prefix(YAMLRoot): + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = SSSOM["Prefix"] + class_class_curie: ClassVar[str] = "sssom:Prefix" + class_name: ClassVar[str] = "prefix" + class_model_uri: ClassVar[URIRef] = SSSOM.Prefix + + prefix_name: Union[str, PrefixPrefixName] = None + prefix_url: Optional[Union[str, URI]] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self._is_empty(self.prefix_name): + self.MissingRequiredField("prefix_name") + if not isinstance(self.prefix_name, PrefixPrefixName): + self.prefix_name = PrefixPrefixName(self.prefix_name) + + if self.prefix_url is not None and not isinstance(self.prefix_url, URI): + self.prefix_url = URI(self.prefix_url) + + super().__post_init__(**kwargs) + + +@dataclass +class Propagatable(YAMLRoot): + """ + Metamodel extension class to describe slots whose value can be propagated down from the MappingSet class to the + Mapping class. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = SSSOM["Propagatable"] + class_class_curie: ClassVar[str] = "sssom:Propagatable" + class_name: ClassVar[str] = "Propagatable" + class_model_uri: ClassVar[URIRef] = SSSOM.Propagatable + + propagated: Optional[Union[bool, Bool]] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self.propagated is not None and not isinstance(self.propagated, Bool): + self.propagated = Bool(self.propagated) + + super().__post_init__(**kwargs) + + # Enumerations class EntityTypeEnum(EnumDefinitionImpl): @@ -521,43 +758,55 @@ class EntityTypeEnum(EnumDefinitionImpl): @classmethod def _addvals(cls): setattr(cls, "owl class", - PermissibleValue(text="owl class", - meaning=OWL.Class) ) + PermissibleValue( + text="owl class", + meaning=OWL["Class"])) setattr(cls, "owl object property", - PermissibleValue(text="owl object property", - meaning=OWL.ObjectProperty) ) + PermissibleValue( + text="owl object property", + meaning=OWL["ObjectProperty"])) setattr(cls, "owl data property", - PermissibleValue(text="owl data property", - meaning=OWL.DataProperty) ) + PermissibleValue( + text="owl data property", + meaning=OWL["DataProperty"])) setattr(cls, "owl annotation property", - PermissibleValue(text="owl annotation property", - meaning=OWL.AnnotationProperty) ) + PermissibleValue( + text="owl annotation property", + meaning=OWL["AnnotationProperty"])) setattr(cls, "owl named individual", - PermissibleValue(text="owl named individual", - meaning=OWL.NamedIndividual) ) + PermissibleValue( + text="owl named individual", + meaning=OWL["NamedIndividual"])) setattr(cls, "skos concept", - PermissibleValue(text="skos concept", - meaning=SKOS.Concept) ) + PermissibleValue( + text="skos concept", + meaning=SKOS["Concept"])) setattr(cls, "rdfs resource", - PermissibleValue(text="rdfs resource", - meaning=RDFS.Resource) ) + PermissibleValue( + text="rdfs resource", + meaning=RDFS["Resource"])) setattr(cls, "rdfs class", - PermissibleValue(text="rdfs class", - meaning=RDFS.Class) ) + PermissibleValue( + text="rdfs class", + meaning=RDFS["Class"])) setattr(cls, "rdfs literal", - PermissibleValue(text="rdfs literal", - meaning=RDFS.Literal) ) + PermissibleValue( + text="rdfs literal", + meaning=RDFS["Literal"])) setattr(cls, "rdfs datatype", - PermissibleValue(text="rdfs datatype", - meaning=RDFS.Datatype) ) + PermissibleValue( + text="rdfs datatype", + meaning=RDFS["Datatype"])) setattr(cls, "rdf property", - PermissibleValue(text="rdf property", - meaning=RDF.Property) ) + PermissibleValue( + text="rdf property", + meaning=RDF["Property"])) class PredicateModifierEnum(EnumDefinitionImpl): - Not = PermissibleValue(text="Not", - description="Negating the mapping predicate. The meaning of the triple becomes subject_id is not a predicate_id match to object_id.") + Not = PermissibleValue( + text="Not", + description="""Negating the mapping predicate. The meaning of the triple becomes subject_id is not a predicate_id match to object_id.""") _defn = EnumDefinition( name="PredicateModifierEnum", @@ -572,28 +821,43 @@ class MappingCardinalityEnum(EnumDefinitionImpl): @classmethod def _addvals(cls): setattr(cls, "1:1", - PermissibleValue(text="1:1", - description="One-to-one mapping") ) + PermissibleValue( + text="1:1", + description="One-to-one mapping")) setattr(cls, "1:n", - PermissibleValue(text="1:n", - description="One-to-many mapping") ) + PermissibleValue( + text="1:n", + description="One-to-many mapping")) setattr(cls, "n:1", - PermissibleValue(text="n:1", - description="Many-to-one mapping") ) + PermissibleValue( + text="n:1", + description="Many-to-one mapping")) setattr(cls, "1:0", - PermissibleValue(text="1:0", - description="One-to-none mapping") ) + PermissibleValue( + text="1:0", + description="One-to-none mapping")) setattr(cls, "0:1", - PermissibleValue(text="0:1", - description="None-to-one mapping") ) + PermissibleValue( + text="0:1", + description="None-to-one mapping")) setattr(cls, "n:n", - PermissibleValue(text="n:n", - description="Many-to-many mapping") ) + PermissibleValue( + text="n:n", + description="Many-to-many mapping")) # Slots class slots: pass +slots.prefix_name = Slot(uri=SSSOM.prefix_name, name="prefix_name", curie=SSSOM.curie('prefix_name'), + model_uri=SSSOM.prefix_name, domain=None, range=URIRef) + +slots.prefix_url = Slot(uri=SSSOM.prefix_url, name="prefix_url", curie=SSSOM.curie('prefix_url'), + model_uri=SSSOM.prefix_url, domain=None, range=Optional[Union[str, URI]]) + +slots.curie_map = Slot(uri=SSSOM.curie_map, name="curie_map", curie=SSSOM.curie('curie_map'), + model_uri=SSSOM.curie_map, domain=None, range=Optional[Union[Dict[Union[str, PrefixPrefixName], Union[dict, Prefix]], List[Union[dict, Prefix]]]]) + slots.mirror_from = Slot(uri=SSSOM.mirror_from, name="mirror_from", curie=SSSOM.curie('mirror_from'), model_uri=SSSOM.mirror_from, domain=None, range=Optional[Union[str, URI]]) @@ -633,6 +897,12 @@ class slots: slots.subject_id = Slot(uri=OWL.annotatedSource, name="subject_id", curie=OWL.curie('annotatedSource'), model_uri=SSSOM.subject_id, domain=None, range=Union[str, EntityReference]) +slots.literal = Slot(uri=OWL.annotatedTarget, name="literal", curie=OWL.curie('annotatedTarget'), + model_uri=SSSOM.literal, domain=None, range=str, mappings = [OWL["annotatedSource"]]) + +slots.literal_datatype = Slot(uri=RDF.datatype, name="literal_datatype", curie=RDF.curie('datatype'), + model_uri=SSSOM.literal_datatype, domain=None, range=Optional[Union[str, URI]]) + slots.subject_label = Slot(uri=SSSOM.subject_label, name="subject_label", curie=SSSOM.curie('subject_label'), model_uri=SSSOM.subject_label, domain=None, range=Optional[str]) @@ -712,6 +982,12 @@ class slots: slots.subject_source_version = Slot(uri=SSSOM.subject_source_version, name="subject_source_version", curie=SSSOM.curie('subject_source_version'), model_uri=SSSOM.subject_source_version, domain=None, range=Optional[str]) +slots.literal_source = Slot(uri=SSSOM.literal_source, name="literal_source", curie=SSSOM.curie('literal_source'), + model_uri=SSSOM.literal_source, domain=None, range=Optional[Union[str, EntityReference]]) + +slots.literal_source_version = Slot(uri=SSSOM.literal_source_version, name="literal_source_version", curie=SSSOM.curie('literal_source_version'), + model_uri=SSSOM.literal_source_version, domain=None, range=Optional[str]) + slots.object_source = Slot(uri=SSSOM.object_source, name="object_source", curie=SSSOM.curie('object_source'), model_uri=SSSOM.object_source, domain=None, range=Optional[Union[str, EntityReference]]) @@ -760,6 +1036,9 @@ class slots: slots.object_preprocessing = Slot(uri=SSSOM.object_preprocessing, name="object_preprocessing", curie=SSSOM.curie('object_preprocessing'), model_uri=SSSOM.object_preprocessing, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) +slots.literal_preprocessing = Slot(uri=SSSOM.literal_preprocessing, name="literal_preprocessing", curie=SSSOM.curie('literal_preprocessing'), + model_uri=SSSOM.literal_preprocessing, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) + slots.curation_rule = Slot(uri=SSSOM.curation_rule, name="curation_rule", curie=SSSOM.curie('curation_rule'), model_uri=SSSOM.curation_rule, domain=None, range=Optional[Union[Union[str, EntityReference], List[Union[str, EntityReference]]]]) @@ -772,6 +1051,12 @@ class slots: slots.semantic_similarity_measure = Slot(uri=SSSOM.semantic_similarity_measure, name="semantic_similarity_measure", curie=SSSOM.curie('semantic_similarity_measure'), model_uri=SSSOM.semantic_similarity_measure, domain=None, range=Optional[str]) +slots.similarity_score = Slot(uri=SSSOM.similarity_score, name="similarity_score", curie=SSSOM.curie('similarity_score'), + model_uri=SSSOM.similarity_score, domain=None, range=Optional[float]) + +slots.similarity_measure = Slot(uri=SSSOM.similarity_measure, name="similarity_measure", curie=SSSOM.curie('similarity_measure'), + model_uri=SSSOM.similarity_measure, domain=None, range=Optional[str]) + slots.issue_tracker_item = Slot(uri=SSSOM.issue_tracker_item, name="issue_tracker_item", curie=SSSOM.curie('issue_tracker_item'), model_uri=SSSOM.issue_tracker_item, domain=None, range=Optional[Union[str, EntityReference]]) @@ -787,5 +1072,8 @@ class slots: slots.comment = Slot(uri=RDFS.comment, name="comment", curie=RDFS.curie('comment'), model_uri=SSSOM.comment, domain=None, range=Optional[str]) +slots.propagatable__propagated = Slot(uri=SSSOM.propagated, name="propagatable__propagated", curie=SSSOM.curie('propagated'), + model_uri=SSSOM.propagatable__propagated, domain=None, range=Optional[Union[bool, Bool]]) + slots.mapping_set_license = Slot(uri=DCTERMS.license, name="mapping set_license", curie=DCTERMS.curie('license'), model_uri=SSSOM.mapping_set_license, domain=MappingSet, range=Union[str, URI]) \ No newline at end of file