

{# hidden divs for d3 viz - shown within slider #}

<div class="hidden" id="ontoinfo">

{% for o in ontologies %}
	
	{% if o.uri %}
		<h2>Ontology: <a href="{{o.uri|default('--')}}" target="_blank" class="class"  title="Try to open original URI">{{o.uri}}</a></h2>
	{% else %}
		<h2>Ontology:</h2> 
		<em>Not defined</em>
	{% endif %}
		


	<hr class="margintop">

	{% if o.annotations()%}
	<b class="section-title">Annotations:</b>

		{# <h1><a name="annotations">&nbsp;</a>Ontology annotations</h1> #}
		
		{% for each in o.annotations() %}
			{% if each.1 != variable_watcher  %}
				{% if not loop.first %}</dl>{% endif %}
					<dt>{{each.1}}</dt>
				{% set variable_watcher = each.1 %}
			{% else %}
			{% endif %}
			<dd>{{each.2|linebreaks}}</dd>
		{% endfor %}

	{% else %}
		<em>No annotations available</em>
	{% endif %}


	{% if o.annotations()%}
	<hr>
	<b class="section-title">Implementation:</b>
	<pre class="turtlesource">{{o.rdf_source()|escape}}</pre>

	{% endif %}



	{% if topclasses %}
	<hr>
	<b class="section-title">Top Classes</b>
	
	<p>
	{% for s in topclasses %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}
	</p>

	{% endif %}


{% endfor %}
</div>




{% for each in classes  %}
	
<div class="hidden" id="{{each.id}}">

	
	<h2 class="entity-section">Class: <a href="{{each.uri}}" class="class" target="_blank"
                                          title="Try to open original URI">{{each.title}}</a>
	</h2>
	<hr>


	<p><b class="section-uri">URI: </b><code>{{each.uri}}</code></p>
    {% if each.bestLabel() %}
		<p><b class="section-title">Label: </b>
			{{each.bestLabel()|capfirst}}
		</p>
    {% endif %}
    {% if each.bestDescription() %}
        <p><b class="section-title">Description: </b>
			{{each.bestDescription()|linebreaks}}
		</p>
    {% endif %}



	{% if each.parents() or each.children() or each.domain_of or each.range_of or each.instances %}
		<hr>
	{% endif %}
	
	
	{% if each.parents() %}
		<p><b class="section-title">Has Super Class (direct):</b> {% for s in each.parents() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.ancestors() and each.ancestors()|length > each.parents()|length %}
		<p><b class="section-title">Has Super Class (all):</b> {% for s in each.ancestors() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}

	{% if each.children()  %}
		<p><b class="section-title">Has Sub Class (direct):</b> {% for s in each.children() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.descendants() and each.descendants()|length > each.children()|length %}
		<p><b class="section-title">Has Sub Class (all):</b> {% for s in each.descendants() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}

	{% if each.instances %}
		<p><b class="section-title">Has Instances (direct):</b> {% for s in each.instances %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}

	{% if each.domain_of %}
		<p><b class="section-title">In Domain Of:</b> {% for s in each.domain_of %}<a href="javascript:showpanel('{{s.id}}');"  class="prop">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.range_of %}
		<p><b class="section-title">In Range Of:</b> {% for s in each.range_of %}<a href="javascript:showpanel('{{s.id}}');" class="prop">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}

	<hr>
	<b class="section-title">Implementation:</b>
	<pre class="turtlesource">{{each.rdf_source()|escape}}</pre>

</div>
	
	
{% endfor %}






