-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add steps to generate Collections Ontology shapes documentation
A follow-on patch will regenerate Make-managed files. References: * ucoProject/UCO#389 Signed-off-by: Alex Nelson <[email protected]>
- Loading branch information
1 parent
e6a12c9
commit 7fb70d4
Showing
5 changed files
with
154 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#!/usr/bin/make -f | ||
|
||
# This software was developed at the National Institute of Standards | ||
# and Technology by employees of the Federal Government in the course | ||
# of their official duties. Pursuant to title 17 Section 105 of the | ||
# United States Code this software is not subject to copyright | ||
# protection and is in the public domain. NIST assumes no | ||
# responsibility whatsoever for its use by other parties, and makes | ||
# no guarantees, expressed or implied, about its quality, | ||
# reliability, or any other characteristic. | ||
# | ||
# We would appreciate acknowledgement if the software is used. | ||
|
||
SHELL := /bin/bash | ||
|
||
top_srcdir := $(shell cd .. ; pwd) | ||
|
||
RDF_TOOLKT_JAR := $(top_srcdir)/dependencies/UCO/lib/rdf-toolkit.jar | ||
|
||
rdf_files := \ | ||
co.rdf | ||
|
||
all: \ | ||
$(rdf_files) \ | ||
.symlinking.done.log \ | ||
co.ttl | ||
|
||
.PHONY: \ | ||
clean-symlinking | ||
|
||
.documentation.done.log: \ | ||
$(top_srcdir)/.venv.done.log \ | ||
$(top_srcdir)/dependencies/UCO/ontology/co/co.ttl | ||
rm -rf documentation | ||
mkdir documentation | ||
source $(top_srcdir)/venv/bin/activate \ | ||
&& ontospy gendocs \ | ||
--outputpath $$PWD/documentation \ | ||
--theme darkly \ | ||
--title co-shapes-docs \ | ||
--type 2 \ | ||
$(top_srcdir)/dependencies/UCO/ontology/co/co.ttl | ||
touch $@ | ||
|
||
.%.symlinking.done.log: \ | ||
%.ttl \ | ||
.documentation.done.log | ||
source $(top_srcdir)/venv/bin/activate \ | ||
&& python3 $(top_srcdir)/src/map_concepts_as_symlinks.py \ | ||
$< | ||
|
||
.symlinking.done.log: \ | ||
.co.symlinking.done.log | ||
|
||
check: \ | ||
$(rdf_files) | ||
# Test that generated RDF-XML is valid XML. | ||
source $(top_srcdir)/venv/bin/activate \ | ||
&& rdfpipe \ | ||
--input-format xml \ | ||
--no-out \ | ||
co.rdf | ||
|
||
clean: \ | ||
clean-symlinking | ||
@rm -f \ | ||
*.rdf \ | ||
*.ttl \ | ||
.*.done.log | ||
@rm -rf \ | ||
documentation | ||
|
||
clean-symlinking: | ||
@rm -f \ | ||
.symlinking.done.log | ||
@find \ | ||
. \ | ||
-name '*.html' \ | ||
-type l \ | ||
-exec rm '{}' \; | ||
|
||
co.rdf: \ | ||
$(top_srcdir)/dependencies/UCO/ontology/co/co.ttl \ | ||
$(RDF_TOOLKT_JAR) \ | ||
$(top_srcdir)/src/namespaces.sed | ||
java -jar $(RDF_TOOLKT_JAR) \ | ||
--inline-blank-nodes \ | ||
--source $< \ | ||
--source-format turtle \ | ||
--target __$@ \ | ||
--target-format rdf-xml | ||
sed \ | ||
-f $(top_srcdir)/src/namespaces.sed \ | ||
__$@ \ | ||
> _$@ | ||
rm __$@ | ||
mv _$@ $@ | ||
|
||
co.ttl: \ | ||
$(top_srcdir)/dependencies/UCO/ontology/co/co.ttl | ||
cp $< $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.