Skip to content

Commit

Permalink
Add case-prov illustrations of beginnings of chain of custody
Browse files Browse the repository at this point in the history
This is part of retiring CASE-Examples review from the `case-prov`
repository.

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

References:
* casework/CASE-Implementation-PROV-O#89

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
  • Loading branch information
ajnelson-nist committed Sep 19, 2023
1 parent 79ce84b commit b4e4f5a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.dot
.check_README.md
kb-entailment.ttl
kb-prov-time.ttl
Expand Down
45 changes: 44 additions & 1 deletion tests/CASE-Examples/examples/illustrations/src/review.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,60 @@ rdf_toolkit_jar := $(top_srcdir)/dependencies/CASE-Examples/dependencies/CASE-de
subjectdir_basename := $(shell basename $$PWD)

all: \
$(subjectdir_basename).json \
$(subjectdir_basename)-prov-originals.svg \
undefined_concepts.txt \
undefined_kindOfRelationships.tsv

.PHONY: \
normalize

%.svg: \
%.dot
dot \
-o _$@ \
-T svg \
$<
mv _$@ $@

$(rdf_toolkit_jar):
@echo "ERROR:Makefile:rdf-toolkit.jar not downloaded; please run 'make download' from the top-level directory ($(top_srcdir))." >&2
@exit 2

$(subjectdir_basename)-prov-originals.dot: \
$(subjectdir_basename)-prov.ttl
rm -f _$@
source $(top_srcdir)/venv/bin/activate \
&& case_prov_dot \
--dash-unqualified \
--debug \
--from-empty-set \
--use-deterministic-uuids \
_$@ \
$<
mv _$@ $@

$(subjectdir_basename)-prov.ttl: \
$(subjectdir_basename).json \
$(top_srcdir)/.venv.done.log
rm -f __$@ _$@
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/venv/bin/activate \
&& case_prov_rdf \
--allow-empty-results \
--debug \
--use-deterministic-uuids \
__$@ \
$<
java -jar $(rdf_toolkit_jar) \
--inline-blank-nodes \
--source __$@ \
--source-format turtle \
--target _$@ \
--target-format turtle
rm __$@
mv _$@ $@


$(subjectdir_basename).json: \
$(top_srcdir)/dependencies/CASE-Examples/examples/illustrations/$(subjectdir_basename)/$(subjectdir_basename).json
source $(top_srcdir)/venv/bin/activate \
Expand Down

0 comments on commit b4e4f5a

Please sign in to comment.