{# PROPERTIES SECTION #}


{% for each in properties  %}

<div class="hidden" id="{{each.id}}">
	
	<h2 class="entity-section">Property: <a  href="{{each.uri}}" class="prop"  target="_blank"
                                          title="Try to open original URI">{{each.title}}</a>
	</h2>
	<hr>


	<p><b class="section-uri">URI: </b><code>{{each.uri}}</code></p>
    {% if each.bestLabel() %}
		<p><b class="section-title">Label: </b>
			{{each.bestLabel()|capfirst}}
		</p>
    {% endif %}
    {% if each.bestDescription() %}
        <p><b class="section-title">Description: </b>
			{{each.bestDescription()|linebreaks}}
		</p>
    {% endif %}


	{% if each.parents() or each.children() or each.domains or each.ranges  %}
		<hr>
	{% endif %}


	{% if each.parents() %}
		<p><b  class="section-title">Has Super Property (direct):</b> {% for s in each.parents() %}<a href="javascript:showpanel('{{s.id}}');" class="prop">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.ancestors() and each.ancestors()|length > each.parents()|length %}
		<p><b  class="section-title">Has Super Property (all):</b> {% for s in each.ancestors() %}<a href="javascript:showpanel('{{s.id}}');" class="prop">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.children() %}
		<p><b class="section-title">Has Sub Property (direct):</b> {% for s in each.children() %}<a href="javascript:showpanel('{{s.id}}');" class="prop">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.descendants() and each.descendants()|length > each.children()|length %}
		<p><b class="section-title">Has Sub Property (all):</b> {% for s in each.descendants() %}<a href="javascript:showpanel('{{s.id}}');" class="prop">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.domains %}
		<p><b class="section-title">Domain:</b> {% for s in each.domains %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title|default(s)}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.ranges %}
		<p><b class="section-title">Range:</b> {% for s in each.ranges %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title|default(s)}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	<hr>
	<b class="section-title">Implementation:</b>
	<pre class="turtlesource">{{each.rdf_source()|escape}}</pre>


</div>

{% endfor %}







{# SKOS CONCEPTS SECTION #}


{% for each in skosConcepts  %}

<div class="hidden" id="{{each.id}}">
	
	<h2 class="entity-section">Concept: <a href="{{each.uri}}" class="class"  target="_blank"
                                          title="Try to open original URI">{{each.title}}</a>
	</h2>
	<hr>

	<p><b class="section-uri">URI: </b><code>{{each.uri}}</code></p>
    {% if each.bestLabel() %}
		<p><b class="section-title">Label: </b>
			{{each.bestLabel()|capfirst}}
		</p>
    {% endif %}
    {% if each.bestDescription() %}
        <p><b class="section-title">Description: </b>
			{{each.bestDescription()|linebreaks}}
		</p>
    {% endif %}


	{% if each.parents() or each.children()  %}
		<hr>
	{% endif %}
	
	{% if each.parents() %}
		<p><b class="section-title">Has Super Concept (direct):</b> {% for s in each.parents() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.ancestors() and each.ancestors()|length > each.parents()|length %}
		<p><b class="section-title">Has Super Concept (all):</b> {% for s in each.ancestors() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.children() %}
		<p><b class="section-title">Has Sub Concept (direct):</b> {% for s in each.children() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	{% if each.descendants() and each.descendants()|length > each.children()|length %}
		<p><b class="section-title">Has Sub Concept (all):</b> {% for s in each.descendants() %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	
	<hr>
	<b class="section-title">Implementation:</b>
	<pre class="turtlesource">{{each.rdf_source()|escape}}</pre>

</div>
	
{% endfor %}









{# INDIVIDUALS SECTION #}


{% for each in individuals  %}

<div class="hidden" id="{{each.id}}">
	
	<h2 class="entity-section">Individual: <a href="{{each.uri}}" class="class"  target="_blank"
                                          title="Try to open original URI">{{each.title}}</a>
	</h2>
	<hr>

	<p><b class="section-uri">URI: </b><code>{{each.uri}}</code></p>
    {% if each.bestLabel() %}
		<p><b class="section-title">Label: </b>
			{{each.bestLabel()|capfirst}}
		</p>
    {% endif %}
    {% if each.bestDescription() %}
        <p><b class="section-title">Description: </b>
			{{each.bestDescription()|linebreaks}}
		</p>
    {% endif %}


	{% if each.instance_of %}
		<hr>
	{% endif %}
	
	{% if each.instance_of %}
		<p><b class="section-title">Is Direct Instance Of:</b> {% for s in each.instance_of %}<a href="javascript:showpanel('{{s.id}}');" class="class">{{s.title}}</a> {% if not loop.last %}|{% endif %} {% endfor %}</p>
	{% endif %}
	
	<hr>
	<b class="section-title">Implementation:</b>
	<pre class="turtlesource">{{each.rdf_source()|escape}}</pre>

</div>
	
{% endfor %}


