{% macro ref(r) -%} {{ r.label }} {%- endmacro %} {% macro expr(e) -%} {% for k, v in e %}{% if k == "ref" %}{{ ref(v) }}{% elif k == "kw" %}{{ v }}{% elif k == "lit" %}{{ v }}{% elif k == "url" %}{{ v }}{% else %}{{ v }}{% endif %}{% endfor %} {%- endmacro %} {% macro refs(items) -%} {% for r in items %}{{ ref(r) }}{% if not loop.last %}, {% endif %}{% endfor %} {%- endmacro %} {% macro exprs(items) -%} {% if items|length == 1 %}{{ expr(items[0]) }}{% else %}{% endif %} {%- endmacro %} {% macro row(label, body) -%} {{ label }}{{ body }} {%- endmacro %} {% macro agent(a) -%} {% if a.iri or a.homepage %}{{ a.name }}{% else %}{{ a.name }}{% endif %}{% if a.orcid and a.orcid != (a.homepage or a.iri) %} (ORCID){% endif %}{% if a.affiliation %}, {{ a.affiliation }}{% endif %} {%- endmacro %} {% macro agent_line(items) -%} {% for a in items %}{{ agent(a) }}{% if not loop.last %}; {% endif %}{% endfor %} {%- endmacro %} {% macro agents(items) -%} {{ agent_line(items) }} {%- endmacro %} {% macro link_or_text(v) -%} {% if v and (v.startswith("http://") or v.startswith("https://")) %}{{ v }}{% else %}{{ v }}{% endif %} {%- endmacro %} {% macro tree(nodes, depth=0) -%} {%- endmacro %} {% macro term(x) %}

{{ x.label }}

{{ x.kind_label }} {% if x.deprecated %}{{ t('deprecated') }}{% endif %} {% if x.imported %}{{ t('imported') }}{% elif x.undeclared %}{{ t('undeclared') }}{% elif x.external %}{{ t('external') }}{% endif %} {% if x.status %}{{ x.status }}{% endif %}

{{ x.iri }}

{% if x.definition %}
{{ x.definition|md }}{% if x.iri in ai_terms %} AI-assisted{% endif %}
{% endif %} {% for c in x.comments %}
{{ c|md }}
{% endfor %} {% if x.replaced_by %}

{{ t('replaced_by') }}: {{ refs(x.replaced_by) }}

{% endif %} {% if x.curie %}{{ row('CURIE', ''|safe ~ x.curie ~ ''|safe) }}{% endif %} {% if x.undeclared and x.use_count %}{{ row(t('used_on'), t('used_on_n', n=x.use_count)) }}{% endif %} {% if x.alt_labels %}{{ row(t('alt_labels'), x.alt_labels|join(", ")) }}{% endif %} {% if x.superclasses %}{{ row(t('superclasses'), refs(x.superclasses)) }}{% endif %} {% if x.inferred_superclasses %}{{ row(t('inferred_superclasses'), refs(x.inferred_superclasses)) }}{% endif %} {% if x.restrictions %}{{ row(t('restrictions'), exprs(x.restrictions)) }}{% endif %} {% if x.equivalent %}{{ row(t('equivalent'), exprs(x.equivalent)) }}{% endif %} {% if x.subclasses %}{{ row(t('subclasses'), refs(x.subclasses)) }}{% endif %} {% if x.disjoint %}{{ row(t('disjoint'), refs(x.disjoint)) }}{% endif %} {% if x.disjoint_union %}{{ row(t('disjoint_union'), exprs(x.disjoint_union)) }}{% endif %} {% if x.keys %}{{ row(t('keys'), exprs(x.keys)) }}{% endif %} {% if x.super_properties %}{{ row(t('super_properties'), refs(x.super_properties)) }}{% endif %} {% if x.sub_properties %}{{ row(t('sub_properties'), refs(x.sub_properties)) }}{% endif %} {% if x.domain %}{{ row(t('domain'), exprs(x.domain)) }}{% endif %} {% if x.range %}{{ row(t('range'), exprs(x.range)) }}{% endif %} {% if x.characteristics %}{{ row(t('characteristics'), x.characteristics|join(", ")) }}{% endif %} {% if x.inverse_of %}{{ row(t('inverse_of'), exprs(x.inverse_of)) }}{% endif %} {% if x.equivalent_properties %}{{ row(t('equivalent_properties'), refs(x.equivalent_properties)) }}{% endif %} {% if x.disjoint_properties %}{{ row(t('disjoint_properties'), refs(x.disjoint_properties)) }}{% endif %} {% if x.chains %}{{ row(t('chains'), exprs(x.chains)) }}{% endif %} {% if x.types %}{{ row(t('types'), exprs(x.types)) }}{% endif %} {% if x.facts %}{% set body %}{% endset %}{{ row(t('facts'), body) }}{% endif %} {% if x.same_as %}{{ row(t('same_as'), refs(x.same_as)) }}{% endif %} {% if x.top_concepts %}{{ row(t('top_concepts'), refs(x.top_concepts)) }}{% endif %} {% if x.broader %}{{ row(t('broader'), refs(x.broader)) }}{% endif %} {% if x.narrower %}{{ row(t('narrower'), refs(x.narrower)) }}{% endif %} {% if x.related %}{{ row(t('related'), refs(x.related)) }}{% endif %} {% if x.in_scheme %}{{ row(t('in_scheme'), refs(x.in_scheme)) }}{% endif %} {% for label, items in x.mappings.items() %}{{ row(label[:1]|upper ~ label[1:], refs(items)) }}{% endfor %} {% if x.instances %}{{ row(t('instances'), refs(x.instances)) }}{% endif %} {% if x.used_in %}{% set body %}{% for role, items in x.used_in|groupby('role') %}
{{ role }} {% for u in items %}{{ ref(u.ref) }}{% if not loop.last %}, {% endif %}{% endfor %}
{% endfor %}{% endset %}{{ row(t('used_in'), body) }}{% endif %} {% if x.examples %}{% set body %}{% for e in x.examples %}{{ e }}{% if not loop.last %}
{% endif %}{% endfor %}{% endset %}{{ row(t('examples'), body) }}{% endif %} {% for label, notes in x.notes.items() %}{% set body %}{% for n in notes %}
{{ n|md }}
{% endfor %}{% endset %}{{ row(label, body) }}{% endfor %} {% if x.see_also %}{{ row(t('see_also'), exprs(x.see_also)) }}{% endif %} {% if x.source %}{{ row(t('source'), exprs(x.source)) }}{% endif %} {% if x.is_defined_by %}{{ row(t('is_defined_by'), refs(x.is_defined_by)) }}{% endif %} {% for a in x.annotations %}{{ row(ref(a.prop), exprs(a.values)) }}{% endfor %} {% if x.competency_questions and cq_page %}{% set body %}{% for cid, anchor in x.competency_questions %}{{ cid }}{% if not loop.last %}, {% endif %}{% endfor %}{% endset %}{{ row(t('competency_questions'), body) }}{% endif %}
{% for block in x.extra_blocks %}{{ block|safe }}{% endfor %} {% if has_graph and x.kind in ('class', 'concept') %}

{{ t('show_in_graph') }}

{% endif %}
{% endmacro %}