Skip to content

Instantly share code, notes, and snippets.

@labra
Last active July 21, 2022 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save labra/27a4fd013ecd43c97548fa8d4b3356ba to your computer and use it in GitHub Desktop.
Save labra/27a4fd013ecd43c97548fa8d4b3356ba to your computer and use it in GitHub Desktop.
ShEx schema for Research Software generated by sheXer
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xml: <http://www.w3.org/XML/1998/namespace>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX : <http://weso.es/shapes/>
<ResearchSoftware>
{
schema:version xsd:integer ;
schema:dateModified xsd:string ;
rdfs:label rdf:langString +;
wikibase:statements xsd:integer ;
wikibase:sitelinks xsd:integer ;
wikibase:identifiers xsd:integer ;
wdt:P31 [wd:Q95001953] ; // rdfs:comment "Q95001953 --> research software ; P31 --> instance of"
schema:description rdf:langString *;
wdt:P1343 IRI ?; // rdfs:comment "P1343 --> described by source"
wdt:P856 IRI *; // rdfs:comment "P856 --> official website"
wdt:P277 IRI *; // rdfs:comment "P277 --> programming language"
wdt:P1324 IRI ?; // rdfs:comment "P1324 --> source code repository"
wdt:P571 xsd:string ?; // rdfs:comment "P571 --> inception"
wdt:P31 [wd:Q506883] ?; // rdfs:comment "Q506883 --> free and open-source software ; P31 --> instance of"
wdt:P31 [wd:Q341] ?; // rdfs:comment "P31 --> instance of ; Q341 --> free software"
wdt:P31 [wd:Q40056] ?; // rdfs:comment "P31 --> instance of ; Q40056 --> computer program"
wdt:P31 [wd:Q166142] ?; // rdfs:comment "P31 --> instance of ; Q166142 --> application"
wdt:P31 [wd:Q11121294] ?; // rdfs:comment "P31 --> instance of ; Q11121294 --> simulation software"
wdt:P31 [wd:Q112121811] ?; // rdfs:comment "P31 --> instance of ; Q112121811 --> ImageJ plugin"
wdt:P31 [wd:Q112123591] ?; // rdfs:comment "P31 --> instance of ; Q112123591 --> forest simulator"
wdt:P646 xsd:string ?; // rdfs:comment "P646 --> Freebase ID"
wdt:P1547 IRI ?; // rdfs:comment "P1547 --> depends on software"
wdt:P3417 xsd:string ?; // rdfs:comment "P3417 --> Quora topic ID"
p:direct-normalized/P646 IRI ?;
wdt:P50 IRI ?; // rdfs:comment "P50 --> author"
wdt:P178 IRI *; // rdfs:comment "P178 --> developer"
wdt:P306 IRI *; // rdfs:comment "P306 --> operating system"
wdt:P348 xsd:float ?; // rdfs:comment "P348 --> software version identifier"
wdt:P356 xsd:string ?; // rdfs:comment "P356 --> DOI"
wdt:P400 IRI *; // rdfs:comment "P400 --> platform"
wdt:P767 IRI ?; // rdfs:comment "P767 --> contributor to the creative work or subject"
wdt:P2209 xsd:string ?; // rdfs:comment "P2209 --> SourceForge project"
wdt:P4793 xsd:string ?; // rdfs:comment "P4793 --> identifiers.org prefix"
wdt:P9712 xsd:string ?; // rdfs:comment "P9712 --> Research Resource Identifier"
p:direct-normalized/P356 IRI ?;
wdt:P170 IRI ?; // rdfs:comment "P170 --> creator"
wdt:P1476 rdf:langString ?; // rdfs:comment "P1476 --> title"
wdt:P366 IRI * // rdfs:comment "P366 --> has use"
}
# Shape <ResearchSoftware>, frequency comments (sheXer)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xml: <http://www.w3.org/XML/1998/namespace>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX : <http://weso.es/shapes/>
<ResearchSoftware>
{
schema:version xsd:integer ; # 100.0 %
schema:dateModified xsd:string ; # 100.0 %
rdfs:label rdf:langString +; # 100.0 %
# 62.5 % obj: rdf:langString. Cardinality: {1}
# 12.5 % obj: rdf:langString. Cardinality: {11}
# 12.5 % obj: rdf:langString. Cardinality: {2}
# 12.5 % obj: rdf:langString. Cardinality: {7}
wikibase:statements xsd:integer ; # 100.0 %
wikibase:sitelinks xsd:integer ; # 100.0 %
wikibase:identifiers xsd:integer ; # 100.0 %
wdt:P31 [wd:Q95001953] ; # 100.0 % // rdfs:comment "Q95001953 --> research software ; P31 --> instance of"
schema:description rdf:langString *;
# 87.5 % obj: rdf:langString. Cardinality: +
# 75.0 % obj: rdf:langString. Cardinality: {1}
# 12.5 % obj: rdf:langString. Cardinality: {7}
wdt:P1343 IRI ?; // rdfs:comment "P1343 --> described by source"
# 62.5 % obj: IRI. Cardinality: {1}
wdt:P856 IRI *; // rdfs:comment "P856 --> official website"
# 50.0 % obj: IRI. Cardinality: +
# 37.5 % obj: IRI. Cardinality: {1}
# 12.5 % obj: IRI. Cardinality: {2}
wdt:P277 IRI *; // rdfs:comment "P277 --> programming language"
# 25.0 % obj: IRI. Cardinality: +
# 12.5 % obj: IRI. Cardinality: {1}
# 12.5 % obj: IRI. Cardinality: {2}
wdt:P1324 IRI ?; // rdfs:comment "P1324 --> source code repository"
# 25.0 % obj: IRI. Cardinality: {1}
wdt:P571 xsd:string ?; // rdfs:comment "P571 --> inception"
# 25.0 % obj: xsd:string. Cardinality: {1}
wdt:P31 [wd:Q506883] ?; // rdfs:comment "Q506883 --> free and open-source software ; P31 --> instance of"
# 12.5 % obj: wd:Q506883. Cardinality: {1} // rdfs:comment "Q506883 --> free and open-source software"
wdt:P31 [wd:Q341] ?; // rdfs:comment "Q341 --> free software ; P31 --> instance of"
# 12.5 % obj: wd:Q341. Cardinality: {1} // rdfs:comment "Q341 --> free software"
wdt:P31 [wd:Q40056] ?; // rdfs:comment "Q40056 --> computer program ; P31 --> instance of"
# 12.5 % obj: wd:Q40056. Cardinality: {1} // rdfs:comment "Q40056 --> computer program"
wdt:P31 [wd:Q166142] ?; // rdfs:comment "P31 --> instance of ; Q166142 --> application"
# 12.5 % obj: wd:Q166142. Cardinality: {1} // rdfs:comment "Q166142 --> application"
wdt:P31 [wd:Q11121294] ?; // rdfs:comment "Q11121294 --> simulation software ; P31 --> instance of"
# 12.5 % obj: wd:Q11121294. Cardinality: {1} // rdfs:comment "Q11121294 --> simulation software"
wdt:P31 [wd:Q112121811] ?; // rdfs:comment "Q112121811 --> ImageJ plugin ; P31 --> instance of"
# 12.5 % obj: wd:Q112121811. Cardinality: {1} // rdfs:comment "Q112121811 --> ImageJ plugin"
wdt:P31 [wd:Q112123591] ?; // rdfs:comment "Q112123591 --> forest simulator ; P31 --> instance of"
# 12.5 % obj: wd:Q112123591. Cardinality: {1} // rdfs:comment "Q112123591 --> forest simulator"
wdt:P646 xsd:string ?; // rdfs:comment "P646 --> Freebase ID"
# 12.5 % obj: xsd:string. Cardinality: {1}
wdt:P1547 IRI ?; // rdfs:comment "P1547 --> depends on software"
# 12.5 % obj: IRI. Cardinality: {1}
wdt:P3417 xsd:string ?; // rdfs:comment "P3417 --> Quora topic ID"
# 12.5 % obj: xsd:string. Cardinality: {1}
wdt:P50 IRI ?; // rdfs:comment "P50 --> author"
# 12.5 % obj: IRI. Cardinality: {1}
wdt:P178 IRI *; // rdfs:comment "P178 --> developer"
# 12.5 % obj: IRI. Cardinality: {3}
wdt:P306 IRI *; // rdfs:comment "P306 --> operating system"
# 12.5 % obj: IRI. Cardinality: {6}
wdt:P348 xsd:float ?; // rdfs:comment "P348 --> software version identifier"
# 12.5 % obj: xsd:float. Cardinality: {1}
wdt:P356 xsd:string ?; // rdfs:comment "P356 --> DOI"
# 12.5 % obj: xsd:string. Cardinality: {1}
wdt:P400 IRI *; // rdfs:comment "P400 --> platform"
# 12.5 % obj: IRI. Cardinality: {7}
wdt:P767 IRI ?; // rdfs:comment "P767 --> contributor to the creative work or subject"
# 12.5 % obj: IRI. Cardinality: {1}
wdt:P2209 xsd:string ?; // rdfs:comment "P2209 --> SourceForge project"
# 12.5 % obj: xsd:string. Cardinality: {1}
wdt:P4793 xsd:string ?; // rdfs:comment "P4793 --> identifiers.org prefix"
# 12.5 % obj: xsd:string. Cardinality: {1}
wdt:P9712 xsd:string ?; // rdfs:comment "P9712 --> Research Resource Identifier"
# 12.5 % obj: xsd:string. Cardinality: {1}
wdt:P170 IRI ?; // rdfs:comment "P170 --> creator"
# 12.5 % obj: IRI. Cardinality: {1}
wdt:P1476 rdf:langString ?; // rdfs:comment "P1476 --> title"
# 12.5 % obj: rdf:langString. Cardinality: {1}
wdt:P366 IRI * // rdfs:comment "P366 --> has use"
# 12.5 % obj: IRI. Cardinality: {2}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment