Skip to content

Commit

Permalink
Merge pull request #1465 from OpenEnergyPlatform/feature-1124-infer-a…
Browse files Browse the repository at this point in the history
…xioms-after-building

Added reasoning to the creation of oeo-full.omn
  • Loading branch information
areleu authored Dec 1, 2023
2 parents d76dc8f + 5b76c9c commit 986a537
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ endef

.PHONY: all clean base merge directories

all: base merge
all: base merge closure

base: | directories $(VERSIONDIR)/catalog-v001.xml build/robot.jar $(OWL_COPY) $(OMN_COPY) $(OMN_TRANSLATE)

merge: | $(VERSIONDIR)/oeo-full.omn

closure: | $(VERSIONDIR)/oeo-closure.owl

clean:
- $(RM) -r $(VERSIONDIR) $(ROBOT_PATH)

Expand All @@ -73,7 +75,7 @@ $(VERSIONDIR)/catalog-v001.xml: src/ontology/catalog-v001.xml
sed -i -E "s/edits\//modules\//m" $@

build/robot.jar: | build
curl -L -o $@ https://github.com/ontodev/robot/releases/download/v1.4.1/robot.jar
curl -L -o $@ https://github.com/ontodev/robot/releases/download/v1.9.2/robot.jar


$(VERSIONDIR)/%.owl: $(VERSIONDIR)/%.omn
Expand Down Expand Up @@ -105,3 +107,7 @@ $(VERSIONDIR)/oeo-full.owl : | base
$(VERSIONDIR)/oeo-full.omn : $(VERSIONDIR)/oeo-full.owl
$(call translate_to_omn,$@,$<)
$(call replace_owls,$@)

$(VERSIONDIR)/oeo-closure.owl : $(VERSIONDIR)/oeo-full.owl
$(ROBOT) reason --input $< --reasoner hermit --catalog $(VERSIONDIR)/catalog-v001.xml --axiom-generators "SubClass EquivalentClass DataPropertyCharacteristic EquivalentDataProperties SubDataProperty ClassAssertion EquivalentObjectProperty InverseObjectProperties ObjectPropertyCharacteristic SubObjectProperty ObjectPropertyRange ObjectPropertyDomain" --include-indirect true annotate --ontology-iri http://openenergy-platform.org/ontology/oeo/ --output $@
$(ROBOT) merge --catalog $(VERSIONDIR)/catalog-v001.xml --input $< --input $@ annotate --ontology-iri http://openenergy-platform.org/ontology/oeo/ --output $@

0 comments on commit 986a537

Please sign in to comment.