Skip to content

Commit c04df88

Browse files
authored
Merge pull request #335 from materialdigital/334-import-time-ontology
import time ontology
2 parents 1ac9bea + fd9e062 commit c04df88

File tree

7 files changed

+74
-2
lines changed

7 files changed

+74
-2
lines changed

docs/odk-workflows/RepositoryFileStructure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ These are the current imports in PMDCO
2525
| uo | http://purl.obolibrary.org/obo/uo.owl | slme |
2626
| cob | http://purl.obolibrary.org/obo/cob.owl | custom |
2727
| nfdicore | https://raw.githubusercontent.com/ISE-FIZKarlsruhe/nfdicore/refs/tags/v3.0.4/nfdicore-base.owl | slme |
28+
| time | https://raw.githubusercontent.com/w3c/sdw/gh-pages/time/rdf/time.ttl | slme |
2829
## Components
2930
Components, in contrast to imports, are considered full members of the ontology. This means that any axiom in a component is also included in the ontology base - which means it is considered _native_ to the ontology. While this sounds complicated, consider this: conceptually, no component should be part of more than one ontology. If that seems to be the case, we are most likely talking about an import. Components are often not needed for ontologies, but there are some use cases:
3031

src/ontology/Makefile

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# More information: https://github.com/INCATools/ontology-development-kit/
1111

1212
# Fingerprint of the configuration file when this Makefile was last generated
13-
CONFIG_HASH= f5a9d1ce153a46ffaef9ec764e1d72263a3f2459ad54de1c4a20829b9affd945
13+
CONFIG_HASH= 799b43df9d1d26346103cbdacb63c0a80550e5c42db371ea9f878e01030b3928
1414

1515

1616
# ----------------------------------------
@@ -188,7 +188,7 @@ all_main: $(MAIN_FILES)
188188
# ----------------------------------------
189189

190190

191-
IMPORTS = bfo ro iao obi chebi stato uo cob nfdicore
191+
IMPORTS = bfo ro iao obi chebi stato uo cob nfdicore time
192192

193193
IMPORT_ROOTS = $(patsubst %, $(IMPORTDIR)/%_import, $(IMPORTS))
194194
IMPORT_OWL_FILES = $(foreach n,$(IMPORT_ROOTS), $(n).owl)
@@ -483,6 +483,25 @@ $(IMPORTDIR)/nfdicore_import.owl: $(MIRRORDIR)/nfdicore.owl $(IMPORTDIR)/nfdicor
483483
repair --merge-axiom-annotations true \
484484
$(ANNOTATE_CONVERT_FILE)
485485

486+
## Module for ontology: time (slme)
487+
$(IMPORTDIR)/time_import.owl: $(MIRRORDIR)/time.owl $(IMPORTDIR)/time_terms.txt $(IMPORTSEED) | all_robot_plugins
488+
$(ROBOT) annotate --input $< --remove-annotations \
489+
odk:normalize --add-source true \
490+
extract --term-file $(IMPORTDIR)/time_terms.txt $(T_IMPORTSEED) \
491+
--copy-ontology-annotations true --force true \
492+
--individuals include \
493+
--method SUBSET \
494+
remove $(foreach p, $(ANNOTATION_PROPERTIES), --term $(p)) \
495+
--term rdfs:label \
496+
--term IAO:0000115 \
497+
--term OMO:0002000 \
498+
--term-file $(IMPORTDIR)/time_terms.txt $(T_IMPORTSEED) \
499+
--select complement --select annotation-properties \
500+
odk:normalize --base-iri https://w3id.org/pmd \
501+
--subset-decls true --synonym-decls true \
502+
repair --merge-axiom-annotations true \
503+
$(ANNOTATE_CONVERT_FILE)
504+
486505
endif # IMP=true
487506

488507
.PHONY: refresh-imports
@@ -646,6 +665,13 @@ mirror-nfdicore: | $(TMPDIR)
646665
$(ROBOT) convert -I https://raw.githubusercontent.com/ISE-FIZKarlsruhe/nfdicore/refs/tags/v3.0.4/nfdicore-base.owl -o $(TMPDIR)/$@.owl
647666

648667

668+
## ONTOLOGY: time
669+
.PHONY: mirror-time
670+
.PRECIOUS: $(MIRRORDIR)/time.owl
671+
mirror-time: | $(TMPDIR)
672+
$(ROBOT) convert -I https://raw.githubusercontent.com/w3c/sdw/gh-pages/time/rdf/time.ttl -o $(TMPDIR)/$@.owl
673+
674+
649675
$(MIRRORDIR)/%.owl: mirror-% | $(MIRRORDIR)
650676
if [ -f $(TMPDIR)/mirror-$*.owl ]; then if cmp -s $(TMPDIR)/mirror-$*.owl $@ ; then echo "Mirror identical, ignoring."; else echo "Mirrors different, updating." &&\
651677
cp $(TMPDIR)/mirror-$*.owl $@; fi; fi

