jekyll-theme-jod 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 20cef60fae47f59c2fa7645076ef681f8a7f8d21
4
+ data.tar.gz: e137512a3174bd2dfe9c5e3912f331e5df362439
5
+ SHA512:
6
+ metadata.gz: c90159399e5129bcb83c3aa5a17431c27ce6d6ce928eff10f0c59bc46b06891eef9614e389c9303babbb09ea36fd7e2fce740e8cfc26b60bba7ad87ecf281936
7
+ data.tar.gz: ab0fb6db49ccf7fc62572f84786b58cc6f74ba675ea1333ebd8c2332efc3766166f0143ad24f8e51f1c896b5347152d51c7ea83cd7109cdd7d33fc0f8d0cd3dd
@@ -0,0 +1,67 @@
1
+ # JOD - Jekyll Ontology Documentation
2
+
3
+ The JOD project generates documentation web pages from Ontology turtle documents.
4
+
5
+ JOD is based on [jekyll](jekyllrb.com) as well as the wonderful [jekyll-rdf plugin](https://github.com/white-gecko/jekyll-rdf) and creates web pages which use [Bootstrap 4](https://getbootstrap.com/) as a front-end component library.
6
+
7
+ ## Status
8
+
9
+ In development as a proof of concept project at [eccenca](https://www.eccenca.com).
10
+
11
+
12
+ ## Installation
13
+
14
+ Add this line to your Jekyll site's `Gemfile`:
15
+
16
+ ```ruby
17
+ gem "jekyll-theme-jod"
18
+ ```
19
+
20
+ And add this line to your Jekyll site's `_config.yml`:
21
+
22
+ ```yaml
23
+ theme: jekyll-theme-jod
24
+ ```
25
+
26
+ And then execute:
27
+
28
+ $ bundle
29
+
30
+ Or install it yourself as:
31
+
32
+ $ gem install jekyll-theme-jod
33
+
34
+ ## Usage
35
+
36
+ TODO: Write usage instructions here. Describe your available layouts, includes, and/or sass.
37
+
38
+ ## Contributing
39
+
40
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
41
+
42
+ ## Development
43
+
44
+ To set up your environment to develop this theme, run `bundle install`.
45
+
46
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
47
+
48
+ When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
49
+
50
+ ## License
51
+
52
+ See https://github.com/eccenca/jod/issues/6
53
+
54
+ Maybe it will be: "The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT)."
55
+
56
+
57
+ ## Screenshot
58
+
59
+ ![Screenshot](./Screenshot.png "Screenshot")
60
+
61
+ ## Related Projects
62
+
63
+ - [Widoco](https://github.com/dgarijo/Widoco), a Wizard for documenting ontologies
64
+ - [LODE](https://github.com/essepuntato/LODE), Live OWL Documentation Environment to convert OWL ontologies into HTML human-readable pages
65
+ - [specgen](https://github.com/zazi/specgen) and other tools from the [Generating HTML documentation of OWL](https://www.w3.org/2011/prov/wiki/Generating_HTML_documentation_of_OWL) page
66
+ - [OntoWiki's](http://ontowiki.net/) [site extension](https://github.com/AKSW/site.ontowiki), a HTML Content Publishing system on top of Linked Data
67
+ - [Ontodocs](https://github.com/lambdamusic/Ontodocs), a Python command line application aimed at facilitating the creation of documentation for ontologies encoded in RDF/OWL.
@@ -0,0 +1,201 @@
1
+ {%- capture iri -%}<{{include.iri}}>{%- endcapture -%}
2
+ {%- assign cardResource = iri | rdf_get -%}
3
+ <div
4
+ class="card"
5
+ id="{{ cardResource.iri | md5}}"
6
+ >
7
+ <div class="card-header">
8
+ <h4 class="card-title">{% include label.html iri = cardResource.iri %}</h4>
9
+ <p><small class="text-muted">{{ cardResource.iri }}</small></p>
10
+ <nav
11
+ class="nav nav-tabs card-header-tabs"
12
+ id="{{ cardResource.iri | md5}}-nav"
13
+ role="tablist">
14
+ <a
15
+ href="#{{ cardResource.iri | md5}}-description"
16
+ class="nav-item nav-link active"
17
+ aria-selected="true"
18
+ data-toggle="tab"
19
+ role="tab">Description</a>
20
+ <a
21
+ href="#{{ cardResource.iri | md5}}-annotations"
22
+ class="nav-item nav-link"
23
+ aria-selected="false"
24
+ data-toggle="tab"
25
+ role="tab">Annotations</a>
26
+ <a
27
+ href="#{{ cardResource.iri | md5}}-relations"
28
+ id="{{ cardResource.iri | md5}}-tab-relations"
29
+ class="nav-item nav-link"
30
+ aria-selected="false"
31
+ data-toggle="tab"
32
+ role="tab">Relations</a>
33
+ </nav>
34
+ </div>
35
+ <div
36
+ id="{{ cardResource.iri | md5}}-tab-content"
37
+ class="tab-content card-body">
38
+ <div
39
+ id="{{ cardResource.iri | md5}}-description"
40
+ class="card-text tab-pane fade show active"
41
+ role="tabpanel">
42
+ <p>
43
+ {{ cardResource | rdf_property: 'rdfs:comment', 'en'}}
44
+ </p>
45
+ <dl>
46
+ {%- assign literal = cardResource | rdf_property: 'dct:description', 'en' -%}
47
+ {%- if literal -%}
48
+ <dt>description</dt>
49
+ <dd>{{- literal -}}</dd>
50
+ {%- endif -%}
51
+
52
+ {%- assign literal = cardResource | rdf_property: 'skos:scopeNote', 'en' -%}
53
+ {%- if literal -%}
54
+ <dt>scope</dt>
55
+ <dd>{{- literal -}}</dd>
56
+ {%- endif -%}
57
+
58
+ {%- assign literal = cardResource | rdf_property: 'skos:definition', 'en' -%}
59
+ {%- if literal -%}
60
+ <dt>definition</dt>
61
+ <dd>{{- literal -}}</dd>
62
+ {%- endif -%}
63
+
64
+ </dl>
65
+ </div>
66
+ <div
67
+ id="{{ cardResource.iri | md5}}-annotations"
68
+ class="card-text tab-pane fade"
69
+ role="tabpanel">
70
+ <dl>
71
+ {%- assign literal = cardResource | rdf_property: 'skos:note', 'en' -%}
72
+ {%- if literal -%}
73
+ <dt>has note</dt>
74
+ <dd>{{- literal -}}</dd>
75
+ {%- endif -%}
76
+
77
+ {%- assign literal = cardResource | rdf_property: 'skos:editorialNote', 'en' -%}
78
+ {%- if literal -%}
79
+ <dt>has editorial note</dt>
80
+ <dd>{{- literal -}}</dd>
81
+ {%- endif -%}
82
+
83
+ {%- assign literal = cardResource | rdf_property: 'skos:changeNote', 'en' -%}
84
+ {%- if literal -%}
85
+ <dt>has change note</dt>
86
+ <dd>{{- literal -}}</dd>
87
+ {%- endif -%}
88
+
89
+ {%- assign literal = cardResource | rdf_property: 'skos:historyNote', 'en' -%}
90
+ {%- if literal -%}
91
+ <dt>has history note</dt>
92
+ <dd>{{- literal -}}</dd>
93
+ {%- endif -%}
94
+
95
+ {%- assign literal = cardResource | rdf_property: 'vs:term_status' -%}
96
+ {%- if literal -%}
97
+ <dt>has status</dt>
98
+ <dd>{{- literal -}}</dd>
99
+ {%- endif -%}
100
+
101
+ {%- assign resultset = cardResource | rdf_property: 'dct:created', nil, true -%}
102
+ {%- if resultset -%}
103
+ <dt>was created at</dt>
104
+ {%- for date in resultset -%}
105
+ <dd>{{- date -}}</dd>
106
+ {%- endfor -%}
107
+ {%- endif -%}
108
+
109
+ {%- assign resultset = cardResource | rdf_property: 'dct:modified', nil, true -%}
110
+ {%- if resultset -%}
111
+ <dt>was modified at</dt>
112
+ {%- for date in resultset -%}
113
+ <dd>{{- date -}}</dd>
114
+ {%- endfor -%}
115
+ {%- endif -%}
116
+
117
+ {%- assign resultset = cardResource | rdf_property: 'skos:example', nil, true -%}
118
+ {%- if resultset -%}
119
+ <dt>example values</dt>
120
+ {%- for literal in resultset -%}
121
+ <dd>{{- literal -}}</dd>
122
+ {%- endfor -%}
123
+ {%- endif -%}
124
+ </dl>
125
+ </div>
126
+ <div
127
+ id="{{ cardResource.iri | md5}}-relations"
128
+ class="card-text tab-pane fade"
129
+ role="tabpanel">
130
+ <dl>
131
+ {%- assign resultset = cardResource | rdf_inverse_property: 'rdfs:subClassOf', true -%}
132
+ {%- if resultset -%}
133
+ <dt>has sub-classes</dt>
134
+ {%- for resourceIri in resultset -%}
135
+ <dd>{%- include internal-link.html iri = resourceIri -%}</dd>
136
+ {%- endfor -%}
137
+ {%- endif -%}
138
+
139
+ {%- assign resultset = cardResource | rdf_property: 'rdfs:subClassOf', nil, true -%}
140
+ {%- if resultset -%}
141
+ <dt>has super-classes</dt>
142
+ {%- for resourceIri in resultset -%}
143
+ <dd>{%- include internal-link.html iri = resourceIri -%}</dd>
144
+ {%- endfor -%}
145
+ {%- endif -%}
146
+
147
+ {%- assign resultset = cardResource | rdf_inverse_property: 'rdfs:domain', true -%}
148
+ {%- if resultset -%}
149
+ <dt>is in domain of</dt>
150
+ {%- for resourceIri in resultset -%}
151
+ <dd>{%- include internal-link.html iri = resourceIri -%}</dd>
152
+ {%- endfor -%}
153
+ {%- endif -%}
154
+
155
+ {%- assign resultset = cardResource | rdf_inverse_property: 'rdfs:range', true -%}
156
+ {%- if resultset -%}
157
+ <dt>is in range of</dt>
158
+ {%- for resourceIri in resultset -%}
159
+ <dd>{%- include internal-link.html iri = resourceIri -%}</dd>
160
+ {%- endfor -%}
161
+ {%- endif -%}
162
+
163
+ {%- assign resultset = cardResource | rdf_property: 'rdfs:domain', nil, true -%}
164
+ {%- if resultset -%}
165
+ <dt>has domain</dt>
166
+ {%- for resourceIri in resultset -%}
167
+ <dd>{%- include internal-link.html iri = resourceIri -%}</dd>
168
+ {%- endfor -%}
169
+ {%- endif -%}
170
+
171
+ {%- assign resultset = cardResource | rdf_property: 'rdfs:range', nil, true -%}
172
+ {%- if resultset -%}
173
+ <dt>has range</dt>
174
+ {%- for resourceIri in resultset -%}
175
+ <dd>{%- include internal-link.html iri = resourceIri -%}</dd>
176
+ {%- endfor -%}
177
+ {%- endif -%}
178
+
179
+ {%- assign rdfsIsDefinedBy = cardResource | rdf_property: 'rdfs:isDefinedBy' -%}
180
+ {%- if rdfsIsDefinedBy -%}
181
+ <dt>is defined by</dt>
182
+ <dd>{{- rdfsIsDefinedBy -}}</dd>
183
+ {%- endif -%}
184
+ </dl>
185
+ </div>
186
+ </div>
187
+ <div class="card-footer">
188
+ {%- assign dctModified = cardResource | rdf_property: 'dct:modified' -%}
189
+ {%- if dctModified -%}
190
+ <small class="text-muted">Modified: {{- dctModified -}}</small>
191
+ {%- endif -%}
192
+ {%- assign dctCreated = cardResource | rdf_property: 'dct:created' -%}
193
+ {%- if dctCreated -%}
194
+ <small class="text-muted">Created: {{- dctCreated -}}</small>
195
+ {% endif -%}
196
+ {%- assign vsTermStatus = cardResource | rdf_property: 'vs:term_status' -%}
197
+ {%- if vsTermStatus -%}
198
+ <small class="text-muted">Status: {{- vsTermStatus -}}</small>
199
+ {%- endif -%}
200
+ </div>
201
+ </div>
@@ -0,0 +1,7 @@
1
+ {%- capture iri -%}<{{include.iri}}>{%- endcapture -%}
2
+ {%- assign linkedResource = iri | rdf_get -%}
3
+ <a
4
+ href="#{{ linkedResource.iri | md5 }}"
5
+ >
6
+ {%- include label.html iri = linkedResource.iri -%}
7
+ </a>
@@ -0,0 +1,9 @@
1
+ {%- capture iri -%}<{{include.iri}}>{%- endcapture -%}
2
+ {%- assign labelResource = iri | rdf_get -%}
3
+ {%- assign label = labelResource | rdf_property: 'skos:prefLabel', 'en' -%}
4
+ {%- unless label -%}{%- assign label = labelResource | rdf_property: 'skos:prefLabel' -%}{%- endunless -%}
5
+ {%- unless label -%}{%- assign label = labelResource | rdf_property: 'rdfs:label', 'en' -%}{%- endunless -%}
6
+ {%- unless label -%}{%- assign label = labelResource | rdf_property: 'rdfs:label' -%}{%- endunless -%}
7
+ {%- unless label -%}{%- assign label = labelResource.iri | split: "#" -%}{%- assign label = {{label[1]}} -%}{%- endunless -%}
8
+ {%- unless label -%}{%- assign label = labelResource.iri | split: "/" -%}{%- assign label = {{label.last}} -%}{%- endunless -%}
9
+ {{- label -}}
@@ -0,0 +1,74 @@
1
+ {%- if include.iri -%}
2
+ {%- capture iri -%}<{{include.iri}}>{%- endcapture -%}
3
+ {% comment %} iri:"{{iri | escape }}" {% endcomment %}
4
+ {%- assign linksResource = iri | rdf_get -%}
5
+
6
+ <h3>Linked Resources</h3>
7
+ {%- capture query -%}
8
+ SELECT ?predicate ?object
9
+ WHERE {
10
+ <{{linksResource}}> ?predicate ?object .
11
+ FILTER isIRI(?object)
12
+ }
13
+ {%- endcapture -%}
14
+ {% comment %} <pre>{{ query | escape}}</pre> {% endcomment %}
15
+ {% assign resultset = page.rdf | sparql_query: query %}
16
+ <ul>
17
+ {% for result in resultset %}
18
+ <li>
19
+ <a
20
+ title="{{ result.predicate }}"
21
+ href="{{ site.baseurl }}./{{ result.object.page_url }}"
22
+ >{% include label.html iri = result.object.iri %}</a> via
23
+ <a
24
+ href="{{ site.baseurl }}./{{ result.predicate.page_url }}"
25
+ >{% include label.html iri = result.predicate.iri %}</a>
26
+ </li>
27
+ {% endfor %}
28
+ </ul>
29
+
30
+ <h3>Resources linking here</h3>
31
+ {%- capture query -%}
32
+ SELECT ?subject ?predicate
33
+ WHERE {
34
+ ?subject ?predicate <{{linksResource}}> .
35
+ FILTER isIRI(?subject)
36
+ }
37
+ {%- endcapture -%}
38
+ {% comment %} <pre>{{ query | escape}}</pre> {% endcomment %}
39
+ {% assign resultset = page.rdf | sparql_query: query %}
40
+ <ul>
41
+ {% for result in resultset %}
42
+ <li>
43
+ <a
44
+ title="{{ result.predicate }}"
45
+ href="{{ site.baseurl }}./{{ result.subject.page_url }}"
46
+ >{% include label.html iri = result.subject.iri %}</a> via
47
+ <a
48
+ href="{{ site.baseurl }}./{{ result.predicate.page_url }}"
49
+ >{% include label.html iri = result.predicate.iri %}</a>
50
+ </li>
51
+ {% endfor %}
52
+ </ul>
53
+
54
+ <h3>Resources using this as predicate</h3>
55
+ {%- capture query -%}
56
+ SELECT ?subject
57
+ WHERE {
58
+ ?subject <{{linksResource}}> ?predicate .
59
+ FILTER isIRI(?subject)
60
+ }
61
+ {%- endcapture -%}
62
+ {% comment %} <pre>{{ query | escape}}</pre> {% endcomment %}
63
+ {% assign resultset = page.rdf | sparql_query: query %}
64
+ <ul>
65
+ {% for result in resultset %}
66
+ <li>
67
+ <a
68
+ href="{{ site.baseurl }}./{{ result.subject.page_url }}"
69
+ >{% include label.html iri = result.subject.iri %}</a>
70
+ </li>
71
+ {% endfor %}
72
+ </ul>
73
+ </div>
74
+ {%- endif -%}
@@ -0,0 +1,24 @@
1
+ <nav class="col-sm-3 col-md-2 d-none d-sm-block bg-light sidebar">
2
+ <form class="bd-search d-flex align-items-center">
3
+ <input
4
+ type="search"
5
+ class="form-control ds-input"
6
+ id="search-input"
7
+ placeholder="Search..."
8
+ autocomplete="off"
9
+ spellcheck="false"
10
+ role="combobox"
11
+ dir="auto"
12
+ />
13
+ </form>
14
+
15
+ <ul class="nav nav-pills flex-column">
16
+ {% for result in classesResultset %}
17
+ <li class="nav-item">
18
+ <a class="nav-link" href="#{{ result.subject.iri | md5 }}">
19
+ {% include label.html iri = result.subject.iri %}
20
+ </a>
21
+ </li>
22
+ {% endfor %}
23
+ </ul>
24
+ </nav>
@@ -0,0 +1,55 @@
1
+ <div class="jumbotron">
2
+ <h1 class="display-3">{% include label.html iri = page.rdf.iri %}</h1>
3
+ <p class="lead">{{ page.rdf | rdf_property: 'rdfs:comment', 'en' }}</p>
4
+ <hr class="my-4">
5
+ <p>
6
+ <dl>
7
+ {%- assign owlVersionInfo = page.rdf | rdf_property: 'owl:versionInfo' -%}
8
+ {%- if owlVersionInfo -%}
9
+ <dt>Version</dt>
10
+ <dd>{{- owlVersionInfo -}}</dd>
11
+ {%- endif -%}
12
+ {%- assign dctcreated = page.rdf | rdf_property: 'dct:created' -%}
13
+ {%- if dctcreated -%}
14
+ <dt>Created</dt>
15
+ <dd>{{- dctcreated -}}</dd>
16
+ {%- endif -%}
17
+ {%- assign dctmodified = page.rdf | rdf_property: 'dct:modified' -%}
18
+ {%- if dctmodified -%}
19
+ <dt>Modified</dt>
20
+ <dd>{{- dctmodified -}}</dd>
21
+ {%- endif -%}
22
+ {%- assign vannPreferredNamespacePrefix = page.rdf | rdf_property: 'vann:preferredNamespacePrefix' -%}
23
+ {%- if vannPreferredNamespacePrefix -%}
24
+ <dt>Preferred Namespace Prefix</dt>
25
+ <dd>{{- vannPreferredNamespacePrefix -}}</dd>
26
+ {%- endif -%}
27
+ {%- assign vannPreferredNamespaceUri = page.rdf | rdf_property: 'vann:preferredNamespaceUri' -%}
28
+ {%- if vannPreferredNamespaceUri -%}
29
+ <dt>Preferred Namespace URI</dt>
30
+ <dd>{{- vannPreferredNamespaceUri -}}</dd>
31
+ {%- endif -%}
32
+ </dl>
33
+ </p>
34
+ <hr class="my-4">
35
+ <p>
36
+ {% for result in countClassResultSet %}
37
+ <a class="btn btn-primary btn-lg" href="#classes" role="button">
38
+ Classes
39
+ <span class="badge badge-light">{{ result.classes}}</span>
40
+ </a>
41
+ {% endfor %}
42
+ {% for result in countObjectPropertiesResultSet %}
43
+ <a class="btn btn-primary btn-lg" href="#objectProperties" role="button">
44
+ Object Properties
45
+ <span class="badge badge-light">{{ result.objectProperties}}</span>
46
+ </a>
47
+ {% endfor %}
48
+ {%- for result in countDatatypePropertiesResultSet -%}
49
+ <a class="btn btn-primary btn-lg" href="#datatypeProperties" role="button">
50
+ Datatype Properties
51
+ <span class="badge badge-light">{{ result.datatypeProperties }}</span>
52
+ </a>
53
+ {%- endfor -%}
54
+ </p>
55
+ </div>
@@ -0,0 +1,22 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Hello, world!</title>
5
+ <!-- Required meta tags -->
6
+ <meta charset="utf-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8
+
9
+ <!-- Bootstrap CSS -->
10
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
11
+ </head>
12
+ <body>
13
+
14
+ {{content}}
15
+
16
+ <!-- Optional JavaScript -->
17
+ <!-- jQuery first, then Popper.js, then Bootstrap JS -->
18
+ <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
19
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
20
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
21
+ </body>
22
+ </html>
@@ -0,0 +1,98 @@
1
+ ---
2
+ layout: default
3
+ rdf_prefix_path: "assets/prefixes.pref"
4
+ ---
5
+ {% assign classesQuery = '
6
+ SELECT DISTINCT ?subject
7
+ WHERE
8
+ {
9
+ ?subject a ?class .
10
+ FILTER ( ?class IN (owl:Class, rdfs:Class) )
11
+ FILTER isIRI(?subject)
12
+ }
13
+ ORDER BY ?label' %}
14
+ {% assign classesResultset = page.rdf | sparql_query: classesQuery %}
15
+
16
+ {% assign countClassQuery = '
17
+ SELECT DISTINCT (COUNT(?subject) as ?classes)
18
+ WHERE
19
+ {
20
+ ?subject a ?class .
21
+ FILTER ( ?class IN (owl:Class, rdfs:Class) )
22
+ FILTER isIRI(?subject)
23
+ }
24
+ ' %}
25
+ {% assign countClassResultSet = page.rdf | sparql_query: countClassQuery %}
26
+
27
+ {% assign objectPropertiesQuery = '
28
+ SELECT DISTINCT ?subject
29
+ WHERE
30
+ {
31
+ ?subject a ?class .
32
+ FILTER ( ?class IN (owl:ObjectProperty) )
33
+ FILTER isIRI(?subject)
34
+ }
35
+ ORDER BY ?label' %}
36
+ {% assign objectPropertiesResultset = page.rdf | sparql_query: objectPropertiesQuery %}
37
+
38
+ {% assign countObjectPropertiesQuery = '
39
+ SELECT DISTINCT (COUNT(?subject) as ?objectProperties)
40
+ WHERE
41
+ {
42
+ ?subject a ?class .
43
+ FILTER ( ?class IN (owl:ObjectProperty) )
44
+ FILTER isIRI(?subject)
45
+ }
46
+ ' %}
47
+ {% assign countObjectPropertiesResultSet = page.rdf | sparql_query: countObjectPropertiesQuery %}
48
+
49
+ {% assign datatypePropertiesQuery = '
50
+ SELECT DISTINCT ?subject
51
+ WHERE
52
+ {
53
+ ?subject a ?class .
54
+ FILTER ( ?class IN (owl:DatatypeProperty) )
55
+ FILTER isIRI(?subject)
56
+ }
57
+ ORDER BY ?label' %}
58
+ {% assign datatypePropertiesResultset = page.rdf | sparql_query: datatypePropertiesQuery %}
59
+
60
+ {% assign countDatatypePropertiesQuery = '
61
+ SELECT DISTINCT (COUNT(?subject) as ?datatypeProperties)
62
+ WHERE
63
+ {
64
+ ?subject a ?class .
65
+ FILTER ( ?class IN (owl:DatatypeProperty) )
66
+ FILTER isIRI(?subject)
67
+ }
68
+ ' %}
69
+ {% assign countDatatypePropertiesResultSet = page.rdf | sparql_query: countDatatypePropertiesQuery %}
70
+
71
+ <div class="container-fluid">
72
+ <div class="row">
73
+ {% include navigation.html iri = result.subject.iri %}
74
+
75
+ <main role="main" class="container">
76
+ {% include ontology-head.html iri = result.subject.iri %}
77
+
78
+ <h2 id="classes">Overview</h2>
79
+ <h2 id="classes">Classes</h2>
80
+ {% for result in classesResultset %}
81
+ <p>{% include class-card.html iri = result.subject.iri %}</p>
82
+ {% endfor %}
83
+
84
+ <h2 id="objectProperties">Object Properties</h2>
85
+ {% for result in objectPropertiesResultset %}
86
+ <p>{% include class-card.html iri = result.subject.iri %}</p>
87
+ {% endfor %}
88
+
89
+ <h2 id="datatypeProperties">Datatype Properties</h2>
90
+ {% for result in datatypePropertiesResultset %}
91
+ <p>{% include class-card.html iri = result.subject.iri %}</p>
92
+ {% endfor %}
93
+
94
+ </main>
95
+
96
+ {% comment %} {% include links.html iri = page.rdf.iri %} {% endcomment %}
97
+ </div>
98
+ </div>
@@ -0,0 +1,19 @@
1
+ ---
2
+ layout: default
3
+ rdf_prefix_path: "assets/prefixes.pref"
4
+ ---
5
+ resource
6
+
7
+ {% comment %} if page.rdf.covered {% endcomment %}
8
+ {%- capture iri -%}<{{page.rdf.iri}}>{%- endcapture -%}
9
+ {%- assign linksResource = iri | rdf_get -%}
10
+ linksResource: {{linksResource}}
11
+ {% if linksResource %}
12
+ <h2>Linked Resources for {{ page.rdf.iri }}</h2>
13
+ {% include links.html iri = page.rdf.iri %}
14
+ {% endif %}
15
+
16
+ {% for ancor in page.sub_rdf %}
17
+ <h2>Linked Resources for {{ ancor }}</h2>
18
+ {% include links.html iri = ancor %}
19
+ {% endfor %}
@@ -0,0 +1,9 @@
1
+ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
2
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
+ PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
4
+ PREFIX foaf: <http://xmlns.com/foaf/0.1/>
5
+ PREFIX owl: <http://www.w3.org/2002/07/owl#>
6
+ PREFIX dct: <http://purl.org/dc/terms/>
7
+ PREFIX vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>
8
+ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
9
+ PREFIX vann: <http://purl.org/vocab/vann/>
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-theme-jod
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ''
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-03-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-rdf
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.0.a
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.0.a
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ description:
70
+ email:
71
+ - ''
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - README.md
77
+ - _includes/class-card.html
78
+ - _includes/internal-link.html
79
+ - _includes/label.html
80
+ - _includes/links.html
81
+ - _includes/navigation.html
82
+ - _includes/ontology-head.html
83
+ - _layouts/default.html
84
+ - _layouts/ontology.html
85
+ - _layouts/resource.html
86
+ - assets/prefixes.pref
87
+ homepage: https://github.com/eccenca/jod
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.5.2.1
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: The JOD theme generates documentation web pages from Ontology turtle documents
111
+ using Jekyll-RDF extension.
112
+ test_files: []