iqvoc 3.5.3 → 3.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. data/CHANGELOG.md +11 -2
  2. data/Gemfile +4 -6
  3. data/Gemfile.lock +4 -31
  4. data/README.md +1 -1
  5. data/app/assets/javascripts/iqvoc/iqvoc.js +10 -2
  6. data/app/controllers/application_controller.rb +1 -1
  7. data/app/controllers/collections_controller.rb +5 -5
  8. data/app/controllers/concepts/versions_controller.rb +1 -1
  9. data/app/controllers/concepts_controller.rb +7 -8
  10. data/app/controllers/dashboard_controller.rb +1 -1
  11. data/app/controllers/instance_configuration_controller.rb +8 -2
  12. data/app/controllers/rdf_controller.rb +19 -9
  13. data/app/controllers/user_sessions_controller.rb +1 -1
  14. data/app/helpers/application_helper.rb +19 -0
  15. data/app/helpers/dashboard_helper.rb +2 -2
  16. data/app/helpers/rdf_helper.rb +3 -1
  17. data/app/helpers/search_results_helper.rb +1 -1
  18. data/app/models/collection/member/base.rb +1 -1
  19. data/app/models/concept/base.rb +32 -10
  20. data/app/models/concept/skos/scheme.rb +46 -0
  21. data/app/models/labeling/skos/base.rb +3 -3
  22. data/app/models/note/skos/base.rb +1 -1
  23. data/app/models/note/skos/change_note.rb +2 -2
  24. data/app/models/search_extension.rb +1 -1
  25. data/app/models/user.rb +1 -1
  26. data/app/views/concepts/_base_data.html.erb +8 -0
  27. data/app/views/concepts/index.iqrdf +5 -5
  28. data/app/views/layouts/application.html.erb +3 -1
  29. data/app/views/partials/concept/relation/_edit_base.html.erb +2 -2
  30. data/app/views/partials/concept/relation/skos/broader/_mono.html.erb +4 -1
  31. data/app/views/partials/concept/relation/skos/broader/_poly.html.erb +5 -1
  32. data/app/views/rdf/scheme.iqrdf +9 -0
  33. data/config/application.rb +1 -1
  34. data/config/engine.rb +4 -4
  35. data/config/initializers/secret_token_configurator.rb +2 -2
  36. data/config/locales/activerecord.de.yml +13 -0
  37. data/config/locales/activerecord.en.yml +13 -0
  38. data/config/locales/de.yml +3 -0
  39. data/config/locales/en.yml +3 -0
  40. data/config/routes.rb +3 -2
  41. data/db/migrate/20120201120736_add_top_term_to_concepts.rb +7 -0
  42. data/db/schema.rb +2 -1
  43. data/iqvoc.gemspec +1 -1
  44. data/lib/debug.rb +34 -8
  45. data/lib/iqvoc/ability.rb +1 -2
  46. data/lib/iqvoc/configuration/collection.rb +2 -2
  47. data/lib/iqvoc/configuration/concept.rb +10 -5
  48. data/lib/iqvoc/configuration/core.rb +45 -8
  49. data/lib/iqvoc/configuration/label.rb +1 -1
  50. data/lib/iqvoc/controller_extensions.rb +3 -2
  51. data/lib/iqvoc/version.rb +1 -1
  52. data/lib/iqvoc.rb +1 -1
  53. data/lib/tasks/heroku.rake +2 -2
  54. data/test/factories.rb +2 -1
  55. data/test/integration/concept_scheme_test.rb +38 -0
  56. data/test/integration/search_test.rb +4 -4
  57. data/test/integration/tree_test.rb +4 -2
  58. data/test/integration_test_helper.rb +7 -5
  59. data/test/unit/concept_test.rb +1 -1
  60. data/test/unit/instance_configuration_test.rb +7 -7
  61. data/test/unit/skos_import_test.rb +2 -2
  62. metadata +23 -185
  63. data/app/views/layouts/_navigation.html.erb +0 -32
  64. data/config/blazing.rb +0 -36
  65. data/public/assets/ajax-loader-5c1bf2208bffabddfb583013023b2b11.gif +0 -0
  66. data/public/assets/ajax-loader.gif +0 -0
  67. data/public/assets/arrow_down-e1f4aacd91274ce8d4db40d8b4ad781f.gif +0 -0
  68. data/public/assets/arrow_down.gif +0 -0
  69. data/public/assets/arrow_up-a48d7a55002e97f1b70e0e957edf3964.gif +0 -0
  70. data/public/assets/arrow_up.gif +0 -0
  71. data/public/assets/back-ffd41b7924770324ead91a4eb51604f6.png +0 -0
  72. data/public/assets/back.png +0 -0
  73. data/public/assets/blueprint/ie-d2ff4b1cc209dc6b08716b5e0098e106.css +0 -36
  74. data/public/assets/blueprint/ie-d2ff4b1cc209dc6b08716b5e0098e106.css.gz +0 -0
  75. data/public/assets/blueprint/ie.css +0 -36
  76. data/public/assets/blueprint/ie.css.gz +0 -0
  77. data/public/assets/blueprint/print-799a53ff649d9f14baf5f5fe643d04c4.css +0 -30
  78. data/public/assets/blueprint/print-799a53ff649d9f14baf5f5fe643d04c4.css.gz +0 -0
  79. data/public/assets/blueprint/print.css +0 -30
  80. data/public/assets/blueprint/print.css.gz +0 -0
  81. data/public/assets/blueprint/screen-d721f98ceac371a9294fc6f091ca1cb5.css +0 -259
  82. data/public/assets/blueprint/screen-d721f98ceac371a9294fc6f091ca1cb5.css.gz +0 -0
  83. data/public/assets/blueprint/screen.css +0 -259
  84. data/public/assets/blueprint/screen.css.gz +0 -0
  85. data/public/assets/branch-c950c8ac69ee2f753f86a75d944aa976.png +0 -0
  86. data/public/assets/branch.png +0 -0
  87. data/public/assets/categ-e1e1a5958017a5586456895785298c89.png +0 -0
  88. data/public/assets/categ.png +0 -0
  89. data/public/assets/categ_open-de616238db93a0645b4c4a2cdd4eece4.png +0 -0
  90. data/public/assets/categ_open.png +0 -0
  91. data/public/assets/excanvas-1f8c36f3578409126862b5c17e59b9bd.js +0 -14
  92. data/public/assets/excanvas-1f8c36f3578409126862b5c17e59b9bd.js.gz +0 -0
  93. data/public/assets/excanvas.js +0 -14
  94. data/public/assets/excanvas.js.gz +0 -0
  95. data/public/assets/file-48364459f087292aafa11168442bde71.gif +0 -0
  96. data/public/assets/file.gif +0 -0
  97. data/public/assets/folder-7e0f370ab3fcca5deab89784db42da4a.gif +0 -0
  98. data/public/assets/folder-closed-cb6c847cac4dea2cb59c98ecfc76b8ae.gif +0 -0
  99. data/public/assets/folder-closed.gif +0 -0
  100. data/public/assets/folder.gif +0 -0
  101. data/public/assets/footer-ea48e7e96122c8ab345da8ff67f29838.png +0 -0
  102. data/public/assets/footer.png +0 -0
  103. data/public/assets/go_there-ee7df641e73ef83e43180dbc07c40540.png +0 -0
  104. data/public/assets/go_there.png +0 -0
  105. data/public/assets/header_long-5c7970b5911f94433a696ae87918ecb0.png +0 -0
  106. data/public/assets/header_long.png +0 -0
  107. data/public/assets/iqvoc/ie_fixes-7797396e9cd2f32961f56af18bacd33a.css +0 -7
  108. data/public/assets/iqvoc/ie_fixes-7797396e9cd2f32961f56af18bacd33a.css.gz +0 -0
  109. data/public/assets/iqvoc/ie_fixes.css +0 -7
  110. data/public/assets/iqvoc/ie_fixes.css.gz +0 -0
  111. data/public/assets/iqvoc/visualization-49b198ac7d8bc15fa13eafc528e96081.js +0 -4
  112. data/public/assets/iqvoc/visualization-49b198ac7d8bc15fa13eafc528e96081.js.gz +0 -0
  113. data/public/assets/iqvoc/visualization.js +0 -4
  114. data/public/assets/iqvoc/visualization.js.gz +0 -0
  115. data/public/assets/iqvoc-ff2c5252d9877c38297164984d4a7a55.png +0 -0
  116. data/public/assets/iqvoc.png +0 -0
  117. data/public/assets/jit_rgraph-63bc6fa01820d73bb4076f2f62493e66.js +0 -25
  118. data/public/assets/jit_rgraph-63bc6fa01820d73bb4076f2f62493e66.js.gz +0 -0
  119. data/public/assets/jit_rgraph.js +0 -25
  120. data/public/assets/jit_rgraph.js.gz +0 -0
  121. data/public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-951e2a65945b93d3f69c1994e5672f39.png +0 -0
  122. data/public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  123. data/public/assets/jquery-ui/ui-bg_flat_55_fbec88_40x100-befbc2de63b9556a093c0a5bb2e08a95.png +0 -0
  124. data/public/assets/jquery-ui/ui-bg_flat_55_fbec88_40x100.png +0 -0
  125. data/public/assets/jquery-ui/ui-bg_glass_75_d0e5f5_1x400-faa3341c6543985d2c94bd65e36bd6d8.png +0 -0
  126. data/public/assets/jquery-ui/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  127. data/public/assets/jquery-ui/ui-bg_glass_85_dfeffc_1x400-df1d30b336ee1530edc334458abd2417.png +0 -0
  128. data/public/assets/jquery-ui/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  129. data/public/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400-5767880afddd9b98f4b4cfd43a09947b.png +0 -0
  130. data/public/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  131. data/public/assets/jquery-ui/ui-bg_gloss-wave_55_5c9ccc_500x100-c563cdeeac0f1479b69e36b21d785ac4.png +0 -0
  132. data/public/assets/jquery-ui/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  133. data/public/assets/jquery-ui/ui-bg_inset-hard_100_f5f8f9_1x100-b837a3b8315a7ff270664ce469f2e6d7.png +0 -0
  134. data/public/assets/jquery-ui/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  135. data/public/assets/jquery-ui/ui-bg_inset-hard_100_fcfdfd_1x100-b5d3cda0e6142534937f71cf4438e28a.png +0 -0
  136. data/public/assets/jquery-ui/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  137. data/public/assets/jquery-ui/ui-icons_217bc0_256x240-14e62c24f88d00f227d88e5b16406eec.png +0 -0
  138. data/public/assets/jquery-ui/ui-icons_217bc0_256x240.png +0 -0
  139. data/public/assets/jquery-ui/ui-icons_2e83ff_256x240-c15e521f58d397c2fa31f4214f92a399.png +0 -0
  140. data/public/assets/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  141. data/public/assets/jquery-ui/ui-icons_469bdd_256x240-aceccf3311e1b369e71a4ac629953d61.png +0 -0
  142. data/public/assets/jquery-ui/ui-icons_469bdd_256x240.png +0 -0
  143. data/public/assets/jquery-ui/ui-icons_6da8d5_256x240-18148340aba4ce354c9d52c5aa2f5c0c.png +0 -0
  144. data/public/assets/jquery-ui/ui-icons_6da8d5_256x240.png +0 -0
  145. data/public/assets/jquery-ui/ui-icons_cd0a0a_256x240-279edbd373e73b1ecd1ea7a6ba19750d.png +0 -0
  146. data/public/assets/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  147. data/public/assets/jquery-ui/ui-icons_d8e7f3_256x240-732b446e2e1d4f4fec4277e2632a9adf.png +0 -0
  148. data/public/assets/jquery-ui/ui-icons_d8e7f3_256x240.png +0 -0
  149. data/public/assets/jquery-ui/ui-icons_f9bd01_256x240-1ee933e5956743f5607f2075ed21fac5.png +0 -0
  150. data/public/assets/jquery-ui/ui-icons_f9bd01_256x240.png +0 -0
  151. data/public/assets/json2-fdda51ffce29dd4cb684dc7bd0aede01.js +0 -157
  152. data/public/assets/json2-fdda51ffce29dd4cb684dc7bd0aede01.js.gz +0 -0
  153. data/public/assets/json2.js +0 -157
  154. data/public/assets/json2.js.gz +0 -0
  155. data/public/assets/leaf_end-2ac151e8d7b4928bacb557f96cb5b517.png +0 -0
  156. data/public/assets/leaf_end.png +0 -0
  157. data/public/assets/leaf_end_filled-cdb0eb9ce60425bf0a1fd12226e502eb.png +0 -0
  158. data/public/assets/leaf_end_filled.png +0 -0
  159. data/public/assets/leaf_mid-966f99acaeaddfaedb6b602eb1eed7e0.png +0 -0
  160. data/public/assets/leaf_mid.png +0 -0
  161. data/public/assets/leaf_mid_filled-fecf059c72a649fe77052a886fb030d5.png +0 -0
  162. data/public/assets/leaf_mid_filled.png +0 -0
  163. data/public/assets/leaf_nothing-e8b5532117e55a184d93e8bf66afa20a.png +0 -0
  164. data/public/assets/leaf_nothing.png +0 -0
  165. data/public/assets/leaf_only-e4fe523e451ad9dea6bba08b44cf8039.png +0 -0
  166. data/public/assets/leaf_only.png +0 -0
  167. data/public/assets/leaf_only_filled-7b9a97903759b89facd5fb2e03ba14d1.png +0 -0
  168. data/public/assets/leaf_only_filled.png +0 -0
  169. data/public/assets/leaf_top-61fbce4d3adf2235964e828647a52149.png +0 -0
  170. data/public/assets/leaf_top.png +0 -0
  171. data/public/assets/leaf_top_filled-003d96425167d3b74e63eb75e12d163e.png +0 -0
  172. data/public/assets/leaf_top_filled.png +0 -0
  173. data/public/assets/manifest-c08ebf92c2ea89fbce8705f984a7c604.css +0 -1139
  174. data/public/assets/manifest-c08ebf92c2ea89fbce8705f984a7c604.css.gz +0 -0
  175. data/public/assets/manifest-c6d880245ce63929a5842e48cb7c65f2.js +0 -21
  176. data/public/assets/manifest-c6d880245ce63929a5842e48cb7c65f2.js.gz +0 -0
  177. data/public/assets/manifest.css +0 -1139
  178. data/public/assets/manifest.css.gz +0 -0
  179. data/public/assets/manifest.js +0 -21
  180. data/public/assets/manifest.js.gz +0 -0
  181. data/public/assets/manifest.yml +0 -73
  182. data/public/assets/minus-633f45b71e7552c36214c9d81fce94b0.gif +0 -0
  183. data/public/assets/minus.gif +0 -0
  184. data/public/assets/nothing-19b9650c540a8776b047d6dde27687b0.png +0 -0
  185. data/public/assets/nothing.png +0 -0
  186. data/public/assets/ok-96195c6d50075a63cbdfa11818301f56.png +0 -0
  187. data/public/assets/ok.png +0 -0
  188. data/public/assets/plus-dd3920a86d5ea72497854d875c6afc00.gif +0 -0
  189. data/public/assets/plus.gif +0 -0
  190. data/public/assets/rdf_flyer-b2cc2d8b2a537a9c74b39450f8e6b16f.gif +0 -0
  191. data/public/assets/rdf_flyer.gif +0 -0
  192. data/public/assets/red_arrow-875d1bca1c4b97ec82635af86032a024.png +0 -0
  193. data/public/assets/red_arrow.png +0 -0
  194. data/public/assets/shadow-2975795dc944082531617a0c3ad2da70.png +0 -0
  195. data/public/assets/shadow.png +0 -0
  196. data/public/assets/spinner-0b76e32ff4e68b1e8789b4d0fe991cd7.gif +0 -0
  197. data/public/assets/spinner.gif +0 -0
  198. data/public/assets/tokenizer_delete-94c9b41ce566e499de2090b552e0d167.png +0 -0
  199. data/public/assets/tokenizer_delete.png +0 -0
  200. data/public/assets/tokenizer_pencile-b508830af36466f05620d83c544b22ff.png +0 -0
  201. data/public/assets/tokenizer_pencile.png +0 -0
  202. data/public/assets/tokenizer_show-152443b9a6c0b058cfb51c51f567116f.png +0 -0
  203. data/public/assets/tokenizer_show.png +0 -0
  204. data/public/assets/top_01-fab0825c0529e87fddf883074490dc19.png +0 -0
  205. data/public/assets/top_01.png +0 -0
  206. data/public/assets/treeview-black-116394dbf5afda75949a9925de790795.gif +0 -0
  207. data/public/assets/treeview-black-line-142d898d1f095b3cec1a5dd204daae0d.gif +0 -0
  208. data/public/assets/treeview-black-line.gif +0 -0
  209. data/public/assets/treeview-black.gif +0 -0
  210. data/public/assets/treeview-default-01747815c9007458fc391092548255f8.gif +0 -0
  211. data/public/assets/treeview-default-line-9aecef4278b9e684f18f3c52e3607f80.gif +0 -0
  212. data/public/assets/treeview-default-line.gif +0 -0
  213. data/public/assets/treeview-default.gif +0 -0
  214. data/public/assets/treeview-famfamfam-c5f86a8a52aa48e87b4bd58878c81ad8.gif +0 -0
  215. data/public/assets/treeview-famfamfam-line-897ce097b7d84700985608f22e2403c3.gif +0 -0
  216. data/public/assets/treeview-famfamfam-line.gif +0 -0
  217. data/public/assets/treeview-famfamfam.gif +0 -0
  218. data/public/assets/treeview-gray-56089927c44332a8375be41ab13130c8.gif +0 -0
  219. data/public/assets/treeview-gray-line-d4be395725623b1f39a0964fa479774e.gif +0 -0
  220. data/public/assets/treeview-gray-line.gif +0 -0
  221. data/public/assets/treeview-gray.gif +0 -0
  222. data/public/assets/treeview-red-cb4ed4e5654d76aef755e5c55b63e91c.gif +0 -0
  223. data/public/assets/treeview-red-line-fdf843bbfba11d00897c7971dff7e806.gif +0 -0
  224. data/public/assets/treeview-red-line.gif +0 -0
  225. data/public/assets/treeview-red.gif +0 -0
  226. data/public/assets/trunk-5686782333e8b4c7e4468c452fb52cec.png +0 -0
  227. data/public/assets/trunk.png +0 -0
  228. data/public/assets/unfinished-1cb6bae22a5b855f4b51cb03a1cce928.png +0 -0
  229. data/public/assets/unfinished.png +0 -0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 3.5.4 (2012-02-08)