src/ontology/catalog-v001.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<uri name="https://w3id.org/pmd/co/imports/uo_import.owl" uri="imports/uo_import.owl" />
1111
<uri name="https://w3id.org/pmd/co/imports/cob_import.owl" uri="imports/cob_import.owl" />
1212
<uri name="https://w3id.org/pmd/co/imports/nfdicore_import.owl" uri="imports/nfdicore_import.owl" />
13+
<uri name="https://w3id.org/pmd/co/imports/time_import.owl" uri="imports/time_import.owl" />
1314
<uri name="https://w3id.org/pmd/co/components/imports-edit.owl" uri="components/imports-edit.owl" />
1415
<uri name="https://w3id.org/pmd/co/components/pmdco-shared.owl" uri="components/pmdco-shared.owl" />
1516
<uri name="https://w3id.org/pmd/co/components/pmdco-axioms-shared.owl" uri="components/pmdco-axioms-shared.owl" />
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Prefix(:=<https://w3id.org/pmd/co/imports/time_import.owl#>)
2+
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
3+
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
4+
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
5+
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
6+
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)
7+
8+
9+
Ontology(<https://w3id.org/pmd/co/imports/time_import.owl>
10+
<https://w3id.org/pmd/co/releases/2026-02-20/imports/time_import.owl>
11+
Annotation(<http://purl.org/dc/elements/1.1/source> <http://www.w3.org/2006/time#2016>)
12+
Annotation(owl:versionInfo "2026-02-20")
13+
14+
Declaration(DataProperty(<http://www.w3.org/2006/time#inXSDDateTime>))
15+
Declaration(AnnotationProperty(<http://purl.org/dc/elements/1.1/source>))
16+
Declaration(AnnotationProperty(<http://purl.org/dc/terms/contributor>))
17+
Declaration(AnnotationProperty(<http://purl.org/dc/terms/created>))
18+
Declaration(AnnotationProperty(<http://purl.org/dc/terms/creator>))
19+
Declaration(AnnotationProperty(<http://purl.org/dc/terms/license>))
20+
Declaration(AnnotationProperty(<http://www.w3.org/2004/02/skos/core#definition>))
21+
Declaration(AnnotationProperty(<http://www.w3.org/2004/02/skos/core#example>))
22+
Declaration(Datatype(xsd:date))
23+
24+
############################
25+
# Data Properties
26+
############################
27+
28+
# Data Property: <http://www.w3.org/2006/time#inXSDDateTime> (in XSD Date-Time)
29+
30+
AnnotationAssertion(rdfs:label <http://www.w3.org/2006/time#inXSDDateTime> "en fecha-tiempo XSD"@es)
31+
AnnotationAssertion(rdfs:label <http://www.w3.org/2006/time#inXSDDateTime> "in XSD Date-Time"@en)
32+
AnnotationAssertion(<http://www.w3.org/2004/02/skos/core#definition> <http://www.w3.org/2006/time#inXSDDateTime> "Posición de un instante, expresado utilizando xsd:dateTime."@es)
33+
AnnotationAssertion(<http://www.w3.org/2004/02/skos/core#definition> <http://www.w3.org/2006/time#inXSDDateTime> "Position of an instant, expressed using xsd:dateTime"@en)
34+
35+
36+
37+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
http://www.w3.org/2006/time#inXSDDateTime

src/ontology/pmdco-edit.owl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Import(<https://w3id.org/pmd/co/imports/nfdicore_import.owl>)
2828
Import(<https://w3id.org/pmd/co/imports/obi_import.owl>)
2929
Import(<https://w3id.org/pmd/co/imports/ro_import.owl>)
3030
Import(<https://w3id.org/pmd/co/imports/stato_import.owl>)
31+
Import(<https://w3id.org/pmd/co/imports/time_import.owl>)
3132
Import(<https://w3id.org/pmd/co/imports/uo_import.owl>)
3233
Annotation(dcterms:creator <https://orcid.org/0000-0001-6772-1943>)
3334
Annotation(dcterms:creator <https://orcid.org/0000-0001-7192-7143>)
@@ -64,6 +65,7 @@ Declaration(AnnotationProperty(dcterms:title))
6465
Declaration(AnnotationProperty(<http://usefulinc.com/ns/doap#repository>))
6566

6667

68+
6769
AnnotationAssertion(rdfs:label <https://orcid.org/0000-0001-6772-1943> "Martin Glauer")
6870
AnnotationAssertion(rdfs:label <https://orcid.org/0000-0001-7192-7143> "Jörg Waitelonis")
6971
AnnotationAssertion(rdfs:label <https://orcid.org/0000-0002-1058-3102> "Fabian Neuhaus")

src/ontology/pmdco-odk.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ import_group:
4646
mirror_from: https://raw.githubusercontent.com/ISE-FIZKarlsruhe/nfdicore/refs/tags/v3.0.4/nfdicore-base.owl
4747
module_type: slme
4848
module_type_slme: SUBSET
49+
- id: time
50+
mirror_from: https://raw.githubusercontent.com/w3c/sdw/gh-pages/time/rdf/time.ttl
51+
module_type: slme
52+
module_type_slme: SUBSET
4953

5054
components:
5155
products:

0 commit comments

Comments
 (0)