{% 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  %}




        {% with thispage="classinfo" %}
            {% include "breadcrumbs.html" %}
        {% endwith %}





            <h1>
{#                Class: #}
                {{each.qname}}
                {% if not each.children  %}
                    <small class="label label-info label-xs">leaf node</small>
                  {% endif %}

            </h1>
            <hr>



            <div class="tree-container">
            <div class="tree">
                <ul>
                    {% if each.parents %}

                        {% for s in each.parents %}

                        <li>

                          <a href="{{s.slug}}.html" title="'{{s.bestLabel}}'{% if s.bestDescription %} - {{s.bestDescription|truncatewords:20}}{% endif %}">{{s.qname}}</a>

                          <ul>

                            <li><a style="font-weight: bold;" title="'{{each.bestLabel}}'{% if each.bestDescription %} - {{each.bestDescription|truncatewords:20}}{% endif %}">{{each.qname}}</a>
                            {% if each.children  %}
                                <ul>
                                  {% for s in each.children %}<li><a href="{{s.slug}}.html" title="'{{s.bestLabel}}'{% if s.bestDescription %} - {{s.bestDescription|truncatewords:20}}{% endif %}">{{s.qname}}</a></li>{% endfor %}
                                </ul>
                            {% endif %}
                              </li>

                          </ul>

                          </li>
                        {% endfor %}

                    {% else %}

                        <li><a href="entities-tree-classes.html">owl:Thing</a>

                          <ul>
                            <li><a style="font-weight: bold;" title="'{{each.bestLabel}}'{% if each.bestDescription %} - {{each.bestDescription|truncatewords:20}}{% endif %}">{{each.qname}}</a>

                            {% if each.children  %}
                                <ul>
                                  {% for s in each.children %}<li><a href="{{s.slug}}.html" title="'{{s.bestLabel}}'{% if s.bestDescription %} - {{s.bestDescription|truncatewords:20}}{% endif %}">{{s.qname}}</a></li>{% endfor %}
                                </ul>
                            {% endif %}
                              </li>

                          </ul>

                        </li>
                    {% endif %}

                </ul>
            </div>
            </div>




           <div class="row"><div class="col-md-12">
              <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">URI</h3>
            </div>
            <div class="panel-body">

                <code>{{each.uri}}</code>
            </div>
          </div>
           </div></div>

           {% if  each.bestLabel %}
            <div class="row"><div class="col-md-12">
              <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Label</h3>
            </div>
            <div class="panel-body">

                {{each.bestLabel}}
            </div>
          </div>
           </div></div>
           {% endif %}



           {% if  each.bestDescription %}
            <div class="row"><div class="col-md-12">
              <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Description</h3>
            </div>
            <div class="panel-body">

                {{each.bestDescription|default:"--"}}
            </div>
          </div>
           </div></div>
           {% endif %}




           {% if each.ancestors %}
            <div class="row"><div class="col-md-12">
              <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Superclasses ({{each.ancestors|length}})</h3>
            </div>
            <div class="panel-body">

            {% if each.ancestors %}
                    {% for s in each.ancestors %}<li><a href="{{s.slug}}.html" title="{{s.uri}}">{{s.qname}}</a></li>{% endfor %}
            {% else %}
                <li>owl:Thing</li>
            {% endif %}

            </div>
          </div>
           </div></div>
           {% endif %}



          {% if each.shapes %}
           <div class="row"><div class="col-md-12">
             <div class="panel panel-default">
           <div class="panel-heading">
             <h3 class="panel-title">Shapes ({{each.shapes|length}})</h3>
           </div>
           <div class="panel-body">


             {% for s in each.shapes %}<li><a href="{{s.slug}}.html" title="{{s.uri}}">{{s.qname}}</a></li>{% endfor %}


           </div>
         </div>
          </div></div>
          {% endif %}



         {% if each.domain_of_inferred %}
           <div class="row"><div class="col-md-12">
              <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Usage</h3>
            </div>
            <div class="panel-body" style="overflow: auto;">

                <p>Instances of {{each.qname}} can have the following properties:</p>
            </div>
             <table class="table table-bordered" style="overflow: auto;">

                <tr class="table-classproperties">
                    <th>PROPERTY</th><th>TYPE</th><th>DESCRIPTION</th><th>RANGE</th>
                </tr>

                {% for group in each.domain_of_inferred  %}

                    {% for k,v in group.items  %}

                    {% if v %}

                        <tr class="table-inheritanceinfo">
                            <th colspan="4" class="treeinfo"><span class="label label-default">From class <a title="{{k.qname}}" href="{{k.slug}}.html" class="fromclass_link">{{k.qname}}</a></span>
                            </th>
                        </tr>

                            {% for prop in v  %}
                            <tr>
                                <td class="firsttd">
                                    <a class="propcolor" title="{{prop.qname}}" href="{{prop.slug}}.html">{{prop.qname}}</a>
                                </td>
                                <td class="secondtd">
                                    <i>{{prop.rdftype_qname}}<i>
                                </td>
                                <td class="thirdtd">
                                    <span>{{prop.bestDescription|default:"--"}}</span>
                                </td>
                                <td class="fourthtd">
                                    {% if  prop.ranges %}
                                    {% for range in prop.ranges  %}

                                        {% if not range.ext_model %}
                                          <a title="{{range.qname}}" href="{{range.slug}}.html" class="rdfclass">{{range.qname}}</a>
                                        {% else %}
                                          <i>{{range.qname}}</i>
                                        {% endif %}


                                    {% endfor %}
                                    {% else %}
                                        <i>owl:Thing</i>
                                    {% endif %}
                                </td>
                            </tr>

                            {% endfor %}

                    {% endif %}

                    {% endfor %}

                {% endfor %}

            </table>


          </div>
           </div></div>

        {% endif %}






           <div class="row"><div class="col-md-12">
              <div class="panel panel-default">
            <div class="panel-heading">
              <h3 class="panel-title">Implementation</h3>
            </div>
            <div class="panel-body implementation-panel">

                {% if pygments_code %}

                    {{pygments_code|safe}}

                {% else %}
                     <div class="implementation">
                        <code style="background-color: white;">{{each.serialize|linebreaks}}</code>
                    </div>
                {% endif %}
            </div>
          </div>
           </div></div>





        {% endwith %}



{% endifequal %}




{% endblock bodycontent %}