2
+
3
+ * Top concepts<br>
4
+ From now on the hierarchical concept view only lists concepts marked as "top term".
5
+ This also includes a default concept scheme and support for top concepts in RDF views.
6
+ * Configurable navigation<br>
7
+ Use `Iqvoc.navigation_items` to inject additional navigation items.
8
+ * Bugfixes
9
+
1
10
  ## 3.5.1 (2012-02-01)
2
11
 
3
12
  * Bugfixes
@@ -22,7 +31,7 @@
22
31
  * Several asset pipeline related fixes
23
32
  * Largely simplified heroku setup
24
33
  * Improvements to engine mode
25
-
34
+
26
35
  Detailed commit log: https://github.com/innoq/iqvoc/compare/v3.3.0...v3.3.3
27
36
 
28
37
  ## 3.3.0 (2012-01-10)
@@ -31,7 +40,7 @@ Detailed commit log: https://github.com/innoq/iqvoc/compare/v3.3.0...v3.3.3
31
40
  * Asset pipeline<br>
32
41
  [Detailed instructions](https://github.com/innoq/iqvoc/wiki/iQvoc-as-a-Rails-Engine)
33
42
  on how to use iQvoc as a Rails Engine (including the asset pipeline).
34
-
43
+
35
44
  This is a big update. Detailed commit log: https://github.com/innoq/iqvoc/compare/v3.2.6...v3.3.0
36
45
 
37
46
  ## 3.2.6 (2012-01-10)
data/Gemfile CHANGED
@@ -33,17 +33,16 @@ gem 'iq_rdf', '~> 0.1.2'
33
33
  gem 'json'
34
34
  gem 'rails_autolink'
35
35
  gem 'jruby-openssl', :platforms => :jruby
36
- gem 'blazing'
37
- gem 'blazing-passenger'
38
- gem 'blazing-rails'
36
+ gem 'fastercsv', :platforms => :ruby_18
39
37
 
40
38
  group :development do
41
- gem 'awesome_print'
42
39
  gem 'heroku'
43
40
  gem 'view_marker'
44
41
  end
45
42
 
46
43
  group :development, :test do
44
+ gem 'awesome_print'
45
+
47
46
  platforms :ruby do
48
47
  gem 'mysql2'
49
48
  gem 'sqlite3'
@@ -65,8 +64,7 @@ group :test do
65
64
  gem 'capybara-webkit'
66
65
  gem 'database_cleaner'
67
66
  gem 'factory_girl_rails'
68
- gem 'memory_test_fix'
69
- gem 'turn'
67
+ gem 'minitest'
70
68
  end
71
69
 
72
70
  group :production do
data/Gemfile.lock CHANGED
@@ -44,23 +44,11 @@ GEM
44
44
  i18n (~> 0.6)
45
45
  multi_json (~> 1.0)
46
46
  addressable (2.2.6)
47
- ansi (1.4.2)
48
47
  arel (3.0.0)
49
48
  authlogic (3.1.0)
50
49
  activerecord (>= 3.0.7)
51
50
  activerecord (>= 3.0.7)
52
51
  awesome_print (1.0.2)
53
- blazing (0.2.7)
54
- activesupport
55
- grit
56
- i18n
57
- logging
58
- blazing-passenger (0.2.3)
59
- blazing (>= 0.2.5)
60
- httparty
61
- blazing-rails (0.1.3)
62
- blazing (>= 0.2.5)
63
- httparty
64
52
  bouncy-castle-java (1.5.0146.1)
65
53
  builder (3.0.0)
66
54
  cancan (1.6.7)
@@ -77,7 +65,6 @@ GEM
77
65
  childprocess (0.3.0)
78
66
  ffi (~> 1.0.6)
79
67
  database_cleaner (0.7.1)
80
- diff-lcs (1.1.3)
81
68
  erubis (2.7.0)
82
69
  execjs (1.3.0)
83
70
  multi_json (~> 1.0)
@@ -86,20 +73,15 @@ GEM
86
73
  factory_girl_rails (1.6.0)
87
74
  factory_girl (~> 2.5.0)
88
75
  railties (>= 3.0.0)
76
+ fastercsv (1.5.4)
89
77
  ffi (1.0.11)
90
78
  ffi (1.0.11-java)
91
- grit (2.4.1)
92
- diff-lcs (~> 1.1)
93
- mime-types (~> 1.15)
94
79
  heroku (2.19.1)
95
80
  launchy (>= 0.3.2)
96
81
  rest-client (~> 1.6.1)
97
82
  rubyzip
98
83
  term-ansicolor (~> 1.0.5)
99
84
  hike (1.2.1)
100
- httparty (0.8.1)
101
- multi_json
102
- multi_xml
103
85
  i18n (0.6.0)
104
86
  iq_rdf (0.1.2)
105
87
  builder
@@ -122,17 +104,13 @@ GEM
122
104
  ffi (~> 1.0.9)
123
105
  spoon (~> 0.0.1)
124
106
  libv8 (3.3.10.4)
125
- little-plugger (1.1.3)
126
- logging (1.6.2)
127
- little-plugger (>= 1.1.3)
128
107
  mail (2.4.1)
129
108
  i18n (>= 0.4.0)
130
109
  mime-types (~> 1.16)
131
110
  treetop (~> 1.4.8)
132
- memory_test_fix (0.2.0)
133
111
  mime-types (1.17.2)
112
+ minitest (2.11.1)
134
113
  multi_json (1.0.4)
135
- multi_xml (0.4.1)
136
114
  mysql2 (0.3.11)
137
115
  nokogiri (1.5.0)
138
116
  nokogiri (1.5.0-java)
@@ -188,8 +166,6 @@ GEM
188
166
  treetop (1.4.10)
189
167
  polyglot
190
168
  polyglot (>= 0.3.1)
191
- turn (0.8.3)
192
- ansi
193
169
  tzinfo (0.3.31)
194
170
  uglifier (1.2.3)
195
171
  execjs (>= 0.3.0)
@@ -209,20 +185,18 @@ DEPENDENCIES
209
185
  activerecord-oracle_enhanced-adapter
210
186
  authlogic
211
187
  awesome_print
212
- blazing
213
- blazing-passenger
214
- blazing-rails
215
188
  cancan
216
189
  capybara
217
190
  capybara-webkit
218
191
  database_cleaner
219
192
  factory_girl_rails
193
+ fastercsv
220
194
  heroku
221
195
  iq_rdf (~> 0.1.2)
222
196
  jruby-openssl
223
197
  json
224
198
  kaminari
225
- memory_test_fix
199
+ minitest
226
200
  mysql2
227
201
  nokogiri (~> 1.5.0)
228
202
  pg
@@ -232,6 +206,5 @@ DEPENDENCIES
232
206
  spork-testunit!
233
207
  sqlite3
234
208
  therubyracer
235
- turn
236
209
  uglifier (>= 1.0.3)
237
210
  view_marker
data/README.md CHANGED
@@ -42,7 +42,7 @@ heroku restart
42
42
 
43
43
  Remember to visit the Users section and change the default passwords!
44
44
 
45
- **Remarks:**
45
+ **Remarks:**
46
46
  For now iQvoc only supports the standard Bamboo stack. Cedar is not supported as we have `sqlite3` as a dependency
47
47
  in the Gemfile and Cedar does not support a custom `BUNDLE_WITHOUT` config like Bamboo at the moment.
48
48
 
@@ -1,4 +1,4 @@
1
- /*jslint vars: true, unparam: true, browser: true */
1
+ /*jslint vars: true, unparam: true, browser: true, white: true */
2
2
  /*global jQuery */
3
3
 
4
4
  var IQVOC = (function($) {
@@ -188,6 +188,15 @@ jQuery(document).ready(function($) {
188
188
  IQVOC.EntitySelector(node);
189
189
  });
190
190
 
191
+ // hide broader relations for top terms (mutually exclusive in mono hierarchies)
192
+ var topTerm = $("#concept_top_term.exclusive");
193
+ var onTopTermToggle = function(ev) {
194
+ var broader = topTerm.closest("li").next(); // XXX: brittle
195
+ broader[topTerm.prop("checked") ? "slideUp" : "slideDown"]();
196
+ };
197
+ topTerm.on("change", onTopTermToggle);
198
+ onTopTermToggle();
199
+
191
200
  // Label editing (inline notes)
192
201
  $("fieldset.note_relation ol li.inline_note.new").hide();
193
202
  $("fieldset.note_relation input[type=button]").click(function(ev) {
@@ -247,4 +256,3 @@ jQuery(document).ready(function($) {
247
256
  });
248
257
  });
249
258
  });
250
-
@@ -18,6 +18,6 @@ require "iqvoc/controller_extensions"
18
18
 
19
19
  class ApplicationController < ActionController::Base
20
20
  include Iqvoc::ControllerExtensions
21
-
21
+
22
22
  protect_from_forgery
23
23
  end
@@ -48,8 +48,8 @@ class CollectionsController < ApplicationController
48
48
 
49
49
  # When in single query mode, AR handles ALL includes to be loaded by that
50
50
  # one query. We don't want that! So let's do it manually :-)
51
- ActiveRecord::Associations::Preloader.new(@collection,
52
- [:pref_labels,
51
+ ActiveRecord::Associations::Preloader.new(@collection,
52
+ [:pref_labels,
53
53
  {:subcollections => [:pref_labels, :subcollections]},
54
54
  {:concepts => [:pref_labels] + Iqvoc::Concept.base_class.default_includes}]).run
55
55
  end
@@ -84,10 +84,10 @@ class CollectionsController < ApplicationController
84
84
  # When in single query mode, AR handles ALL includes to be loaded by that
85
85
  # one query. We don't want that! So let's do it manually :-)
86
86
  ActiveRecord::Associations::Preloader.new(@collection, [
87
- :pref_labels,
88
- {:subcollections => :pref_labels},
87
+ :pref_labels,
88
+ {:subcollections => :pref_labels},
89
89
  {:concepts => [:pref_labels] + Iqvoc::Concept.base_class.default_includes}]).run
90
-
90
+
91
91
  build_note_relations
92
92
  end
93
93
 
@@ -84,7 +84,7 @@ class Concepts::VersionsController < ApplicationController
84
84
 
85
85
  new_version.unlock
86
86
  new_version.save :validate => false
87
-
87
+
88
88
  flash[:notice] = t("txt.controllers.versioning.unlocked")
89
89
  redirect_to concept_path(:published => 0, :id => new_version)
90
90
  end
@@ -22,11 +22,11 @@ class ConceptsController < ApplicationController
22
22
 
23
23
  respond_to do |format|
24
24
  format.json do # Search for widget
25
- @concepts = Iqvoc::Concept.base_class.editor_selectable.with_pref_labels.merge(Label::Base.by_query_value("#{params[:query]}%")).all
26
- response = []
27
- @concepts.each { |concept| response << concept_widget_data(concept)}
28
-
29
- render :json => response
25
+ scope = Iqvoc::Concept.base_class.editor_selectable.with_pref_labels.
26
+ merge(Label::Base.by_query_value("#{params[:query]}%"))
27
+ scope = scope.where(:top_term => false) if params[:exclude_top_terms]
28
+ @concepts = scope.all.map { |concept| concept_widget_data(concept) }
29
+ render :json => @concepts
30
30
  end
31
31
  format.all do # RDF full export
32
32
  authorize! :full_export, Concept::Base
@@ -55,7 +55,7 @@ class ConceptsController < ApplicationController
55
55
  format.html do
56
56
  # When in single query mode, AR handles ALL includes to be loaded by that
57
57
  # one query. We don't want that! So let's do it manually :-)
58
- ActiveRecord::Associations::Preloader.new(@concept,
58
+ ActiveRecord::Associations::Preloader.new(@concept,
59
59
  Iqvoc::Concept.base_class.default_includes + [:collection_members => {:collection => :labels},
60
60
  :broader_relations => {:target => [:pref_labels, :broader_relations]},
61
61
  :narrower_relations => {:target => [:pref_labels, :narrower_relations]}]).run
@@ -65,7 +65,7 @@ class ConceptsController < ApplicationController
65
65
  format.json do
66
66
  # When in single query mode, AR handles ALL includes to be loaded by that
67
67
  # one query. We don't want that! So let's do it manually :-)
68
- ActiveRecord::Associations::Preloader.new(@concept,
68
+ ActiveRecord::Associations::Preloader.new(@concept,
69
69
  [:labels,
70
70
  { :relations => { :target => [:labelings, :relations] } }]).run
71
71
 
@@ -83,7 +83,6 @@ class ConceptsController < ApplicationController
83
83
  }
84
84
  render :json => concept_data
85
85
  end
86
- format.ttl
87
86
  end
88
87
  end
89
88
 
@@ -18,7 +18,7 @@ class DashboardController < ApplicationController
18
18
 
19
19
  def index
20
20
  authorize! :use, :dashboard
21
-
21
+
22
22
  @items = []
23
23
  Iqvoc.first_level_classes.each do |klass|
24
24
  @items += klass.for_dashboard.all
@@ -14,7 +14,13 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
- require 'csv'
17
+ if RUBY_VERSION < "1.9"
18
+ require 'rubygems'
19
+ require 'faster_csv'
20
+ CSV = FCSV
21
+ else
22
+ require 'csv'
23
+ end
18
24
 
19
25
  class InstanceConfigurationController < ApplicationController
20
26
 
@@ -54,7 +60,7 @@ class InstanceConfigurationController < ApplicationController
54
60
 
55
61
  redirect_to instance_configuration_url
56
62
  end
57
-
63
+
58
64
  private
59
65
 
60
66
  # default value determines value type
@@ -18,25 +18,35 @@ class RdfController < ApplicationController
18
18
 
19
19
  skip_before_filter :require_user
20
20
  skip_before_filter :set_locale
21
+
22
+ def scheme
23
+ respond_to do |format|
24
+ format.html { redirect_to about_path }
25
+ format.any do
26
+ authorize! :read, Iqvoc::Concept.root_class.instance
27
+ @top_concepts = Iqvoc::Concept.base_class.tops.published.all
28
+ end
29
+ end
30
+ end
21
31
 
22
32
  def show
23
- scope = if (params[:published] == "0")
24
- Iqvoc::Concept.base_class.scoped.unpublished
33
+ scope = if params[:published] == "0"
34
+ Iqvoc::Concept.base_class.unpublished
25
35
  else
26
- Iqvoc::Concept.base_class.scoped.published
36
+ Iqvoc::Concept.base_class.published
27
37
  end
28
38
  if @concept = scope.by_origin(params[:id]).with_associations.last
29
39
  respond_to do |format|
30
- format.html {
40
+ format.html do
31
41
  redirect_to concept_url(:id => @concept.origin, :published => params[:published])
32
- }
33
- format.any {
42
+ end
43
+ format.any do
34
44
  authorize! :read, @concept
35
- render "show_concept"
36
- }
45
+ render :show_concept
46
+ end
37
47
  end
38
48
  else
39
- raise ActiveRecord::RecordNotFound.new("Coulnd't find either a concept matching '#{params[:id]}'.")
49
+ raise ActiveRecord::RecordNotFound.new("Concept '#{params[:id]}' not found.")
40
50
  end
41
51
  end
42
52
 
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
 
17
17
  class UserSessionsController < ApplicationController
18
-
18
+
19
19
  skip_before_filter :require_user, :only => [:new, :create]
20
20
 
21
21
  def new
@@ -16,6 +16,25 @@
16
16
 
17
17
  module ApplicationHelper
18
18
 
19
+ # expects an array of hashes with the following members:
20
+ # :content - usually a navigation link
21
+ # :active? - an optional function determining whether the respective item is
22
+ # currently active
23
+ # :controller - an optional string, used instead of `active?` to check for a
24
+ # specific controller
25
+ # :authorized? - an optional function determining whether the respective item
26
+ # is available to the current user (defaults to true)
27
+ def nav_items(items)
28
+ items.map do |item|
29
+ if (not item[:authorized?]) || instance_eval(&item[:authorized?])
30
+ active = item[:controller] ? params[:controller] == item[:controller] :
31
+ (item[:active?] ? instance_eval(&item[:active?]) : false)
32
+ content_tag "li", instance_eval(&item[:content]),
33
+ :class => ("active" if active)
34
+ end
35
+ end.join.html_safe
36
+ end
37
+
19
38
  def iqvoc_default_rdf_namespaces
20
39
  Iqvoc.rdf_namespaces.merge({
21
40
  :default => root_url(:format => nil, :lang => nil, :trailing_slash => true).gsub(/\/\/$/, "/"), # gsub because of a Rails bug :-(
@@ -34,9 +34,9 @@ module DashboardHelper
34
34
 
35
35
  content_tag :span, raw(msg), :class => css
36
36
  end
37
-
37
+
38
38
  def link_to_dashboard_item(item)
39
- if item.is_a?(Label::Base)
39
+ if item.is_a?(Label::Base)
40
40
  item.published? ? label_path(:id => item.origin) : label_path(:published => 0, :id => item.origin)
41
41
  else
42
42
  item.published? ? concept_path(:id => item.origin) : concept_path(:published => 0, :id => item.origin)
@@ -18,7 +18,7 @@ module RdfHelper
18
18
 
19
19
  def render_concept(document, concept)
20
20
 
21
- # You can not eager load polymorpihc associations. That's why we're loading
21
+ # You can not eager load polymorphic associations. That's why we're loading
22
22
  # the collections _one_ time and remember them for further _render_concept_
23
23
  # calls in the future.
24
24
  @rdf_helper_cached_collections ||= Iqvoc::Collection.base_class.select("id, origin").all.each_with_object({}) do |c, hash|
@@ -35,6 +35,8 @@ module RdfHelper
35
35
 
36
36
  c.Schema::expires(concept.expired_at) if concept.expired_at
37
37
  c.Owl::deprecated(true) if concept.expired_at and concept.expired_at <= Date.new
38
+
39
+ c.Skos::topConceptOf IqRdf.build_uri(Iqvoc::Concept.root_class.instance.origin) if concept.top_term?
38
40
 
39
41
  concept.labelings.each do |labeling|
40
42
  labeling.build_rdf(document, c)
@@ -28,5 +28,5 @@ module SearchResultsHelper
28
28
  end
29
29
  text
30
30
  end
31
-
31
+
32
32
  end
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
 
17
17
  class Collection::Member::Base < ActiveRecord::Base
18
-
18
+
19
19
  self.table_name = 'collection_members'
20
20
 
21
21
  belongs_to :collection, :class_name => 'Collection::Base'
@@ -38,13 +38,15 @@ class Concept::Base < ActiveRecord::Base
38
38
  :on => :update
39
39
 
40
40
  validate :ensure_no_pref_labels_share_the_same_language
41
+ validate :ensure_exclusive_top_term
42
+ validate :ensure_rooted_top_terms
41
43
 
42
44
  Iqvoc::Concept.include_modules.each do |mod|
43
45
  include mod
44
46
  end
45
47
 
46
48
  # ********** Hooks
47
-
49
+
48
50
  after_initialize do
49
51
  @full_validation = false
50
52
  end
@@ -125,7 +127,7 @@ class Concept::Base < ActiveRecord::Base
125
127
  # *** Concept2Concept relations
126
128
 
127
129
  # Broader
128
- # Actually this is not needed anymore.
130
+ # FIXME: Actually this is not needed anymore.
129
131
  # BUT: the include in scope :tops doesn't work with
130
132
  # 'Iqvoc::Concept.broader_relation_class_name'!?!?! (Rails Bug????)
131
133
  has_many :broader_relations,
@@ -134,7 +136,7 @@ class Concept::Base < ActiveRecord::Base
134
136
  :extend => Concept::Relation::ReverseRelationExtension
135
137
 
136
138
  # Narrower
137
- # Actually this is not needed anymore.
139
+ # FIXME: Actually this is not needed anymore.
138
140
  # BUT: the include in scope :tops doesn't work with
139
141
  # 'Iqvoc::Concept.broader_relation_class_name'!?!?! (Rails Bug????)
140
142
  has_many :narrower_relations,
@@ -226,26 +228,26 @@ class Concept::Base < ActiveRecord::Base
226
228
  # ********** Relation Stuff
227
229
 
228
230
  @nested_relations.each do |relation|
229
- accepts_nested_attributes_for relation, :allow_destroy => true, :reject_if => Proc.new {|attrs| attrs[:value].blank? }
231
+ accepts_nested_attributes_for relation, :allow_destroy => true, :reject_if => Proc.new { |attrs| attrs[:value].blank? }
230
232
  end
231
233
 
232
234
  # ********** Scopes
233
235
 
234
- scope :tops, includes(:broader_relations).
235
- where(:concept_relations => {:id => nil})
236
+ scope :tops, where(:top_term => true)
236
237
 
237
238
  scope :broader_tops, includes(:narrower_relations, :pref_labels).
238
- where(:concept_relations => {:id => nil}, :labelings => {:type => Iqvoc::Concept.pref_labeling_class_name}).
239
+ where(:concept_relations => { :id => nil },
240
+ :labelings => { :type => Iqvoc::Concept.pref_labeling_class_name }).
239
241
  order("LOWER(#{Label::Base.table_name}.value)")
240
242
 
241
243
  scope :with_associations, includes([
242
- {:labelings => :target}, :relations, :matches, :notes
244
+ { :labelings => :target }, :relations, :matches, :notes
243
245
  ])
244
246
 
245
247
  scope :with_pref_labels,
246
248
  includes(:pref_labels).
247
249
  order("LOWER(#{Label::Base.table_name}.value)").
248
- where(:labelings => {:type => Iqvoc::Concept.pref_labeling_class_name}) # This line is just a workaround for a Rails Bug. TODO: Delete it when the Bug is fixed
250
+ where(:labelings => { :type => Iqvoc::Concept.pref_labeling_class_name }) # This line is just a workaround for a Rails Bug. TODO: Delete it when the Bug is fixed
249
251
 
250
252
  scope :for_dashboard, lambda {
251
253
  unpublished_or_follow_up.
@@ -331,7 +333,7 @@ class Concept::Base < ActiveRecord::Base
331
333
  def related_concepts_for_relation_class(relation_class, only_published = true)
332
334
  relation_class = relation_class.name if relation_class < ActiveRecord::Base # Use the class name string
333
335
  relations.select { |rel| rel.class.name == relation_class }.map(&:target).
334
- select { |c| c.published? || !only_published }
336
+ select { |c| c.published? || !only_published }
335
337
  end
336
338
 
337
339
  def matches_for_class(match_class)
@@ -390,6 +392,26 @@ class Concept::Base < ActiveRecord::Base
390
392
  end
391
393
  end
392
394
 
395
+ # top term and broader relations are mutually exclusive
396
+ def ensure_exclusive_top_term
397
+ if @full_validation
398
+ if top_term && broader_relations.any?
399
+ errors.add :base, I18n.t("txt.models.concept.top_term_exclusive_error")
400
+ end
401
+ end
402
+ end
403
+
404
+ # top terms must never be used as descendants (narrower relation targets)
405
+ # NB: for top terms themselves, this is covered by `ensure_exclusive_top_term`
406
+ def ensure_rooted_top_terms
407
+ if @full_validation
408
+ if narrower_relations.includes(:target). # XXX: inefficient?
409
+ select { |rel| rel.target.top_term? }.any?
410
+ errors.add :base, I18n.t("txt.models.concept.top_term_rooted_error")
411
+ end
412
+ end
413
+ end
414
+
393
415
  def ensure_a_pref_label_in_the_primary_thesaurus_language
394
416
  if @full_validation
395
417
  labels = pref_labels.select{|l| l.published?}
@@ -0,0 +1,46 @@
1
+ # encoding: UTF-8
2
+
3
+ # Copyright 2011 innoQ Deutschland GmbH
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'singleton'
18
+
19
+ # virtual root node
20
+ # NB:
21
+ # * does not inherit from Concept::Base to avoid being included in all
22
+ # queries based on that class, including indirect ones (e.g. relations)
23
+ # * persistence (i.e. a database record) is not required since this is a
24
+ # singleton and merely a static, virtual node
25
+ class Concept::SKOS::Scheme
26
+ include Singleton
27
+
28
+ def self.rdf_class
29
+ :ConceptScheme
30
+ end
31
+
32
+ def self.rdf_namespace
33
+ :skos
34
+ end
35
+
36
+ def origin
37
+ :scheme
38
+ end
39
+
40
+ def build_rdf_subject(document, controller, &block)
41
+ ns = IqRdf::Namespace.find_namespace_class(self.class.rdf_namespace.to_sym)
42
+ raise "Namespace '#{rdf_namespace}' is not defined in IqRdf document." unless ns
43
+ IqRdf.build_uri(origin, ns.build_uri(self.class.rdf_class), &block)
44
+ end
45
+
46
+ end
@@ -63,7 +63,7 @@ class Labeling::SKOS::Base < Labeling::Base
63
63
  end
64
64
  end
65
65
  scope = scope.includes(:owner)
66
-
66
+
67
67
  scope = case params[:for]
68
68
  when "concept"
69
69
  scope.where("concepts.type" => Iqvoc::Concept.base_class_name).merge(Concept::Base.published)
@@ -73,7 +73,7 @@ class Labeling::SKOS::Base < Labeling::Base
73
73
  # no additional conditions
74
74
  scope
75
75
  end
76
-
76
+
77
77
  scope
78
78
  end
79
79
 
@@ -84,7 +84,7 @@ class Labeling::SKOS::Base < Labeling::Base
84
84
  def self.build_from_rdf(subject, predicate, object)
85
85
  raise "Labeling::SKOS::Base#build_from_rdf: Subject (#{subject}) must be a Concept." unless subject.is_a?(Concept::Base)
86
86
  raise "Labeling::SKOS::Base#build_from_rdf: Object (#{object}) must be a string literal" unless object =~ /^"(.+)"(@(.+))$/
87
-
87
+
88
88
  lang = $3
89
89
  value = JSON.parse(%Q{["#{$1}"]})[0].gsub("\\n", "\n") # Trick to decode \uHHHHH chars
90
90
 
@@ -25,7 +25,7 @@ class Note::SKOS::Base < Note::Base
25
25
  unless object =~ /^"(.+)"(@(.+))$/
26
26
  raise "Note::SKOS::Base#build_from_rdf: Object (#{object}) must be a string literal"
27
27
  end
28
-
28
+
29
29
  lang = $3
30
30
  value = JSON.parse(%Q{["#{$1}"]})[0].gsub("\\n", "\n") # Trick to decode \uHHHHH chars
31
31
 
@@ -21,11 +21,11 @@ class Note::SKOS::ChangeNote < Note::SKOS::Base
21
21
  def self.edit_partial_name(obj)
22
22
  "partials/note/skos/edit_change_note"
23
23
  end
24
-
24
+
25
25
  def self.search_result_partial_name
26
26
  'partials/note/skos/change_note/search_result'
27
27
  end
28
-
28
+
29
29
  def self.single_query(params = {})
30
30
  query_str = build_query_string(params)
31
31
 
@@ -22,7 +22,7 @@ module SearchExtension
22
22
  end
23
23
 
24
24
  module ClassMethods
25
-
25
+
26
26
  def multi_query(params = {})
27
27
  query_terms = params[:query].split(/\r\n/)
28
28
  results = []