wontomedia 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +661 -0
- data/COPYING.DOCUMENTATION +450 -0
- data/LICENSE +661 -0
- data/README.markdown +56 -0
- data/Rakefile +185 -0
- data/VERSION.yml +4 -0
- data/app/controllers/admin_controller.rb +144 -0
- data/app/controllers/application_controller.rb +29 -0
- data/app/controllers/connections_controller.rb +150 -0
- data/app/controllers/items_controller.rb +365 -0
- data/app/helpers/connections_helper.rb +67 -0
- data/app/helpers/format_helper.rb +154 -0
- data/app/helpers/items_helper.rb +105 -0
- data/app/models/category_item.rb +23 -0
- data/app/models/connection.rb +210 -0
- data/app/models/individual_item.rb +23 -0
- data/app/models/item.rb +86 -0
- data/app/models/property_item.rb +23 -0
- data/app/models/qualified_item.rb +23 -0
- data/app/views/admin/index.html.erb +74 -0
- data/app/views/connections/_index_outbound_links.html.erb +48 -0
- data/app/views/connections/_spo_select_controls.html.erb +151 -0
- data/app/views/connections/edit.html.erb +70 -0
- data/app/views/connections/index.html.erb +84 -0
- data/app/views/connections/new.html.erb +61 -0
- data/app/views/connections/show.html.erb +110 -0
- data/app/views/items/_active_content.html.erb +26 -0
- data/app/views/items/_content_examples.html.erb +55 -0
- data/app/views/items/_core_tasks.html.erb +23 -0
- data/app/views/items/_form_fields.html.erb +69 -0
- data/app/views/items/_list_outbound_links.html.erb +58 -0
- data/app/views/items/_screen_select.html.erb +24 -0
- data/app/views/items/_show_outbound_links.html.erb +70 -0
- data/app/views/items/_topic_list.html.erb +26 -0
- data/app/views/items/_type_select.html.erb +47 -0
- data/app/views/items/edit.html.erb +63 -0
- data/app/views/items/index.html.erb +74 -0
- data/app/views/items/new.html.erb +124 -0
- data/app/views/items/newpop.html.erb +58 -0
- data/app/views/items/show.html.erb +209 -0
- data/app/views/layouts/_amazon_ads.html.erb +55 -0
- data/app/views/layouts/_glossary_help_box.html.erb +43 -0
- data/app/views/layouts/_google_ads.html.erb +40 -0
- data/app/views/layouts/_language_select.html.erb +24 -0
- data/app/views/layouts/_login_controls.html.erb +24 -0
- data/app/views/layouts/_master_help.html.erb +24 -0
- data/app/views/layouts/_navigation_menu.html.erb +39 -0
- data/app/views/layouts/_search_box.html.erb +27 -0
- data/app/views/layouts/_status_msgs.html.erb +25 -0
- data/app/views/layouts/application.html.erb +67 -0
- data/app/views/layouts/base.html.erb +93 -0
- data/app/views/layouts/home.html.erb +67 -0
- data/app/views/layouts/popup.html.erb +23 -0
- data/assets/wontomedia-sample.rb +47 -0
- data/config/asset_packages.yml +44 -0
- data/config/boot.rb +110 -0
- data/config/cucumber.yml +65 -0
- data/config/database-mysql-development.yml +47 -0
- data/config/database-mysql.yml +26 -0
- data/config/environment.rb +94 -0
- data/config/environments/cucumber.rb +29 -0
- data/config/environments/development.rb +26 -0
- data/config/environments/production.rb +33 -0
- data/config/environments/test.rb +31 -0
- data/config/initializers/inflections.rb +19 -0
- data/config/initializers/mime_types.rb +14 -0
- data/config/initializers/new_rails_defaults.rb +26 -0
- data/config/locales/en.yml +14 -0
- data/config/routes.rb +37 -0
- data/db/fixtures/connections.yml +96 -0
- data/db/fixtures/items.yml +277 -0
- data/db/migrate/20090312212805_create_items.rb +31 -0
- data/db/migrate/20090406221320_create_connections.rb +32 -0
- data/db/migrate/20090411014503_add_type_for_item_subclasses.rb +29 -0
- data/db/migrate/20090415142152_rename_item_type.rb +31 -0
- data/db/migrate/20090518022918_rename_object_and_self.rb +33 -0
- data/db/migrate/20090529171442_add_flags_to_items.rb +27 -0
- data/db/migrate/20090529171508_add_flags_to_connections.rb +27 -0
- data/db/migrate/20090605213800_flags_columns_not_null.rb +29 -0
- data/db/migrate/20090605215028_flags_columns_default_zero.rb +29 -0
- data/db/schema.rb +30 -0
- data/default-custom/app/views/items/_home_extern_list.html.erb +32 -0
- data/default-custom/app/views/items/_home_introductory_text.html.erb +70 -0
- data/default-custom/app/views/items/home.html.erb +77 -0
- data/default-custom/public/images/logo.png +0 -0
- data/default-custom/public/images/logo.svg +74 -0
- data/default-custom/public/stylesheets/wm.css +301 -0
- data/doc/README.markdown +44 -0
- data/doc/README_FOR_APP +82 -0
- data/doc/customization.markdown +93 -0
- data/doc/scripts/rake-customize.markdown +83 -0
- data/lib/helpers/connection_helper.rb +41 -0
- data/lib/helpers/item_helper.rb +141 -0
- data/lib/helpers/tripple_navigation.rb +158 -0
- data/lib/tasks/cucumber.rake +83 -0
- data/lib/tasks/customize.rake +70 -0
- data/lib/tasks/db.rake +65 -0
- data/lib/tasks/javascript_testing_tasks.rake +176 -0
- data/public/404.html +50 -0
- data/public/422.html +50 -0
- data/public/500.html +53 -0
- data/public/dispatch.cgi +20 -0
- data/public/dispatch.fcgi +34 -0
- data/public/dispatch.rb +20 -0
- data/public/favicon.ico +0 -0
- data/public/images/blank_error_icon.png +0 -0
- data/public/images/blank_status_icon.png +0 -0
- data/public/images/error_error_icon.png +0 -0
- data/public/images/error_status_icon.png +0 -0
- data/public/images/good_status_icon.png +0 -0
- data/public/images/help_icon.png +0 -0
- data/public/images/twitter_icon.png +0 -0
- data/public/images/warn_error_icon.png +0 -0
- data/public/images/working_status_icon.gif +0 -0
- data/public/javascripts/application.js +56 -0
- data/public/javascripts/controls.js +963 -0
- data/public/javascripts/dragdrop.js +973 -0
- data/public/javascripts/effects.js +1128 -0
- data/public/javascripts/event.simulate.js +64 -0
- data/public/javascripts/fancybox.js +43 -0
- data/public/javascripts/forConnectionsForms.js +218 -0
- data/public/javascripts/forItemsForms.js +511 -0
- data/public/javascripts/itemCreatePopup.js +115 -0
- data/public/javascripts/itemTitleToName.js +119 -0
- data/public/javascripts/jquery.js +4376 -0
- data/public/javascripts/modalbox.js +502 -0
- data/public/javascripts/prototype.js +4320 -0
- data/public/javascripts/reconcileJQueryAndPrototype.js +19 -0
- data/public/robots.txt +7 -0
- data/public/stylesheets/blank.gif +0 -0
- data/public/stylesheets/fancy_close.png +0 -0
- data/public/stylesheets/fancy_loading.png +0 -0
- data/public/stylesheets/fancy_nav_left.png +0 -0
- data/public/stylesheets/fancy_nav_right.png +0 -0
- data/public/stylesheets/fancy_shadow_e.png +0 -0
- data/public/stylesheets/fancy_shadow_n.png +0 -0
- data/public/stylesheets/fancy_shadow_ne.png +0 -0
- data/public/stylesheets/fancy_shadow_nw.png +0 -0
- data/public/stylesheets/fancy_shadow_s.png +0 -0
- data/public/stylesheets/fancy_shadow_se.png +0 -0
- data/public/stylesheets/fancy_shadow_sw.png +0 -0
- data/public/stylesheets/fancy_shadow_w.png +0 -0
- data/public/stylesheets/fancy_title_left.png +0 -0
- data/public/stylesheets/fancy_title_main.png +0 -0
- data/public/stylesheets/fancy_title_over.png +0 -0
- data/public/stylesheets/fancy_title_right.png +0 -0
- data/public/stylesheets/fancybox.css +333 -0
- data/public/stylesheets/modalbox.css +110 -0
- data/public/stylesheets/scaffold.css +36 -0
- data/public/stylesheets/spinner.gif +0 -0
- data/script/about +4 -0
- data/script/console +3 -0
- data/script/cucumber +10 -0
- data/script/dbconsole +3 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/performance/request +3 -0
- data/script/plugin +3 -0
- data/script/process/inspector +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/vendor/plugins/asset_packager/CHANGELOG +122 -0
- data/vendor/plugins/asset_packager/README +178 -0
- data/vendor/plugins/asset_packager/Rakefile +22 -0
- data/vendor/plugins/asset_packager/about.yml +8 -0
- data/vendor/plugins/asset_packager/init.rb +2 -0
- data/vendor/plugins/asset_packager/install.rb +1 -0
- data/vendor/plugins/asset_packager/lib/jsmin.rb +205 -0
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package.rb +212 -0
- data/vendor/plugins/asset_packager/lib/synthesis/asset_package_helper.rb +39 -0
- data/vendor/plugins/asset_packager/tasks/asset_packager_tasks.rake +23 -0
- data/vendor/plugins/asset_packager/test/asset_package_helper_development_test.rb +100 -0
- data/vendor/plugins/asset_packager/test/asset_package_helper_production_test.rb +140 -0
- data/vendor/plugins/asset_packager/test/asset_packager_test.rb +92 -0
- data/vendor/plugins/asset_packager/test/asset_packages.yml +20 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/application.js +2 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/bar.js +4 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/controls.js +815 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/dragdrop.js +913 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/effects.js +958 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/foo.js +4 -0
- data/vendor/plugins/asset_packager/test/assets/javascripts/prototype.js +2006 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/bar.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/foo.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/header.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/screen.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/bar.css +16 -0
- data/vendor/plugins/asset_packager/test/assets/stylesheets/subdir/foo.css +16 -0
- metadata +265 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
# Edit at your own peril - it's recommended to regenerate this file
|
2
|
+
# in the future when you upgrade to a newer version of Cucumber.
|
3
|
+
|
4
|
+
# IMPORTANT: Setting config.cache_classes to false is known to
|
5
|
+
# break Cucumber's use_transactional_fixtures method.
|
6
|
+
# For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165
|
7
|
+
config.cache_classes = true
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.action_controller.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Disable request forgery protection in test environment
|
17
|
+
config.action_controller.allow_forgery_protection = false
|
18
|
+
|
19
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
20
|
+
# The :test delivery method accumulates sent emails in the
|
21
|
+
# ActionMailer::Base.deliveries array.
|
22
|
+
config.action_mailer.delivery_method = :test
|
23
|
+
|
24
|
+
config.gem 'cucumber-rails', :lib => false, :version => '>=0.2.4' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
|
25
|
+
config.gem 'database_cleaner', :lib => false, :version => '>=0.4.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
|
26
|
+
config.gem 'webrat', :lib => false, :version => '>=0.6.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))
|
27
|
+
config.gem 'rspec', :lib => false, :version => '>=1.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))
|
28
|
+
config.gem 'rspec-rails', :lib => false, :version => '>=1.3.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
|
29
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# !!!!! This file was auto-generated by "ruby rails wontomedia" IF
|
2
|
+
# !!!!! YOU MODIFY IT, you *MUST* replace this notice with a WontoMedia
|
3
|
+
# !!!!! copyright attribute (get from policy/copyright-notices/header.rb)
|
4
|
+
# !!!!! *AND* remove the name of this file from the copyright checking
|
5
|
+
# !!!!! ignore list (policy/copyright-notice-ignore) *BEFORE*
|
6
|
+
# !!!!! submitting to any version control that feeds back to the
|
7
|
+
# !!!!! WontoMedia project.
|
8
|
+
|
9
|
+
|
10
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
11
|
+
|
12
|
+
# In the development environment your application's code is reloaded on
|
13
|
+
# every request. This slows down response time but is perfect for development
|
14
|
+
# since you don't have to restart the webserver when you make code changes.
|
15
|
+
config.cache_classes = false
|
16
|
+
|
17
|
+
# Log error messages when you accidentally call methods on nil.
|
18
|
+
config.whiny_nils = true
|
19
|
+
|
20
|
+
# Show full error reports and disable caching
|
21
|
+
config.action_controller.consider_all_requests_local = true
|
22
|
+
config.action_view.debug_rjs = true
|
23
|
+
config.action_controller.perform_caching = false
|
24
|
+
|
25
|
+
# Don't care if the mailer can't send
|
26
|
+
config.action_mailer.raise_delivery_errors = false
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# !!!!! This file was auto-generated by "ruby rails wontomedia" IF
|
2
|
+
# !!!!! YOU MODIFY IT, you *MUST* replace this notice with a WontoMedia
|
3
|
+
# !!!!! copyright attribute (get from policy/copyright-notices/header.rb)
|
4
|
+
# !!!!! *AND* remove the name of this file from the copyright checking
|
5
|
+
# !!!!! ignore list (policy/copyright-notice-ignore) *BEFORE*
|
6
|
+
# !!!!! submitting to any version control that feeds back to the
|
7
|
+
# !!!!! WontoMedia project.
|
8
|
+
|
9
|
+
|
10
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
11
|
+
|
12
|
+
# The production environment is meant for finished, "live" apps.
|
13
|
+
# Code is not reloaded between requests
|
14
|
+
config.cache_classes = true
|
15
|
+
|
16
|
+
# Enable threaded mode
|
17
|
+
# config.threadsafe!
|
18
|
+
|
19
|
+
# Use a different logger for distributed setups
|
20
|
+
# config.logger = SyslogLogger.new
|
21
|
+
|
22
|
+
# Full error reports are disabled and caching is turned on
|
23
|
+
config.action_controller.consider_all_requests_local = false
|
24
|
+
config.action_controller.perform_caching = true
|
25
|
+
|
26
|
+
# Use a different cache store in production
|
27
|
+
# config.cache_store = :mem_cache_store
|
28
|
+
|
29
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
30
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
31
|
+
|
32
|
+
# Disable delivery errors, bad email addresses will be ignored
|
33
|
+
# config.action_mailer.raise_delivery_errors = false
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# !!!!! This file was auto-generated by "ruby rails wontomedia" IF
|
2
|
+
# !!!!! YOU MODIFY IT, you *MUST* replace this notice with a WontoMedia
|
3
|
+
# !!!!! copyright attribute (get from policy/copyright-notices/header.rb)
|
4
|
+
# !!!!! *AND* remove the name of this file from the copyright checking
|
5
|
+
# !!!!! ignore list (policy/copyright-notice-ignore) *BEFORE*
|
6
|
+
# !!!!! submitting to any version control that feeds back to the
|
7
|
+
# !!!!! WontoMedia project.
|
8
|
+
|
9
|
+
|
10
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
11
|
+
|
12
|
+
# The test environment is used exclusively to run your application's
|
13
|
+
# test suite. You never need to work with it otherwise. Remember that
|
14
|
+
# your test database is "scratch space" for the test suite and is wiped
|
15
|
+
# and recreated between test runs. Don't rely on the data there!
|
16
|
+
config.cache_classes = true
|
17
|
+
|
18
|
+
# Log error messages when you accidentally call methods on nil.
|
19
|
+
config.whiny_nils = true
|
20
|
+
|
21
|
+
# Show full error reports and disable caching
|
22
|
+
config.action_controller.consider_all_requests_local = true
|
23
|
+
config.action_controller.perform_caching = false
|
24
|
+
|
25
|
+
# Disable request forgery protection in test environment
|
26
|
+
config.action_controller.allow_forgery_protection = false
|
27
|
+
|
28
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
29
|
+
# The :test delivery method accumulates sent emails in the
|
30
|
+
# ActionMailer::Base.deliveries array.
|
31
|
+
config.action_mailer.delivery_method = :test
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# !!!!! This file was auto-generated by "ruby rails wontomedia" IF
|
2
|
+
# !!!!! YOU MODIFY IT, you *MUST* replace this notice with a WontoMedia
|
3
|
+
# !!!!! copyright attribute (get from policy/copyright-notices/header.rb)
|
4
|
+
# !!!!! *AND* remove the name of this file from the copyright checking
|
5
|
+
# !!!!! ignore list (policy/copyright-notice-ignore) *BEFORE*
|
6
|
+
# !!!!! submitting to any version control that feeds back to the
|
7
|
+
# !!!!! WontoMedia project.
|
8
|
+
|
9
|
+
|
10
|
+
# Be sure to restart your server when you modify this file.
|
11
|
+
|
12
|
+
# Add new inflection rules using the following format
|
13
|
+
# (all these examples are active by default):
|
14
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
15
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
16
|
+
# inflect.singular /^(ox)en/i, '\1'
|
17
|
+
# inflect.irregular 'person', 'people'
|
18
|
+
# inflect.uncountable %w( fish sheep )
|
19
|
+
# end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# !!!!! This file was auto-generated by "ruby rails wontomedia" IF
|
2
|
+
# !!!!! YOU MODIFY IT, you *MUST* replace this notice with a WontoMedia
|
3
|
+
# !!!!! copyright attribute (get from policy/copyright-notices/header.rb)
|
4
|
+
# !!!!! *AND* remove the name of this file from the copyright checking
|
5
|
+
# !!!!! ignore list (policy/copyright-notice-ignore) *BEFORE*
|
6
|
+
# !!!!! submitting to any version control that feeds back to the
|
7
|
+
# !!!!! WontoMedia project.
|
8
|
+
|
9
|
+
|
10
|
+
# Be sure to restart your server when you modify this file.
|
11
|
+
|
12
|
+
# Add new mime types for use in respond_to blocks:
|
13
|
+
# Mime::Type.register "text/richtext", :rtf
|
14
|
+
# Mime::Type.register_alias "text/html", :iphone
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# !!!!! This file was auto-generated by "ruby rails wontomedia" IF
|
2
|
+
# !!!!! YOU MODIFY IT, you *MUST* replace this notice with a WontoMedia
|
3
|
+
# !!!!! copyright attribute (get from policy/copyright-notices/header.rb)
|
4
|
+
# !!!!! *AND* remove the name of this file from the copyright checking
|
5
|
+
# !!!!! ignore list (policy/copyright-notice-ignore) *BEFORE*
|
6
|
+
# !!!!! submitting to any version control that feeds back to the
|
7
|
+
# !!!!! WontoMedia project.
|
8
|
+
|
9
|
+
|
10
|
+
# These settings change the behavior of Rails 2 apps and will be defaults
|
11
|
+
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
12
|
+
|
13
|
+
if defined?(ActiveRecord)
|
14
|
+
# Include Active Record class name as root for JSON serialized output.
|
15
|
+
ActiveRecord::Base.include_root_in_json = true
|
16
|
+
|
17
|
+
# Store the full class name (including module namespace) in STI type column.
|
18
|
+
ActiveRecord::Base.store_full_sti_class = true
|
19
|
+
end
|
20
|
+
|
21
|
+
# Use ISO 8601 format for JSON serialized times and dates.
|
22
|
+
ActiveSupport.use_standard_json_time_format = true
|
23
|
+
|
24
|
+
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
25
|
+
# if you're including raw json in an HTML page.
|
26
|
+
ActiveSupport.escape_html_entities_in_json = false
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# !!!!! This file was auto-generated by "ruby rails wontomedia" IF
|
2
|
+
# !!!!! YOU MODIFY IT, you *MUST* replace this notice with a WontoMedia
|
3
|
+
# !!!!! copyright attribute (get from policy/copyright-notices/header.rb)
|
4
|
+
# !!!!! *AND* remove the name of this file from the copyright checking
|
5
|
+
# !!!!! ignore list (policy/copyright-notice-ignore) *BEFORE*
|
6
|
+
# !!!!! submitting to any version control that feeds back to the
|
7
|
+
# !!!!! WontoMedia project.
|
8
|
+
|
9
|
+
|
10
|
+
# Sample localization file for English. Add more files in this directory for other locales.
|
11
|
+
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
12
|
+
|
13
|
+
en:
|
14
|
+
hello: "Hello world"
|
data/config/routes.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
|
19
|
+
ActionController::Routing::Routes.draw do |map|
|
20
|
+
map.admin_index '/admin', :controller => 'admin', :action => 'index'
|
21
|
+
map.admin_item_up '/admin/item_up', :controller => 'admin',
|
22
|
+
:action => 'item_up'
|
23
|
+
map.admin_connection_up '/admin/connection_up', :controller => 'admin',
|
24
|
+
:action => 'connection_up'
|
25
|
+
|
26
|
+
map.items_lookup '/items/lookup', :controller => :items, :action => :lookup
|
27
|
+
map.itemCreatePopup '/items/new-pop',
|
28
|
+
:controller => :items, :action => :newpop
|
29
|
+
map.resources :items
|
30
|
+
|
31
|
+
map.resources :connections
|
32
|
+
map.root :controller => "items", :action => "home"
|
33
|
+
|
34
|
+
# Install the default routes as the lowest priority.
|
35
|
+
# map.connect ':controller/:action/:id'
|
36
|
+
# map.connect ':controller/:action/:id.:format'
|
37
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
|
19
|
+
define_sub_property_of:
|
20
|
+
subject: sub_property_of
|
21
|
+
predicate: sub_property_of
|
22
|
+
obj: hierarchical_relationship
|
23
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
24
|
+
|
25
|
+
define_inverse_relationship:
|
26
|
+
subject: inverse_relationship
|
27
|
+
predicate: sub_property_of
|
28
|
+
obj: symmetric_relationship
|
29
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
30
|
+
|
31
|
+
define_parent_of:
|
32
|
+
subject: parent_of
|
33
|
+
predicate: sub_property_of
|
34
|
+
obj: hierarchical_relationship
|
35
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
36
|
+
|
37
|
+
define_child_of:
|
38
|
+
subject: child_of
|
39
|
+
predicate: sub_property_of
|
40
|
+
obj: hierarchical_relationship
|
41
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
42
|
+
|
43
|
+
define_parent_to_child_symmetry:
|
44
|
+
subject: parent_of
|
45
|
+
predicate: inverse_relationship
|
46
|
+
obj: child_of
|
47
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
48
|
+
|
49
|
+
define_child_to_parent_symmetry:
|
50
|
+
subject: child_of
|
51
|
+
predicate: inverse_relationship
|
52
|
+
obj: parent_of
|
53
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
54
|
+
|
55
|
+
define_peer_of:
|
56
|
+
subject: peer_of
|
57
|
+
predicate: sub_property_of
|
58
|
+
obj: symmetric_relationship
|
59
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
60
|
+
|
61
|
+
define_one_of:
|
62
|
+
subject: one_of
|
63
|
+
predicate: sub_property_of
|
64
|
+
obj: child_of
|
65
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
66
|
+
|
67
|
+
define_contains:
|
68
|
+
subject: contains
|
69
|
+
predicate: sub_property_of
|
70
|
+
obj: parent_of
|
71
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
72
|
+
|
73
|
+
define_predecessor_to_successor_symmetry:
|
74
|
+
subject: predecessor_of
|
75
|
+
predicate: inverse_relationship
|
76
|
+
obj: successor_of
|
77
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
78
|
+
|
79
|
+
define_successor_to_predecessor_symmetry:
|
80
|
+
subject: successor_of
|
81
|
+
predicate: inverse_relationship
|
82
|
+
obj: predecessor_of
|
83
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
84
|
+
|
85
|
+
define_predecessor_of:
|
86
|
+
subject: predecessor_of
|
87
|
+
predicate: sub_property_of
|
88
|
+
obj: ordered_relationship
|
89
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
90
|
+
|
91
|
+
define_successor_of:
|
92
|
+
subject: successor_of
|
93
|
+
predicate: sub_property_of
|
94
|
+
obj: ordered_relationship
|
95
|
+
flags: <%= Connection::DATA_IS_UNALTERABLE %>
|
96
|
+
|
@@ -0,0 +1,277 @@
|
|
1
|
+
# WontoMedia - a wontology web application
|
2
|
+
# Copyright (C) 2010 - Glen E. Ivey
|
3
|
+
# www.wontology.com
|
4
|
+
#
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU Affero General Public License version
|
7
|
+
# 3 as published by the Free Software Foundation.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU Affero General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program in the file COPYING and/or LICENSE. If not,
|
16
|
+
# see <http://www.gnu.org/licenses/>.
|
17
|
+
|
18
|
+
|
19
|
+
# "item" schema: name, sti_type, title, description
|
20
|
+
|
21
|
+
|
22
|
+
#### Minimal set of types (predicates) for connections
|
23
|
+
#### this is WontoMedia's native "schema", and represents the minimal
|
24
|
+
#### typing information used by the UI
|
25
|
+
|
26
|
+
|
27
|
+
# relationships we expect ontology-contributors to use
|
28
|
+
peer_of:
|
29
|
+
name: peer_of
|
30
|
+
sti_type: PropertyItem
|
31
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
32
|
+
title: Peer Of (basic relationship)
|
33
|
+
description: >-
|
34
|
+
A relationship of this type between two items indicates a
|
35
|
+
relationship between equals. This would be appropriate, for
|
36
|
+
example, as a description of the "synonym" relationship that might
|
37
|
+
occur between the entries for two words in a thesaurus.
|
38
|
+
WontoMedia makes two assumptions about individuals that have a
|
39
|
+
Peer-Of relationship to each other. First, the relationship is
|
40
|
+
assumed to be bidirectional. Saying that "A is a Peer-Of B"
|
41
|
+
implies that "B is a Peer-Of A", and it doesn't matter which of
|
42
|
+
the two "directions" is used when the relationship is first
|
43
|
+
created. Second, when showing the graph of relationships between
|
44
|
+
individuals, WontoMedia will attempt to indicate Peer-Of
|
45
|
+
relationships as primarily horizontal.
|
46
|
+
|
47
|
+
|
48
|
+
one_of:
|
49
|
+
name: one_of
|
50
|
+
sti_type: PropertyItem
|
51
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
52
|
+
title: One Of (basic relationship)
|
53
|
+
description: >-
|
54
|
+
A relationship of this type between two items is hierarchical.
|
55
|
+
This relationship states that the subject (left-hand side) of the
|
56
|
+
relationship ("A" in the relationship "A is One-Of B", and like
|
57
|
+
"macintosh" in "macintosh is One-Of computer") is assumed to be
|
58
|
+
more specific or more narrow than the object of the relationship
|
59
|
+
("B" and "computer"). When showing a graph of connections
|
60
|
+
between items, WontoMedia will attempt to indicate 'One-Of'
|
61
|
+
relationships as primarily vertical, with the object-item drawn
|
62
|
+
nearer "the root" of the graph and the subject-item toward "the
|
63
|
+
leaves".
|
64
|
+
|
65
|
+
'One Of' is most appropriate for showing relationships between an
|
66
|
+
individual and a category. Relationships between two categories
|
67
|
+
are better indicated with 'Child Of', as in "computer is Child-Of
|
68
|
+
electronics" (assuming, of course, that they're both categories).
|
69
|
+
|
70
|
+
'One Of' is itself a child of 'Child Of'. And 'Child Of' is the
|
71
|
+
opposite of 'Parent Of', and finally 'Contains' is a child of
|
72
|
+
'Parent Of'. So, it might be possible to infer that 'One Of' and
|
73
|
+
'Contains' are approximate opposites of each other. However,
|
74
|
+
making a 'One Of' relationship between two items will not
|
75
|
+
automatically cause the symmetric 'Contains' relationship to be
|
76
|
+
created.
|
77
|
+
|
78
|
+
|
79
|
+
contains:
|
80
|
+
name: contains
|
81
|
+
sti_type: PropertyItem
|
82
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
83
|
+
title: Contains (basic relationship)
|
84
|
+
description: >-
|
85
|
+
A relationship of this type between two items is hierarchical.
|
86
|
+
This relationship states that the subject (left-hand side) of the
|
87
|
+
relationship ("A" in the relationship "A Contains B", and like
|
88
|
+
"spacecraft" in "spacecraft Contains apollo") is more general or
|
89
|
+
broad than the object of the relationship ("B" and "apollo").
|
90
|
+
When showing a graph of connections between items, WontoMedia
|
91
|
+
will attempt to indicate 'Contains' relationships as primarily
|
92
|
+
vertical, with the subject-item drawn nearer "the root" of the
|
93
|
+
graph and the object-item toward "the leaves".
|
94
|
+
|
95
|
+
'Contains' is most appropriate for showing relationships between a
|
96
|
+
category and an individual. Relationships between two categories
|
97
|
+
are better indicated with 'Parent Of', as in "vehicle Contains
|
98
|
+
spacecraft" (assuming, of course, that both are categories).
|
99
|
+
|
100
|
+
'Contains' is actually Child-Of 'Parent Of'. 'Parent Of' and
|
101
|
+
'Child Of' are opposites of each other, and 'One Of' is a child of
|
102
|
+
'Child Of'. But this does not make 'Contains' and 'Child Of'
|
103
|
+
opposites of each other, though an approximation of opposite-ness
|
104
|
+
could be inferred. WontoMedia will not automatically cause a
|
105
|
+
'Child Of' relationship to be created when a 'Contains'
|
106
|
+
relationship is.
|
107
|
+
|
108
|
+
|
109
|
+
parent_of:
|
110
|
+
name: parent_of
|
111
|
+
sti_type: PropertyItem
|
112
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
113
|
+
title: Parent Of (basic relationship)
|
114
|
+
description: >-
|
115
|
+
This is the fundamental type of hierarchical relationship. This
|
116
|
+
relationship states that the subject (left-hand side) of the
|
117
|
+
relationship ("A" in the relationship "A is the Parent-Of B", and
|
118
|
+
like "vehicle" in "vehicle is Parent-Of spacecraft") is a
|
119
|
+
super-set of the object of the relationship ("B" and
|
120
|
+
"spacecraft"). When showing a graph of connections between
|
121
|
+
items, WontoMedia will attempt to indicate 'Parent Of'
|
122
|
+
relationships as primarily vertical, with the subject-item drawn
|
123
|
+
nearer "the root" of the graph and the object-item toward "the
|
124
|
+
leaves".
|
125
|
+
|
126
|
+
'Parent Of' is typically appropriate for relationships between two
|
127
|
+
categories or between two individuals. To indicate that a
|
128
|
+
category contains an individual, the more specific 'Contains' can
|
129
|
+
be used.
|
130
|
+
|
131
|
+
'Parent Of' is the opposite of 'Child Of'. Creating a
|
132
|
+
relationship that states one category is 'Parent Of' another is
|
133
|
+
exactly the same as creating a 'Child Of' relationship with the
|
134
|
+
subject and object reversed, and WontoMedia will list the
|
135
|
+
relationship between then using both relationship names (which
|
136
|
+
name is given priority depends on which item is more central to
|
137
|
+
the display).
|
138
|
+
|
139
|
+
|
140
|
+
child_of:
|
141
|
+
name: child_of
|
142
|
+
sti_type: PropertyItem
|
143
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
144
|
+
title: Child Of (basic relationship)
|
145
|
+
description: >-
|
146
|
+
This is the fundamental type of hierarchical relationship. This
|
147
|
+
relationship states that the subject (left-hand side) of the
|
148
|
+
relationship ("A" in the relationship "A is a Child-Of B", and
|
149
|
+
like "spacecraft" in "spacecraft is Child-Of vehicle") is a subset
|
150
|
+
of the object of the relationship ("B" and "vehicle"). When
|
151
|
+
showing a graph of connections between items, WontoMedia will
|
152
|
+
attempt to indicate 'Child Of' relationships as primarily
|
153
|
+
vertical, with the object-item drawn nearer "the root" of the
|
154
|
+
graph and the subject-item toward "the leaves".
|
155
|
+
|
156
|
+
'Child Of' is typically appropriate for relationships between two
|
157
|
+
categories or between two individuals. To indicate that an
|
158
|
+
individual is contained by a category, the more specific 'One Of'
|
159
|
+
can be used.
|
160
|
+
|
161
|
+
'Child Of' is the opposite of 'Parent Of'. Creating a
|
162
|
+
relationship that states one category is 'Child Of' another is
|
163
|
+
exactly the same as creating a 'Parent Of' relationship with the
|
164
|
+
subject and object reversed, and WontoMedia will list the
|
165
|
+
relationship between then using both relationship names (which
|
166
|
+
name is given priority depends on which item is more central to
|
167
|
+
the display).
|
168
|
+
|
169
|
+
|
170
|
+
predecessor_of:
|
171
|
+
name: predecessor_of
|
172
|
+
sti_type: PropertyItem
|
173
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
174
|
+
title: Predecessor Of (basic relationship)
|
175
|
+
description: >-
|
176
|
+
This relationship states that the subject (left-hand side) of the
|
177
|
+
relationship ("A" in the relationship "A is a Predecessor-Of B")
|
178
|
+
precedes the object in some type of ordered sequence or
|
179
|
+
collection.
|
180
|
+
|
181
|
+
|
182
|
+
successor_of:
|
183
|
+
name: successor_of
|
184
|
+
sti_type: PropertyItem
|
185
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
186
|
+
title: Successor Of (basic relationship)
|
187
|
+
description: >-
|
188
|
+
This relationship states that the subject (left-hand side) of the
|
189
|
+
relationship ("N" in the relationship "N is a Successor-Of M")
|
190
|
+
follows the object in some type of ordered sequence or
|
191
|
+
collection.
|
192
|
+
|
193
|
+
|
194
|
+
# relationships grounding those above
|
195
|
+
inverse_relationship:
|
196
|
+
name: inverse_relationship
|
197
|
+
sti_type: PropertyItem
|
198
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
199
|
+
title: Inverse Relationship (basic relationship type)
|
200
|
+
description: >-
|
201
|
+
This relationship is used to characterize how two other
|
202
|
+
relationships relate to each other. This relationship is used to
|
203
|
+
denote that two other relationships are symmetric and inseparable
|
204
|
+
opposites of each other. For example, "Child-Of has
|
205
|
+
Inverse-Relationship to Parent-Of". WontoMedia will interpret any
|
206
|
+
two relationships linked by 'Inverse Relationship' (or by a
|
207
|
+
non-built in relationship that is marked as a 'SubProperty Of'
|
208
|
+
'Inverse Relationship') as being identical antonyms of each
|
209
|
+
other. Any time one relationship is created, WontoMedia will
|
210
|
+
automatically infer, create, and show the matching opposite
|
211
|
+
(inverse) relationship's name.
|
212
|
+
|
213
|
+
|
214
|
+
sub_property_of:
|
215
|
+
name: sub_property_of
|
216
|
+
sti_type: PropertyItem
|
217
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
218
|
+
title: SubProperty Of (basic relationship type)
|
219
|
+
description: >-
|
220
|
+
This relationship is used to relate two other relationships to
|
221
|
+
each other. The statement "A is a SubProperty-Of B" says that the
|
222
|
+
relationship A makes a more specific, narrow claim about items it
|
223
|
+
relates than the relationship B does. However, if WontoMedia has
|
224
|
+
special behavior or handling for relationship B, the 'SubProperty
|
225
|
+
Of' statement allows it to determine it should apply that special
|
226
|
+
behavior to A as well.
|
227
|
+
|
228
|
+
For example, when drawing relationship graphs, WontoMedia attempts
|
229
|
+
to draw all instances of 'Symmetric Relationship" in a primarily
|
230
|
+
horizontal way. There is a built-in statement that "Peer-Of is a
|
231
|
+
SubProperty-Of Symmetric-Relationship", which causes 'Peer Of'
|
232
|
+
relationships to be (preferentially) drawn horizontally, as will
|
233
|
+
be any other types of relationships that are added to an ontology
|
234
|
+
with WontoMedia.
|
235
|
+
|
236
|
+
|
237
|
+
# fundamental property classes; the root of the property universe
|
238
|
+
symmetric_relationship:
|
239
|
+
name: symmetric_relationship
|
240
|
+
sti_type: PropertyItem
|
241
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
242
|
+
title: Symmetric Relationship (root relationship type)
|
243
|
+
description: >-
|
244
|
+
This is a root element in WontoMedia's internal schema. All
|
245
|
+
relationship (property) classes are children of one of three root
|
246
|
+
relationship types, including this one.
|
247
|
+
|
248
|
+
value_relationship:
|
249
|
+
name: value_relationship
|
250
|
+
sti_type: PropertyItem
|
251
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
252
|
+
title: Value Relationship (root relationship type)
|
253
|
+
description: >-
|
254
|
+
This is a root element in WontoMedia's internal schema. All
|
255
|
+
relationship (property) classes are children of one of three root
|
256
|
+
relationship types, including this one.
|
257
|
+
|
258
|
+
hierarchical_relationship:
|
259
|
+
name: hierarchical_relationship
|
260
|
+
sti_type: PropertyItem
|
261
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
262
|
+
title: Hierarchical Relationship (root relationship type)
|
263
|
+
description: >-
|
264
|
+
This is a root element in WontoMedia's internal schema. All
|
265
|
+
relationship (property) classes are children of one of three root
|
266
|
+
relationship types, including this one.
|
267
|
+
|
268
|
+
ordered_relationship:
|
269
|
+
name: ordered_relationship
|
270
|
+
sti_type: PropertyItem
|
271
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
272
|
+
title: Ordered Relationship (root relationship type)
|
273
|
+
description: >-
|
274
|
+
This is a root element in WontoMedia's internal schema.
|
275
|
+
Properties should be made sub_property_of this property if they
|
276
|
+
imply an order between their subject and object. Among other
|
277
|
+
things, this property allows WontoMedia to make UI decisions.
|