Skip to content

Commit

Permalink
Merge pull request #485 from ucoProject/Release-1.0.0
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
ajnelson-nist authored Sep 1, 2022
2 parents 7cd1b56 + 4ba6ee2 commit 1ffc719
Show file tree
Hide file tree
Showing 94 changed files with 7,703 additions and 2,722 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "dependencies/CASE-Utility-SHACL-Inheritance-Reviewer"]
path = dependencies/CASE-Utility-SHACL-Inheritance-Reviewer
url = https://github.com/casework/CASE-Utility-SHACL-Inheritance-Reviewer.git
[submodule "dependencies/collections-ontology"]
path = dependencies/collections-ontology
url = https://github.com/collections-ontology/collections-ontology.git
[submodule "dependencies/error"]
path = dependencies/error
url = https://github.com/SPAROntologies/error.git
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ all: \
.gitmodules
# CASE-Utility-SHACL-Inheritance-Reviewer
test -r dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/README.md \
|| (git submodule init dependencies/CASE-Utility-SHACL-Inheritance-Reviewer && git submodule update dependencies/CASE-Utility-SHACL-Inheritance-Reviewer)
|| git submodule update --init dependencies/CASE-Utility-SHACL-Inheritance-Reviewer
@test -r dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/README.md \
|| (echo "ERROR:Makefile:CASE-Utility-SHACL-Inheritance-Reviewer submodule README.md file not found, even though that submodule is initialized." >&2 ; exit 2)
# collections-ontology
test -r dependencies/collections-ontology/README.md \
|| git submodule update \
--init \
dependencies/collections-ontology
# error ontology
test -r dependencies/error/README.md \
|| git submodule update \
--init \
dependencies/error
touch $@

.lib.done.log:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Through this approach not only are domain-focused representations defined consis
The purpose of this repository is to provide a foundation for broader community involvement in defining what to represent and how.

### Current Release
The current release of UCO is 0.9.1.
The current release of UCO is 1.0.0.

