{# The hidden divs of the D3 visualizations: one per ontology, class, property, concept and individual, copied into the side panel by showpanel(id) (shared/js_sidepanel.html). They show what the html-multi page of the same entity shows, in a compact form (backlog #26). A link to an entity with no div of its own (eg owl:Thing, or a class defined elsewhere) is turned into plain text when the panel opens. #} {# a link that opens an entity in the panel #} {% macro plink(s, css="class") -%} {{s.title|default(s)}} {%- endmacro %} {# a list of entities, separated by | #} {% macro plinks(items, css="class") -%} {% for s in items %}{{ plink(s, css) }}{% if not loop.last %} | {% endif %}{% endfor %} {%- endmacro %} {# the URI, label, description and rdfs:seeAlso of an entity #} {% macro basics(each) -%}
URI: {{each.uri}}
Label: {{each.bestLabel()|capfirst}}
{% endif %} {% if each.bestDescription() %}Description: {{each.bestDescription()|linebreaks}}
{% endif %} {% if each.seeAlso() %}See also: {% for x in each.seeAlso() %}{% if x is url %}{{x}}{% else %}{{x}}{% endif %}{% if not loop.last %} | {% endif %}{% endfor %}
{% endif %} {%- endmacro %} {# the Turtle source #} {% macro implementation(each) -%}{{each.rdf_source()|escape}}
{%- endmacro %}
{{ plinks(topclasses) }}
{% endif %} {% if stats %}| {{each.0}} | {{each.1}} |
| {{prefix|default(":")}} | {{uri}} |
Has Super Class (direct): {{ plinks(each.parents()) }}
{% endif %} {% if each.ancestors() and each.ancestors()|length > each.parents()|length %}Has Super Class (all): {{ plinks(each.ancestors()) }}
{% endif %} {% if each.children() %}Has Sub Class (direct): {{ plinks(each.children()) }}
{% endif %} {% if each.descendants() and each.descendants()|length > each.children()|length %}Has Sub Class (all): {{ plinks(each.descendants()) }}
{% endif %} {% if each.instances %}Has Instances (direct): {{ plinks(each.instances) }}
{% endif %} {% if each.all_shapes %}Shapes: {% for s in each.all_shapes %}{{s.title}}{% if not loop.last %} | {% endif %}{% endfor %}
{% endif %} {# the properties that apply to instances of the class, its own and its superclasses': the table is built when the panel opens, from PANEL_DATA (js_sidepanel.html) #} {% if each.range_of %}In Range Of: {{ plinks(each.range_of, "prop") }}
{% endif %} {# the SHACL property shapes of the class and its superclasses: built when the panel opens, from PANEL_DATA (js_sidepanel.html) #} {{ implementation(each) }}Type{% if each.rdftypes_qnames|length > 1 %}s{% endif %}: {{each.rdftypes_qnames|join(", ")}}
{% endif %}Has Super Property (direct): {{ plinks(each.parents(), "prop") }}
{% endif %} {% if each.ancestors() and each.ancestors()|length > each.parents()|length %}Has Super Property (all): {{ plinks(each.ancestors(), "prop") }}
{% endif %} {% if each.children() %}Has Sub Property (direct): {{ plinks(each.children(), "prop") }}
{% endif %} {% if each.descendants() and each.descendants()|length > each.children()|length %}Has Sub Property (all): {{ plinks(each.descendants(), "prop") }}
{% endif %} {% set domains = each.domains or each.domains_inferred %}Domain{% if not each.domains %} (inferred){% endif %}: {% if domains %}{{ plinks(domains) }}{% else %}owl:Thing{% endif %}
{% set ranges = each.ranges or each.ranges_inferred %}Range{% if not each.ranges %} (inferred){% endif %}: {% if ranges %}{{ plinks(ranges) }}{% else %}owl:Thing{% endif %}
{{ implementation(each) }}Has Super Concept (direct): {{ plinks(each.parents()) }}
{% endif %} {% if each.ancestors() and each.ancestors()|length > each.parents()|length %}Has Super Concept (all): {{ plinks(each.ancestors()) }}
{% endif %} {% if each.children() %}Has Sub Concept (direct): {{ plinks(each.children()) }}
{% endif %} {% if each.descendants() and each.descendants()|length > each.children()|length %}Has Sub Concept (all): {{ plinks(each.descendants()) }}
{% endif %} {{ implementation(each) }}Is Direct Instance Of: {{ plinks(each.instance_of()) }}
{% endif %} {{ implementation(each) }}