|
94 | 94 | ' %} |
95 | 95 | {% assign countDatatypePropertiesResultSet = page.rdf | sparql_query: countDatatypePropertiesQuery %} |
96 | 96 |
|
| 97 | +{% assign namedIndividualsQuery = ' |
| 98 | + SELECT DISTINCT ?subject |
| 99 | + WHERE |
| 100 | + { |
| 101 | + ?subject a ?class . |
| 102 | + FILTER ( ?class IN (owl:NamedIndividual) ) |
| 103 | + FILTER isIRI(?subject) |
| 104 | + } |
| 105 | + ORDER BY ?label' %} |
| 106 | +{% assign namedIndividualsResultset = page.rdf | sparql_query: namedIndividualsQuery %} |
| 107 | + |
| 108 | +{% assign countNamedIndividualsQuery = ' |
| 109 | + SELECT DISTINCT (COUNT(?subject) as ?namedIndividuals) |
| 110 | + WHERE |
| 111 | + { |
| 112 | + ?subject a ?class . |
| 113 | + FILTER ( ?class IN (owl:NamedIndividual) ) |
| 114 | + FILTER isIRI(?subject) |
| 115 | + } |
| 116 | + ' %} |
| 117 | +{% assign countNamedIndividualsResultSet = page.rdf | sparql_query: countNamedIndividualsQuery %} |
| 118 | + |
| 119 | + |
| 120 | +{% for result in countClassResultSet %} |
| 121 | +{% assign countClass = result.classes | plus: 0 %} |
| 122 | +{% endfor %} |
| 123 | +{% for result in countRdfPropertiesResultSet %} |
| 124 | +{% assign countRdfProperties = result.rdfProperties | plus: 0 %} |
| 125 | +{% endfor %} |
| 126 | +{% for result in countObjectPropertiesResultSet %} |
| 127 | +{% assign countObjectProperties = result.objectProperties | plus: 0 %} |
| 128 | +{% endfor %} |
| 129 | +{% for result in countDatatypePropertiesResultSet %} |
| 130 | +{% assign countDatatypeProperties = result.datatypeProperties | plus: 0 %} |
| 131 | +{% endfor %} |
| 132 | +{% for result in countNamedIndividualsResultSet %} |
| 133 | +{% assign countNamedIndividuals = result.namedIndividuals | plus: 0 %} |
| 134 | +{% endfor %} |
| 135 | + |
97 | 136 | <div class="container-fluid"> |
98 | 137 | <div class="row"> |
99 | 138 | {% include navigation.html iri = result.subject.iri %} |
100 | 139 |
|
101 | 140 | <main role="main" class="container col-sm-9 col-md-10 col-lg-8 col-xl-7"> |
102 | 141 | {% include ontology-head.html iri = result.subject.iri %} |
103 | 142 |
|
104 | | - <h2 id="classes">Overview</h2> |
105 | | - <h2 id="classes">Classes</h2> |
106 | 143 | {% for result in classesResultset %} |
| 144 | + {%- if forloop.first %} |
| 145 | + <h2 id="classes">Classes</h2> |
| 146 | + {% endif -%} |
107 | 147 | <p>{% include class-card.html iri = result.subject.iri %}</p> |
108 | 148 | {% endfor %} |
109 | 149 |
|
110 | | - <h2 id="rdfProperties">RDF Properties</h2> |
111 | 150 | {% for result in rdfPropertiesResultset %} |
| 151 | + {%- if forloop.first %} |
| 152 | + <h2 id="rdfProperties">RDF Properties</h2> |
| 153 | + {% endif -%} |
112 | 154 | <p>{% include class-card.html iri = result.subject.iri %}</p> |
113 | 155 | {% endfor %} |
114 | 156 |
|
115 | | - <h2 id="objectProperties">Object Properties</h2> |
116 | 157 | {% for result in objectPropertiesResultset %} |
| 158 | + {%- if forloop.first %} |
| 159 | + <h2 id="objectProperties">Object Properties</h2> |
| 160 | + {% endif -%} |
117 | 161 | <p>{% include class-card.html iri = result.subject.iri %}</p> |
118 | 162 | {% endfor %} |
119 | 163 |
|
120 | | - <h2 id="datatypeProperties">Datatype Properties</h2> |
121 | 164 | {% for result in datatypePropertiesResultset %} |
| 165 | + {%- if forloop.first %} |
| 166 | + <h2 id="datatypeProperties">Datatype Properties</h2> |
| 167 | + {% endif -%} |
| 168 | + <p>{% include class-card.html iri = result.subject.iri %}</p> |
| 169 | + {% endfor %} |
| 170 | + |
| 171 | + {% for result in namedIndividualsResultset %} |
| 172 | + {%- if forloop.first %} |
| 173 | + <h2 id="namedIndividuals">Named Individuals</h2> |
| 174 | + {% endif -%} |
122 | 175 | <p>{% include class-card.html iri = result.subject.iri %}</p> |
123 | 176 | {% endfor %} |
124 | 177 |
|
|
0 commit comments