UCO 0.9.1 implements a starting point in UCO for ontology version designation and backwards-compatibility tracking. OWL versioning features are implemented and tested on top of UCO 0.9.0, as part of demonstrating version incrementing for UCO 1.0.0 and exercising the documentation deployment process. No other changes are implemented since UCO 0.9.0.
UCO 1.0.0 incorporates required refinements and updates to provide a stable version for adopters to use. Following [SemVer](https://semver.org/spec/v2.0.0.html), additive improvements will continue to be accepted, but backwards-incompatible changes will be scheduled only for the 2.0.0 release, which will come after at least 6 months to possibly 12 months.

More detail of improvements is documented in the [UCO 0.9.1 release notes](https://unifiedcyberontology.org/releases/0.9.1/).
More detail of improvements is documented in the [UCO 1.0.0 release notes](https://unifiedcyberontology.org/releases/1.0.0/).
1 change: 1 addition & 0 deletions dependencies/collections-ontology
Submodule collections-ontology added at 619e7b
1 change: 1 addition & 0 deletions dependencies/error
Submodule error added at 101aca
75 changes: 52 additions & 23 deletions ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,70 @@ SHELL := /bin/bash

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

turtle_directories := $(shell find * -type d -maxdepth 0 | sort)

all_directories := $(foreach turtle_directory,$(turtle_directories),all-$(turtle_directory))
all: \
all-co \
all-owl \
all-uco

check_directories := $(foreach turtle_directory,$(turtle_directories),check-$(turtle_directory))
.PHONY: \
all-co \
all-owl \
all-uco \
check-co \
check-owl \
check-uco \
clean-co \
clean-owl \
clean-uco

clean_directories := $(foreach turtle_directory,$(turtle_directories),clean-$(turtle_directory))
all-co:
$(MAKE) \
--directory co

all: \
$(all_directories)
all-owl:
$(MAKE) \
--directory owl

all-%: \
% \
$(top_srcdir)/.lib.done.log
all-uco:
$(MAKE) \
--directory $< \
--file $(top_srcdir)/src/review.mk
--directory uco

check: \
$(check_directories)
check-co \
check-owl \
check-uco

check-%: \
% \
$(top_srcdir)/.lib.done.log
check-co:
$(MAKE) \
--directory $< \
--file $(top_srcdir)/src/review.mk \
--directory co \
check

check-owl:
$(MAKE) \
--directory owl \
check

check-uco:
$(MAKE) \
--directory uco \
check

clean: \
$(clean_directories)
clean-co \
clean-owl \
clean-uco

clean-co:
@$(MAKE) \
--directory co \
clean

clean-owl:
@$(MAKE) \
--directory owl \
clean

clean-%: \
%
clean-uco:
@$(MAKE) \
--directory $< \
--file $(top_srcdir)/src/review.mk \
--directory uco \
clean
59 changes: 59 additions & 0 deletions ontology/co/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/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.

# This Makefile is adapted from /src/review.mk. It is expected to be
# short-lived, because at the time of this writing, there is a separate
# proposal revising the CI process to no longer use Make for Turtle
# normalization.
# TODO https://github.com/ucoProject/UCO/issues/373

SHELL := /bin/bash

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

ttl_basenames := $(shell find *.ttl -type f | sort)

# These are reference files, named with a leading dot.
check_reference_basenames := $(foreach ttl_basename,$(ttl_basenames),.check-$(ttl_basename))

# These are recipe targets, not intended to be created files.
check_targets := $(foreach ttl_basename,$(ttl_basenames),check-$(ttl_basename))

all: \
$(check_reference_basenames)

.check-%.ttl: \
%.ttl \
$(top_srcdir)/.lib.done.log
java -jar $(top_srcdir)/lib/rdf-toolkit.jar \
--inline-blank-nodes \
--source $< \
--source-format turtle \
--target $@_ \
--target-format turtle
mv $@_ $@

check: \
$(check_targets)

# 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:ontology/co/Makefile:The local $< does not match the normalized version. If the above reported changes look fine, run 'cp .check-$< $<' while in the sub-folder ontology/co/ to get a file ready to commit to Git." >&2 ; exit 1)

clean:
@rm -f $(check_reference_basenames)

159 changes: 159 additions & 0 deletions ontology/co/co.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# imports: http://purl.org/co

@prefix co: <http://purl.org/co/> .
@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 uco-co: <https://ontology.unifiedcyberontology.org/co/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<https://ontology.unifiedcyberontology.org/co>
a owl:Ontology ;
rdfs:label "uco-co"@en ;
rdfs:comment "This ontology defines SHACL shapes to supplement the OWL 2 DL definitions in the Collections Ontology."@en ;
owl:imports <http://purl.org/co> ;
owl:ontologyIRI <https://ontology.unifiedcyberontology.org/co> ;
owl:versionIRI uco-co:1.0.0 ;
.

co:ListItem
rdfs:subClassOf co:Item ;
.

uco-co:List-shape
a sh:NodeShape ;
sh:property [
sh:class co:ListItem ;
sh:path co:item ;
] ;
sh:targetClass co:List ;
.

uco-co:ListItem-shape
a sh:NodeShape ;
sh:property [
rdfs:comment "Adapted from restriction on co:ListItem."@en ;
sh:maxCount "1"^^xsd:integer ;
sh:path co:index ;
] ;
sh:targetClass co:ListItem ;
.

uco-co:firstItem-subjects-previousItem-shape
a sh:PropertyShape ;
sh:description "The first item in a list must not have a previous item."@en ;
sh:maxCount "0"^^xsd:integer ;
sh:path (
co:firstItem
co:previousItem
) ;
sh:targetSubjectsOf co:firstItem ;
.

uco-co:firstItem-subjects-shape
a sh:PropertyShape ;
sh:class co:ListItem ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:firstItem ;
sh:targetSubjectsOf co:firstItem ;
.

uco-co:followedBy-subjects-shape
a sh:PropertyShape ;
sh:class co:Item ;
sh:description "This shape encodes in SHACL that co:followedBy has range co:Item (induced via the propertyChainAxiom on co:item and superproperty relationship with co:nextItem)."@en ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:followedBy ;
sh:targetSubjectsOf co:followedBy ;
.

uco-co:index-subjects-shape
a sh:PropertyShape ;
sh:datatype xsd:positiveInteger ;
sh:nodeKind sh:Literal ;
sh:path co:index ;
sh:targetSubjectsOf co:index ;
.

uco-co:item-subjects-shape
a sh:PropertyShape ;
sh:class co:Item ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:item ;
sh:targetSubjectsOf co:item ;
.

uco-co:itemContent-subjects-shape
a sh:NodeShape ;
sh:not [
a sh:PropertyShape ;
sh:class co:Item ;
sh:description "This shape encodes in SHACL that the range of co:itemContent is the complement of co:Item."@en ;
sh:path co:itemContent ;
] ;
sh:property [
a sh:PropertyShape ;
sh:description "This shape encodes in SHACL that co:itemContent is an OWL FunctionalProperty (giving the sh:maxCount constraint)."@en ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:itemContent ;
] ;
sh:targetSubjectsOf co:itemContent ;
.

uco-co:lastItem-subjects-shape
sh:class co:ListItem ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:lastItem ;
sh:targetSubjectsOf co:lastItem ;
.

uco-co:nextItem-subjects-shape
a sh:PropertyShape ;
sh:class co:Item ;
sh:description "This shape encodes in SHACL that co:nextItem is a FunctionalProperty (giving the sh:maxCount constraint), and has range co:Item (induced via the propertyChainAxiom on co:item)."@en ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:nextItem ;
sh:targetSubjectsOf co:nextItem ;
.

uco-co:precededBy-subjects-shape
a sh:PropertyShape ;
sh:class co:Item ;
sh:description "This shape encodes in SHACL that co:precededBy has range co:Item (induced via the propertyChainAxiom on co:item and superproperty relationship with co:previousItem)."@en ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:precededBy ;
sh:targetSubjectsOf co:precededBy ;
.

uco-co:previousItem-subjects-shape
a sh:PropertyShape ;
sh:class co:Item ;
sh:description "This shape encodes in SHACL that co:previousItem is a FunctionalProperty (giving the sh:maxCount constraint), and has range co:Item (induced via the propertyChainAxiom on co:item)."@en ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:BlankNodeOrIRI ;
sh:path co:previousItem ;
sh:targetSubjectsOf co:previousItem ;
.

uco-co:size-subjects-shape
a sh:PropertyShape ;
sh:datatype xsd:nonNegativeInteger ;
sh:maxCount "1"^^xsd:integer ;
sh:nodeKind sh:Literal ;
sh:path co:size ;
sh:targetSubjectsOf co:size ;
.

[]
a owl:Axiom ;
rdfs:comment "This triple is repeated from the Collections Ontology."@en ;
owl:AnnotatedProperty rdfs:subClassOf ;
owl:AnnotatedSource co:ListItem ;
owl:AnnotatedTarget co:Item ;
.

Loading

0 comments on commit 1ffc719

Please sign in to comment.