Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCO Issue 449: Add Protege catalog files #44

Merged
merged 3 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ all: \

.PHONY: \
all-dependencies \
all-ontology \
all-shapes \
all-taxonomy \
all-tests \
Expand Down Expand Up @@ -132,8 +133,13 @@ all-dependencies: \
$(MAKE) \
--directory dependencies

all-shapes: \
all-ontology: \
all-dependencies
$(MAKE) \
--directory ontology

all-shapes: \
all-ontology
$(MAKE) \
--directory shapes

Expand Down
32 changes: 29 additions & 3 deletions dependencies/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ SHELL := /bin/bash

top_srcdir := $(shell cd .. ; pwd)

# TODO - After release of CASE 1.2.0, have this reference a different submodule.
case_srcdir := CASE-unstable

uco_srcdir := $(case_srcdir)/dependencies/UCO

case_develop_ttls := \
$(wildcard CASE-develop/ontology/*/*.ttl) \
$(wildcard UCO-develop/ontology/*/*.ttl) \
Expand Down Expand Up @@ -48,8 +53,8 @@ rdf_toolkit_jar := $(top_srcdir)/dependencies/CASE/dependencies/UCO/lib/rdf-tool
all: \
CASE-develop.ttl \
CASE-unstable.ttl \
dcat-us.jsonld \
dependencies.ttl
catalog-v001.xml \
dcat-us.jsonld

CASE-develop.ttl: \
$(top_srcdir)/.venv.done.log \
Expand All @@ -72,9 +77,29 @@ CASE-unstable.ttl: \
> _$@
mv _$@ $@

