iqvoc 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +69 -0
- data/Gemfile.lock +134 -0
- data/LICENSE +13 -0
- data/README.md +68 -0
- data/Rakefile +23 -0
- data/app/controllers/application_controller.rb +125 -0
- data/app/controllers/collections/hierarchical_controller.rb +44 -0
- data/app/controllers/collections_controller.rb +124 -0
- data/app/controllers/concepts/alphabetical_controller.rb +39 -0
- data/app/controllers/concepts/hierarchical_controller.rb +74 -0
- data/app/controllers/concepts/untranslated_controller.rb +38 -0
- data/app/controllers/concepts/versions_controller.rb +119 -0
- data/app/controllers/concepts_controller.rb +174 -0
- data/app/controllers/dashboard_controller.rb +43 -0
- data/app/controllers/pages_controller.rb +22 -0
- data/app/controllers/rdf_controller.rb +43 -0
- data/app/controllers/search_results_controller.rb +101 -0
- data/app/controllers/triple_store_syncs_controller.rb +45 -0
- data/app/controllers/user_sessions_controller.rb +48 -0
- data/app/controllers/users_controller.rb +81 -0
- data/app/helpers/application_helper.rb +60 -0
- data/app/helpers/concepts_helper.rb +86 -0
- data/app/helpers/dashboard_helper.rb +46 -0
- data/app/helpers/rdf_helper.rb +63 -0
- data/app/helpers/search_results_helper.rb +32 -0
- data/app/models/collection/base.rb +161 -0
- data/app/models/collection/member/base.rb +23 -0
- data/app/models/collection/member/collection.rb +33 -0
- data/app/models/collection/member/concept.rb +33 -0
- data/app/models/collection/unordered.rb +18 -0
- data/app/models/concept/base.rb +418 -0
- data/app/models/concept/relation/base.rb +95 -0
- data/app/models/concept/relation/reverse_relation_extension.rb +49 -0
- data/app/models/concept/relation/skos/base.rb +37 -0
- data/app/models/concept/relation/skos/broader/base.rb +41 -0
- data/app/models/concept/relation/skos/broader/mono.rb +28 -0
- data/app/models/concept/relation/skos/broader/poly.rb +23 -0
- data/app/models/concept/relation/skos/narrower/base.rb +37 -0
- data/app/models/concept/relation/skos/related.rb +21 -0
- data/app/models/concept/skos/base.rb +28 -0
- data/app/models/label/base.rb +98 -0
- data/app/models/label/skos/base.rb +27 -0
- data/app/models/labeling/base.rb +81 -0
- data/app/models/labeling/skos/alt_label.rb +21 -0
- data/app/models/labeling/skos/base.rb +99 -0
- data/app/models/labeling/skos/hidden_label.rb +25 -0
- data/app/models/labeling/skos/pref_label.rb +30 -0
- data/app/models/match/base.rb +57 -0
- data/app/models/match/skos/base.rb +23 -0
- data/app/models/match/skos/broad_match.rb +21 -0
- data/app/models/match/skos/close_match.rb +21 -0
- data/app/models/match/skos/exact_match.rb +21 -0
- data/app/models/match/skos/mapping_relation.rb +21 -0
- data/app/models/match/skos/narrow_match.rb +21 -0
- data/app/models/match/skos/related_match.rb +21 -0
- data/app/models/note/annotated/base.rb +29 -0
- data/app/models/note/base.rb +127 -0
- data/app/models/note/skos/base.rb +52 -0
- data/app/models/note/skos/change_note.rb +38 -0
- data/app/models/note/skos/definition.rb +33 -0
- data/app/models/note/skos/editorial_note.rb +21 -0
- data/app/models/note/skos/example.rb +21 -0
- data/app/models/note/skos/history_note.rb +21 -0
- data/app/models/note/skos/scope_note.rb +21 -0
- data/app/models/origin_mapping.rb +58 -0
- data/app/models/rdf_store.rb +96 -0
- data/app/models/search_extension.rb +58 -0
- data/app/models/user.rb +49 -0
- data/app/models/user_session.rb +23 -0
- data/app/views/collections/_collection.html.erb +10 -0
- data/app/views/collections/_form.html.erb +47 -0
- data/app/views/collections/edit.html.erb +11 -0
- data/app/views/collections/index.html.erb +12 -0
- data/app/views/collections/new.html.erb +7 -0
- data/app/views/collections/show.html.erb +53 -0
- data/app/views/collections/show.iqrdf +22 -0
- data/app/views/concepts/_base_data.html.erb +72 -0
- data/app/views/concepts/_close_match.html.erb +16 -0
- data/app/views/concepts/_show_head.html.erb +23 -0
- data/app/views/concepts/_visualization.html.erb +9 -0
- data/app/views/concepts/alphabetical/_pref_labeling.html.erb +6 -0
- data/app/views/concepts/alphabetical/index.html.erb +17 -0
- data/app/views/concepts/edit.html.erb +32 -0
- data/app/views/concepts/hierarchical/_treeview.html.erb +20 -0
- data/app/views/concepts/hierarchical/index.html.erb +5 -0
- data/app/views/concepts/index.iqrdf +24 -0
- data/app/views/concepts/new.html.erb +3 -0
- data/app/views/concepts/show_published.html.erb +16 -0
- data/app/views/concepts/show_unpublished.html.erb +43 -0
- data/app/views/concepts/untranslated/index.html.erb +23 -0
- data/app/views/dashboard/index.html.erb +47 -0
- data/app/views/errors/access_denied.html.erb +3 -0
- data/app/views/errors/multiple_choices.html.erb +11 -0
- data/app/views/errors/not_found.html.erb +8 -0
- data/app/views/kaminari/_page.html.erb +6 -0
- data/app/views/kaminari/_paginator.html.erb +15 -0
- data/app/views/layouts/_controls.html.erb +37 -0
- data/app/views/layouts/_header.html.erb +1 -0
- data/app/views/layouts/_navigation.html.erb +27 -0
- data/app/views/layouts/_sections.html.erb +8 -0
- data/app/views/layouts/application.html.erb +83 -0
- data/app/views/pages/about.html.erb +77 -0
- data/app/views/partials/_rdf_logo.html.erb +4 -0
- data/app/views/partials/collection/_member.html.erb +14 -0
- data/app/views/partials/collection_label/_search_result.html.erb +5 -0
- data/app/views/partials/concept/_edit_link_base.html.erb +4 -0
- data/app/views/partials/concept/_inline_base.html.erb +4 -0
- data/app/views/partials/concept/_new_link_base.html.erb +4 -0
- data/app/views/partials/concept/relation/_base.html.erb +8 -0
- data/app/views/partials/concept/relation/_edit_base.html.erb +15 -0
- data/app/views/partials/concept/relation/skos/_narrower.html.erb +12 -0
- data/app/views/partials/concept/relation/skos/broader/_mono.html.erb +28 -0
- data/app/views/partials/concept/relation/skos/broader/_poly.html.erb +14 -0
- data/app/views/partials/labeling/skos/_base.html.erb +17 -0
- data/app/views/partials/labeling/skos/_edit_base.html.erb +7 -0
- data/app/views/partials/labeling/skos/_search_result.html.erb +12 -0
- data/app/views/partials/match/_base.html.erb +13 -0
- data/app/views/partials/match/_edit_base.html.erb +6 -0
- data/app/views/partials/note/_base.html.erb +15 -0
- data/app/views/partials/note/_edit_base.html.erb +28 -0
- data/app/views/partials/note/_note.html.erb +14 -0
- data/app/views/partials/note/_search_result.html.erb +8 -0
- data/app/views/partials/note/skos/_edit_change_note.html.erb +47 -0
- data/app/views/partials/note/skos/definition/_search_result.html.erb +8 -0
- data/app/views/rdf/show_concept.iqrdf +5 -0
- data/app/views/search_results/_head_contents.html.erb +4 -0
- data/app/views/search_results/_rdf_links.html.erb +4 -0
- data/app/views/search_results/index.html.erb +92 -0
- data/app/views/search_results/index.iqrdf +33 -0
- data/app/views/triple_store_syncs/new.html.erb +7 -0
- data/app/views/user_sessions/new.html.erb +11 -0
- data/app/views/users/_form.html.erb +45 -0
- data/app/views/users/_user_preference.html.erb +12 -0
- data/app/views/users/edit.html.erb +14 -0
- data/app/views/users/index.html.erb +29 -0
- data/app/views/users/new.html.erb +13 -0
- data/config/application.rb +82 -0
- data/config/boot.rb +29 -0
- data/config/database.template.yml +43 -0
- data/config/database.yml +40 -0
- data/config/deploy/common.rb +79 -0
- data/config/deploy/ec2.rb +43 -0
- data/config/deploy/history.rb +29 -0
- data/config/deploy/innoq.rb +37 -0
- data/config/deploy.rb +72 -0
- data/config/engine.rb +25 -0
- data/config/environment.rb +21 -0
- data/config/environments/development.rb +74 -0
- data/config/environments/production.rb +65 -0
- data/config/environments/production.template.rb +65 -0
- data/config/environments/production_internal.rb +65 -0
- data/config/environments/test.rb +51 -0
- data/config/initializers/action_view.rb +23 -0
- data/config/initializers/active_record.rb +18 -0
- data/config/initializers/backtrace_silencers.rb +23 -0
- data/config/initializers/inflections.rb +26 -0
- data/config/initializers/iqvoc.rb +50 -0
- data/config/initializers/jdbc.rb +23 -0
- data/config/initializers/kaminari_config.rb +8 -0
- data/config/initializers/language.rb +6 -0
- data/config/initializers/mime_types.rb +24 -0
- data/config/initializers/secret_token.rb +29 -0
- data/config/initializers/secret_token.rb.template +29 -0
- data/config/initializers/session_store.rb +24 -0
- data/config/locales/activerecord.de.yml +135 -0
- data/config/locales/activerecord.en.yml +135 -0
- data/config/locales/authlogic.de.yml +38 -0
- data/config/locales/authlogic.en.yml +38 -0
- data/config/locales/de.yml +326 -0
- data/config/locales/defaults.de.yml +153 -0
- data/config/locales/en.yml +332 -0
- data/config/routes.rb +53 -0
- data/config/warble.rb +158 -0
- data/db/iqvoc_test.sqlite3 +0 -0
- data/db/migrate/20100927101502_create_schema.rb +174 -0
- data/db/migrate/20101125141218_add_collection_tables.rb +32 -0
- data/db/migrate/20101129161528_add_type_to_collections.rb +24 -0
- data/db/migrate/20101202094602_add_origin_to_collections.rb +25 -0
- data/db/migrate/20101202135420_rename_collection_contents_to_collection_members.rb +25 -0
- data/db/migrate/20101208103531_add_type_to_collection_contents.rb +27 -0
- data/db/migrate/20101210153916_add_indexes_to_collections.rb +25 -0
- data/db/migrate/20110204121244_create_collection_labels.rb +32 -0
- data/db/migrate/20110208084250_change_origin_lengths.rb +27 -0
- data/db/migrate/20110328124300_discard_collection_specifics.rb +27 -0
- data/db/migrate/20110408120357_remove_classifications_and_classifiers.rb +32 -0
- data/db/migrate/20110408120740_remove_xl_specfic_stuff.rb +39 -0
- data/db/migrate/20110420133640_change_value_in_notes.rb +8 -0
- data/db/migrate/20110427120534_add_published_at_to_labels.rb +9 -0
- data/db/migrate/20110510162719_use_mono_hierarchy_instead_of_poly_hierarchy.rb +13 -0
- data/db/migrate/20110512132624_extend_notes_value_field_length.rb +8 -0
- data/db/migrate/20110525103100_separate_note_annotation_predicates.rb +38 -0
- data/db/migrate/20110615134040_change_umt_note_annotations_to_dct.rb +9 -0
- data/db/schema.rb +127 -0
- data/db/seeds.rb +37 -0
- data/iqvoc.gemspec +27 -0
- data/lib/engine_tasks/assets.rake +49 -0
- data/lib/engine_tasks/db.rake +18 -0
- data/lib/engine_tasks/release.rake +118 -0
- data/lib/iqvoc/ability.rb +44 -0
- data/lib/iqvoc/data_helper.rb +27 -0
- data/lib/iqvoc/deep_cloning.rb +92 -0
- data/lib/iqvoc/rdf_helper.rb +67 -0
- data/lib/iqvoc/skos_importer.rb +144 -0
- data/lib/iqvoc/version.rb +19 -0
- data/lib/iqvoc/versioning.rb +151 -0
- data/lib/iqvoc.rb +228 -0
- data/lib/maker.rb +144 -0
- data/lib/ojdbc14.jar +0 -0
- data/lib/string.rb +23 -0
- data/lib/tasks/importer.rake +16 -0
- data/lib/tasks/jdbc.rake +24 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/iqvoc/add.png +0 -0
- data/public/images/iqvoc/arrow_down.gif +0 -0
- data/public/images/iqvoc/arrow_up.gif +0 -0
- data/public/images/iqvoc/footer.png +0 -0
- data/public/images/iqvoc/go_there.png +0 -0
- data/public/images/iqvoc/header.png +0 -0
- data/public/images/iqvoc/header_long.png +0 -0
- data/public/images/iqvoc/iqvoc.png +0 -0
- data/public/images/iqvoc/note_add.png +0 -0
- data/public/images/iqvoc/note_delete.png +0 -0
- data/public/images/iqvoc/note_edit.png +0 -0
- data/public/images/iqvoc/ok.png +0 -0
- data/public/images/iqvoc/rails.png +0 -0
- data/public/images/iqvoc/rdf_flyer.gif +0 -0
- data/public/images/iqvoc/red_arrow.png +0 -0
- data/public/images/iqvoc/remove.png +0 -0
- data/public/images/iqvoc/shadow.png +0 -0
- data/public/images/iqvoc/spinner.gif +0 -0
- data/public/images/iqvoc/tokenizer_delete.png +0 -0
- data/public/images/iqvoc/tokenizer_pencile.png +0 -0
- data/public/images/iqvoc/tokenizer_show.png +0 -0
- data/public/images/iqvoc/unfinished.png +0 -0
- data/public/javascripts/iqvoc/application.js +123 -0
- data/public/javascripts/iqvoc/entityselect.js +121 -0
- data/public/javascripts/iqvoc/excanvas.js +35 -0
- data/public/javascripts/iqvoc/iqvoc.js +118 -0
- data/public/javascripts/iqvoc/jit_rgraph.js +153 -0
- data/public/javascripts/iqvoc/jquery-1.6.2.min.js +18 -0
- data/public/javascripts/iqvoc/jquery-treeview/changelog.txt +29 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/async.html +44 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/bg.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/demo.js +43 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/images.html +56 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/index.html +340 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/large.html +559 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/prerendered.html +621 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/screen.css +24 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/simple.html +82 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/source.php +87 -0
- data/public/javascripts/iqvoc/jquery-treeview/demo/source.phps +87 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/ajax-loader.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/file.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/folder-closed.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/folder.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/minus.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/plus.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red-line.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red.gif +0 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.async.js +82 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.css +75 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.js +251 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.min.js +15 -0
- data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.pack.js +16 -0
- data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.cookie.js +92 -0
- data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.js +3363 -0
- data/public/javascripts/iqvoc/jquery-treeview/todo +8 -0
- data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.js +3229 -0
- data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.min.js +163 -0
- data/public/javascripts/iqvoc/jquery-ui.datepicker-de.js +22 -0
- data/public/javascripts/iqvoc/json2.js +480 -0
- data/public/javascripts/iqvoc/langselect.js +73 -0
- data/public/javascripts/iqvoc/rails.js +132 -0
- data/public/javascripts/iqvoc/storage.js +122 -0
- data/public/javascripts/iqvoc/visualization.js +321 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/iqvoc/blueprint/ie.css +35 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/key.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/readme.txt +32 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/buttons/screen.css +97 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/screen.css +71 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/readme.txt +18 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/screen.css +40 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/rtl/readme.txt +10 -0
- data/public/stylesheets/iqvoc/blueprint/plugins/rtl/screen.css +110 -0
- data/public/stylesheets/iqvoc/blueprint/print.css +29 -0
- data/public/stylesheets/iqvoc/blueprint/screen.css +258 -0
- data/public/stylesheets/iqvoc/blueprint/src/forms.css +65 -0
- data/public/stylesheets/iqvoc/blueprint/src/grid.css +280 -0
- data/public/stylesheets/iqvoc/blueprint/src/grid.png +0 -0
- data/public/stylesheets/iqvoc/blueprint/src/ie.css +76 -0
- data/public/stylesheets/iqvoc/blueprint/src/print.css +85 -0
- data/public/stylesheets/iqvoc/blueprint/src/reset.css +45 -0
- data/public/stylesheets/iqvoc/blueprint/src/typography.css +106 -0
- data/public/stylesheets/iqvoc/forms.css +71 -0
- data/public/stylesheets/iqvoc/images/back.png +0 -0
- data/public/stylesheets/iqvoc/images/branch.png +0 -0
- data/public/stylesheets/iqvoc/images/categ.png +0 -0
- data/public/stylesheets/iqvoc/images/categ_open.png +0 -0
- data/public/stylesheets/iqvoc/images/go_there.png +0 -0
- data/public/stylesheets/iqvoc/images/iqvoc.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_end.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_end_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_mid.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_mid_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_nothing.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_only.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_only_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_top.png +0 -0
- data/public/stylesheets/iqvoc/images/leaf_top_filled.png +0 -0
- data/public/stylesheets/iqvoc/images/nothing.png +0 -0
- data/public/stylesheets/iqvoc/images/top_01.png +0 -0
- data/public/stylesheets/iqvoc/images/trunk.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_217bc0_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_469bdd_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_6da8d5_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
- data/public/stylesheets/iqvoc/iqvoc.css +477 -0
- data/public/stylesheets/iqvoc/jquery-ui-1.8.13.custom.css +415 -0
- data/public/stylesheets/iqvoc/widgets.css +81 -0
- data/test/factories.rb +74 -0
- data/test/integration/alphabetical_test.rb +53 -0
- data/test/integration/authentication_test.rb +41 -0
- data/test/integration/browse_concepts_and_labels_test.rb +61 -0
- data/test/integration/browse_static_pages_test.rb +29 -0
- data/test/integration/client_augmentation_test.rb +42 -0
- data/test/integration/client_edit_concept_test.rb +72 -0
- data/test/integration/collection_circularity_test.rb +110 -0
- data/test/integration/concept_test.rb +61 -0
- data/test/integration/edit_concepts_test.rb +40 -0
- data/test/integration/note_annotations_test.rb +86 -0
- data/test/integration/search_test.rb +205 -0
- data/test/integration/tree_test.rb +31 -0
- data/test/integration/untranslated_test.rb +60 -0
- data/test/integration_test_helper.rb +45 -0
- data/test/performance/browsing_test.rb +25 -0
- data/test/test_helper.rb +29 -0
- data/test/unit/concept_test.rb +93 -0
- data/test/unit/note_test.rb +32 -0
- data/test/unit/origin_mapping_test.rb +70 -0
- data/test/unit/skos_import_test.rb +100 -0
- metadata +522 -0
data/config/warble.rb
ADDED
@@ -0,0 +1,158 @@
|
|
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
|
+
# Disable automatic framework detection by uncommenting/setting to false
|
18
|
+
# Warbler.framework_detection = false
|
19
|
+
|
20
|
+
# Warbler web application assembly configuration file
|
21
|
+
Warbler::Config.new do |config|
|
22
|
+
# Features: additional options controlling how the jar is built.
|
23
|
+
# Currently the following features are supported:
|
24
|
+
# - gemjar: package the gem repository in a jar file in WEB-INF/lib
|
25
|
+
# - executable: embed a web server and make the war executable
|
26
|
+
# - compiled: compile .rb files to .class files
|
27
|
+
# config.features = %w(gemjar)
|
28
|
+
|
29
|
+
# Application directories to be included in the webapp.
|
30
|
+
config.dirs = %w(app config lib log vendor tmp)
|
31
|
+
|
32
|
+
# Additional files/directories to include, above those in config.dirs
|
33
|
+
# config.includes = FileList["db"]
|
34
|
+
|
35
|
+
# Additional files/directories to exclude
|
36
|
+
# config.excludes = FileList["lib/tasks/*"]
|
37
|
+
|
38
|
+
# Additional Java .jar files to include. Note that if .jar files are placed
|
39
|
+
# in lib (and not otherwise excluded) then they need not be mentioned here.
|
40
|
+
# JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
|
41
|
+
# own versions if you directly set the value
|
42
|
+
# config.java_libs += FileList["lib/java/*.jar"]
|
43
|
+
|
44
|
+
# Loose Java classes and miscellaneous files to be included.
|
45
|
+
# config.java_classes = FileList["target/classes/**.*"]
|
46
|
+
|
47
|
+
# One or more pathmaps defining how the java classes should be copied into
|
48
|
+
# the archive. The example pathmap below accompanies the java_classes
|
49
|
+
# configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
|
50
|
+
# for details of how to specify a pathmap.
|
51
|
+
# config.pathmaps.java_classes << "%{target/classes/,}p"
|
52
|
+
|
53
|
+
# Bundler support is built-in. If Warbler finds a Gemfile in the
|
54
|
+
# project directory, it will be used to collect the gems to bundle
|
55
|
+
# in your application. If you wish to explicitly disable this
|
56
|
+
# functionality, uncomment here.
|
57
|
+
# config.bundler = false
|
58
|
+
|
59
|
+
# An array of Bundler groups to avoid including in the war file.
|
60
|
+
# Defaults to ["development", "test"].
|
61
|
+
# config.bundle_without = []
|
62
|
+
|
63
|
+
# Other gems to be included. If you don't use Bundler or a gemspec
|
64
|
+
# file, you need to tell Warbler which gems your application needs
|
65
|
+
# so that they can be packaged in the archive.
|
66
|
+
# For Rails applications, the Rails gems are included by default
|
67
|
+
# unless the vendor/rails directory is present.
|
68
|
+
# config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"]
|
69
|
+
# config.gems << "tzinfo"
|
70
|
+
|
71
|
+
# Uncomment this if you don't want to package rails gem.
|
72
|
+
# config.gems -= ["rails"]
|
73
|
+
|
74
|
+
# The most recent versions of gems are used.
|
75
|
+
# You can specify versions of gems by using a hash assignment:
|
76
|
+
# config.gems["rails"] = "2.3.10"
|
77
|
+
|
78
|
+
# You can also use regexps or Gem::Dependency objects for flexibility or
|
79
|
+
# finer-grained control.
|
80
|
+
# config.gems << /^merb-/
|
81
|
+
# config.gems << Gem::Dependency.new("merb-core", "= 0.9.3")
|
82
|
+
|
83
|
+
# Include gem dependencies not mentioned specifically. Default is
|
84
|
+
# true, uncomment to turn off.
|
85
|
+
# config.gem_dependencies = false
|
86
|
+
|
87
|
+
# Array of regular expressions matching relative paths in gems to be
|
88
|
+
# excluded from the war. Defaults to empty, but you can set it like
|
89
|
+
# below, which excludes test files.
|
90
|
+
# config.gem_excludes = [/^(test|spec)\//]
|
91
|
+
|
92
|
+
# Pathmaps for controlling how application files are copied into the archive
|
93
|
+
# config.pathmaps.application = ["WEB-INF/%p"]
|
94
|
+
|
95
|
+
# Name of the archive (without the extension). Defaults to the basename
|
96
|
+
# of the project directory.
|
97
|
+
# config.jar_name = "mywar"
|
98
|
+
|
99
|
+
# Name of the MANIFEST.MF template for the war file. Defaults to a simple
|
100
|
+
# MANIFEST.MF that contains the version of Warbler used to create the war file.
|
101
|
+
# config.manifest_file = "config/MANIFEST.MF"
|
102
|
+
|
103
|
+
# When using the 'compiled' feature and specified, only these Ruby
|
104
|
+
# files will be compiled. Default is to compile all \.rb files in
|
105
|
+
# the application.
|
106
|
+
# config.compiled_ruby_files = FileList['app/**/*.rb']
|
107
|
+
|
108
|
+
# === War files only below here ===
|
109
|
+
|
110
|
+
# Path to the pre-bundled gem directory inside the war file. Default
|
111
|
+
# is 'WEB-INF/gems'. Specify path if gems are already bundled
|
112
|
+
# before running Warbler. This also sets 'gem.path' inside web.xml.
|
113
|
+
# config.gem_path = "WEB-INF/vendor/bundler_gems"
|
114
|
+
|
115
|
+
# Files for WEB-INF directory (next to web.xml). This contains
|
116
|
+
# web.xml by default. If there is an .erb-File it will be processed
|
117
|
+
# with webxml-config. You may want to exclude this file via
|
118
|
+
# config.excludes.
|
119
|
+
# config.webinf_files += FileList["jboss-web.xml"]
|
120
|
+
|
121
|
+
# Files to be included in the root of the webapp. Note that files in public
|
122
|
+
# will have the leading 'public/' part of the path stripped during staging.
|
123
|
+
# config.public_html = FileList["public/**/*", "doc/**/*"]
|
124
|
+
|
125
|
+
# Pathmaps for controlling how public HTML files are copied into the .war
|
126
|
+
# config.pathmaps.public_html = ["%{public/,}p"]
|
127
|
+
|
128
|
+
# Value of RAILS_ENV for the webapp -- default as shown below
|
129
|
+
config.webxml.rails.env = ENV['RAILS_ENV'] || 'production'
|
130
|
+
|
131
|
+
# Application booter to use, one of :rack, :rails, or :merb (autodetected by default)
|
132
|
+
# config.webxml.booter = :rails
|
133
|
+
|
134
|
+
# Set JRuby to run in 1.9 mode.
|
135
|
+
# config.webxml.jruby.compat.version = "1.9"
|
136
|
+
|
137
|
+
# When using the :rack booter, "Rackup" script to use.
|
138
|
+
# - For 'rackup.path', the value points to the location of the rackup
|
139
|
+
# script in the web archive file. You need to make sure this file
|
140
|
+
# gets included in the war, possibly by adding it to config.includes
|
141
|
+
# or config.webinf_files above.
|
142
|
+
# - For 'rackup', the rackup script you provide as an inline string
|
143
|
+
# is simply embedded in web.xml.
|
144
|
+
# The script is evaluated in a Rack::Builder to load the application.
|
145
|
+
# Examples:
|
146
|
+
# config.webxml.rackup.path = 'WEB-INF/hello.ru'
|
147
|
+
# config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
|
148
|
+
# config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
|
149
|
+
|
150
|
+
# Control the pool of Rails runtimes. Leaving unspecified means
|
151
|
+
# the pool will grow as needed to service requests. It is recommended
|
152
|
+
# that you fix these values when running a production server!
|
153
|
+
config.webxml.jruby.min.runtimes = 2
|
154
|
+
config.webxml.jruby.max.runtimes = 4
|
155
|
+
|
156
|
+
# JNDI data source name
|
157
|
+
# config.webxml.jndi = 'jdbc/rails'
|
158
|
+
end
|
Binary file
|
@@ -0,0 +1,174 @@
|
|
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
|
+
class CreateSchema < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
create_table "classifications", :force => true do |t|
|
20
|
+
t.integer "owner_id"
|
21
|
+
t.integer "target_id"
|
22
|
+
t.datetime "created_at"
|
23
|
+
t.datetime "updated_at"
|
24
|
+
end
|
25
|
+
|
26
|
+
add_index "classifications", ["owner_id", "target_id"], :name => "ix_classifications_fk"
|
27
|
+
|
28
|
+
create_table "classifiers", :force => true do |t|
|
29
|
+
t.string "title"
|
30
|
+
t.string "description"
|
31
|
+
t.string "notation"
|
32
|
+
t.datetime "created_at"
|
33
|
+
t.datetime "updated_at"
|
34
|
+
end
|
35
|
+
|
36
|
+
add_index "classifiers", ["notation"], :name => "ix_classifiers_on_notation"
|
37
|
+
|
38
|
+
create_table "concept_relations", :force => true do |t|
|
39
|
+
t.string "type"
|
40
|
+
t.integer "owner_id"
|
41
|
+
t.integer "target_id"
|
42
|
+
t.datetime "created_at"
|
43
|
+
t.datetime "updated_at"
|
44
|
+
end
|
45
|
+
|
46
|
+
add_index "concept_relations", ["owner_id", "target_id"], :name => "ix_concept_relations_fk"
|
47
|
+
|
48
|
+
create_table "concepts", :force => true do |t|
|
49
|
+
t.string "type"
|
50
|
+
t.string "origin"
|
51
|
+
t.integer "rev", :default => 1
|
52
|
+
t.date "published_at"
|
53
|
+
t.integer "published_version_id"
|
54
|
+
t.integer "locked_by"
|
55
|
+
t.date "expired_at"
|
56
|
+
t.date "follow_up"
|
57
|
+
t.boolean "to_review"
|
58
|
+
t.date "rdf_updated_at"
|
59
|
+
t.datetime "created_at"
|
60
|
+
t.datetime "updated_at"
|
61
|
+
end
|
62
|
+
|
63
|
+
add_index "concepts", ["origin"], :name => "ix_concepts_on_origin"
|
64
|
+
add_index "concepts", ["published_version_id"], :name => "ix_concepts_publ_version_id"
|
65
|
+
|
66
|
+
create_table "label_relations", :force => true do |t|
|
67
|
+
t.string "type"
|
68
|
+
t.integer "domain_id"
|
69
|
+
t.integer "range_id"
|
70
|
+
t.datetime "created_at"
|
71
|
+
t.datetime "updated_at"
|
72
|
+
end
|
73
|
+
|
74
|
+
add_index "label_relations", ["domain_id", "range_id", "type"], :name => "ix_label_relations_fk_type"
|
75
|
+
add_index "label_relations", ["type"], :name => "ix_label_relations_on_type"
|
76
|
+
|
77
|
+
create_table "labelings", :force => true do |t|
|
78
|
+
t.string "type"
|
79
|
+
t.integer "owner_id"
|
80
|
+
t.integer "target_id"
|
81
|
+
t.datetime "created_at"
|
82
|
+
t.datetime "updated_at"
|
83
|
+
end
|
84
|
+
|
85
|
+
add_index "labelings", ["owner_id", "target_id", "type"], :name => "ix_labelings_fk_type"
|
86
|
+
add_index "labelings", ["type"], :name => "ix_labelings_on_type"
|
87
|
+
|
88
|
+
create_table "labels", :force => true do |t|
|
89
|
+
t.string "type"
|
90
|
+
t.string "origin"
|
91
|
+
t.string "language"
|
92
|
+
t.string "value", :limit => 1024
|
93
|
+
t.integer "rev", :default => 1
|
94
|
+
t.integer "published_version_id"
|
95
|
+
t.date "published_at"
|
96
|
+
t.integer "locked_by"
|
97
|
+
t.date "expired_at"
|
98
|
+
t.date "follow_up"
|
99
|
+
t.boolean "to_review"
|
100
|
+
t.date "rdf_updated_at"
|
101
|
+
t.datetime "created_at"
|
102
|
+
t.datetime "updated_at"
|
103
|
+
end
|
104
|
+
|
105
|
+
add_index "labels", ["language"], :name => "ix_labels_on_language"
|
106
|
+
add_index "labels", ["origin"], :name => "ix_labels_on_origin"
|
107
|
+
add_index "labels", ["value"], :name => "ix_labels_on_value"
|
108
|
+
add_index "labels", ["published_version_id"], :name => "ix_labels_published_version_id"
|
109
|
+
|
110
|
+
create_table "matches", :force => true do |t|
|
111
|
+
t.integer "concept_id"
|
112
|
+
t.string "type"
|
113
|
+
t.string "value"
|
114
|
+
t.datetime "created_at"
|
115
|
+
t.datetime "updated_at"
|
116
|
+
end
|
117
|
+
|
118
|
+
add_index "matches", ["concept_id", "type"], :name => "ix_matches_fk_type"
|
119
|
+
add_index "matches", ["type"], :name => "ix_matches_on_type"
|
120
|
+
|
121
|
+
create_table "note_annotations", :force => true do |t|
|
122
|
+
t.integer "note_id"
|
123
|
+
t.string "identifier", :limit => 50
|
124
|
+
t.string "value", :limit => 1024
|
125
|
+
t.datetime "created_at"
|
126
|
+
t.datetime "updated_at"
|
127
|
+
end
|
128
|
+
|
129
|
+
add_index "note_annotations", ["note_id"], :name => "ix_note_annotations_fk"
|
130
|
+
|
131
|
+
create_table "notes", :force => true do |t|
|
132
|
+
t.string "language", :limit => 2
|
133
|
+
t.string "value", :limit => 1024
|
134
|
+
t.string "type", :limit => 50
|
135
|
+
t.datetime "created_at"
|
136
|
+
t.datetime "updated_at"
|
137
|
+
t.integer "owner_id"
|
138
|
+
t.string "owner_type", :null => false
|
139
|
+
end
|
140
|
+
|
141
|
+
add_index "notes", ["owner_id", "owner_type", "type"], :name => "ix_notes_fk_type"
|
142
|
+
add_index "notes", ["language"], :name => "ix_notes_on_language"
|
143
|
+
add_index "notes", ["type"], :name => "ix_notes_on_type"
|
144
|
+
|
145
|
+
create_table "users", :force => true do |t|
|
146
|
+
t.string "forename"
|
147
|
+
t.string "surname"
|
148
|
+
t.string "email"
|
149
|
+
t.string "crypted_password"
|
150
|
+
t.boolean "active"
|
151
|
+
t.datetime "created_at"
|
152
|
+
t.datetime "updated_at"
|
153
|
+
t.string "password_salt"
|
154
|
+
t.string "persistence_token"
|
155
|
+
t.string "perishable_token"
|
156
|
+
t.string "role"
|
157
|
+
t.string "telephone_number"
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
def self.down
|
162
|
+
drop_table "classifications"
|
163
|
+
drop_table "classifiers"
|
164
|
+
drop_table "concept_relations"
|
165
|
+
drop_table "concepts"
|
166
|
+
drop_table "label_relations"
|
167
|
+
drop_table "labelings"
|
168
|
+
drop_table "labels"
|
169
|
+
drop_table "matches"
|
170
|
+
drop_table "note_annotations"
|
171
|
+
drop_table "notes"
|
172
|
+
drop_table "users"
|
173
|
+
end
|
174
|
+
end
|
@@ -0,0 +1,32 @@
|
|
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
|
+
class AddCollectionTables < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
create_table :collections, :force => true do |t|
|
20
|
+
end
|
21
|
+
|
22
|
+
create_table :collection_contents, :force => true do |t|
|
23
|
+
t.integer :collection_id
|
24
|
+
t.integer :concept_id
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.down
|
29
|
+
drop_table :collections
|
30
|
+
drop_table :collection_contents
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,24 @@
|
|
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
|
+
class AddTypeToCollections < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
add_column :collections, :type, :string
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.down
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,25 @@
|
|
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
|
+
class AddOriginToCollections < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
add_column :collections, :origin, :string
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.down
|
23
|
+
remove_column :collections, :origin if column_exists? :collections, :origin
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
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
|
+
class RenameCollectionContentsToCollectionMembers < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
rename_table(:collection_contents, :collection_members)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.down
|
23
|
+
rename_table(:collection_members, :collection_contents)
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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
|
+
class AddTypeToCollectionContents < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
rename_column :collection_members, :concept_id, :target_id
|
20
|
+
add_column :collection_members, :type, :string
|
21
|
+
Collection::Member::Base.update_all(:type => 'Collection::Member::Concept')
|
22
|
+
Collection::Base.update_all(:type => 'Collection::Base')
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.down
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,25 @@
|
|
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
|
+
class AddIndexesToCollections < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
add_index :collections, [:origin, :type], :name => "ix_collections_origin_type"
|
20
|
+
add_index :collection_members, [:collection_id, :target_id, :type], :name => "ix_collections_fk_type"
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.down
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,32 @@
|
|
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
|
+
class CreateCollectionLabels < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
create_table :collection_labels, :force => true do |t|
|
20
|
+
t.references :collection
|
21
|
+
t.string :value
|
22
|
+
t.string :language
|
23
|
+
t.timestamps
|
24
|
+
end
|
25
|
+
|
26
|
+
add_index :collection_labels, :collection_id, :name => 'ix_collection_labels_fk'
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.down
|
30
|
+
drop_table :collection_labels
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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
|
+
class ChangeOriginLengths < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
change_column :concepts, :origin, :string, :limit => 4000
|
20
|
+
change_column :labels, :origin, :string, :limit => 4000
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.down
|
24
|
+
change_column :concepts, :origin, :string, :limit => 255
|
25
|
+
change_column :labels, :origin, :string, :limit => 255
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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
|
+
class DiscardCollectionSpecifics < ActiveRecord::Migration
|
18
|
+
def self.up
|
19
|
+
drop_table :collections
|
20
|
+
drop_table :collection_labels
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.down
|
24
|
+
create_table :collections
|
25
|
+
create_table :collection_labels
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class RemoveClassificationsAndClassifiers < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def self.up
|
4
|
+
drop_table "classifications"
|
5
|
+
drop_table "classifiers"
|
6
|
+
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
|
11
|
+
create_table "classifications", :force => true do |t|
|
12
|
+
t.integer "owner_id"
|
13
|
+
t.integer "target_id"
|
14
|
+
t.datetime "created_at"
|
15
|
+
t.datetime "updated_at"
|
16
|
+
end
|
17
|
+
|
18
|
+
add_index "classifications", ["owner_id", "target_id"], :name => "ix_classifications_fk"
|
19
|
+
|
20
|
+
create_table "classifiers", :force => true do |t|
|
21
|
+
t.string "title"
|
22
|
+
t.string "description"
|
23
|
+
t.string "notation"
|
24
|
+
t.datetime "created_at"
|
25
|
+
t.datetime "updated_at"
|
26
|
+
end
|
27
|
+
|
28
|
+
add_index "classifiers", ["notation"], :name => "ix_classifiers_on_notation"
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class RemoveXlSpecficStuff < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def self.up
|
4
|
+
drop_table "label_relations"
|
5
|
+
|
6
|
+
remove_column :labels, "rev"
|
7
|
+
remove_column :labels, "published_version_id"
|
8
|
+
remove_column :labels, "published_at"
|
9
|
+
remove_column :labels, "locked_by"
|
10
|
+
remove_column :labels, "expired_at"
|
11
|
+
remove_column :labels, "follow_up"
|
12
|
+
remove_column :labels, "to_review"
|
13
|
+
remove_column :labels, "rdf_updated_at"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.down
|
17
|
+
add_column :labels, "rev", :integer, :default => 1
|
18
|
+
add_column :labels, "published_version_id", :integer
|
19
|
+
add_column :labels, "published_at", :date
|
20
|
+
add_column :labels, "locked_by", :integer
|
21
|
+
add_column :labels, "expired_at", :date
|
22
|
+
add_column :labels, "follow_up", :date
|
23
|
+
add_column :labels, "to_review", :boolean
|
24
|
+
add_column :labels, "rdf_updated_at", :date
|
25
|
+
|
26
|
+
create_table "label_relations", :force => true do |t|
|
27
|
+
t.string "type"
|
28
|
+
t.integer "domain_id"
|
29
|
+
t.integer "range_id"
|
30
|
+
t.datetime "created_at"
|
31
|
+
t.datetime "updated_at"
|
32
|
+
end
|
33
|
+
|
34
|
+
add_index "label_relations", ["domain_id", "range_id", "type"], :name => "index_label_relations_on_domain_id_and_range_id_and_type"
|
35
|
+
add_index "label_relations", ["type"], :name => "index_label_relations_on_type"
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|