Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions .github/deployment/sparql/no_parenthetical_labels.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Title:
# No Parenthetical Labels
# Constraint Description:
# No label shall include a parenthetical, such as "tank (vehicle)"
# Severity:
# Error

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT ?class ?label ?warningMessage
WHERE {
?class a owl:Class ;
rdfs:label ?label .

FILTER (!ISBLANK(?class)) .
FILTER (REGEX(STR(?label), "\\([^\\)]*\\)")) .

BIND (
CONCAT(
"Warning: Class ",
STR(?label),
" has a parenthetical qualifier in its label."
)
AS ?warningMessage
)
}
31 changes: 31 additions & 0 deletions .github/deployment/sparql/no_reflexive_subclassOf.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Title:
# No Reflexive SubclassOf
# Constraint Description:
# No class should be asserted as a subclass of itself.
# Severity:
# Error

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT ?class ?warningMessage
WHERE {
?class a owl:Class .

FILTER (!ISBLANK(?class)) .

?class rdfs:subClassOf ?class .

OPTIONAL {
?class rdfs:label ?label .
}

BIND(
CONCAT(
"Warning: Class ",
COALESCE(STR(?label), STR(?class)),
" is explicitly asserted as a subclass of itself"
)
AS ?warningMessage
)
}
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# The Common Core Ontologies (CCO)
## RECENT NEWS
The modernization of repository artifacts, issues, and documentation is underway:
* Initial cleanup is expected to be completed by **June 30, 2026**.
* The first wave of major structural changes (3.0) is expected to be released by **December 31, 2026** and will incorporate GeoSPARQL, QUDT, and the refactoring of information.
* The second wave of major structural changes (4.0) is expected to be released **June 30, 2027**.

[![GitHub Actions](https://github.com/CommonCoreOntology/CommonCoreOntologies/actions/workflows/manage_release.yml/badge.svg)](https://github.com/CommonCoreOntology/CommonCoreOntologies/actions/workflows/manage_release.yml)
[![license](https://img.shields.io/static/v1?label=license&message=BSD%203.1&color=green&style=flat)](https://github.com/CommonCoreOntology/CommonCoreOntologies?tab=BSD-3-Clause-1-ov-file)
[![release](https://img.shields.io/static/v1?label=release&message=2.0&color=blue&style=flat)](https://github.com/CommonCoreOntology/CommonCoreOntologies/releases/tag/v2.0-2024-11-06)
It is the recommendation of the CCO Governance Board that users wait to update following 4.0 release. In the meantime, users who would like to use versions of CCO with the up-to-date changes, are directed to pull from the 'develop' branch. For a high-level overview of planned updates, see the milestones displayed below. See here for an accompanying [slide deck](https://github.com/CommonCoreOntology/CommonCoreOntologies/blob/develop/documentation/user-guides/Beverley%20-%20P%26G%20CCO%20Modernization%20Brief.pptx).

<img width="990" height="530" alt="image" src="https://github.com/user-attachments/assets/01ad7d63-26e4-4bbe-8a45-19fd5b2946ab" />

***IMPORTANT NOTE***
Starting with version 2.0, CCO IRIs are using a new namespace and have opaque local identifiers for all ontology elements.
See [here](https://github.com/CommonCoreOntology/CommonCoreOntologies/tree/develop/documentation/mapping-new-iris) for the mapping file.

## What is CCO?

Expand Down
Binary file not shown.
Binary file not shown.
43 changes: 43 additions & 0 deletions no_multiple_parents.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Title:
# No multiple inheritance
# Constraint Description:
# Classes have at most one immediate asserted parent.
# Severity:
# Error

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT ?class ?label
(COUNT(DISTINCT ?parent) AS ?parentCount)
(GROUP_CONCAT(DISTINCT STR(?parentLabel); separator=" | ") AS ?parentLabels)
?warningMessage
WHERE {
?class a owl:Class ;
rdfs:label ?label ;
rdfs:subClassOf ?parent .

FILTER (!ISBLANK(?class)) .
FILTER (!ISBLANK(?parent)) .
FILTER (?parent != owl:Thing) .
FILTER (?parent != owl:Nothing) .
FILTER (?parent != ?class) .

?parent a owl:Class .

OPTIONAL {
?parent rdfs:label ?parentLabel .
}

BIND (
CONCAT(
"Warning: Class ",
STR(?label),
" has too many direct asserted superclass parents."
)
AS ?warningMessage
)
}
GROUP BY ?class ?label ?warningMessage
HAVING (COUNT(DISTINCT ?parent) > 2)
30 changes: 30 additions & 0 deletions owl_classes_not_rdf_classes.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Title:
# No rdfs:Class only owl:Class
# Constraint Description:
# Classes must be declared using owl:Class rather than rdfs:Class
# Severity:
# Error

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT ?class ?label ?warningMessage
WHERE {
?class a rdfs:Class .

FILTER (!ISBLANK(?class)) .

OPTIONAL {
?class rdfs:label ?label .
}

BIND (
CONCAT(
"Warning: Entity ",
COALESCE(STR(?label), STR(?class)),
" is declared as rdfs:Class. Use owl:Class instead."
)
AS ?warningMessage
)
}
4 changes: 3 additions & 1 deletion src/cco-extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ This directory contains extensions of CCO.

## The Contents of this Repository

* **Modal Relations Ontology** - The file contains modal counterparts to the object and data properties contained in CCO files and the bfo-core file.
* **Modal Relations Ontology** - The file contains modal counterparts to the object and data properties contained in CCO files and the bfo-core file.
* **Barcode Ontology** - This ontology is designed to represent barcode information content entities.
* **Familial Relations Ontology** - This ontology is designed to represent familial relationships.
Loading
Loading