iqvoc 4.0.9 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +8 -6
- data/Gemfile.lock +56 -36
- data/README.md +3 -7
- data/app/controllers/concepts/hierarchical_controller.rb +2 -5
- data/app/controllers/concepts/scheme_controller.rb +51 -0
- data/app/controllers/concepts_controller.rb +2 -0
- data/app/controllers/hierarchy_controller.rb +105 -0
- data/app/controllers/rdf_controller.rb +0 -10
- data/app/controllers/user_sessions_controller.rb +5 -1
- data/app/helpers/application_helper.rb +1 -1
- data/app/helpers/concepts_helper.rb +19 -0
- data/app/helpers/rdf_helper.rb +5 -0
- data/app/models/concept/base.rb +10 -1
- data/app/models/concept/relation/skos/base.rb +8 -1
- data/app/models/concept/skos/scheme.rb +54 -13
- data/app/models/concept/validations.rb +2 -2
- data/app/models/labeling/base.rb +8 -0
- data/app/models/labeling/skos/base.rb +0 -8
- data/app/models/notation/base.rb +59 -0
- data/app/views/concepts/_form.html.erb +9 -1
- data/app/views/concepts/scheme/_sidebar.html.erb +6 -0
- data/app/views/concepts/scheme/edit.html.erb +30 -0
- data/app/views/concepts/scheme/show.html.erb +19 -0
- data/app/views/{rdf/scheme.iqrdf → concepts/scheme/show.iqrdf} +0 -0
- data/app/views/hierarchy/show.html.erb +5 -0
- data/app/views/hierarchy/show.iqrdf +24 -0
- data/app/views/partials/notation/_base.html.erb +8 -0
- data/app/views/partials/notation/_edit_base.html.erb +18 -0
- data/config/application.rb +2 -0
- data/config/engine.rb +0 -1
- data/config/initializers/mime_types.rb +2 -2
- data/config/locales/activerecord.de.yml +8 -0
- data/config/locales/activerecord.en.yml +8 -0
- data/config/locales/activerecord.pt.yml +8 -0
- data/config/locales/de.yml +5 -1
- data/config/locales/en.yml +5 -1
- data/config/locales/pt.yml +5 -1
- data/config/routes.rb +35 -32
- data/db/migrate/20130315093255_add_notations.rb +9 -0
- data/db/migrate/20130315141952_add_indexes_to_notations.rb +5 -0
- data/db/schema.rb +9 -1
- data/iqvoc.gemspec +0 -1
- data/lib/generators/app/template.rb +3 -0
- data/lib/iqvoc/ability.rb +3 -1
- data/lib/iqvoc/configuration/concept.rb +10 -1
- data/lib/iqvoc/configuration/core.rb +4 -0
- data/lib/iqvoc/rdfapi.rb +1 -0
- data/lib/iqvoc/skos_importer.rb +14 -7
- data/lib/iqvoc/version.rb +1 -1
- data/test/functional/hierarchy_test.rb +355 -0
- data/test/integration/client_edit_concept_test.rb +1 -1
- data/test/integration/concept_scheme_test.rb +38 -5
- data/test/unit/concept_scheme_test.rb +35 -0
- data/test/unit/skos_import_test.rb +29 -2
- metadata +40 -64
@@ -60,7 +60,7 @@ class SkosImportTest < ActiveSupport::TestCase
|
|
60
60
|
end
|
61
61
|
|
62
62
|
test "basic_importer_functionality" do
|
63
|
-
assert_difference('Concept::Base.count', 4) do
|
63
|
+
assert_difference('Concept::SKOS::Base.count', 4) do
|
64
64
|
Iqvoc::SkosImporter.new(TEST_DATA, "http://www.example.com/")
|
65
65
|
end
|
66
66
|
|
@@ -91,7 +91,7 @@ class SkosImportTest < ActiveSupport::TestCase
|
|
91
91
|
end
|
92
92
|
|
93
93
|
test "incorrect origin" do
|
94
|
-
assert_difference('Concept::Base.count', 1) do
|
94
|
+
assert_difference('Concept::SKOS::Base.count', 1) do
|
95
95
|
Iqvoc::SkosImporter.new(["<http://www.example.com/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2008/05/skos#Concept>."], "http://www.example.com/")
|
96
96
|
end
|
97
97
|
assert_nil Iqvoc::Concept.base_class.by_origin("1").last
|
@@ -116,6 +116,33 @@ class SkosImportTest < ActiveSupport::TestCase
|
|
116
116
|
Iqvoc::SkosImporter.new(test_data, "http://www.example.com/")
|
117
117
|
end
|
118
118
|
end
|
119
|
+
|
120
|
+
test "notations" do
|
121
|
+
test_data = (<<-DATA
|
122
|
+
<http://www.example.com/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2008/05/skos#Concept> .
|
123
|
+
<http://www.example.com/car> <http://www.w3.org/2008/05/skos#notation> "ME-IQ 1234"^^<http://www.example.com/licensePlate> .
|
124
|
+
<http://www.example.com/car> <http://www.w3.org/2008/05/skos#notation> "12345"^^<http://notations.example.com/exampleNotation> .
|
125
|
+
DATA
|
126
|
+
).split("\n")
|
127
|
+
|
128
|
+
assert_difference('Notation::Base.count', 2) do
|
129
|
+
Iqvoc::SkosImporter.new(test_data, "http://www.example.com/")
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
test "top concepts for concept scheme" do
|
134
|
+
test_data = (<<-DATA
|
135
|
+
<http://www.example.com/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2008/05/skos#Concept> .
|
136
|
+
<http://www.example.com/car> <http://www.w3.org/2008/05/skos#topConceptOf> <http://www.example.com/scheme> .
|
137
|
+
<http://www.example.com/pedal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2008/05/skos#Concept> .
|
138
|
+
<http://www.example.com/steering_wheel> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2008/05/skos#Concept> .
|
139
|
+
DATA
|
140
|
+
).split("\n")
|
141
|
+
|
142
|
+
assert_difference('Concept::SKOS::Base.tops.count', 1) do
|
143
|
+
Iqvoc::SkosImporter.new(test_data, "http://www.example.com/")
|
144
|
+
end
|
145
|
+
end
|
119
146
|
end
|
120
147
|
|
121
148
|
class SkosCollectionImportTest < ActiveSupport::TestCase
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iqvoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
5
|
-
prerelease:
|
4
|
+
version: 4.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Robert Glaser
|
@@ -11,12 +10,11 @@ authors:
|
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date: 2013-
|
13
|
+
date: 2013-04-17 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rails
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
18
|
requirements:
|
21
19
|
- - ~>
|
22
20
|
- !ruby/object:Gem::Version
|
@@ -24,7 +22,6 @@ dependencies:
|
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
24
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
25
|
requirements:
|
29
26
|
- - ~>
|
30
27
|
- !ruby/object:Gem::Version
|
@@ -32,71 +29,62 @@ dependencies:
|
|
32
29
|
- !ruby/object:Gem::Dependency
|
33
30
|
name: bundler
|
34
31
|
requirement: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
32
|
requirements:
|
37
|
-
- -
|
33
|
+
- - '>='
|
38
34
|
- !ruby/object:Gem::Version
|
39
35
|
version: '0'
|
40
36
|
type: :runtime
|
41
37
|
prerelease: false
|
42
38
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
39
|
requirements:
|
45
|
-
- -
|
40
|
+
- - '>='
|
46
41
|
- !ruby/object:Gem::Version
|
47
42
|
version: '0'
|
48
43
|
- !ruby/object:Gem::Dependency
|
49
44
|
name: kaminari
|
50
45
|
requirement: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
46
|
requirements:
|
53
|
-
- -
|
47
|
+
- - '>='
|
54
48
|
- !ruby/object:Gem::Version
|
55
49
|
version: '0'
|
56
50
|
type: :runtime
|
57
51
|
prerelease: false
|
58
52
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
53
|
requirements:
|
61
|
-
- -
|
54
|
+
- - '>='
|
62
55
|
- !ruby/object:Gem::Version
|
63
56
|
version: '0'
|
64
57
|
- !ruby/object:Gem::Dependency
|
65
58
|
name: authlogic
|
66
59
|
requirement: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
60
|
requirements:
|
69
|
-
- -
|
61
|
+
- - '>='
|
70
62
|
- !ruby/object:Gem::Version
|
71
63
|
version: '0'
|
72
64
|
type: :runtime
|
73
65
|
prerelease: false
|
74
66
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
67
|
requirements:
|
77
|
-
- -
|
68
|
+
- - '>='
|
78
69
|
- !ruby/object:Gem::Version
|
79
70
|
version: '0'
|
80
71
|
- !ruby/object:Gem::Dependency
|
81
72
|
name: cancan
|
82
73
|
requirement: !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
74
|
requirements:
|
85
|
-
- -
|
75
|
+
- - '>='
|
86
76
|
- !ruby/object:Gem::Version
|
87
77
|
version: '0'
|
88
78
|
type: :runtime
|
89
79
|
prerelease: false
|
90
80
|
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
81
|
requirements:
|
93
|
-
- -
|
82
|
+
- - '>='
|
94
83
|
- !ruby/object:Gem::Version
|
95
84
|
version: '0'
|
96
85
|
- !ruby/object:Gem::Dependency
|
97
86
|
name: iq_rdf
|
98
87
|
requirement: !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
88
|
requirements:
|
101
89
|
- - ~>
|
102
90
|
- !ruby/object:Gem::Version
|
@@ -104,7 +92,6 @@ dependencies:
|
|
104
92
|
type: :runtime
|
105
93
|
prerelease: false
|
106
94
|
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
none: false
|
108
95
|
requirements:
|
109
96
|
- - ~>
|
110
97
|
- !ruby/object:Gem::Version
|
@@ -112,71 +99,48 @@ dependencies:
|
|
112
99
|
- !ruby/object:Gem::Dependency
|
113
100
|
name: json
|
114
101
|
requirement: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
102
|
requirements:
|
117
|
-
- -
|
103
|
+
- - '>='
|
118
104
|
- !ruby/object:Gem::Version
|
119
105
|
version: '0'
|
120
106
|
type: :runtime
|
121
107
|
prerelease: false
|
122
108
|
version_requirements: !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
109
|
requirements:
|
125
|
-
- -
|
110
|
+
- - '>='
|
126
111
|
- !ruby/object:Gem::Version
|
127
112
|
version: '0'
|
128
113
|
- !ruby/object:Gem::Dependency
|
129
114
|
name: rails_autolink
|
130
115
|
requirement: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
116
|
requirements:
|
133
|
-
- -
|
117
|
+
- - '>='
|
134
118
|
- !ruby/object:Gem::Version
|
135
119
|
version: '0'
|
136
120
|
type: :runtime
|
137
121
|
prerelease: false
|
138
122
|
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
none: false
|
140
123
|
requirements:
|
141
|
-
- -
|
142
|
-
- !ruby/object:Gem::Version
|
143
|
-
version: '0'
|
144
|
-
- !ruby/object:Gem::Dependency
|
145
|
-
name: fastercsv
|
146
|
-
requirement: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
|
-
requirements:
|
149
|
-
- - ! '>='
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
152
|
-
type: :runtime
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
none: false
|
156
|
-
requirements:
|
157
|
-
- - ! '>='
|
124
|
+
- - '>='
|
158
125
|
- !ruby/object:Gem::Version
|
159
126
|
version: '0'
|
160
127
|
- !ruby/object:Gem::Dependency
|
161
128
|
name: simple_form
|
162
129
|
requirement: !ruby/object:Gem::Requirement
|
163
|
-
none: false
|
164
130
|
requirements:
|
165
|
-
- -
|
131
|
+
- - '>='
|
166
132
|
- !ruby/object:Gem::Version
|
167
133
|
version: '0'
|
168
134
|
type: :runtime
|
169
135
|
prerelease: false
|
170
136
|
version_requirements: !ruby/object:Gem::Requirement
|
171
|
-
none: false
|
172
137
|
requirements:
|
173
|
-
- -
|
138
|
+
- - '>='
|
174
139
|
- !ruby/object:Gem::Version
|
175
140
|
version: '0'
|
176
141
|
- !ruby/object:Gem::Dependency
|
177
142
|
name: sass-rails
|
178
143
|
requirement: !ruby/object:Gem::Requirement
|
179
|
-
none: false
|
180
144
|
requirements:
|
181
145
|
- - ~>
|
182
146
|
- !ruby/object:Gem::Version
|
@@ -184,7 +148,6 @@ dependencies:
|
|
184
148
|
type: :runtime
|
185
149
|
prerelease: false
|
186
150
|
version_requirements: !ruby/object:Gem::Requirement
|
187
|
-
none: false
|
188
151
|
requirements:
|
189
152
|
- - ~>
|
190
153
|
- !ruby/object:Gem::Version
|
@@ -192,17 +155,15 @@ dependencies:
|
|
192
155
|
- !ruby/object:Gem::Dependency
|
193
156
|
name: iq_triplestorage
|
194
157
|
requirement: !ruby/object:Gem::Requirement
|
195
|
-
none: false
|
196
158
|
requirements:
|
197
|
-
- -
|
159
|
+
- - '>='
|
198
160
|
- !ruby/object:Gem::Version
|
199
161
|
version: '0'
|
200
162
|
type: :runtime
|
201
163
|
prerelease: false
|
202
164
|
version_requirements: !ruby/object:Gem::Requirement
|
203
|
-
none: false
|
204
165
|
requirements:
|
205
|
-
- -
|
166
|
+
- - '>='
|
206
167
|
- !ruby/object:Gem::Version
|
207
168
|
version: '0'
|
208
169
|
description: iQvoc - a SKOS(-XL) vocabulary management system built on the Semantic
|
@@ -256,11 +217,13 @@ files:
|
|
256
217
|
- app/controllers/concepts/alphabetical_controller.rb
|
257
218
|
- app/controllers/concepts/expired_controller.rb
|
258
219
|
- app/controllers/concepts/hierarchical_controller.rb
|
220
|
+
- app/controllers/concepts/scheme_controller.rb
|
259
221
|
- app/controllers/concepts/untranslated_controller.rb
|
260
222
|
- app/controllers/concepts/versions_controller.rb
|
261
223
|
- app/controllers/concepts_controller.rb
|
262
224
|
- app/controllers/dashboard_controller.rb
|
263
225
|
- app/controllers/frontpage_controller.rb
|
226
|
+
- app/controllers/hierarchy_controller.rb
|
264
227
|
- app/controllers/import_controller.rb
|
265
228
|
- app/controllers/instance_configuration_controller.rb
|
266
229
|
- app/controllers/pages_controller.rb
|
@@ -311,6 +274,7 @@ files:
|
|
311
274
|
- app/models/match/skos/mapping_relation.rb
|
312
275
|
- app/models/match/skos/narrow_match.rb
|
313
276
|
- app/models/match/skos/related_match.rb
|
277
|
+
- app/models/notation/base.rb
|
314
278
|
- app/models/note/annotated/base.rb
|
315
279
|
- app/models/note/base.rb
|
316
280
|
- app/models/note/skos/base.rb
|
@@ -343,6 +307,10 @@ files:
|
|
343
307
|
- app/views/concepts/index.iqrdf
|
344
308
|
- app/views/concepts/new.html.erb
|
345
309
|
- app/views/concepts/notifications/_referenced_concepts.html.erb
|
310
|
+
- app/views/concepts/scheme/_sidebar.html.erb
|
311
|
+
- app/views/concepts/scheme/edit.html.erb
|
312
|
+
- app/views/concepts/scheme/show.html.erb
|
313
|
+
- app/views/concepts/scheme/show.iqrdf
|
346
314
|
- app/views/concepts/show.iqrdf
|
347
315
|
- app/views/concepts/show_published.html.erb
|
348
316
|
- app/views/concepts/show_unpublished.html.erb
|
@@ -354,6 +322,8 @@ files:
|
|
354
322
|
- app/views/errors/access_denied.html.erb
|
355
323
|
- app/views/errors/not_found.html.erb
|
356
324
|
- app/views/frontpage/index.html.erb
|
325
|
+
- app/views/hierarchy/show.html.erb
|
326
|
+
- app/views/hierarchy/show.iqrdf
|
357
327
|
- app/views/import/import.html.erb
|
358
328
|
- app/views/import/index.html.erb
|
359
329
|
- app/views/instance_configuration/index.html.erb
|
@@ -386,6 +356,8 @@ files:
|
|
386
356
|
- app/views/partials/labeling/skos/_search_result.html.erb
|
387
357
|
- app/views/partials/match/_base.html.erb
|
388
358
|
- app/views/partials/match/_edit_base.html.erb
|
359
|
+
- app/views/partials/notation/_base.html.erb
|
360
|
+
- app/views/partials/notation/_edit_base.html.erb
|
389
361
|
- app/views/partials/note/_base.html.erb
|
390
362
|
- app/views/partials/note/_edit_base.html.erb
|
391
363
|
- app/views/partials/note/_note.html.erb
|
@@ -393,7 +365,6 @@ files:
|
|
393
365
|
- app/views/partials/note/skos/_edit_change_note.html.erb
|
394
366
|
- app/views/partials/note/skos/change_note/_search_result.html.erb
|
395
367
|
- app/views/partials/note/skos/definition/_search_result.html.erb
|
396
|
-
- app/views/rdf/scheme.iqrdf
|
397
368
|
- app/views/search_results/_header.html.erb
|
398
369
|
- app/views/search_results/_sidebar.html.erb
|
399
370
|
- app/views/search_results/index.html.erb
|
@@ -469,6 +440,8 @@ files:
|
|
469
440
|
- db/migrate/20120201120736_add_top_term_to_concepts.rb
|
470
441
|
- db/migrate/20120326102037_add_rank_to_concept_relations.rb
|
471
442
|
- db/migrate/20130227145825_fix_collection_type.rb
|
443
|
+
- db/migrate/20130315093255_add_notations.rb
|
444
|
+
- db/migrate/20130315141952_add_indexes_to_notations.rb
|
472
445
|
- db/schema.rb
|
473
446
|
- db/seeds.rb
|
474
447
|
- public/404.html
|
@@ -510,6 +483,7 @@ files:
|
|
510
483
|
- lib/tasks/sync.rake
|
511
484
|
- lib/templates/erb/scaffold/_form.html.erb
|
512
485
|
- test/factories.rb
|
486
|
+
- test/functional/hierarchy_test.rb
|
513
487
|
- test/integration/alphabetical_test.rb
|
514
488
|
- test/integration/authentication_test.rb
|
515
489
|
- test/integration/browse_concepts_and_labels_test.rb
|
@@ -527,6 +501,7 @@ files:
|
|
527
501
|
- test/integration_test_helper.rb
|
528
502
|
- test/performance/browsing_test.rb
|
529
503
|
- test/test_helper.rb
|
504
|
+
- test/unit/concept_scheme_test.rb
|
530
505
|
- test/unit/concept_test.rb
|
531
506
|
- test/unit/hygiene_test.rb
|
532
507
|
- test/unit/inline_data_test.rb
|
@@ -584,30 +559,30 @@ files:
|
|
584
559
|
- vendor/assets/stylesheets/jquery.treeview.css.erb
|
585
560
|
homepage: http://github.com/innoq/iqvoc
|
586
561
|
licenses: []
|
562
|
+
metadata: {}
|
587
563
|
post_install_message:
|
588
564
|
rdoc_options: []
|
589
565
|
require_paths:
|
590
566
|
- lib
|
591
567
|
required_ruby_version: !ruby/object:Gem::Requirement
|
592
|
-
none: false
|
593
568
|
requirements:
|
594
|
-
- -
|
569
|
+
- - '>='
|
595
570
|
- !ruby/object:Gem::Version
|
596
571
|
version: '0'
|
597
572
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
598
|
-
none: false
|
599
573
|
requirements:
|
600
|
-
- -
|
574
|
+
- - '>='
|
601
575
|
- !ruby/object:Gem::Version
|
602
576
|
version: '0'
|
603
577
|
requirements: []
|
604
578
|
rubyforge_project:
|
605
|
-
rubygems_version:
|
579
|
+
rubygems_version: 2.0.0
|
606
580
|
signing_key:
|
607
|
-
specification_version:
|
581
|
+
specification_version: 4
|
608
582
|
summary: iQvoc
|
609
583
|
test_files:
|
610
584
|
- test/factories.rb
|
585
|
+
- test/functional/hierarchy_test.rb
|
611
586
|
- test/integration/alphabetical_test.rb
|
612
587
|
- test/integration/authentication_test.rb
|
613
588
|
- test/integration/browse_concepts_and_labels_test.rb
|
@@ -625,6 +600,7 @@ test_files:
|
|
625
600
|
- test/integration_test_helper.rb
|
626
601
|
- test/performance/browsing_test.rb
|
627
602
|
- test/test_helper.rb
|
603
|
+
- test/unit/concept_scheme_test.rb
|
628
604
|
- test/unit/concept_test.rb
|
629
605
|
- test/unit/hygiene_test.rb
|
630
606
|
- test/unit/inline_data_test.rb
|