publish_my_data 0.0.32 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/publish_my_data/small-spinner.gif +0 -0
- data/app/assets/images/publish_my_data/sort-asc.gif +0 -0
- data/app/assets/images/publish_my_data/sort-desc.gif +0 -0
- data/app/assets/javascripts/bootstrap/affix.js +126 -0
- data/app/assets/javascripts/bootstrap/alert.js +98 -0
- data/app/assets/javascripts/bootstrap/button.js +109 -0
- data/app/assets/javascripts/bootstrap/carousel.js +217 -0
- data/app/assets/javascripts/bootstrap/collapse.js +179 -0
- data/app/assets/javascripts/bootstrap/dropdown.js +154 -0
- data/app/assets/javascripts/bootstrap/modal.js +246 -0
- data/app/assets/javascripts/bootstrap/popover.js +117 -0
- data/app/assets/javascripts/bootstrap/scrollspy.js +158 -0
- data/app/assets/javascripts/bootstrap/tab.js +135 -0
- data/app/assets/javascripts/bootstrap/tooltip.js +386 -0
- data/app/assets/javascripts/bootstrap/transition.js +56 -0
- data/app/assets/javascripts/publish_my_data/grid/10_data-loader.js +142 -0
- data/app/assets/javascripts/publish_my_data/grid/20_cube-grid.js +512 -0
- data/app/assets/javascripts/publish_my_data/grid/30_cube-dimension.js +77 -0
- data/app/assets/javascripts/publish_my_data/grid/40_cube-dimension-dropdown.js +87 -0
- data/app/assets/javascripts/publish_my_data/grid/45_cube-dimension-label.js +58 -0
- data/app/assets/javascripts/publish_my_data/grid/50_cube-dimensions-controls.js +336 -0
- data/app/assets/javascripts/publish_my_data/grid/60_dataset_cube_grid.js +187 -0
- data/app/assets/javascripts/publish_my_data/grid/70_sparql_results_grid.js +135 -0
- data/app/assets/javascripts/publish_my_data/select_text.js +27 -0
- data/app/assets/javascripts/publish_my_data.js +3 -0
- data/app/assets/javascripts/slick_grid/10_event-drag.js +402 -0
- data/app/assets/javascripts/slick_grid/20_slick-core.js +458 -0
- data/app/assets/javascripts/slick_grid/30_slick-grid.js +3295 -0
- data/app/assets/stylesheets/bootstrap/_alerts.scss +67 -0
- data/app/assets/stylesheets/bootstrap/_badges.scss +51 -0
- data/app/assets/stylesheets/bootstrap/_breadcrumbs.scss +23 -0
- data/app/assets/stylesheets/bootstrap/_button-groups.scss +248 -0
- data/app/assets/stylesheets/bootstrap/_buttons.scss +160 -0
- data/app/assets/stylesheets/bootstrap/_carousel.scss +209 -0
- data/app/assets/stylesheets/bootstrap/_close.scss +33 -0
- data/app/assets/stylesheets/bootstrap/_code.scss +56 -0
- data/app/assets/stylesheets/bootstrap/_component-animations.scss +29 -0
- data/app/assets/stylesheets/bootstrap/_dropdowns.scss +194 -0
- data/app/assets/stylesheets/bootstrap/_forms.scss +350 -0
- data/app/assets/stylesheets/bootstrap/_glyphicons.scss +232 -0
- data/app/assets/stylesheets/bootstrap/_grid.scss +346 -0
- data/app/assets/stylesheets/bootstrap/_input-groups.scss +127 -0
- data/app/assets/stylesheets/bootstrap/_jumbotron.scss +40 -0
- data/app/assets/stylesheets/bootstrap/_labels.scss +58 -0
- data/app/assets/stylesheets/bootstrap/_list-group.scss +88 -0
- data/app/assets/stylesheets/bootstrap/_media.scss +56 -0
- data/app/assets/stylesheets/bootstrap/_mixins.scss +728 -0
- data/app/assets/stylesheets/bootstrap/_modals.scss +145 -0
- data/app/assets/stylesheets/bootstrap/_navbar.scss +625 -0
- data/app/assets/stylesheets/bootstrap/_navs.scss +229 -0
- data/app/assets/stylesheets/bootstrap/_normalize.scss +396 -0
- data/app/assets/stylesheets/bootstrap/_pager.scss +55 -0
- data/app/assets/stylesheets/bootstrap/_pagination.scss +83 -0
- data/app/assets/stylesheets/bootstrap/_panels.scss +148 -0
- data/app/assets/stylesheets/bootstrap/_popovers.scss +133 -0
- data/app/assets/stylesheets/bootstrap/_print.scss +100 -0
- data/app/assets/stylesheets/bootstrap/_progress-bars.scss +95 -0
- data/app/assets/stylesheets/bootstrap/_responsive-utilities.scss +209 -0
- data/app/assets/stylesheets/bootstrap/_scaffolding.scss +130 -0
- data/app/assets/stylesheets/bootstrap/_tables.scss +236 -0
- data/app/assets/stylesheets/bootstrap/_theme.scss +232 -0
- data/app/assets/stylesheets/bootstrap/_thumbnails.scss +31 -0
- data/app/assets/stylesheets/bootstrap/_tooltip.scss +95 -0
- data/app/assets/stylesheets/bootstrap/_type.scss +238 -0
- data/app/assets/stylesheets/bootstrap/_utilities.scss +42 -0
- data/app/assets/stylesheets/bootstrap/_variables.scss +620 -0
- data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/bootstrap/bootstrap.scss +59 -0
- data/app/assets/stylesheets/publish_my_data/core.scss +244 -0
- data/app/assets/stylesheets/publish_my_data/data_grid.scss +103 -0
- data/app/assets/stylesheets/publish_my_data/variables.scss +1 -0
- data/app/assets/stylesheets/{publish_my_data.css → publish_my_data.scss} +13 -2
- data/app/assets/stylesheets/slick_grid/slick_grid.scss +155 -0
- data/app/assets/stylesheets/slick_grid/slick_grid_default_theme.scss +97 -0
- data/app/controllers/concerns/publish_my_data/data_cube.rb +42 -0
- data/app/controllers/publish_my_data/data_cube/dimensions_controller.rb +58 -0
- data/app/controllers/publish_my_data/data_cube/observations_controller.rb +54 -0
- data/app/controllers/publish_my_data/datasets_controller.rb +0 -11
- data/app/controllers/publish_my_data/example_resources_controller.rb +11 -0
- data/app/controllers/publish_my_data/home_controller.rb +4 -0
- data/app/controllers/publish_my_data/information_resources_controller.rb +0 -13
- data/app/helpers/publish_my_data/application_helper.rb +66 -0
- data/app/helpers/publish_my_data/crumb_helper.rb +61 -0
- data/app/helpers/publish_my_data/datasets_helper.rb +31 -0
- data/app/helpers/publish_my_data/resources_helper.rb +24 -0
- data/app/models/concerns/publish_my_data/cube_results.rb +51 -0
- data/app/models/concerns/publish_my_data/dataset_powers.rb +13 -0
- data/app/models/publish_my_data/data_cube/cube.rb +358 -0
- data/app/models/publish_my_data/data_cube/dimension.rb +58 -0
- data/app/models/publish_my_data/vocabulary.rb +0 -4
- data/app/views/layouts/publish_my_data/application.html.haml +18 -0
- data/app/views/layouts/publish_my_data/error.html.haml +21 -0
- data/app/views/publish_my_data/classes/show.html.haml +28 -0
- data/app/views/publish_my_data/concept_schemes/show.html.haml +79 -0
- data/app/views/publish_my_data/concepts/show.html.haml +28 -0
- data/app/views/publish_my_data/data_cube/_controls.html.haml +19 -0
- data/app/views/publish_my_data/data_cube/_grid.html.haml +37 -0
- data/app/views/publish_my_data/datasets/_example_resources.html.haml +47 -0
- data/app/views/publish_my_data/datasets/_types_table.html.erb +33 -0
- data/app/views/publish_my_data/datasets/index.html.haml +32 -0
- data/app/views/publish_my_data/datasets/show.html.haml +186 -0
- data/app/views/publish_my_data/errors/not_found.html.haml +18 -0
- data/app/views/publish_my_data/errors/response_too_large.html.haml +16 -0
- data/app/views/publish_my_data/errors/timeout.html.haml +16 -0
- data/app/views/publish_my_data/errors/uncaught.html.haml +16 -0
- data/app/views/publish_my_data/example_resources/index.js.erb +1 -0
- data/app/views/publish_my_data/home/accessibility.html.haml +1 -0
- data/app/views/publish_my_data/home/docs.html.haml +1 -0
- data/app/views/publish_my_data/home/home.html.haml +5 -0
- data/app/views/publish_my_data/home/privacy.html.haml +1 -0
- data/app/views/publish_my_data/ontologies/show.html.haml +100 -0
- data/app/views/publish_my_data/properties/show.html.haml +28 -0
- data/app/views/publish_my_data/resources/_resource_data.html.haml +16 -0
- data/app/views/publish_my_data/resources/_sparql_section.html.haml +22 -0
- data/app/views/publish_my_data/resources/index.html.haml +37 -0
- data/app/views/publish_my_data/resources/show.html.haml +36 -0
- data/app/views/publish_my_data/shared/_browser_warning.html.haml +4 -0
- data/app/views/publish_my_data/shared/_deprecation_notice.html.haml +8 -0
- data/app/views/publish_my_data/shared/_footer.html.haml +11 -0
- data/app/views/publish_my_data/shared/_google_analytics.html.haml +11 -0
- data/app/views/publish_my_data/shared/_logo.html.haml +1 -0
- data/app/views/publish_my_data/shared/_meta_title.html.haml +2 -0
- data/app/views/publish_my_data/sparql/_form.html.haml +28 -0
- data/app/views/publish_my_data/sparql/_formats_dropdown.html.haml +11 -0
- data/app/views/publish_my_data/sparql/endpoint.html.haml +125 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_ask.html.haml +7 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_construct.html.haml +7 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_describe.html.haml +1 -0
- data/app/views/publish_my_data/sparql/formats_dropdowns/_select.html.haml +9 -0
- data/app/views/publish_my_data/themes/index.html.haml +30 -0
- data/app/views/publish_my_data/themes/show.html.haml +43 -0
- data/config/routes.rb +20 -5
- data/lib/publish_my_data/version.rb +1 -1
- data/lib/publish_my_data.rb +7 -12
- data/spec/controllers/publish_my_data/datasets_controller_spec.rb +0 -75
- data/spec/controllers/publish_my_data/information_resources_controller_spec.rb +2 -11
- data/spec/dummy/config/environments/development.rb +0 -4
- data/spec/dummy/config/environments/test.rb +0 -4
- data/spec/dummy/log/test.log +62962 -0
- data/spec/dummy/tmp/cache/sass/e509ccd4d793d2c162d70125e9f3656b6c28f357/(__TEMPLATE__)c +0 -0
- data/spec/features/running_a_sparql_query_spec.rb +1 -1
- data/spec/features/uri_dereferencing_spec.rb +1 -1
- metadata +200 -58
- data/app/controllers/concerns/publish_my_data/data_download.rb +0 -22
- data/app/controllers/publish_my_data/vocabularies_controller.rb +0 -18
- data/app/views/layouts/publish_my_data/application.html.erb +0 -13
- data/app/views/layouts/publish_my_data/error.html.erb +0 -13
- data/app/views/publish_my_data/classes/show.html.erb +0 -3
- data/app/views/publish_my_data/concept_schemes/_concepts.html.erb +0 -18
- data/app/views/publish_my_data/concept_schemes/show.html.erb +0 -11
- data/app/views/publish_my_data/concepts/show.html.erb +0 -3
- data/app/views/publish_my_data/datasets/index.html.erb +0 -20
- data/app/views/publish_my_data/datasets/show.html.erb +0 -18
- data/app/views/publish_my_data/errors/not_found.html.erb +0 -1
- data/app/views/publish_my_data/errors/response_too_large.html.erb +0 -1
- data/app/views/publish_my_data/errors/timeout.html.erb +0 -1
- data/app/views/publish_my_data/errors/uncaught.html.erb +0 -6
- data/app/views/publish_my_data/ontologies/show.html.erb +0 -17
- data/app/views/publish_my_data/properties/show.html.erb +0 -3
- data/app/views/publish_my_data/resources/_predicates_table.html.erb +0 -30
- data/app/views/publish_my_data/resources/_predicates_table_head.html.erb +0 -6
- data/app/views/publish_my_data/resources/_resource_formats.html.erb +0 -4
- data/app/views/publish_my_data/resources/_summaries.html.erb +0 -18
- data/app/views/publish_my_data/resources/_uri_and_label.html.erb +0 -3
- data/app/views/publish_my_data/resources/index.html.erb +0 -40
- data/app/views/publish_my_data/resources/show.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_ask_formats.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_construct_formats.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_describe_formats.html.erb +0 -1
- data/app/views/publish_my_data/sparql/_error_message.html.erb +0 -3
- data/app/views/publish_my_data/sparql/_form.html.erb +0 -4
- data/app/views/publish_my_data/sparql/_formats.html.erb +0 -6
- data/app/views/publish_my_data/sparql/_pagination.html.erb +0 -6
- data/app/views/publish_my_data/sparql/_results.html.erb +0 -5
- data/app/views/publish_my_data/sparql/_results_data.html.erb +0 -4
- data/app/views/publish_my_data/sparql/_select_formats.html.erb +0 -3
- data/app/views/publish_my_data/sparql/endpoint.html.erb +0 -10
- data/app/views/publish_my_data/themes/index.html.erb +0 -13
- data/app/views/publish_my_data/themes/show.html.erb +0 -15
- data/config/initializers/20_s3_setup.rb +0 -4
- data/spec/controllers/publish_my_data/vocabularies_controller_spec.rb +0 -14
- data/spec/support/data_download.rb +0 -60
@@ -0,0 +1,47 @@
|
|
1
|
+
- if dataset.example_resources.any?
|
2
|
+
%p Types of resource in this dataset:
|
3
|
+
%ul
|
4
|
+
- dataset.types.each do |type|
|
5
|
+
%li= link_to (type.label || type.uri), '#' + dom_id(example_resource_for_type(dataset, type))
|
6
|
+
|
7
|
+
- dataset.example_resources.each do |resource|
|
8
|
+
%table
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%td(colspan="2")
|
12
|
+
%h5 Subject
|
13
|
+
%h3= link_to (resource.label || resource.uri), resource_path_from_uri(resource.uri)
|
14
|
+
%h5
|
15
|
+
= resource.read_predicate(RDF.type).many? ? 'Types:' : 'Type:'
|
16
|
+
= resource.read_predicate(RDF.type).map { |t| resource_uri_or_label(resource, t) }.join(", ").html_safe
|
17
|
+
%tr
|
18
|
+
%th Predicate
|
19
|
+
%th Object
|
20
|
+
|
21
|
+
- resource.predicates.each do |pred|
|
22
|
+
%tr
|
23
|
+
%td
|
24
|
+
%span(class="#{ vocabulary_class(dataset, pred) }")= link_to_resource_uri_or_label(resource, pred)
|
25
|
+
%td
|
26
|
+
%ul
|
27
|
+
- resource.read_predicate(pred).each do |obj|
|
28
|
+
%li(class="#{ vocabulary_class(dataset, obj) }")= link_to_resource_uri_or_label(resource, obj)
|
29
|
+
|
30
|
+
%tfoot
|
31
|
+
%tr
|
32
|
+
%td(colspan="2")
|
33
|
+
%ul
|
34
|
+
%li
|
35
|
+
= link_to show_resource_path(uri: resource.uri, format: 'ttl'), target: 'blank' do
|
36
|
+
Raw data for this resource (.ttl)
|
37
|
+
%i.icon-popup
|
38
|
+
- types_for_example_resource(dataset, resource).each do |type|
|
39
|
+
= link_to list_resources_path(dataset: dataset, type_uri: type) do
|
40
|
+
- if type.label
|
41
|
+
View all
|
42
|
+
= pluralize dataset.type_count(type.uri), type.label
|
43
|
+
- else
|
44
|
+
View all
|
45
|
+
= dataset.type_count(type.uri)
|
46
|
+
resources of type
|
47
|
+
= type.uri
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<table>
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<td colspan="2"><h3>Types of resource in this dataset</h3></td>
|
5
|
+
</tr>
|
6
|
+
<tr>
|
7
|
+
<th class="important_value">Type (click for details of type)</th>
|
8
|
+
<th>Resources (click to browse data)</th>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<% types.each do |t| %>
|
13
|
+
<tr>
|
14
|
+
<td class="details constrain">
|
15
|
+
<h3><%= link_to t.label || t.uri, resource_path_from_uri(t.uri) %></h3>
|
16
|
+
<p><%= t.comment %></p>
|
17
|
+
</td>
|
18
|
+
<td>
|
19
|
+
<%= link_to pluralize(type_resource_counts[t.uri.to_s], "resource"),
|
20
|
+
list_resources_path(dataset: dataset.slug, type_uri: t.uri) %>
|
21
|
+
</td>
|
22
|
+
</tr>
|
23
|
+
<% end %>
|
24
|
+
</tbody>
|
25
|
+
<tfoot>
|
26
|
+
<tr>
|
27
|
+
<td colspan="2">
|
28
|
+
Dataset: <strong><%= dataset.title %></strong>.<br/>
|
29
|
+
<strong><%= pluralize(resources_count, 'resource')%></strong>, of <strong><%= pluralize(types.length, 'type')%></strong>.
|
30
|
+
</td>
|
31
|
+
</tr>
|
32
|
+
</tfoot>
|
33
|
+
</table>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
- page_title 'Datasets'
|
2
|
+
|
3
|
+
- content_for :crumbs do
|
4
|
+
%ol.breadcrumb
|
5
|
+
%li= link_to_home
|
6
|
+
%li.datasets Datasets
|
7
|
+
|
8
|
+
%section#datasets
|
9
|
+
%header
|
10
|
+
%h1 All Datasets
|
11
|
+
%h3= pluralize(@datasets.length, "dataset")
|
12
|
+
%ul
|
13
|
+
- @datasets.each do |dataset|
|
14
|
+
%li
|
15
|
+
%h3= link_to dataset.title, dataset
|
16
|
+
%p
|
17
|
+
=dataset.comment
|
18
|
+
- if dataset.deprecated?
|
19
|
+
%span.discontinued
|
20
|
+
%i.icon.-warning
|
21
|
+
Discontinued
|
22
|
+
- if pagination_required?(@datasets, @pagination_params)
|
23
|
+
= paginate @datasets
|
24
|
+
%footer.alternative-formats
|
25
|
+
:markdown
|
26
|
+
This **page of datasets** is available as
|
27
|
+
%ul
|
28
|
+
%li HTML
|
29
|
+
%li= link_to 'N-triples', format: 'nt', page: @pagination_params.page, per_page: @pagination_params.per_page
|
30
|
+
%li= link_to "Turtle", format: 'ttl', page: @pagination_params.page, per_page: @pagination_params.per_page
|
31
|
+
%li= link_to "RDF/XML", format: 'rdf', page: @pagination_params.page, per_page: @pagination_params.per_page
|
32
|
+
%li= link_to "JSON", format: 'json', page: @pagination_params.page, per_page: @pagination_params.per_page
|
@@ -0,0 +1,186 @@
|
|
1
|
+
- page_title "Dataset: #{dataset.title}"
|
2
|
+
- page_description dataset.description
|
3
|
+
|
4
|
+
- content_for :crumbs do
|
5
|
+
%ol.breadcrumb
|
6
|
+
%li= link_to_home
|
7
|
+
%li= link_to 'Datasets', datasets_path
|
8
|
+
%li.active Dataset
|
9
|
+
|
10
|
+
- if dataset.deprecated?
|
11
|
+
= render partial: 'publish_my_data/shared/deprecation_notice', locals: {resource: dataset}
|
12
|
+
|
13
|
+
%article#dataset
|
14
|
+
%header
|
15
|
+
%h3 Dataset
|
16
|
+
%h1= dataset.title
|
17
|
+
%h3 URI
|
18
|
+
%h2.click-to-select= dataset.uri
|
19
|
+
|
20
|
+
%section.metadata
|
21
|
+
.primary
|
22
|
+
- if dataset.comment.present?
|
23
|
+
%h3 Description
|
24
|
+
%p= auto_link dataset.comment.to_s
|
25
|
+
- if dataset.publisher.present?
|
26
|
+
%h3 Publisher
|
27
|
+
%p= resource_uri_or_label(dataset, dataset.publisher)
|
28
|
+
- if dataset.license.present?
|
29
|
+
%h3 Licence
|
30
|
+
%p= resource_uri_or_label(dataset, dataset.license)
|
31
|
+
- if dataset.contact_email.present?
|
32
|
+
%h3 Contact
|
33
|
+
%p= auto_link dataset.contact_email.to_s.gsub('mailto:','')
|
34
|
+
- if dataset.description.present?
|
35
|
+
%h3 Further Information
|
36
|
+
.js-only
|
37
|
+
#further-information.truncated
|
38
|
+
:markdown
|
39
|
+
#{dataset.description.to_s}
|
40
|
+
.fade-out
|
41
|
+
%p
|
42
|
+
%a#read-more(href="#") Read more
|
43
|
+
%noscript
|
44
|
+
:markdown
|
45
|
+
#{dataset.description.to_s}
|
46
|
+
:css
|
47
|
+
.js-only { display: none; }
|
48
|
+
:javascript
|
49
|
+
$("a#read-more").click(function(e) {
|
50
|
+
e.preventDefault();
|
51
|
+
$("#further-information").removeClass("truncated");
|
52
|
+
$("#further-information .fade-out").hide();
|
53
|
+
$("a#read-more").closest('p').hide();
|
54
|
+
});
|
55
|
+
.secondary
|
56
|
+
- if dataset.issued.present?
|
57
|
+
%h3 Issued
|
58
|
+
%p= formatted_date(dataset.issued.to_s)
|
59
|
+
- if dataset.modified.present?
|
60
|
+
%h3 Modified
|
61
|
+
%p= formatted_date(dataset.modified.to_s)
|
62
|
+
- if dataset.tags.try(:any?)
|
63
|
+
%h3 Tags
|
64
|
+
%p= dataset.tags.join(', ')
|
65
|
+
|
66
|
+
%ul.tab-links
|
67
|
+
- if dataset.is_cube?
|
68
|
+
%li.active
|
69
|
+
%a(href="#grid-view" data-toggle="tab") Grid view
|
70
|
+
%li
|
71
|
+
%a(href="#example-data" data-toggle="tab") Example Data
|
72
|
+
- else
|
73
|
+
%li.active
|
74
|
+
%a(href="#example-data" data-toggle="tab") Example Data
|
75
|
+
%li
|
76
|
+
%a(href="#linked-data" data-toggle="tab") Linked Data & SPARQL
|
77
|
+
|
78
|
+
.tab-content
|
79
|
+
- if dataset.is_cube?
|
80
|
+
%section#grid-view.active
|
81
|
+
= render 'publish_my_data/data_cube/grid', dataset: dataset
|
82
|
+
|
83
|
+
%section#example-data(class="#{ 'active' unless dataset.is_cube? }")
|
84
|
+
.primary
|
85
|
+
%header
|
86
|
+
%h3 Example resources from this dataset
|
87
|
+
#example-data-container
|
88
|
+
%p
|
89
|
+
= image_tag 'publish_my_data/small-spinner.gif', alt: 'busy'
|
90
|
+
%em Loading…
|
91
|
+
:javascript
|
92
|
+
$.get('#{ publish_my_data.example_resources_path(dataset) }');
|
93
|
+
%section#vocabularies.sticky.secondary
|
94
|
+
%header
|
95
|
+
%h3 Supporting Data
|
96
|
+
:markdown
|
97
|
+
**Mouse-over the boxes below** to reveal which terms in the example are from these Ontologies and Concept Schemes.
|
98
|
+
%ul
|
99
|
+
- dataset.ontologies.each_with_index do |ontology, index|
|
100
|
+
= content_tag(:li, id: "ontology_#{index}") do
|
101
|
+
= link_to resource_path_from_uri(ontology.uri) do
|
102
|
+
%span.ontology-label Ontology
|
103
|
+
%span.name.hardwrap= (ontology.label || ontology.uri)
|
104
|
+
- dataset.concept_schemes.each_with_index do |concept_scheme, index|
|
105
|
+
= content_tag(:li, id: "concept_scheme_#{index}") do
|
106
|
+
= link_to resource_path_from_uri(concept_scheme.uri) do
|
107
|
+
%span.concept-scheme-label Concept Scheme
|
108
|
+
%span.name.hardwrap= (concept_scheme.label || concept_scheme.uri)
|
109
|
+
%aside
|
110
|
+
%p
|
111
|
+
%i.icon-circled-help
|
112
|
+
An
|
113
|
+
%em ontology
|
114
|
+
is a set of
|
115
|
+
%em classes
|
116
|
+
and
|
117
|
+
%em properties
|
118
|
+
about a certain topic area. These are used for a resource's types and predicates respectively.
|
119
|
+
%p
|
120
|
+
%i.icon-circled-help
|
121
|
+
A
|
122
|
+
%em concept scheme
|
123
|
+
is a collection of
|
124
|
+
%em concepts
|
125
|
+
about a topic. Concepts act as a list of possible values for a certain property (i.e. predicate) of a resource.
|
126
|
+
:javascript
|
127
|
+
$('#vocabularies ul li').mouseover(function(el) {
|
128
|
+
var ontology_id = el.currentTarget.id;
|
129
|
+
$('.'+ontology_id).addClass('highlight');
|
130
|
+
$('#example-data table').addClass('lowlight');
|
131
|
+
}).mouseout(function(el) {
|
132
|
+
var ontology_id = el.currentTarget.id;
|
133
|
+
$('.'+ontology_id).removeClass('highlight');
|
134
|
+
$('#example-data table').removeClass('lowlight');
|
135
|
+
});
|
136
|
+
|
137
|
+
- #TODO: partialize the sparql section up a bit? (it's also used by ConceptSchemes and Ontols)
|
138
|
+
- resource_class_name = "dataset"
|
139
|
+
- resource = dataset
|
140
|
+
%section#linked-data
|
141
|
+
.primary
|
142
|
+
%h3 SPARQL
|
143
|
+
|
144
|
+
:markdown
|
145
|
+
The data contained in this #{resource_class_name} is stored in a named graph, which can be used in SPARQL queries to restrict results to this #{resource_class_name}.
|
146
|
+
= content_tag :code, resource.data_graph_uri, class: 'namedgraph click-to-select'
|
147
|
+
|
148
|
+
- if resource.data_dump.present?
|
149
|
+
%h3 Download
|
150
|
+
%p
|
151
|
+
= link_to resource.data_dump.to_s do
|
152
|
+
%i.icon-download
|
153
|
+
Complete dump of all triples in this #{resource_class_name}.
|
154
|
+
(zipped n-triples file)
|
155
|
+
|
156
|
+
%h3 Linked Data Resources
|
157
|
+
%p Browse the resources in this dataset by type:
|
158
|
+
%table.resources-summary
|
159
|
+
%thead
|
160
|
+
%tr
|
161
|
+
%th= pluralize dataset.types.length, 'type'
|
162
|
+
%tbody
|
163
|
+
- dataset.types.each do |type|
|
164
|
+
%tr
|
165
|
+
%td
|
166
|
+
%h3= resource_uri_or_label(type, type.uri)
|
167
|
+
%h4.click-to-select= type.uri
|
168
|
+
%section= type.comment
|
169
|
+
%section
|
170
|
+
= link_to "View all #{pluralize(dataset.type_count(type.uri), 'resource')} of this type", list_resources_path(dataset: dataset.slug, type_uri: type.uri)
|
171
|
+
|
172
|
+
.secondary
|
173
|
+
%a.button(href="/sparql") Run a SPARQL Query
|
174
|
+
%h3 API Docs
|
175
|
+
%p Full details of how to programatically access the data in this site can be found in the #{ link_to 'Developer Documentation', publish_my_data.developer_docs_path }.
|
176
|
+
|
177
|
+
|
178
|
+
%footer.alternative-formats
|
179
|
+
:markdown
|
180
|
+
This **dataset** is available as:
|
181
|
+
%ul
|
182
|
+
%li HTML
|
183
|
+
%li= link_to("JSON", show_resource_path(:uri => dataset.uri, format: 'json'))
|
184
|
+
%li= link_to("RDF/XML", show_resource_path(:uri => dataset.uri, format: 'rdf'))
|
185
|
+
%li= link_to("Turtle", show_resource_path(:uri => dataset.uri, format: 'ttl'))
|
186
|
+
%li= link_to("N-triples", show_resource_path(:uri => dataset.uri, format: 'nt'))
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- page_title("404: Not Found")
|
2
|
+
|
3
|
+
- content_for :crumbs do
|
4
|
+
%ol.breadcrumb
|
5
|
+
%li= link_to_home
|
6
|
+
%li Not Found
|
7
|
+
|
8
|
+
%article#not-found
|
9
|
+
%header
|
10
|
+
%h3 http status code
|
11
|
+
%h1 404
|
12
|
+
%h2 Resource Not Found
|
13
|
+
|
14
|
+
%section.message
|
15
|
+
%p
|
16
|
+
There might be a mistake in the URL which means our application can't respond to it, or it might be that you have asked about a valid identifier, but there isn't any information in our database about it.
|
17
|
+
|
18
|
+
Try visiting the #{link_to "Home page", "/"} and browsing from there.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- page_title("400: Response Too Large")
|
2
|
+
|
3
|
+
- content_for :crumbs do
|
4
|
+
%ol.breadcrumb
|
5
|
+
%li= link_to_home
|
6
|
+
%li Response Too Large
|
7
|
+
|
8
|
+
%article#not-found
|
9
|
+
%header
|
10
|
+
%h3 http status code
|
11
|
+
%h1 400
|
12
|
+
%h2 Response Too Large
|
13
|
+
|
14
|
+
%section.message
|
15
|
+
%p
|
16
|
+
Too much data was returned from the database by a query.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- page_title("503: Timeout")
|
2
|
+
|
3
|
+
- content_for :crumbs do
|
4
|
+
%ol.breadcrumb
|
5
|
+
%li= link_to_home
|
6
|
+
%li Timeout
|
7
|
+
|
8
|
+
%article#not-found
|
9
|
+
%header
|
10
|
+
%h3 http status code
|
11
|
+
%h1 503
|
12
|
+
%h2 Timeout
|
13
|
+
|
14
|
+
%section.message
|
15
|
+
%p
|
16
|
+
Sorry, your request timed-out. We may be experiencing unusually high load. You can try again later, or if you've submitted a custom query, consider writing a query designed to return fewer triples.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- page_title("503: Internal Server Error")
|
2
|
+
|
3
|
+
- content_for :crumbs do
|
4
|
+
%ol.breadcrumb
|
5
|
+
%li= link_to_home
|
6
|
+
%li Internal Server Error
|
7
|
+
|
8
|
+
%article#not-found
|
9
|
+
%header
|
10
|
+
%h3 http status code
|
11
|
+
%h1 500
|
12
|
+
%h2 Internal Server Error
|
13
|
+
|
14
|
+
%section.message
|
15
|
+
%p
|
16
|
+
Something went wrong. We've been notified of the error and we'll investigate.
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#example-data-container").html("<%= escape_javascript(render(partial: 'publish_my_data/datasets/example_resources', locals: {dataset: @dataset})) %>");
|
@@ -0,0 +1 @@
|
|
1
|
+
Your accessibility docs here.
|
@@ -0,0 +1 @@
|
|
1
|
+
Developer docs here.
|
@@ -0,0 +1 @@
|
|
1
|
+
Your privacy docs here.
|
@@ -0,0 +1,100 @@
|
|
1
|
+
- page_title("Ontology: #{ontology.label || ontology.uri}")
|
2
|
+
|
3
|
+
- content_for :crumbs do
|
4
|
+
%ol.breadcrumb
|
5
|
+
%li= link_to_home
|
6
|
+
%li= link_to 'Ontology', resource_path_from_uri(ontology.uri)
|
7
|
+
|
8
|
+
- if ontology.deprecated?
|
9
|
+
= render partial: 'publish_my_data/shared/deprecation_notice', locals: {resource: ontology}
|
10
|
+
|
11
|
+
%article#ontology
|
12
|
+
%header
|
13
|
+
%h3= ontology.local? ? 'Ontology' : 'External Ontology'
|
14
|
+
%h1= ontology.label || ontology.uri
|
15
|
+
%h3 URI
|
16
|
+
%h2.click-to-select= ontology.uri
|
17
|
+
|
18
|
+
%section.metadata
|
19
|
+
.primary
|
20
|
+
- if ontology.comment.present?
|
21
|
+
%h3 Description
|
22
|
+
%p= auto_link ontology.comment.to_s
|
23
|
+
- if ontology.publisher.present?
|
24
|
+
%h3 Publisher
|
25
|
+
%p= resource_uri_or_label(ontology, ontology.publisher)
|
26
|
+
- if ontology.license.present?
|
27
|
+
%h3 Licence
|
28
|
+
%p= resource_uri_or_label(ontology, ontology.license)
|
29
|
+
- if ontology.contact_email.present?
|
30
|
+
%h3 Contact
|
31
|
+
%p= auto_link ontology.contact_email.to_s.gsub('mailto:','')
|
32
|
+
- if ontology.description.present?
|
33
|
+
%h3 Further Information
|
34
|
+
.js-only
|
35
|
+
#further-information.truncated
|
36
|
+
:markdown
|
37
|
+
#{ontology.description.to_s}
|
38
|
+
.fade-out
|
39
|
+
%p
|
40
|
+
%a#read-more(href="#") Read more
|
41
|
+
%noscript
|
42
|
+
:markdown
|
43
|
+
#{ontology.description.to_s}
|
44
|
+
:css
|
45
|
+
.js-only { display: none; }
|
46
|
+
:javascript
|
47
|
+
$("a#read-more").click(function(e) {
|
48
|
+
e.preventDefault();
|
49
|
+
$("#further-information").removeClass("truncated");
|
50
|
+
$("#further-information .fade-out").hide();
|
51
|
+
$("a#read-more").closest('p').hide();
|
52
|
+
});
|
53
|
+
.secondary
|
54
|
+
- if ontology.issued.present?
|
55
|
+
%h3 Issued
|
56
|
+
%p= formatted_date(ontology.issued.to_s)
|
57
|
+
- if ontology.modified.present?
|
58
|
+
%h3 Modified
|
59
|
+
%p= formatted_date(ontology.modified.to_s)
|
60
|
+
- if ontology.tags.try(:any?)
|
61
|
+
%h3 Tags
|
62
|
+
%p= ontology.tags.join(', ')
|
63
|
+
|
64
|
+
%ul.tab-links
|
65
|
+
%li.active
|
66
|
+
%a(href="#classes" data-toggle="tab") Classes
|
67
|
+
%li
|
68
|
+
%a(href="#properties" data-toggle="tab") Properties
|
69
|
+
%li
|
70
|
+
%a(href="#linked-data" data-toggle="tab") Linked Data & SPARQL
|
71
|
+
|
72
|
+
.tab-content
|
73
|
+
%section#classes.active
|
74
|
+
.content
|
75
|
+
%ul
|
76
|
+
- ontology.classes.each do |klass|
|
77
|
+
%li
|
78
|
+
%h3= resource_uri_or_label(klass, klass.uri)
|
79
|
+
%h4.click-to-select= klass.uri
|
80
|
+
%p= klass.comment
|
81
|
+
%section#properties
|
82
|
+
.content
|
83
|
+
%ul
|
84
|
+
- ontology.properties.each do |property|
|
85
|
+
%li
|
86
|
+
%h3= resource_uri_or_label(property, property.uri)
|
87
|
+
%h4.click-to-select= property.uri
|
88
|
+
%p= property.comment
|
89
|
+
|
90
|
+
= render 'publish_my_data/resources/sparql_section', resource: ontology
|
91
|
+
|
92
|
+
%footer.alternative-formats
|
93
|
+
:markdown
|
94
|
+
This **ontology** is available as:
|
95
|
+
%ul
|
96
|
+
%li HTML
|
97
|
+
%li= link_to("JSON", show_resource_path(:uri => ontology.uri, format: 'json'))
|
98
|
+
%li= link_to("RDF/XML", show_resource_path(:uri => ontology.uri, format: 'rdf'))
|
99
|
+
%li= link_to("Turtle", show_resource_path(:uri => ontology.uri, format: 'ttl'))
|
100
|
+
%li= link_to("N-triples", show_resource_path(:uri => ontology.uri, format: 'nt'))
|
@@ -0,0 +1,28 @@
|
|
1
|
+
- page_title "Property #{property.label || property.uri}"
|
2
|
+
|
3
|
+
- content_for :crumbs do
|
4
|
+
%ol.breadcrumb
|
5
|
+
%li= link_to_home
|
6
|
+
- if property.defined_by_ontology
|
7
|
+
%li= link_to "Ontology: #{property.defined_by_ontology.label || property.defined_by_ontology.uri}", resource_path_from_uri(property.defined_by_ontology.uri)
|
8
|
+
%li Property
|
9
|
+
|
10
|
+
%article#resource
|
11
|
+
%header
|
12
|
+
%h3 Property
|
13
|
+
%h1= property.label || property.uri
|
14
|
+
%h3 URI
|
15
|
+
%h2.click-to-select= property.uri
|
16
|
+
|
17
|
+
= render 'publish_my_data/resources/resource_data', resource: property
|
18
|
+
|
19
|
+
%footer.alternative-formats
|
20
|
+
:markdown
|
21
|
+
This **property** is available as:
|
22
|
+
%ul
|
23
|
+
%li HTML
|
24
|
+
%li= link_to("JSON", show_resource_path(:uri => property.uri, :format => 'json'))
|
25
|
+
%li= link_to("RDF/XML", show_resource_path(:uri => property.uri, :format => 'rdf'))
|
26
|
+
%li= link_to("Turtle", show_resource_path(:uri => property.uri, :format => 'ttl'))
|
27
|
+
%li= link_to("N-triples", show_resource_path(:uri => property.uri, :format => 'nt'))
|
28
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%section#resource-data
|
2
|
+
%table
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th
|
6
|
+
Predicate
|
7
|
+
%th
|
8
|
+
Object
|
9
|
+
%tbody
|
10
|
+
- resource.predicates.each do |predicate|
|
11
|
+
%tr
|
12
|
+
%td.resource-predicate
|
13
|
+
= resource_uri_or_label(resource, predicate)
|
14
|
+
%td.resource-object
|
15
|
+
- resource.read_predicate(predicate).each do |obj|
|
16
|
+
= resource_uri_or_label(resource, obj)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
- resource_class_name = resource.class.name.demodulize.humanize.downcase
|
2
|
+
|
3
|
+
%section#linked-data
|
4
|
+
.primary
|
5
|
+
%h3 SPARQL
|
6
|
+
|
7
|
+
:markdown
|
8
|
+
The data contained in this #{resource_class_name} is stored in a named graph, which can be used in SPARQL queries to restrict results to this #{resource_class_name}.
|
9
|
+
= content_tag :code, resource.data_graph_uri, class: 'namedgraph click-to-select'
|
10
|
+
|
11
|
+
- if resource.data_dump.present?
|
12
|
+
%h3 Download
|
13
|
+
%p
|
14
|
+
= link_to resource.data_dump.to_s do
|
15
|
+
%i.icon-download
|
16
|
+
Complete dump of all triples in this #{resource_class_name}.
|
17
|
+
(zipped n-triples file)
|
18
|
+
|
19
|
+
.secondary
|
20
|
+
%a.button(href="/sparql") Run a SPARQL Query
|
21
|
+
%h3 API Docs
|
22
|
+
%p Full details of how to programatically access the data in this site can be found in the #{ link_to 'Developer Documentation', publish_my_data.developer_docs_path }.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
- page_title 'Resources'
|
2
|
+
- rdf_type_label = PublishMyData::RdfType.find(@type_filter).label rescue nil
|
3
|
+
|
4
|
+
- content_for :crumbs do
|
5
|
+
%ol.breadcrumb
|
6
|
+
%li= link_to_home
|
7
|
+
- if @dataset && @dataset.theme
|
8
|
+
%li= link_to "Theme: #{@dataset.theme_obj.label || @dataset.theme_obj.uri}", theme_path(@dataset.theme_obj)
|
9
|
+
- if @dataset
|
10
|
+
%li= link_to "Dataset: #{@dataset.label}", @dataset
|
11
|
+
- if @type_filter
|
12
|
+
%li= "Resources of Type: #{rdf_type_label || @type_filter}"
|
13
|
+
- else
|
14
|
+
%li Resources
|
15
|
+
|
16
|
+
%section#datasets
|
17
|
+
%header
|
18
|
+
%h1 Resources
|
19
|
+
%h2= resources_list_table_title
|
20
|
+
%ul
|
21
|
+
- @resources.each do |r|
|
22
|
+
%li
|
23
|
+
%h3= link_to((r.label || r.uri.to_s), resource_path_from_uri(r.uri))
|
24
|
+
%h4.click-to-select= r.uri.to_s
|
25
|
+
|
26
|
+
- if pagination_required?(@resources, @pagination_params)
|
27
|
+
= paginate @resources
|
28
|
+
|
29
|
+
%footer.alternative-formats
|
30
|
+
:markdown
|
31
|
+
This **page of resources** is available as
|
32
|
+
%ul
|
33
|
+
%li HTML
|
34
|
+
%li= link_to 'N-triples', format: 'nt', page: @pagination_params.page, per_page: @pagination_params.per_page
|
35
|
+
%li= link_to "Turtle", format: 'ttl', page: @pagination_params.page, per_page: @pagination_params.per_page
|
36
|
+
%li= link_to "RDF/XML", format: 'rdf', page: @pagination_params.page, per_page: @pagination_params.per_page
|
37
|
+
%li= link_to "JSON", format: 'json', page: @pagination_params.page, per_page: @pagination_params.per_page
|
@@ -0,0 +1,36 @@
|
|
1
|
+
- page_title("Resource: #{resource.label || resource.uri}")
|
2
|
+
|
3
|
+
- rdf_type_label = PublishMyData::RdfType.find(resource.rdf_type.first.to_s).label rescue nil
|
4
|
+
|
5
|
+
- content_for :crumbs do
|
6
|
+
%ol.breadcrumb
|
7
|
+
%li= link_to_home
|
8
|
+
- if resource.theme
|
9
|
+
%li= link_to "Theme: #{resource.theme.label || resource.theme.uri}", theme_path(resource.theme)
|
10
|
+
- if resource.dataset
|
11
|
+
%li= link_to "Dataset: #{resource.dataset.label || resource.dataset.uri}", dataset_path(resource.dataset)
|
12
|
+
- if resource.rdf_type.one?
|
13
|
+
%li= link_to "Type: #{rdf_type_label || resource.rdf_type.first}", list_resources_path(:dataset => resource.dataset, :type_uri => resource.rdf_type.first)
|
14
|
+
%li Resource
|
15
|
+
|
16
|
+
%article#resource
|
17
|
+
%header
|
18
|
+
%h3 Resource
|
19
|
+
%h1= resource.label || resource.uri
|
20
|
+
%h3 URI
|
21
|
+
%h2.click-to-select= resource.uri
|
22
|
+
%h5
|
23
|
+
= resource.read_predicate(RDF.type).many? ? 'Types:' : 'Type:'
|
24
|
+
= resource.read_predicate(RDF.type).map { |t| resource_uri_or_label(resource, t) }.join(", ").html_safe
|
25
|
+
|
26
|
+
= render 'publish_my_data/resources/resource_data', resource: resource
|
27
|
+
|
28
|
+
%footer.alternative-formats
|
29
|
+
:markdown
|
30
|
+
This **resource** is available as:
|
31
|
+
%ul
|
32
|
+
%li HTML
|
33
|
+
%li= link_to("JSON", show_resource_path(:uri => resource.uri, :format => 'json'))
|
34
|
+
%li= link_to("RDF/XML", show_resource_path(:uri => resource.uri, :format => 'rdf'))
|
35
|
+
%li= link_to("Turtle", show_resource_path(:uri => resource.uri, :format => 'ttl'))
|
36
|
+
%li= link_to("N-triples", show_resource_path(:uri => resource.uri, :format => 'nt'))
|
@@ -0,0 +1,8 @@
|
|
1
|
+
#deprecation-notice
|
2
|
+
%i.icon-warning
|
3
|
+
:markdown
|
4
|
+
This #{resource.class.name.demodulize.humanize.downcase} has been discontinued
|
5
|
+
- if resource.replaced_by
|
6
|
+
and replaced by #{link_to resource.replaced_by.to_s, resource.replaced_by.to_s}.
|
7
|
+
Please use this instead.
|
8
|
+
#{link_to "What does this mean?", "/docs#discontinued-datasets"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
%footer
|
2
|
+
.links
|
3
|
+
= link_to "Privacy & Cookies", publish_my_data.privacy_path
|
4
|
+
|
|
5
|
+
= link_to "Accessibility", publish_my_data.accessibility_path
|
6
|
+
|
|
7
|
+
= link_to "Developer Docs", publish_my_data.developer_docs_path
|
8
|
+
|
9
|
+
.credits
|
10
|
+
:markdown
|
11
|
+
Powered by [PublishMyData](http://swirrl.com/publishmydata) Community Edition v#{Gem.loaded_specs["publish_my_data"].version}
|