Skip to content

Commit 5fabffd

Browse files
authored
Merge pull request #156 from casework/include_closure_in_monolithic_builds
Include closure in monolithic builds
2 parents 459fbe7 + 49ef5f2 commit 5fabffd

File tree

8 files changed

+2194
-27
lines changed

8 files changed

+2194
-27
lines changed

case_utils/ontology/Makefile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,30 @@ $(case_srcdir)/.venv.done.log: \
4040
touch -c $@
4141
test -r $@
4242

43+
# Build monolith including transitive import closure outside of
44+
# CDO-maintained ontologies, removing need for network retrieval for
45+
# non-CDO class and property definitions.
4346
case-$(case_version).ttl: \
4447
$(case_srcdir)/.venv.done.log \
4548
$(RDF_TOOLKIT_JAR)
4649
$(MAKE) \
4750
--directory $(case_srcdir)/tests \
4851
case_monolithic.ttl
49-
cp \
50-
$(case_srcdir)/tests/case_monolithic.ttl \
51-
$@
52+
source $(case_srcdir)/venv/bin/activate \
53+
&& rdfpipe \
54+
--output-format turtle \
55+
$(case_srcdir)/tests/case_monolithic.ttl \
56+
$(uco_srcdir)/dependencies/collections-ontology/collections.owl \
57+
$(uco_srcdir)/dependencies/error/docs/current/error.ttl \
58+
> __$@
59+
java -jar $(RDF_TOOLKIT_JAR) \
60+
--inline-blank-nodes \
61+
--source __$@ \
62+
--source-format turtle \
63+
--target _$@ \
64+
--target-format turtle
65+
rm __$@
66+
mv _$@ $@
5267

5368
case-$(case_version)-subclasses.ttl: \
5469
case-$(case_version).ttl \

case_utils/ontology/case-1.0.0-subclasses.ttl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,26 @@
33
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
44
@prefix xs: <http://www.w3.org/2001/XMLSchema#> .
55

6+
<http://purl.org/co/Bag>
7+
rdfs:subClassOf <http://purl.org/co/Collection> ;
8+
.
9+
10+
<http://purl.org/co/Collection>
11+
rdfs:subClassOf owl:Thing ;
12+
.
13+
14+
<http://purl.org/co/Item>
15+
rdfs:subClassOf owl:Thing ;
16+
.
17+
618
<http://purl.org/co/ListItem>
719
rdfs:subClassOf <http://purl.org/co/Item> ;
820
.
921

22+
<http://purl.org/co/Set>
23+
rdfs:subClassOf <http://purl.org/co/Collection> ;
24+
.
25+
1026
<https://ontology.caseontology.org/case/investigation/Attorney>
1127
rdfs:subClassOf <https://ontology.unifiedcyberontology.org/uco/role/Role> ;
1228
.

0 commit comments

Comments
 (0)