-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from casework/release-0.7.1
Release 0.7.1
- Loading branch information
Showing
11 changed files
with
196 additions
and
34 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
Submodule UCO
updated
39 files
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
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
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,53 @@ | ||
#!/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) | ||
|
||
tests_srcdir := $(top_srcdir)/tests | ||
|
||
all: \ | ||
.check-case-qc.ttl | ||
|
||
.PHONY: \ | ||
check-%.ttl | ||
|
||
.PRECIOUS: \ | ||
.check-%.ttl | ||
|
||
.check-%.ttl: \ | ||
%.ttl \ | ||
$(top_srcdir)/.lib.done.log | ||
java -jar $(top_srcdir)/dependencies/UCO/lib/rdf-toolkit.jar \ | ||
--inline-blank-nodes \ | ||
--source $< \ | ||
--source-format turtle \ | ||
--target $@_ \ | ||
--target-format turtle | ||
mv $@_ $@ | ||
|
||
check: \ | ||
check-case-qc.ttl | ||
|
||
# Reminder: diff exits non-0 on finding any differences. | ||
# Reminder: The $^ automatic Make variable is the name of all recipe prerequisites. | ||
check-%.ttl: \ | ||
%.ttl \ | ||
.check-%.ttl | ||
diff $^ \ | ||
|| (echo "ERROR:tests/shapes/Makefile:The local $< does not match the normalized version. If the above reported changes look fine, run 'cp .check-$< $<' while in the sub-folder tests/shapes/ to get a file ready to commit to Git." >&2 ; exit 1) | ||
|
||
clean: | ||
@rm -f \ | ||
.check-*.ttl* |
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,71 @@ | ||
@prefix case-qc: <urn:example:case:qc:> . | ||
@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 xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
<urn:example:case:qc> | ||
a owl:Ontology ; | ||
rdfs:comment "This ontology contains shapes meant to be used against the transitive closure of CASE, excluding imported ontologies developed externally to UCO."@en ; | ||
. | ||
|
||
case-qc:owl-Ontology-shape | ||
a sh:NodeShape ; | ||
sh:sparql | ||
[ | ||
a sh:SPARQLConstraint ; | ||
sh:message "CASE imports of other CASE and UCO ontologies are expected to be of versionIRIs."@en ; | ||
sh:select ''' | ||
SELECT $this ?value | ||
WHERE { | ||
$this owl:imports ?value . | ||
FILTER ( | ||
STRSTARTS ( | ||
STR(?value), | ||
"https://ontology.caseontology.org/" | ||
) | ||
|| | ||
STRSTARTS ( | ||
STR(?value), | ||
"https://ontology.unifiedcyberontology.org/" | ||
) | ||
) | ||
FILTER NOT EXISTS { | ||
?nOtherUcoOntology | ||
owl:versionIRI ?value ; | ||
. | ||
} | ||
} | ||
''' ; | ||
] , | ||
[ | ||
a sh:SPARQLConstraint ; | ||
sh:message "CASE version IRIs are expected to have a fragment matching the versionInfo string in the master CASE ontology."@en ; | ||
sh:select ''' | ||
SELECT $this ?value | ||
WHERE { | ||
$this owl:versionIRI ?value . | ||
<https://ontology.caseontology.org/case/case> owl:versionInfo ?lCaseVersionInfo . | ||
FILTER ( | ||
STRSTARTS ( | ||
STR($this), | ||
"https://ontology.caseontology.org/" | ||
) | ||
) | ||
FILTER ( | ||
STR(?value) | ||
!= | ||
CONCAT( | ||
STR($this), | ||
"/", | ||
?lCaseVersionInfo | ||
) | ||
) | ||
} | ||
''' ; | ||
] | ||
; | ||
sh:targetClass owl:Ontology ; | ||
. | ||
|