catalog-v001.xml: \
$(case_srcdir)/ontology/master/catalog-v001.xml \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
$(uco_srcdir)/src/create-catalog-v001.xml.py \
$(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
dependencies.ttl
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& python3 $(uco_srcdir)/src/create-catalog-v001.xml.py \
--catalog-xml $(case_srcdir)/ontology/master/catalog-v001.xml \
--catalog-xml $(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
_$@ \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
"$(top_srcdir)" \
dependencies.ttl
mv _$@ $@

# Construction of dependencies.ttl includes UCO OWL review.
check: \
dependencies.ttl
catalog-v001.xml

cito.ttl: \
cito/docs/current/cito.ttl
Expand All @@ -90,6 +115,7 @@ clean:
@rm -f \
CASE-develop.ttl \
CASE-unstable.ttl \
catalog-v001.xml \
dependencies.ttl

cpannotationschema.ttl:
Expand Down
18 changes: 18 additions & 0 deletions dependencies/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
<uri id="User Entered Import Resolution" uri="cito.ttl" name="http://purl.org/spar/cito"/>
<uri id="User Entered Import Resolution" uri="cpannotationschema.ttl" name="http://www.ontologydesignpatterns.org/schemas/cpannotationschema.owl"/>
<uri id="User Entered Import Resolution" uri="dcat.ttl" name="http://www.w3.org/ns/dcat"/>
<uri id="User Entered Import Resolution" uri="dcterms.ttl" name="http://purl.org/dc/terms/"/>
<uri id="User Entered Import Resolution" uri="discourse-relationships.ttl" name="http://purl.org/swan/2.0/discourse-relationships/"/>
<uri id="User Entered Import Resolution" uri="foaf.ttl" name="http://xmlns.com/foaf/0.1/"/>
<uri id="User Entered Import Resolution" uri="prov-o.ttl" name="http://www.w3.org/ns/prov#"/>
<uri id="User Entered Import Resolution" uri="prov-o.ttl" name="http://www.w3.org/ns/prov-o#"/>
<uri id="User Entered Import Resolution" uri="situation.ttl" name="http://www.ontologydesignpatterns.org/cp/owl/situation.owl"/>
<uri id="User Entered Import Resolution" uri="skos.ttl" name="http://www.w3.org/2004/02/skos/core"/>
<uri id="User Entered Import Resolution" uri="sosa.ttl" name="http://www.w3.org/ns/sosa/"/>
<uri id="User Entered Import Resolution" uri="sosa.ttl" name="https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/sosa.ttl"/>
<uri id="User Entered Import Resolution" uri="ssn.ttl" name="http://www.w3.org/ns/ssn/"/>
<uri id="User Entered Import Resolution" uri="time.ttl" name="http://www.w3.org/2006/time"/>
<uri id="User Entered Import Resolution" uri="vcard.ttl" name="http://www.w3.org/2006/vcard/ns"/>
</catalog>
15 changes: 15 additions & 0 deletions etc/dependency_files.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
http://purl.org/dc/dcam/ ${top_srcdir}/dependencies/dcam.ttl
http://purl.org/dc/elements/1.1/ ${top_srcdir}/dependencies/dc.ttl
http://purl.org/dc/terms/ ${top_srcdir}/dependencies/dcterms.ttl
http://purl.org/spar/cito/2018-02-16 ${top_srcdir}/dependencies/cito.ttl
http://purl.org/swan/2.0/discourse-relationships/ ${top_srcdir}/dependencies/discourse-relationships.ttl
http://www.ontologydesignpatterns.org/cp/owl/situation.owl ${top_srcdir}/dependencies/situation.ttl
http://www.ontologydesignpatterns.org/schemas/cpannotationschema.owl ${top_srcdir}/dependencies/cpannotationschema.ttl
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://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
https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/ssn.ttl ${top_srcdir}/dependencies/ssn.ttl
4 changes: 4 additions & 0 deletions etc/domain_directories.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
http://example.org/ontology/ ${top_srcdir}/ontology/
http://example.org/shapes/ ${top_srcdir}/shapes/
https://ontology.caseontology.org/ ${top_srcdir}/dependencies/CASE-unstable/ontology/
https://ontology.unifiedcyberontology.org/ ${top_srcdir}/dependencies/CASE-unstable/dependencies/UCO/ontology/
30 changes: 29 additions & 1 deletion ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ SHELL := /bin/bash

top_srcdir := $(shell cd .. ; pwd)

# TODO - After release of CASE 1.2.0, have this reference a different submodule.
case_srcdir := $(top_srcdir)/dependencies/CASE-unstable

uco_srcdir := $(case_srcdir)/dependencies/UCO

ontology_files := case-corpora.ttl
check_ontology_files := $(foreach ontology_file,$(ontology_files),.check-$(ontology_file))
check_ontology_targets := $(foreach ontology_file,$(ontology_files),check-$(ontology_file))

all:
all: \
catalog-v001.xml

.PRECIOUS: \
.check-%.ttl
Expand All @@ -34,8 +40,29 @@ all:
--target-format turtle
mv _$@ $@

catalog-v001.xml: \
$(case_srcdir)/ontology/master/catalog-v001.xml \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
$(uco_srcdir)/src/create-catalog-v001.xml.py \
$(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
$(ontology_files)
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& python3 $(uco_srcdir)/src/create-catalog-v001.xml.py \
--catalog-xml $(case_srcdir)/ontology/master/catalog-v001.xml \
--catalog-xml $(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
_$@ \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
"$(top_srcdir)" \
$(ontology_files)
mv _$@ $@

check: \
$(check_ontology_targets) \
catalog-v001.xml \
uco_owl_review.ttl

check-%.ttl: \
Expand All @@ -47,6 +74,7 @@ check-%.ttl: \
clean:
@rm -f \
$(check_ontology_files) \
catalog-v001.xml \
uco_owl_review.ttl

uco_owl_review.ttl: \
Expand Down
40 changes: 40 additions & 0 deletions ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/dependencies/collections-ontology/collections.owl" name="http://purl.org/co"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/dependencies/error/docs/current/error.ttl" name="http://purl.org/spar/error"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/co/co.ttl" name="https://ontology.unifiedcyberontology.org/co/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/owl/owl.ttl" name="https://ontology.unifiedcyberontology.org/owl/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/action/action.ttl" name="https://ontology.unifiedcyberontology.org/uco/action/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/analysis/analysis.ttl" name="https://ontology.unifiedcyberontology.org/uco/analysis/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/configuration/configuration.ttl" name="https://ontology.unifiedcyberontology.org/uco/configuration/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/identity/identity.ttl" name="https://ontology.unifiedcyberontology.org/uco/identity/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/location/location.ttl" name="https://ontology.unifiedcyberontology.org/uco/location/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/marking/marking.ttl" name="https://ontology.unifiedcyberontology.org/uco/marking/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/master/uco.ttl" name="https://ontology.unifiedcyberontology.org/uco/uco/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/observable/observable.ttl" name="https://ontology.unifiedcyberontology.org/uco/observable/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/pattern/pattern.ttl" name="https://ontology.unifiedcyberontology.org/uco/pattern/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/role/role.ttl" name="https://ontology.unifiedcyberontology.org/uco/role/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/time/time.ttl" name="https://ontology.unifiedcyberontology.org/uco/time/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/tool/tool.ttl" name="https://ontology.unifiedcyberontology.org/uco/tool/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/types/types.ttl" name="https://ontology.unifiedcyberontology.org/uco/types/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/victim/victim.ttl" name="https://ontology.unifiedcyberontology.org/uco/victim/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/dependencies/UCO/ontology/uco/vocabulary/vocabulary.ttl" name="https://ontology.unifiedcyberontology.org/uco/vocabulary/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/ontology/investigation/investigation.ttl" name="https://ontology.caseontology.org/case/investigation/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/ontology/master/case.ttl" name="https://ontology.caseontology.org/case/case/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/CASE-unstable/ontology/vocabulary/vocabulary.ttl" name="https://ontology.caseontology.org/case/vocabulary/1.1.0"/>
<uri id="User Entered Import Resolution" uri="../dependencies/cito.ttl" name="http://purl.org/spar/cito/2018-02-16"/>
<uri id="User Entered Import Resolution" uri="../dependencies/cpannotationschema.ttl" name="http://www.ontologydesignpatterns.org/schemas/cpannotationschema.owl"/>
<uri id="User Entered Import Resolution" uri="../dependencies/dcat.ttl" name="http://www.w3.org/ns/dcat"/>
<uri id="User Entered Import Resolution" uri="../dependencies/dcterms.ttl" name="http://purl.org/dc/terms/"/>
<uri id="User Entered Import Resolution" uri="../dependencies/foaf.ttl" name="http://xmlns.com/foaf/0.1/"/>
<uri id="User Entered Import Resolution" uri="../dependencies/prov-o.ttl" name="http://www.w3.org/ns/prov-o#"/>
<uri id="User Entered Import Resolution" uri="../dependencies/prov-o.ttl" name="https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/prov-o.ttl"/>
<uri id="User Entered Import Resolution" uri="../dependencies/situation.ttl" name="http://www.ontologydesignpatterns.org/cp/owl/situation.owl"/>
<uri id="User Entered Import Resolution" uri="../dependencies/skos.ttl" name="http://www.w3.org/2004/02/skos/core"/>
<uri id="User Entered Import Resolution" uri="../dependencies/sosa.ttl" name="https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/sosa.ttl"/>
<uri id="User Entered Import Resolution" uri="../dependencies/ssn.ttl" name="https://raw.githubusercontent.com/casework/CASE-Corpora/main/dependencies/ssn.ttl"/>
<uri id="User Entered Import Resolution" uri="../dependencies/time.ttl" name="http://www.w3.org/2006/time#2016"/>
<uri id="User Entered Import Resolution" uri="../dependencies/vcard.ttl" name="http://www.w3.org/2006/vcard/ns"/>
<uri id="User Entered Import Resolution" uri="case-corpora.ttl" name="http://example.org/ontology/case-corpora"/>
</catalog>
28 changes: 28 additions & 0 deletions shapes/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ SHELL := /bin/bash

top_srcdir := $(shell cd .. ; pwd)

# TODO - After release of CASE 1.2.0, have this reference a different submodule.
case_srcdir := $(top_srcdir)/dependencies/CASE-unstable

uco_srcdir := $(case_srcdir)/dependencies/UCO

shapes_ttl_sources := $(wildcard sh-*.ttl)
shape_files := \
$(shapes_ttl_sources) \
Expand All @@ -23,6 +28,7 @@ check_shape_files := $(foreach shape_file,$(shape_files),.check-$(shape_file))
check_shape_targets := $(foreach shape_file,$(shape_files),check-$(shape_file))

all: \
catalog-v001.xml \
shapes.ttl

.PRECIOUS: \
Expand All @@ -38,6 +44,28 @@ all: \
--target-format turtle
mv _$@ $@

catalog-v001.xml: \
$(case_srcdir)/ontology/master/catalog-v001.xml \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
$(top_srcdir)/ontology/catalog-v001.xml \
$(uco_srcdir)/src/create-catalog-v001.xml.py \
$(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
shapes.ttl
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& python3 $(uco_srcdir)/src/create-catalog-v001.xml.py \
--catalog-xml $(case_srcdir)/ontology/master/catalog-v001.xml \
--catalog-xml $(top_srcdir)/ontology/catalog-v001.xml \
--catalog-xml $(uco_srcdir)/ontology/uco/master/catalog-v001.xml \
_$@ \
$(top_srcdir)/etc/domain_directories.tsv \
$(top_srcdir)/etc/dependency_files.tsv \
"$(top_srcdir)" \
shapes.ttl
mv _$@ $@

check: \
$(check_shape_targets) \
uco_owl_review.ttl \
Expand Down
Loading