Skip to content

Commit

Permalink
disclaimer for core ontologies
Browse files Browse the repository at this point in the history
  • Loading branch information
chiarcos committed Nov 24, 2024
1 parent 43f9db8 commit 2b98b55
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 9 deletions.
19 changes: 16 additions & 3 deletions modularized/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
SHELL=bash

build: ../owl/core/olia.owl

refresh: olia-top.owl system.owl disclaimer.txt
# function to add a disclaimer, cf. https://www.gnu.org/software/make/manual/make.html#Call-Function, https://www.gnu.org/software/make/manual/make.html#Canned-Recipes
define add_core_disclaimer =
(egrep -m 1 '<\?' $(1); \
echo; \
echo '<!-- '; \
cat disclaimer-for-core-ontologies.txt | sed s/'^'/'\t'/; \
echo '-->'; \
echo; \
egrep -v '<\?' $(1))
endef

refresh: olia-top.owl system.owl disclaimer-for-core-ontologies.txt
@if [ -e olia.owl ]; then rm olia.owl; fi; \
if make olia.owl; then \
cp olia.owl ../owl/core/olia.owl;\
$(call add_core_disclaimer,olia.owl) > ../owl/core/olia.owl;\
echo 2>&1;\
else \
echo 'validity errors, keeping ../owl/core/olia.owl' 1>&2;\
Expand All @@ -17,7 +30,7 @@ refresh: olia-top.owl system.owl disclaimer.txt
if rapper $$file 1>/dev/null 2>$$file.log; then \
rm $$file.log;\
echo ok 2>&1;\
cp $$file ../owl/core;\
$(call add_core_disclaimer,$$file) > ../owl/core/$$file;\
else \
echo failed, see $$file.log 2>&1;\
fi;\
Expand Down
7 changes: 4 additions & 3 deletions modularized/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ For building the [OLiA Reference Model](../owl/core(olia.owl), run `make`. Note
- [ ] remove log from `olia-header.owl`
- rebuild `../owl/core`
- [x] Makefile
- [ ] `olia-top.owl`
- [ ] `system.owl`
- [x] `olia-top.owl`
- [x] `system.owl`
- [x] integrate `olia-header.owl` in `olia.owl`
- [ ] extend header for `olia.owl` (logs, DO NOT EDIT disclaimer)
- [x] DO NOT EDIT disclaimer for core ontologies
- [ ] extend header for `olia.owl` (logs)
- [ ] dynamically build labels for `olia.owl` (remove `olia-rest.owl`)
- [x] `olia.owl`

Expand Down
6 changes: 3 additions & 3 deletions modularized/disclaimer-for-core-ontologies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ DO NOT EDIT THIS FILE

This file is compiled from sources under ../../modularized.
Please see ../../modularized/Makefile for the procedure and
edit only the component ontology.
edit only the component ontologies.

ANY CHANGES DONE DIRECTLY TO THIS FILE MAY BE OVERWRITTEN
WITHOUT NOTICE.
CHANGES APPLIED DIRECTLY TO THIS FILE MAY BE OVERWRITTEN
ANY TIME AND WITHOUT NOTICE.
13 changes: 13 additions & 0 deletions owl/core/olia-top.owl
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<?xml version="1.0"?>

<!--
DO NOT EDIT THIS FILE
=====================
This file is compiled from sources under ../../modularized.
Please see ../../modularized/Makefile for the procedure and
edit only the component ontologies.
CHANGES APPLIED DIRECTLY TO THIS FILE MAY BE OVERWRITTEN
ANY TIME AND WITHOUT NOTICE.
-->

<rdf:RDF
xmlns:dcr="http://www.isocat.org/ns/dcr.rdf#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Expand Down
13 changes: 13 additions & 0 deletions owl/core/olia.owl
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<?xml version="1.0"?>

<!--
DO NOT EDIT THIS FILE
=====================

This file is compiled from sources under ../../modularized.
Please see ../../modularized/Makefile for the procedure and
edit only the component ontologies.

CHANGES APPLIED DIRECTLY TO THIS FILE MAY BE OVERWRITTEN
ANY TIME AND WITHOUT NOTICE.
-->


<!DOCTYPE rdf:RDF [
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
Expand Down
13 changes: 13 additions & 0 deletions owl/core/system.owl
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<?xml version="1.0"?>

<!--
DO NOT EDIT THIS FILE
=====================
This file is compiled from sources under ../../modularized.
Please see ../../modularized/Makefile for the procedure and
edit only the component ontologies.
CHANGES APPLIED DIRECTLY TO THIS FILE MAY BE OVERWRITTEN
ANY TIME AND WITHOUT NOTICE.
-->

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/olia/system.owl#"
Expand Down

0 comments on commit 2b98b55

Please sign in to comment.