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

        {% with main_entity as each  %}


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



            <h1>
{#                Property: #}
                {{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-properties.html">rdf:Property</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">Inherits from</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.children %}

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

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


                  </div>
                </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">Usage</h3>
            </div>

            <table class="table table-bordered" style="overflow: auto;">

               <tr class="table-classproperties">
                   <th>DOMAIN</th><th>PROPERTY</th><th>RANGE</th>
               </tr>
               <tr>
                   <td>
                     {% if each.domains %}
                         {% for s in each.domains %}
                         {% if s.ext_model %}
                              <a href="{{s.uri}}" target="_blank" title="{{s.uri}}">{{s.qname|default:s}}</a>
                           {% elif s.is_Bnode  %}
                              <a>Blank node</a> (see implementation)
                           {% else  %}
                              <a href="{{s.slug}}.html" title="{{s.uri}}">{{s.qname|default:s}}</a>
                           {% endif %}
                           {% if not forloop.last %}, {% endif %}
                         {% endfor %}
                     {% else %}
                         <a>owl:Thing</a> (inferred)
                     {% endif %}
                   </td>

                    <td>
                      {{each.qname}}
                    </td>

                    <td>
                      {% if each.ranges %}
                          {% for s in each.ranges %}
                          {% if s.ext_model %}
                               <a href="{{s.uri}}" target="_blank" title="{{s.uri}}">{{s.qname|default:s}}</a>
                             {% elif s.is_Bnode  %}
                                <a>Blank node</a> (see implementation)
                            {% else  %}
                               <a href="{{s.slug}}.html" title="{{s.uri}}">{{s.qname|default:s}}</a>
                            {% endif %}
                            {% if not forloop.last %}, {% endif %}
                          {% endfor %}
                      {% else %}
                          <a>owl:Thing</a> (inferred)
                      {% endif %}
                    </td>
            </table>

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



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