@@ -254,12 +254,6 @@ imports/%_import.owl: mirror/%.owl imports/%_terms_combined.txt
254254 query --update ../sparql/inject-subset-declaration.ru --update ../sparql/postprocess-module.ru \
255255 remove --term rdfs:label -T imports/$*_terms_combined.txt --select complement --select "classes individuals annotation-properties" \
256256 annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@; fi
257- {% elif 'mireot' == project .import_group .module_type %}
258- imports/%_import.owl: mirror/%.owl imports/%_terms_combined.txt
259- if [ $(IMP) = true ]; then $(ROBOT) query -i $< --update ../sparql/preprocess-module.ru \
260- extract -L imports/$*_terms_combined.txt -U imports/$*_terms_combined.txt --force true --copy-ontology-annotations true --method MIREOT \
261- query --update ../sparql/inject-subset-declaration.ru --update ../sparql/postprocess-module.ru \
262- annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@; fi
263257{% elif 'custom' == project .import_group .module_type %}
264258imports/%_import.owl: mirror/%.owl
265259 echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in {{ project.id }}.Makefile!" && false
@@ -272,7 +266,29 @@ imports/%_import.owl: mirror/%.owl
272266imports/%_import.obo: imports/%_import.owl
273267 if [ $(IMP) = true ]; then $(ROBOT) convert --check false -i $< -f obo -o $@.tmp.obo && mv $@.tmp.obo $@; fi
274268{% endif -%}
275- {% endif %}
269+
270+ {% - for ont in project .import_group .products -%}
271+ {% if ont .is_large -%}
272+ ## Special treatment for large ontology: {{ ont.id }}
273+ {% if 'slme' == project .import_group .module_type %}
274+ imports/{{ ont.id }}_import.owl: mirror/{{ ont.id }}.owl imports/{{ ont.id }}_terms_combined.txt
275+ if [ $(IMP) = true ]; then $(ROBOT) extract -i $< -T imports/{{ ont.id }}_terms_combined.txt --force true --method {{ project.import_group.module_type_slme }} \
276+ query --update ../sparql/inject-subset-declaration.ru \
277+ annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@; fi
278+ {% elif 'minimal' == project .import_group .module_type %}
279+ imports/{{ ont.id }}_import.owl: mirror/{{ ont.id }}.owl imports/{{ ont.id }}_terms_combined.txt
280+ if [ $(IMP) = true ]; then $(ROBOT) extract -i $< -T imports/{{ ont.id }}_terms_combined.txt --force true --method BOT \
281+ remove --base-iri $(URIBASE)"/$(shell echo {{ ont.id }} | tr a-z A-Z)_" --axioms external --preserve-structure false --trim false \
282+ query --update ../sparql/inject-subset-declaration.ru \
283+ remove --term rdfs:label -T imports/{{ ont.id }}_terms_combined.txt --select complement --select "classes individuals annotation-properties" \
284+ annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) --output $@.tmp.owl && mv $@.tmp.owl $@; fi
285+ {% elif 'custom' == project .import_group .module_type %}
286+ imports/{{ ont.id }}_import.owl: mirror/{{ ont.id }}.owl
287+ echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in {{ project.id }}.Makefile!" && false
288+ {% - endif %}
289+ {% - endif %}
290+ {% - endfor %}
291+ {% - endif %}
276292
277293{% if project .components is not none %}
278294# ----------------------------------------
@@ -319,13 +335,27 @@ mirror/{{ ont.id }}.trigger: $(SRC)
319335mirror/{{ ont.id }}.trigger:
320336 touch $@
321337{% endif -%}
322- {% if ont .mirror_from %}
338+
339+ {% - if ont .mirror_from %}
323340mirror/{{ ont.id }}.owl: mirror/{{ ont.id }}.trigger
324341 if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I {{ ont.mirror_from }} -o $@.tmp.owl && mv $@.tmp.owl $@; fi
325- {% else %}
342+ {% - elif ont .use_base %}
343+ {% - if ont .use_gzipped %}
344+ mirror/{{ ont.id }}.owl: mirror/{{ ont.id }}.trigger
345+ if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I $(URIBASE)/{{ ont.id }}/{{ ont.id }}-base.owl.gz -o $@.tmp.owl && mv $@.tmp.owl $@; fi
346+ {% - else %}
347+ mirror/{{ ont.id }}.owl: mirror/{{ ont.id }}.trigger
348+ if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I $(URIBASE)/{{ ont.id }}/{{ ont.id }}-base.owl -o $@.tmp.owl && mv $@.tmp.owl $@; fi
349+ {% - endif %}
350+ {% - else %}
351+ {% - if ont .use_gzipped %}
352+ mirror/{{ ont.id }}.owl: mirror/{{ ont.id }}.trigger
353+ if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I $(URIBASE)/{{ ont.id }}.owl.gz -o $@.tmp.owl && mv $@.tmp.owl $@; fi
354+ {% - else %}
326355mirror/{{ ont.id }}.owl: mirror/{{ ont.id }}.trigger
327356 if [ $(MIR) = true ] && [ $(IMP) = true ]; then $(ROBOT) convert -I $(URIBASE)/{{ ont.id }}.owl -o $@.tmp.owl && mv $@.tmp.owl $@; fi
328- {% endif %}
357+ {% - endif %}
358+ {% - endif %}
329359.PRECIOUS: mirror/%.owl
330360{% endfor -%}
331361{% endif %}
0 commit comments