{# NOTICE #} {# This software was produced for the U.S. Government under contract FA8702-22-C-0001, #} {# and is subject to the Rights in Data-General Clause 52.227-14, Alt. IV (DEC 2007) #} {# ©2021 The MITRE Corporation. All Rights Reserved. #} {% extends "base.html" %} {% block navbar %} {% include "navbar.html" %} {% endblock navbar %} {% block sidebar %} {% with thispage=main_entity.qname %} {% include "sidebar.html" %} {% endwith %} {% endblock sidebar %} {% block bodycontent %} {% ifequal main_entity_type "class" %} {% with main_entity as each %} {# each is a OntoClass object #} {# path to this class #} {% with thispage="classinfo" %} {% include "breadcrumbs.html" %} {% endwith %} {# name of this class, with "leaf node" if it has no children #}

{{each.title}} {% if not each.children %} leaf node {% endif %}


{# horizontal rule #} {# Tree diagram #}
{# URI panel #}

URI

{{each.uri}}
{# Label panel #} {% if each.bestLabel %}

Label

{{each.bestLabel}}
{% endif %} {# Description panel #} {% if each.bestDescription %}

Description

{{each.bestDescription|linebreaks|default:"--"}}
{% endif %} {# Superclasses panel #} {% if each.ancestors %}

Superclasses ({{each.ancestors|length}})

{% if each.ancestors %} {% for s in each.ancestors %}
  • {{s.title}}
  • {% endfor %} {% else %}
  • owl:Thing
  • {% endif %}
    {% endif %} {# Shapes panel #} {% if each.all_shapes %}

    Shapes ({{each.all_shapes|length}})

    {% for s in each.all_shapes %}
  • {{s.title}}
  • {% endfor %}
    {% endif %} {# Instances panel #} {% if each.instances%}

    Instances ({{each.instances|length}})

    {% for s in each.instances%}
  • {{s.title}}
  • {% endfor %}
    {% endif %} {# Usage panel #} {% if each.domain_of_inferred %}

    Usage

    Instances of {{each.title}} can have the following properties:

    {% for group in each.domain_of_inferred %} {% for k,v in group.items %} {% if v %} {% for prop in v %} {% endfor %} {% endif %} {% endfor %} {% endfor %}
    PROPERTYTYPEDESCRIPTIONRANGE
    From class {{k.title}}
    {{prop.title}} {{prop.rdftype_qname}} {{prop.bestDescription|default:"--"}} {% if prop.ranges %} {% for range in prop.ranges %} {% if not range.ext_model %} {{range.title}} {% else %} {{range.title}} {% endif %} {% endfor %} {% else %} owl:Thing {% endif %}
    {% endif %} {# Property Shapes #} {% if each.shacl_constraints %}

    Property Shapes

    By the associated SHACL property shapes, instances of {{each.title}} can have the following properties:

    {% for constraint in each.shacl_constraints %} {# LABEL ROW -- for constraint.headers, display the label #} {% if constraint.header %} {# DATA ROW -- for non-headers, display the data in columns #} {% else %} {% endif %} {% endfor %}

    PROPERTY

    PROPERTY TYPE

    DESCRIPTION

    MIN COUNT

    MAX COUNT

    LOCAL RANGE
    (type range for property on this class)

    GLOBAL RANGE
    (type range for property globally)

    {{constraint.header}} {# PROPERTY #} {% with constraint.property_obj.onto_property as prop %} {{prop.qname}} {% endwith %} {# TYPE (owl:DatatypeProperty or owl:ObjectProperty #} {{constraint.rdftype_qname|join:"
    "|default:"--"}}
    {# DESCRIPTION #} {{constraint.rdfs_comment|join:"
    "}}
    {{constraint.sh_description|join:"
    "}}
    {# MIN COUNT #} {{constraint.sh_minCount|join:", "|default:"0"}} {# MAX COUNT #} {{constraint.sh_maxCount|join:", "|default:"*"}} {# LOCAL TYPE (type defined for property on this classe) #} {% for value in constraint.sh_datatype %} {% if value.onto_class %} {{value.onto_class.qname}} {% else %} {{value.qname}} {% endif %}
    {% endfor %} {% for value in constraint.sh_class %} {% if value.onto_class %} {{value.onto_class.qname}} {% else %} {{value.qname}} {% endif %}
    {% endfor %}
    {# GLOBAL RANGE (type range for property globally) #} {% with constraint.rdfs_range as values %} {% if values %} {% for value in values %} {% if value.onto_class %} {{value.onto_class.qname}} {% else %} {{value.qname}} {% endif %}
    {% endfor %} {% else %} owl:Thing {% endif %} {% endwith %}
    {% endif %} {# Implementation panel #}

    Implementation

    {% if pygments_code %} {{pygments_code|safe}} {% else %}
    {{each.rdf_source|linebreaks}}
    {% endif %}
    {% endwith %} {% endifequal %} {% endblock bodycontent %}