Skip to content

Commit

Permalink
Merge pull request #531 from ucoProject/Release-1.2.0
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
sbarnum authored Mar 29, 2023
2 parents 5f77eb9 + 235f90d commit 5bb9243
Show file tree
Hide file tree
Showing 62 changed files with 1,069 additions and 246 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
.*.ttl
.git_submodule_init.done.log
.lib.done.log
.venv.done.log
_*
venv
13 changes: 12 additions & 1 deletion CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Contributing to the CASE ontology
# Contributing to the UCO ontology


## Testing prerelease states

Practices for users interested in testing prerelease states are documented on the [Cyber Domain Ontology website](https://cyberdomainontology.org/ontology/development/#testing-prereleases).


## Using Protégé catalog files

Interested users of `catalog-v001.xml` files, e.g. users of [Protégé](https://protege.stanford.edu/), can use these XML files to interact with UCO as local files. To do so, UCO must be `git-clone`'d with Git submodules also cloned. This can be done with the following commands:

* `git clone --recursive https://github.com/ucoProject/UCO.git` (all users)
* `git clone https://github.com/ucoProject/UCO.git ; cd UCO ; make` (macOS or Linux users)
- The narrowest setup operation strictly for purposes of supporting the `catalog-v001.xml` files is to run `make .git_submodule_init.done.log` instead of the default `make all`.

Protégé should not require network connectivity to load imported ontologies after the above commands are run.
48 changes: 44 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@

SHELL := /bin/bash

PYTHON3 ?= $(shell which python3)

all: \
.lib.done.log
.lib.done.log \
.venv.done.log
$(MAKE) \
--directory ontology

Expand Down Expand Up @@ -44,9 +47,31 @@ all: \
--directory lib
touch $@

# The two CASE-Utility... files are to trigger rebuilds based on command-line interface changes or version increments.
.venv.done.log: \
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py \
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg \
requirements.txt
rm -rf venv
$(PYTHON3) -m venv \
venv
source venv/bin/activate \
&& pip install \
--upgrade \
pip \
setuptools \
wheel
source venv/bin/activate \
&& pip install \
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer
source venv/bin/activate \
&& pip install \
--requirement requirements.txt
touch $@

check: \
.git_submodule_init.done.log \
.lib.done.log
.lib.done.log \
.venv.done.log
$(MAKE) \
--directory ontology \
check
Expand All @@ -59,7 +84,10 @@ clean: \
clean-ontology
@rm -f \
.git_submodule_init.done.log \
.lib.done.log
.lib.done.log \
.venv.done.log
@rm -rf \
venv

clean-ontology:
@$(MAKE) \
Expand All @@ -70,3 +98,15 @@ clean-tests:
@$(MAKE) \
--directory tests \
clean

# Maintain timestamp order.
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py: \
.git_submodule_init.done.log
touch -c $@
test -r $@

# Maintain timestamp order.
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg: \
.git_submodule_init.done.log
touch -c $@
test -r $@
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 1.1.0.
The current release of UCO is 1.2.0.

UCO 1.1.0 incorporates required refinements and updates, building on the stable 1.0.0 release. 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.
UCO 1.2.0 incorporates required refinements and updates, building on the stable 1.0.0 release. 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 1.1.0 release notes](https://unifiedcyberontology.org/releases/1.1.0/).
More detail of improvements is documented in the [UCO 1.2.0 release notes](https://unifiedcyberontology.org/releases/1.2.0/).
2 changes: 2 additions & 0 deletions etc/dependency_files.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
http://purl.org/co/ ${top_srcdir}/dependencies/collections-ontology/collections.owl
http://purl.org/spar/error ${top_srcdir}/dependencies/error/docs/current/error.ttl
1 change: 1 addition & 0 deletions etc/domain_directories.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://ontology.unifiedcyberontology.org/ ${top_srcdir}/ontology/
27 changes: 23 additions & 4 deletions ontology/co/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ check_reference_basenames := $(foreach ttl_basename,$(ttl_basenames),.check-$(tt
check_targets := $(foreach ttl_basename,$(ttl_basenames),check-$(ttl_basename))

all: \
$(check_reference_basenames)
$(check_reference_basenames) \
catalog-v001.xml

.check-%.ttl: \
%.ttl \
Expand All @@ -43,8 +44,25 @@ all: \
--target-format turtle
mv $@_ $@

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

check: \
$(check_targets)
$(check_targets) \
catalog-v001.xml

# Reminder: diff exits non-0 on finding any differences.
# Reminder: The $^ automatic Make variable is the name of all recipe prerequisites.
Expand All @@ -55,5 +73,6 @@ check-%.ttl: \
|| (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)

@rm -f \
$(check_reference_basenames) \
catalog-v001.xml
6 changes: 6 additions & 0 deletions ontology/co/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?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/collections-ontology/collections.owl" name="http://purl.org/co"/>
<uri id="User Entered Import Resolution" uri="../../dependencies/error/docs/current/error.ttl" name="http://purl.org/spar/error"/>
<uri id="User Entered Import Resolution" uri="co.ttl" name="https://ontology.unifiedcyberontology.org/co"/>
</catalog>
6 changes: 3 additions & 3 deletions ontology/co/co.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
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:backwardCompatibleWith uco-co:1.0.0 ;
owl:backwardCompatibleWith uco-co:1.1.0 ;
owl:imports <http://purl.org/co> ;
owl:priorVersion uco-co:1.0.0 ;
owl:versionIRI uco-co:1.1.0 ;
owl:priorVersion uco-co:1.1.0 ;
owl:versionIRI uco-co:1.2.0 ;
.

co:ListItem
Expand Down
7 changes: 4 additions & 3 deletions ontology/owl/owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
rdfs:label "uco-owl"@en ;
rdfs:comment "This ontology defines SHACL shapes to perform conformance testing of OWL 2 DL. Some of these shapes follow rules specified from the canonical, subtractive parsing process of Section 3 of the OWL 2 mapping to RDF. From the last line of that document's Section 3, 'At the end of this process, the graph G MUST be empty,' anything not strictly matching patterns specified in that section cause the input graph to be non-conformant with OWL 2 DL."@en ;
rdfs:seeAlso <https://www.w3.org/TR/2012/REC-owl2-mapping-to-rdf-20121211/#Mapping_from_RDF_Graphs_to_the_Structural_Specification> ;
owl:backwardCompatibleWith uco-owl:1.0.0 ;
owl:priorVersion uco-owl:1.0.0 ;
owl:versionIRI uco-owl:1.1.0 ;
owl:backwardCompatibleWith uco-owl:1.1.0 ;
owl:priorVersion uco-owl:1.1.0 ;
owl:versionIRI uco-owl:1.2.0 ;
.

uco-owl:Axiom-shape
Expand Down Expand Up @@ -226,6 +226,7 @@ uco-owl:ObjectProperty-shacl-constraints-shape
a sh:SPARQLConstraint ;
sh:message "An OWL Object Property must not permit a Literal value via SHACL consraints."@en ;
sh:select """
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT $this ?value
WHERE {
Expand Down
26 changes: 13 additions & 13 deletions ontology/uco/action/action.ttl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# imports: https://ontology.unifiedcyberontology.org/uco/core/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/location/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/pattern/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/types/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/core/1.2.0
# imports: https://ontology.unifiedcyberontology.org/uco/location/1.2.0
# imports: https://ontology.unifiedcyberontology.org/uco/pattern/1.2.0
# imports: https://ontology.unifiedcyberontology.org/uco/types/1.2.0
# imports: https://ontology.unifiedcyberontology.org/uco/vocabulary/1.2.0

@prefix action: <https://ontology.unifiedcyberontology.org/uco/action/> .
@prefix core: <https://ontology.unifiedcyberontology.org/uco/core/> .
Expand All @@ -20,16 +20,16 @@
a owl:Ontology ;
rdfs:label "uco-action"@en ;
rdfs:comment "This ontology defines classes and properties for characterizing actions."@en-US ;
owl:backwardCompatibleWith action:1.0.0 ;
owl:backwardCompatibleWith action:1.1.0 ;
owl:imports
core:1.1.0 ,
location:1.1.0 ,
pattern:1.1.0 ,
types:1.1.0 ,
vocabulary:1.1.0
core:1.2.0 ,
location:1.2.0 ,
pattern:1.2.0 ,
types:1.2.0 ,
vocabulary:1.2.0
;
owl:priorVersion action:1.0.0 ;
owl:versionIRI action:1.1.0 ;
owl:priorVersion action:1.1.0 ;
owl:versionIRI action:1.2.0 ;
.

action:Action
Expand Down
12 changes: 12 additions & 0 deletions ontology/uco/action/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?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/collections-ontology/collections.owl" name="http://purl.org/co"/>
<uri id="User Entered Import Resolution" uri="../../../dependencies/error/docs/current/error.ttl" name="http://purl.org/spar/error"/>
<uri id="User Entered Import Resolution" uri="../../co/co.ttl" name="https://ontology.unifiedcyberontology.org/co/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../location/location.ttl" name="https://ontology.unifiedcyberontology.org/uco/location/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../pattern/pattern.ttl" name="https://ontology.unifiedcyberontology.org/uco/pattern/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../types/types.ttl" name="https://ontology.unifiedcyberontology.org/uco/types/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../vocabulary/vocabulary.ttl" name="https://ontology.unifiedcyberontology.org/uco/vocabulary/1.2.0"/>
<uri id="User Entered Import Resolution" uri="action.ttl" name="https://ontology.unifiedcyberontology.org/uco/action"/>
</catalog>
8 changes: 5 additions & 3 deletions ontology/uco/analysis/analysis.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# imports: https://ontology.unifiedcyberontology.org/uco/action/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/action/1.2.0

@prefix action: <https://ontology.unifiedcyberontology.org/uco/action/> .
@prefix analysis: <https://ontology.unifiedcyberontology.org/uco/analysis/> .
Expand All @@ -14,8 +14,10 @@
rdfs:label "uco-analysis"@en ;
rdfs:comment "This ontology defines classes and properties for characterizing analytic actions and results."@en-US ;
rdfs:seeAlso <https://github.com/ucoProject/UCO/issues/400> ;
owl:imports action:1.1.0 ;
owl:versionIRI analysis:1.1.0 ;
owl:backwardCompatibleWith analysis:1.1.0 ;
owl:imports action:1.2.0 ;
owl:priorVersion analysis:1.1.0 ;
owl:versionIRI analysis:1.2.0 ;
.

analysis:Analysis
Expand Down
13 changes: 13 additions & 0 deletions ontology/uco/analysis/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?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/collections-ontology/collections.owl" name="http://purl.org/co"/>
<uri id="User Entered Import Resolution" uri="../../../dependencies/error/docs/current/error.ttl" name="http://purl.org/spar/error"/>
<uri id="User Entered Import Resolution" uri="../../co/co.ttl" name="https://ontology.unifiedcyberontology.org/co/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../action/action.ttl" name="https://ontology.unifiedcyberontology.org/uco/action/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../location/location.ttl" name="https://ontology.unifiedcyberontology.org/uco/location/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../pattern/pattern.ttl" name="https://ontology.unifiedcyberontology.org/uco/pattern/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../types/types.ttl" name="https://ontology.unifiedcyberontology.org/uco/types/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../vocabulary/vocabulary.ttl" name="https://ontology.unifiedcyberontology.org/uco/vocabulary/1.2.0"/>
<uri id="User Entered Import Resolution" uri="analysis.ttl" name="https://ontology.unifiedcyberontology.org/uco/analysis"/>
</catalog>
5 changes: 5 additions & 0 deletions ontology/uco/configuration/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?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="../core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.2.0"/>
<uri id="User Entered Import Resolution" uri="configuration.ttl" name="https://ontology.unifiedcyberontology.org/uco/configuration"/>
</catalog>
10 changes: 5 additions & 5 deletions ontology/uco/configuration/configuration.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# imports: https://ontology.unifiedcyberontology.org/uco/core/1.1.0
# imports: https://ontology.unifiedcyberontology.org/uco/core/1.2.0

@prefix configuration: <https://ontology.unifiedcyberontology.org/uco/configuration/> .
@prefix core: <https://ontology.unifiedcyberontology.org/uco/core/> .
Expand All @@ -13,10 +13,10 @@
rdfs:label "uco-configuration"@en ;
rdfs:comment "This ontology defines classes and properties for characterizing configurations."@en-US ;
rdfs:seeAlso <https://github.com/ucoProject/UCO/issues/432> ;
owl:backwardCompatibleWith configuration:1.0.0 ;
owl:imports core:1.1.0 ;
owl:priorVersion configuration:1.0.0 ;
owl:versionIRI configuration:1.1.0 ;
owl:backwardCompatibleWith configuration:1.1.0 ;
owl:imports core:1.2.0 ;
owl:priorVersion configuration:1.1.0 ;
owl:versionIRI configuration:1.2.0 ;
.

configuration:Configuration
Expand Down
4 changes: 4 additions & 0 deletions ontology/uco/core/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?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="core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core"/>
</catalog>
18 changes: 10 additions & 8 deletions ontology/uco/core/core.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
a owl:Ontology ;
rdfs:label "uco-core"@en ;
rdfs:comment "This ontology defines classes and properties that are shared across the various UCO ontologies. At a high-level, the UCO core ontology provides base classes, relationship-oriented classes, content-aggregation classes, and shared classes."@en ;
owl:backwardCompatibleWith core:1.0.0 ;
owl:priorVersion core:1.0.0 ;
owl:versionIRI core:1.1.0 ;
owl:backwardCompatibleWith core:1.1.0 ;
owl:priorVersion core:1.1.0 ;
owl:versionIRI core:1.2.0 ;
.

core:Annotation
Expand Down Expand Up @@ -409,15 +409,16 @@ core:UcoThing
rdfs:subClassOf owl:Thing ;
rdfs:label "UcoThing"@en ;
rdfs:comment "UcoThing is the top-level class within UCO."@en ;
rdfs:seeAlso core:UcoThing-identifier-shape ;
rdfs:seeAlso core:UcoThing-identifier-regex-shape ;
sh:sparql [
a sh:SPARQLConstraint ;
sh:message "UcoThings are required to not be blank nodes."@en ;
sh:select """
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER isBlank ($this)
}
""" ;
Expand All @@ -435,10 +436,11 @@ core:UcoThing-identifier-regex-shape
rdfs:seeAlso <https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3> ;
sh:message "UcoThings are suggested to end with a UUID."@en ;
sh:select '''
PREFIX uco-core: <https://ontology.unifiedcyberontology.org/uco/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
SELECT $this
WHERE {
$this a/rdfs:subClassOf* uco-core:UcoThing .
$this a/rdfs:subClassOf* core:UcoThing .
FILTER (
! REGEX (
STR($this),
Expand Down
6 changes: 6 additions & 0 deletions ontology/uco/identity/catalog-v001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?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="../core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.2.0"/>
<uri id="User Entered Import Resolution" uri="../location/location.ttl" name="https://ontology.unifiedcyberontology.org/uco/location/1.2.0"/>
<uri id="User Entered Import Resolution" uri="identity.ttl" name="https://ontology.unifiedcyberontology.org/uco/identity"/>
</catalog>
Loading

0 comments on commit 5bb9243

Please sign in to comment.