Skip to content

Commit

Permalink
Incorporate ORG ontology
Browse files Browse the repository at this point in the history
Review of CASE-Corpora with RDFS entailments disabled showed some needs
to designate nodes as both `org:Organization` and
`uco-identity:Organization`.  The particular nodes where this occurs are
those used with DCAT-US and non-DCAT-US properties.

This patch adds a new class `case-corpora:Organization` to join UCO's
Organization with ORG's Organization, and uses this more specific class
on individuals flagged by SHACL validation.

SHACL shapes for ORG are started by reviewing class-disjointedness
centered on `org:Organization`.  One unexpected effect is this triple in
ORG:

```turtle
org:Organization
	owl:equivalentClass foaf:Organization ;
	.
```

A new SHACL shape practice is being trialed to handle this.

A follow-on patch will regenerate Make-managed files.

References:
* https://resources.data.gov/resources/dcat-us/#publisher

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Aug 10, 2023
1 parent d5286d2 commit d70229a
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 4 deletions.
2 changes: 1 addition & 1 deletion catalog/catalog.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ kb:distribution-adc5fd35-e9fa-4d1b-8598-f5ce3bba3e9c
.

kb:organization-4ac712c2-4c6e-4670-b1d5-bcfe9d82ae3e
a org:Organization ;
a case-corpora:Organization ;
skos:prefLabel "The CASE Community" ;
.

Expand Down
5 changes: 2 additions & 3 deletions catalog/shared.ttl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@prefix case-corpora: <http://example.org/ontology/case-corpora/> .
@prefix kb: <http://example.org/kb/> .
@prefix orcid: <https://orcid.org/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
Expand All @@ -12,12 +11,12 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

kb:organization-6ee3224c-c27c-4a8c-8a64-27bcff396e53
a org:Organization ;
a case-corpora:Organization ;
skos:prefLabel "DFRWS" ;
.

kb:organization-72ec45c9-ea94-4503-9428-ad73300056f5
a org:Organization ;
a case-corpora:Organization ;
skos:prefLabel "Digital Corpora" ;
.

Expand Down
14 changes: 14 additions & 0 deletions dependencies/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependent_ontology_files := \
discourse-relationships.ttl \
dublin_core_type.ttl \
foaf.ttl \
org.ttl \
prov-o.ttl \
situation.ttl \
skos.ttl \
Expand Down Expand Up @@ -252,6 +253,19 @@ foaf.ttl:
rm __$@
mv _$@ $@

org.ttl:
wget \
--output-document=__$@ \
http://www.w3.org/ns/org
java -jar $(rdf_toolkit_jar) \
--inline-blank-nodes \
--source-format turtle \
--source __$@ \
--target-format turtle \
--target _$@
rm __$@
mv _$@ $@

prov-o.ttl:
wget \
--output-document=__$@ \
Expand Down
1 change: 1 addition & 0 deletions etc/dependency_files.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ http://www.w3.org/2004/02/skos/core ${top_srcdir}/dependencies/skos.ttl
http://www.w3.org/2006/time#2016 ${top_srcdir}/dependencies/time.ttl
http://www.w3.org/2006/vcard/ns ${top_srcdir}/dependencies/vcard.ttl
http://www.w3.org/ns/dcat ${top_srcdir}/dependencies/dcat.ttl
http://www.w3.org/ns/org# ${top_srcdir}/dependencies/org.ttl
http://xmlns.com/foaf/0.1/ ${top_srcdir}/dependencies/foaf.ttl
https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/prov-o.ttl ${top_srcdir}/dependencies/prov-o.ttl
https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/sosa.ttl ${top_srcdir}/dependencies/sosa.ttl
Expand Down
12 changes: 12 additions & 0 deletions ontology/case-corpora.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# imports: http://www.w3.org/2006/time#2016
# imports: http://www.w3.org/2006/vcard/ns
# imports: http://www.w3.org/ns/dcat
# imports: http://www.w3.org/ns/org#
# imports: http://xmlns.com/foaf/0.1/
# imports: https://ontology.caseontology.org/case/case/1.2.0
# imports: https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/prov-o.ttl
Expand All @@ -14,6 +15,7 @@
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix drafting: <http://example.org/ontology/drafting/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
Expand All @@ -38,6 +40,7 @@
time:2016 ,
<http://www.w3.org/2006/vcard/ns> ,
<http://www.w3.org/ns/dcat> ,
<http://www.w3.org/ns/org#> ,
<http://xmlns.com/foaf/0.1/> ,
<https://ontology.caseontology.org/case/case/1.2.0> ,
<https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/prov-o.ttl> ,
Expand Down Expand Up @@ -80,6 +83,15 @@ case-corpora:IANAMediaType
;
.

case-corpora:Organization
a owl:Class ;
rdfs:subClassOf
org:Organization ,
foaf:Organization ,
uco-identity:Organization
;
.

case-corpora:SeedingAction
a owl:Class ;
rdfs:subClassOf
Expand Down
2 changes: 2 additions & 0 deletions shapes/sh-dcat-us.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# imports: http://example.org/shapes/dcat
# imports: http://example.org/shapes/org
# imports: http://example.org/shapes/pod
# imports: http://example.org/shapes/skos

Expand All @@ -20,6 +21,7 @@
a owl:Ontology ;
owl:imports
<http://example.org/shapes/dcat> ,
<http://example.org/shapes/org> ,
<http://example.org/shapes/pod> ,
<http://example.org/shapes/skos>
;
Expand Down
67 changes: 67 additions & 0 deletions shapes/sh-org.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# imports: http://example.org/shapes/foaf
# imports: http://www.w3.org/ns/org#

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix sh-org: <http://example.org/shapes/org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://example.org/shapes/org>
a owl:Ontology ;
owl:imports
<http://example.org/shapes/foaf> ,
<http://www.w3.org/ns/org#>
;
.

sh-org:ChangeEvent-disjointWith-Organization-shape
a sh:NodeShape ;
sh:message "org:ChangeEvent and org:Organization are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class org:Organization ;
] ;
sh:targetClass org:ChangeEvent ;
.

sh-org:Membership-disjointWith-Organization-shape
a sh:NodeShape ;
sh:message "org:Membership and org:Organization are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class org:Organization ;
] ;
sh:targetClass org:Membership ;
.

sh-org:Organization-disjointWith-Role-shape
a sh:NodeShape ;
sh:message "org:Organization and org:Role are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class org:Role ;
] ;
sh:targetClass org:Organization ;
.

sh-org:Organization-disjointWith-Site-shape
a sh:NodeShape ;
sh:message "org:Organization and org:Site are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class org:Site ;
] ;
sh:targetClass org:Organization ;
.

sh-org:Organization-shape
a sh:NodeShape ;
rdfs:comment "org:Organization declares itself an equivalent class with foaf:Organization."@en ;
sh:class foaf:Organization ;
sh:targetClass org:Organization ;
.

0 comments on commit d70229a

Please sign in to comment.