|
| 1 | +@prefix sh: <http://www.w3.org/ns/shacl#> . |
| 2 | +@prefix schema: <http://schema.org/> . |
| 3 | +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
| 4 | +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . |
| 5 | +@prefix md4i: <http://w3id.org/nfdi4ing/metadata4ing#> . |
| 6 | +@prefix gimie: <https://sdsc-ordes.github.io/gimie/shacl/> . |
| 7 | + |
| 8 | +# ───────────────────────────────────────────── |
| 9 | +# SoftwareSourceCode shape |
| 10 | +# ───────────────────────────────────────────── |
| 11 | + |
| 12 | +gimie:SoftwareSourceCodeShape |
| 13 | + a sh:NodeShape ; |
| 14 | + sh:targetClass schema:SoftwareSourceCode ; |
| 15 | + rdfs:label "Software Source Code"@en ; |
| 16 | + rdfs:comment "Shape for a software source code repository as described by gimie. Maps to schema:SoftwareSourceCode / codemeta:SoftwareSourceCode."@en ; |
| 17 | + |
| 18 | + # ── Required properties ────────────────── |
| 19 | + |
| 20 | + sh:property [ |
| 21 | + sh:path schema:codeRepository ; |
| 22 | + sh:name "code repository"@en ; |
| 23 | + sh:description "URL of the source code repository (e.g. Git remote)."@en ; |
| 24 | + sh:nodeKind sh:IRI ; |
| 25 | + sh:minCount 1 ; |
| 26 | + sh:maxCount 1 ; |
| 27 | + ] ; |
| 28 | + |
| 29 | + sh:property [ |
| 30 | + sh:path schema:name ; |
| 31 | + sh:name "name"@en ; |
| 32 | + sh:description "The name of the software project, typically owner/repo."@en ; |
| 33 | + sh:datatype xsd:string ; |
| 34 | + sh:minCount 1 ; |
| 35 | + sh:maxCount 1 ; |
| 36 | + ] ; |
| 37 | + |
| 38 | + # ── Optional scalar properties ─────────── |
| 39 | + |
| 40 | + sh:property [ |
| 41 | + sh:path schema:description ; |
| 42 | + sh:name "description"@en ; |
| 43 | + sh:description "A short textual description of the software."@en ; |
| 44 | + sh:datatype xsd:string ; |
| 45 | + sh:maxCount 1 ; |
| 46 | + ] ; |
| 47 | + |
| 48 | + sh:property [ |
| 49 | + sh:path schema:identifier ; |
| 50 | + sh:name "identifier"@en ; |
| 51 | + sh:description "A unique identifier for the software (e.g. a DOI or slug)."@en ; |
| 52 | + sh:datatype xsd:string ; |
| 53 | + sh:maxCount 1 ; |
| 54 | + ] ; |
| 55 | + |
| 56 | + sh:property [ |
| 57 | + sh:path schema:version ; |
| 58 | + sh:name "version"@en ; |
| 59 | + sh:description "The current version of the software (e.g. a release tag)."@en ; |
| 60 | + sh:datatype xsd:string ; |
| 61 | + sh:maxCount 1 ; |
| 62 | + ] ; |
| 63 | + |
| 64 | + sh:property [ |
| 65 | + sh:path schema:dateCreated ; |
| 66 | + sh:name "date created"@en ; |
| 67 | + sh:description "Date on which the repository was created."@en ; |
| 68 | + sh:datatype xsd:date ; |
| 69 | + sh:maxCount 1 ; |
| 70 | + ] ; |
| 71 | + |
| 72 | + sh:property [ |
| 73 | + sh:path schema:dateModified ; |
| 74 | + sh:name "date modified"@en ; |
| 75 | + sh:description "Date on which the repository was last modified."@en ; |
| 76 | + sh:datatype xsd:date ; |
| 77 | + sh:maxCount 1 ; |
| 78 | + ] ; |
| 79 | + |
| 80 | + sh:property [ |
| 81 | + sh:path schema:datePublished ; |
| 82 | + sh:name "date published"@en ; |
| 83 | + sh:description "Date of the latest release / publication."@en ; |
| 84 | + sh:datatype xsd:date ; |
| 85 | + sh:maxCount 1 ; |
| 86 | + ] ; |
| 87 | + |
| 88 | + sh:property [ |
| 89 | + sh:path schema:downloadUrl ; |
| 90 | + sh:name "download URL"@en ; |
| 91 | + sh:description "URL to download the software archive (e.g. a tarball of the latest release)."@en ; |
| 92 | + sh:nodeKind sh:IRI ; |
| 93 | + sh:maxCount 1 ; |
| 94 | + ] ; |
| 95 | + |
| 96 | + sh:property [ |
| 97 | + sh:path schema:isBasedOn ; |
| 98 | + sh:name "is based on"@en ; |
| 99 | + sh:description "URL of the parent / upstream repository this software was forked from."@en ; |
| 100 | + sh:nodeKind sh:IRI ; |
| 101 | + sh:maxCount 1 ; |
| 102 | + ] ; |
| 103 | + |
| 104 | + # ── Repeatable literal properties ──────── |
| 105 | + |
| 106 | + sh:property [ |
| 107 | + sh:path schema:keywords ; |
| 108 | + sh:name "keywords"@en ; |
| 109 | + sh:description "Keywords or tags describing the software (e.g. GitHub topics)."@en ; |
| 110 | + sh:datatype xsd:string ; |
| 111 | + ] ; |
| 112 | + |
| 113 | + sh:property [ |
| 114 | + sh:path schema:programmingLanguage ; |
| 115 | + sh:name "programming language"@en ; |
| 116 | + sh:description "The primary programming language(s) of the software."@en ; |
| 117 | + sh:datatype xsd:string ; |
| 118 | + ] ; |
| 119 | + |
| 120 | + sh:property [ |
| 121 | + sh:path schema:license ; |
| 122 | + sh:name "license"@en ; |
| 123 | + sh:description "An SPDX license URL identifying the license of the software."@en ; |
| 124 | + sh:nodeKind sh:IRI ; |
| 125 | + ] ; |
| 126 | + |
| 127 | + sh:property [ |
| 128 | + sh:path schema:citation ; |
| 129 | + sh:name "citation"@en ; |
| 130 | + sh:description "A DOI or URL referencing a citable publication for this software (typically from CITATION.cff)."@en ; |
| 131 | + sh:nodeKind sh:IRI ; |
| 132 | + ] ; |
| 133 | + |
| 134 | + # ── Relationship properties ────────────── |
| 135 | + |
| 136 | + sh:property [ |
| 137 | + sh:path schema:author ; |
| 138 | + sh:name "author"@en ; |
| 139 | + sh:description "The author(s) of the software. May be a Person or an Organization."@en ; |
| 140 | + sh:or ( |
| 141 | + [ sh:node gimie:PersonShape ] |
| 142 | + [ sh:node gimie:OrganizationShape ] |
| 143 | + ) ; |
| 144 | + ] ; |
| 145 | + |
| 146 | + sh:property [ |
| 147 | + sh:path schema:contributor ; |
| 148 | + sh:name "contributor"@en ; |
| 149 | + sh:description "A contributor to the software repository."@en ; |
| 150 | + sh:node gimie:PersonShape ; |
| 151 | + ] . |
| 152 | + |
| 153 | + |
| 154 | +# ───────────────────────────────────────────── |
| 155 | +# Person shape |
| 156 | +# ───────────────────────────────────────────── |
| 157 | + |
| 158 | +gimie:PersonShape |
| 159 | + a sh:NodeShape ; |
| 160 | + sh:targetClass schema:Person ; |
| 161 | + rdfs:label "Person"@en ; |
| 162 | + rdfs:comment "Shape for a person who authored or contributed to a software project. Maps to schema:Person / codemeta:Person."@en ; |
| 163 | + |
| 164 | + sh:property [ |
| 165 | + sh:path schema:identifier ; |
| 166 | + sh:name "identifier"@en ; |
| 167 | + sh:description "A unique identifier for the person (e.g. a username or slug)."@en ; |
| 168 | + sh:datatype xsd:string ; |
| 169 | + sh:minCount 1 ; |
| 170 | + sh:maxCount 1 ; |
| 171 | + ] ; |
| 172 | + |
| 173 | + sh:property [ |
| 174 | + sh:path schema:name ; |
| 175 | + sh:name "name"@en ; |
| 176 | + sh:description "The full name of the person."@en ; |
| 177 | + sh:datatype xsd:string ; |
| 178 | + sh:maxCount 1 ; |
| 179 | + ] ; |
| 180 | + |
| 181 | + sh:property [ |
| 182 | + sh:path schema:email ; |
| 183 | + sh:name "email"@en ; |
| 184 | + sh:description "The email address of the person."@en ; |
| 185 | + sh:datatype xsd:string ; |
| 186 | + sh:maxCount 1 ; |
| 187 | + ] ; |
| 188 | + |
| 189 | + sh:property [ |
| 190 | + sh:path md4i:orcidId ; |
| 191 | + sh:name "ORCID iD"@en ; |
| 192 | + sh:description "The ORCID identifier of the person, extracted from CITATION.cff."@en ; |
| 193 | + sh:maxCount 1 ; |
| 194 | + ] ; |
| 195 | + |
| 196 | + sh:property [ |
| 197 | + sh:path schema:affiliation ; |
| 198 | + sh:name "affiliation"@en ; |
| 199 | + sh:description "Organization(s) the person is affiliated with."@en ; |
| 200 | + sh:or ( |
| 201 | + [ sh:node gimie:OrganizationShape ] |
| 202 | + [ sh:datatype xsd:string ] |
| 203 | + ) ; |
| 204 | + ] . |
| 205 | + |
| 206 | + |
| 207 | +# ───────────────────────────────────────────── |
| 208 | +# Organization shape |
| 209 | +# ───────────────────────────────────────────── |
| 210 | + |
| 211 | +gimie:OrganizationShape |
| 212 | + a sh:NodeShape ; |
| 213 | + sh:targetClass schema:Organization ; |
| 214 | + rdfs:label "Organization"@en ; |
| 215 | + rdfs:comment "Shape for an organization that owns or is affiliated with a software project. Maps to schema:Organization / codemeta:Organization."@en ; |
| 216 | + |
| 217 | + sh:property [ |
| 218 | + sh:path schema:name ; |
| 219 | + sh:name "name"@en ; |
| 220 | + sh:description "The name of the organization."@en ; |
| 221 | + sh:datatype xsd:string ; |
| 222 | + sh:minCount 1 ; |
| 223 | + sh:maxCount 1 ; |
| 224 | + ] ; |
| 225 | + |
| 226 | + sh:property [ |
| 227 | + sh:path schema:legalName ; |
| 228 | + sh:name "legal name"@en ; |
| 229 | + sh:description "The official legal name of the organization."@en ; |
| 230 | + sh:datatype xsd:string ; |
| 231 | + sh:maxCount 1 ; |
| 232 | + ] ; |
| 233 | + |
| 234 | + sh:property [ |
| 235 | + sh:path schema:email ; |
| 236 | + sh:name "email"@en ; |
| 237 | + sh:description "Contact email address(es) of the organization."@en ; |
| 238 | + sh:datatype xsd:string ; |
| 239 | + ] ; |
| 240 | + |
| 241 | + sh:property [ |
| 242 | + sh:path schema:description ; |
| 243 | + sh:name "description"@en ; |
| 244 | + sh:description "A short textual description of the organization."@en ; |
| 245 | + sh:datatype xsd:string ; |
| 246 | + sh:maxCount 1 ; |
| 247 | + ] ; |
| 248 | + |
| 249 | + sh:property [ |
| 250 | + sh:path schema:logo ; |
| 251 | + sh:name "logo"@en ; |
| 252 | + sh:description "URL of the organization's logo or avatar."@en ; |
| 253 | + sh:nodeKind sh:IRI ; |
| 254 | + sh:maxCount 1 ; |
| 255 | + ] . |
0 commit comments