iqvoc 4.0.9 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +8 -6
- data/Gemfile.lock +56 -36
- data/README.md +3 -7
- data/app/controllers/concepts/hierarchical_controller.rb +2 -5
- data/app/controllers/concepts/scheme_controller.rb +51 -0
- data/app/controllers/concepts_controller.rb +2 -0
- data/app/controllers/hierarchy_controller.rb +105 -0
- data/app/controllers/rdf_controller.rb +0 -10
- data/app/controllers/user_sessions_controller.rb +5 -1
- data/app/helpers/application_helper.rb +1 -1
- data/app/helpers/concepts_helper.rb +19 -0
- data/app/helpers/rdf_helper.rb +5 -0
- data/app/models/concept/base.rb +10 -1
- data/app/models/concept/relation/skos/base.rb +8 -1
- data/app/models/concept/skos/scheme.rb +54 -13
- data/app/models/concept/validations.rb +2 -2
- data/app/models/labeling/base.rb +8 -0
- data/app/models/labeling/skos/base.rb +0 -8
- data/app/models/notation/base.rb +59 -0
- data/app/views/concepts/_form.html.erb +9 -1
- data/app/views/concepts/scheme/_sidebar.html.erb +6 -0
- data/app/views/concepts/scheme/edit.html.erb +30 -0
- data/app/views/concepts/scheme/show.html.erb +19 -0
- data/app/views/{rdf/scheme.iqrdf → concepts/scheme/show.iqrdf} +0 -0
- data/app/views/hierarchy/show.html.erb +5 -0
- data/app/views/hierarchy/show.iqrdf +24 -0
- data/app/views/partials/notation/_base.html.erb +8 -0
- data/app/views/partials/notation/_edit_base.html.erb +18 -0
- data/config/application.rb +2 -0
- data/config/engine.rb +0 -1
- data/config/initializers/mime_types.rb +2 -2
- data/config/locales/activerecord.de.yml +8 -0
- data/config/locales/activerecord.en.yml +8 -0
- data/config/locales/activerecord.pt.yml +8 -0
- data/config/locales/de.yml +5 -1
- data/config/locales/en.yml +5 -1
- data/config/locales/pt.yml +5 -1
- data/config/routes.rb +35 -32
- data/db/migrate/20130315093255_add_notations.rb +9 -0
- data/db/migrate/20130315141952_add_indexes_to_notations.rb +5 -0
- data/db/schema.rb +9 -1
- data/iqvoc.gemspec +0 -1
- data/lib/generators/app/template.rb +3 -0
- data/lib/iqvoc/ability.rb +3 -1
- data/lib/iqvoc/configuration/concept.rb +10 -1
- data/lib/iqvoc/configuration/core.rb +4 -0
- data/lib/iqvoc/rdfapi.rb +1 -0
- data/lib/iqvoc/skos_importer.rb +14 -7
- data/lib/iqvoc/version.rb +1 -1
- data/test/functional/hierarchy_test.rb +355 -0
- data/test/integration/client_edit_concept_test.rb +1 -1
- data/test/integration/concept_scheme_test.rb +38 -5
- data/test/unit/concept_scheme_test.rb +35 -0
- data/test/unit/skos_import_test.rb +29 -2
- metadata +40 -64
@@ -14,27 +14,39 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
|
17
|
+
class Concept::SKOS::Scheme < Concept::Base
|
18
|
+
private_class_method :new
|
18
19
|
|
19
|
-
|
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
|
20
|
+
after_update :redeclare_top_concepts
|
27
21
|
|
28
22
|
def self.rdf_class
|
29
|
-
|
23
|
+
'ConceptScheme'
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.rdf_predicate
|
27
|
+
'topConceptOf'
|
30
28
|
end
|
31
29
|
|
32
30
|
def self.rdf_namespace
|
33
|
-
|
31
|
+
'skos'
|
34
32
|
end
|
35
33
|
|
36
|
-
def
|
37
|
-
:
|
34
|
+
def self.build_from_rdf(rdf_subject, rdf_predicate, rdf_object)
|
35
|
+
rdf_subject.update_attribute :top_term, true
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.instance
|
39
|
+
first_or_create!(:origin => 'scheme', :published_at => Time.now)
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.create(attributes = nil, options = {}, &block)
|
43
|
+
raise TypeError, "Singleton" if first
|
44
|
+
super
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.create!(attributes = nil, options = {}, &block)
|
48
|
+
raise TypeError, "Singleton" if first
|
49
|
+
super
|
38
50
|
end
|
39
51
|
|
40
52
|
def build_rdf_subject(&block)
|
@@ -43,4 +55,33 @@ class Concept::SKOS::Scheme
|
|
43
55
|
IqRdf.build_uri(origin, ns.build_uri(self.class.rdf_class), &block)
|
44
56
|
end
|
45
57
|
|
58
|
+
def top_concepts
|
59
|
+
Iqvoc::Concept.base_class.tops
|
60
|
+
end
|
61
|
+
|
62
|
+
def inline_top_concept_origins=(origins)
|
63
|
+
@inline_top_concept_origins = origins.to_s.
|
64
|
+
split(Iqvoc::InlineDataHelper::SPLITTER).map(&:strip)
|
65
|
+
end
|
66
|
+
|
67
|
+
def inline_top_concept_origins
|
68
|
+
@inline_top_concept_origins || top_concepts.map { |c| c.origin }.uniq
|
69
|
+
end
|
70
|
+
|
71
|
+
def inline_top_concepts
|
72
|
+
if @inline_top_concept_origins
|
73
|
+
Iqvoc::Concept.base_class.editor_selectable.where(:origin => @inline_top_concept_origins)
|
74
|
+
else
|
75
|
+
top_concepts.select { |c| c.editor_selectable? }
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def redeclare_top_concepts
|
80
|
+
return if inline_top_concept_origins.nil? # There is nothing to do
|
81
|
+
|
82
|
+
Iqvoc::Concept.base_class.transaction do
|
83
|
+
Iqvoc::Concept.base_class.tops.update_all :top_term => false
|
84
|
+
Iqvoc::Concept.base_class.where(:origin => @inline_top_concept_origins).update_all(:top_term => true)
|
85
|
+
end
|
86
|
+
end
|
46
87
|
end
|
@@ -18,11 +18,11 @@ module Concept
|
|
18
18
|
query = Concept::Base.by_origin(origin)
|
19
19
|
existing_total = query.count
|
20
20
|
if existing_total >= 2
|
21
|
-
errors.add :base, I18n.t("txt.models.concept.version_error")
|
21
|
+
errors.add :base, I18n.t("txt.models.concept.version_error", :origin => origin)
|
22
22
|
elsif existing_total == 1
|
23
23
|
unless (query.published.count == 0 and published?) or
|
24
24
|
(query.published.count == 1 and not published?)
|
25
|
-
errors.add :base, I18n.t("txt.models.concept.version_error")
|
25
|
+
errors.add :base, I18n.t("txt.models.concept.version_error", :origin => origin)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
data/app/models/labeling/base.rb
CHANGED
@@ -41,6 +41,14 @@ class Labeling::Base < ActiveRecord::Base
|
|
41
41
|
includes(:owner).merge(Concept::Base.published)
|
42
42
|
end
|
43
43
|
|
44
|
+
def self.concept_expired
|
45
|
+
includes(:owner).merge(Iqvoc::Concept.base_class.expired)
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.concept_not_expired
|
49
|
+
includes(:owner).merge(Iqvoc::Concept.base_class.not_expired)
|
50
|
+
end
|
51
|
+
|
44
52
|
def self.label_published
|
45
53
|
includes(:target).merge(Label::Base.published)
|
46
54
|
end
|
@@ -28,14 +28,6 @@ class Labeling::SKOS::Base < Labeling::Base
|
|
28
28
|
includes(:target).merge(self.label_class.where(:value => label, :language => language))
|
29
29
|
end
|
30
30
|
|
31
|
-
def self.concept_expired
|
32
|
-
includes(:owner).merge(Iqvoc::Concept.base_class.expired)
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.concept_not_expired
|
36
|
-
includes(:owner).merge(Iqvoc::Concept.base_class.not_expired)
|
37
|
-
end
|
38
|
-
|
39
31
|
# ********** Methods
|
40
32
|
|
41
33
|
def self.label_class
|
@@ -0,0 +1,59 @@
|
|
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 Notation::Base < ActiveRecord::Base
|
18
|
+
|
19
|
+
self.table_name = 'notations'
|
20
|
+
|
21
|
+
class_attribute :rdf_namespace, :rdf_predicate
|
22
|
+
self.rdf_namespace = 'skos'
|
23
|
+
self.rdf_predicate = 'notation'
|
24
|
+
|
25
|
+
def self.build_from_rdf(rdf_subject, rdf_predicate, rdf_object)
|
26
|
+
# TODO: Adopt this to RDFAPI
|
27
|
+
data = rdf_object.match /"(?<value>.+)"\^\^<(?<data_type>.+)>/
|
28
|
+
create! :concept_id => rdf_subject.id,
|
29
|
+
:value => data[:value],
|
30
|
+
:data_type => data[:data_type]
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.view_section(obj)
|
34
|
+
"main"
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.view_section_sort_key(obj)
|
38
|
+
500
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.partial_name(obj)
|
42
|
+
"partials/notation/base"
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.edit_partial_name(obj)
|
46
|
+
"partials/notation/edit_base"
|
47
|
+
end
|
48
|
+
|
49
|
+
def build_rdf(document, subject)
|
50
|
+
raise "Notation::Base#build_rdf: Class #{self.name} needs to define self.rdf_namespace and self.rdf_predicate." unless self.rdf_namespace && self.rdf_predicate
|
51
|
+
|
52
|
+
if IqRdf::Namespace.find_namespace_class(self.rdf_namespace.camelcase)
|
53
|
+
subject.send(self.rdf_namespace.camelcase).send(self.rdf_predicate, IqRdf::Literal.new(value, :none, URI.parse(data_type)))
|
54
|
+
else
|
55
|
+
raise "#{self.class}#build_rdf: couldn't find Namespace '#{self.rdf_namespace.camelcase}'."
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -41,7 +41,7 @@
|
|
41
41
|
<legend><%= Concept::Relation::Base.model_name.human(:count => 2) %></legend>
|
42
42
|
<%- if Iqvoc::Concept.broader_relation_class.narrower_editable -%>
|
43
43
|
<%= render Iqvoc::Concept.broader_relation_class.narrower_class.edit_partial_name(concept),
|
44
|
-
:concept => concept, :klass => Iqvoc::Concept.broader_relation_class.narrower_class %>
|
44
|
+
:concept => concept, :klass => Iqvoc::Concept.broader_relation_class.narrower_class, :f => f %>
|
45
45
|
<%- end -%>
|
46
46
|
|
47
47
|
<%= f.input :top_term, :as => :boolean, :input_html =>
|
@@ -57,12 +57,20 @@
|
|
57
57
|
</fieldset>
|
58
58
|
<!-- / Concept relations -->
|
59
59
|
|
60
|
+
<!-- Matches -->
|
60
61
|
<fieldset>
|
61
62
|
<legend><%= Match::Base.model_name.human(:count => 2) %></legend>
|
62
63
|
<% Iqvoc::Concept.match_classes.each do |match_class| %>
|
63
64
|
<%= render match_class.edit_partial_name(concept), :owner_klass => concept, :assoc_klass => match_class, :f => f %>
|
64
65
|
<% end %>
|
65
66
|
</fieldset>
|
67
|
+
<!-- / Matches -->
|
68
|
+
|
69
|
+
<!-- Notations -->
|
70
|
+
<% Iqvoc::Concept.notation_classes.each do |notation_class| %>
|
71
|
+
<%= render notation_class.edit_partial_name(concept), :owner_klass => concept, :assoc_klass => notation_class, :f => f %>
|
72
|
+
<% end %>
|
73
|
+
<!-- / Notations -->
|
66
74
|
|
67
75
|
<div class="form-actions">
|
68
76
|
<%= f.submit t("txt.common.save"), :class => "btn-primary" %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= sidebar do %>
|
2
|
+
<%= sidebar_header t('txt.common.representations') %>
|
3
|
+
<%= sidebar_item :icon => 'share', :text => 'HTML', :path => scheme_path(:format => :html) %>
|
4
|
+
<%= sidebar_item :icon => 'share', :text => 'RDF/XML', :path => rdf_scheme_url(:format => :rdf, :lang => nil), :id => 'rdf_link_xml' %>
|
5
|
+
<%= sidebar_item :icon => 'share', :text => 'RDF/Turtle', :path => rdf_scheme_url(:format => :ttl, :lang => nil), :id => 'rdf_link_ttl' %>
|
6
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<%= page_header :title => @scheme.class.model_name.human %>
|
2
|
+
<%= error_messages_for @scheme %>
|
3
|
+
<%= simple_form_for @scheme, :as => :concept, :url => scheme_path, :html => { :class => 'form-horizontal' } do |f| %>
|
4
|
+
<fieldset>
|
5
|
+
<legend><%= t 'txt.views.layouts.sections.labels' %></legend>
|
6
|
+
<% if not Iqvoc.const_defined?(:SKOSXL) %>
|
7
|
+
<p><%= t 'txt.common.hint_csv_input' %></p>
|
8
|
+
<% end %>
|
9
|
+
<%- Iqvoc::Concept.labeling_classes.each do |labeling_class, languages| -%>
|
10
|
+
<%- languages.each do |language| -%>
|
11
|
+
<%= render labeling_class.edit_partial_name(@scheme), :f => f,
|
12
|
+
:concept => @scheme, :klass => labeling_class, :language => language %>
|
13
|
+
<%- end -%>
|
14
|
+
<%- end -%>
|
15
|
+
</fieldset>
|
16
|
+
<fieldset>
|
17
|
+
<legend><%= Iqvoc::Concept.base_class.model_name.human(:count => 2) %></legend>
|
18
|
+
<%= f.input "concept[inline_top_concept_origins]", :label => t('txt.common.type_to_search') do %>
|
19
|
+
<%= text_field_tag "concept[inline_top_concept_origins]", @scheme.inline_top_concept_origins.join(Iqvoc::InlineDataHelper::JOINER),
|
20
|
+
:class => "entity_select",
|
21
|
+
:"data-query-url" => concepts_path(:format => :json),
|
22
|
+
:"data-entity-uri" => concept_path(:id => "{id}"),
|
23
|
+
:"data-entities" => @scheme.inline_top_concepts.
|
24
|
+
map { |c| concept_widget_data(c) }.to_json %>
|
25
|
+
<% end %>
|
26
|
+
</fieldset>
|
27
|
+
<div class="form-actions">
|
28
|
+
<%= f.submit t("txt.common.save"), :class => "btn-primary" %>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= page_header :title => 'Concept Scheme' %>
|
2
|
+
<%= render 'sidebar', :scheme => @scheme %>
|
3
|
+
|
4
|
+
<% if can? :update, @scheme %>
|
5
|
+
<div class="editing_versioning_toolbar well">
|
6
|
+
<%= link_to t('txt.common.edit'), edit_scheme_path, :class => 'btn' %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% Iqvoc::Concept.labeling_classes.each do |labeling_class, languages| %>
|
11
|
+
<% (languages || Iqvoc.available_languages).each do |lang| %>
|
12
|
+
<%= render labeling_class.partial_name(@scheme), :klass => labeling_class, :concept => @scheme, :lang => lang %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<div class="relation panel">
|
17
|
+
<h3><%= Iqvoc::Concept.base_class.model_name.human(:count => 2) %></h3>
|
18
|
+
<%= treeview @scheme.top_concepts %>
|
19
|
+
</div>
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
1
|
+
hierarchy2rdf = lambda do |hash|
|
2
|
+
hash.each do |concept, rels|
|
3
|
+
document << concept.build_rdf_subject do |sbj|
|
4
|
+
sbj.Skos::topConceptOf IqRdf.build_uri(Iqvoc::Concept.root_class.instance.origin) if concept.top_term?
|
5
|
+
|
6
|
+
concept.pref_labelings.each do |labeling|
|
7
|
+
labeling.build_rdf(document, sbj)
|
8
|
+
end
|
9
|
+
|
10
|
+
rels.each do |relation, _|
|
11
|
+
@relation_class.new(:owner => concept, :target => relation). # XXX: hacky!?
|
12
|
+
build_rdf(document, sbj)
|
13
|
+
end
|
14
|
+
|
15
|
+
hierarchy2rdf.call(rels)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Iqvoc.default_rdf_namespace_helper_methods.each do |meth|
|
21
|
+
document.namespaces(self.send(meth))
|
22
|
+
end
|
23
|
+
|
24
|
+
hierarchy2rdf.call(@concepts)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<fieldset class="note_relation" id="notations_data">
|
2
|
+
<legend><%= Notation::Base.model_name.human(:count => 2) %></legend>
|
3
|
+
<ol>
|
4
|
+
<% owner_klass.notations.each do |notation| %>
|
5
|
+
<%= content_tag(:li, :class => "inline_note #{" new" if notation.new_record?}") do %>
|
6
|
+
<%= f.simple_fields_for :notations, notation do |note_form| %>
|
7
|
+
<%= note_form.input :value, :input_html => { :class => 'span4' } %>
|
8
|
+
<%= note_form.input :data_type, :input_html => { :class => 'span4' } %>
|
9
|
+
|
10
|
+
<% unless notation.new_record? %>
|
11
|
+
<%= note_form.input :"_destroy", :as => :boolean, :label => t("txt.common.delete") %>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
</ol>
|
17
|
+
<input type="button" value="<%= t("txt.common.add_note") %>" class="btn pull-right">
|
18
|
+
</fieldset>
|
data/config/application.rb
CHANGED
data/config/engine.rb
CHANGED
@@ -20,5 +20,5 @@
|
|
20
20
|
# Mime::Type.register "text/richtext", :rtf
|
21
21
|
# Mime::Type.register_alias "text/html", :iphone
|
22
22
|
|
23
|
-
Mime::Type.register "application/xml
|
24
|
-
Mime::Type.register "text/turtle", :ttl
|
23
|
+
Mime::Type.register "application/rdf+xml", :rdf
|
24
|
+
Mime::Type.register "text/turtle", :ttl
|
@@ -41,6 +41,8 @@ de:
|
|
41
41
|
concept/relation/skos/related:
|
42
42
|
one: "Verwandter Begriff"
|
43
43
|
other: "Verwandte Begriffe"
|
44
|
+
concept/skos/scheme:
|
45
|
+
one: "Konzept-Schema"
|
44
46
|
label/skos/base:
|
45
47
|
one: "Label"
|
46
48
|
other: "Labels"
|
@@ -110,6 +112,9 @@ de:
|
|
110
112
|
collection/member/base:
|
111
113
|
one: "Zugewiesene Kollektion"
|
112
114
|
other: "Zugewiesene Kollektionen"
|
115
|
+
notation/base:
|
116
|
+
one: "Notation"
|
117
|
+
other: "Notationen"
|
113
118
|
|
114
119
|
attributes:
|
115
120
|
concept/base:
|
@@ -122,6 +127,9 @@ de:
|
|
122
127
|
language: "Sprache"
|
123
128
|
note/base:
|
124
129
|
value: "Wert"
|
130
|
+
notation/base:
|
131
|
+
value: "Wert"
|
132
|
+
data_type: "Datentyp (URL)"
|
125
133
|
user:
|
126
134
|
forename: "Vorname"
|
127
135
|
surname: "Nachname"
|
@@ -41,6 +41,8 @@ en:
|
|
41
41
|
concept/relation/skos/related:
|
42
42
|
one: "Related term"
|
43
43
|
other: "Related terms"
|
44
|
+
concept/skos/scheme:
|
45
|
+
one: "Concept Scheme"
|
44
46
|
label/skos/base:
|
45
47
|
one: "Label"
|
46
48
|
other: "Labels"
|
@@ -110,6 +112,9 @@ en:
|
|
110
112
|
collection/member/base:
|
111
113
|
one: "Assigned collection"
|
112
114
|
other: "Assigned collections"
|
115
|
+
notation/base:
|
116
|
+
one: "Notation"
|
117
|
+
other: "Notations"
|
113
118
|
|
114
119
|
attributes:
|
115
120
|
concept/base:
|
@@ -122,6 +127,9 @@ en:
|
|
122
127
|
language: "Language"
|
123
128
|
note/base:
|
124
129
|
value: "Value"
|
130
|
+
notation/base:
|
131
|
+
value: "Value"
|
132
|
+
data_type: "Data type (URL)"
|
125
133
|
user:
|
126
134
|
forename: "Forename"
|
127
135
|
surname: "Surname"
|
@@ -41,6 +41,8 @@ pt:
|
|
41
41
|
concept/relation/skos/related:
|
42
42
|
one: "Termo relacionado"
|
43
43
|
other: "Termos relacionados"
|
44
|
+
concept/skos/scheme:
|
45
|
+
one: "esquema de conceito"
|
44
46
|
label/skos/base:
|
45
47
|
one: "Rótulo"
|
46
48
|
other: "Rótulos"
|
@@ -110,6 +112,9 @@ pt:
|
|
110
112
|
collection/member/base:
|
111
113
|
one: "Coleção atribuída"
|
112
114
|
other: "Coleções atribuídas"
|
115
|
+
notation/base:
|
116
|
+
one: "Notação"
|
117
|
+
other: "Notações"
|
113
118
|
|
114
119
|
attributes:
|
115
120
|
concept/base:
|
@@ -122,6 +127,9 @@ pt:
|
|
122
127
|
language: "Idioma"
|
123
128
|
note/base:
|
124
129
|
value: "Valor"
|
130
|
+
notation/base:
|
131
|
+
value: "Valor"
|
132
|
+
data_type: "Tipo de dados (URL)"
|
125
133
|
user:
|
126
134
|
forename: "Primeiro nome"
|
127
135
|
surname: "Sobrenome"
|
data/config/locales/de.yml
CHANGED
@@ -343,6 +343,10 @@ de:
|
|
343
343
|
config_info: "Synchronisierung mit Triplestore: %{target_info}"
|
344
344
|
config_warning: "Bisher wurde kein Triplestore konfiguriert."
|
345
345
|
batch_hint: "Für große Datenmengen sollte vom Systemadministrator `rake sync:all[%{host}]` ausgeführt werden."
|
346
|
+
concept_scheme:
|
347
|
+
save:
|
348
|
+
success: "Das Konzept-Schema wurde erfolgreich gespeichert."
|
349
|
+
error: "Das Konzept-Schema konnte nicht gespeichert werden."
|
346
350
|
|
347
351
|
models:
|
348
352
|
label:
|
@@ -351,7 +355,7 @@ de:
|
|
351
355
|
concept:
|
352
356
|
uri: "Konzept-URI"
|
353
357
|
origin_error: "Origin ungültig!"
|
354
|
-
version_error: "Es existieren schon zwei Versionen dieses Konzepts"
|
358
|
+
version_error: "Es existieren schon zwei Versionen dieses Konzepts: %{origin}"
|
355
359
|
no_pref_label_error: "Es muss mindestens ein bevorzugtes Label angegeben werden."
|
356
360
|
orphan_error: "Es muss ein allgemeinerer Begriff zugewiesen oder der Begriff als Begriff oberster Ebene definiert werden."
|
357
361
|
top_term_exclusive_error: "Einem Begriff oberster Ebene darf kein allgemeinerer Begriff zugewiesen werden."
|
data/config/locales/en.yml
CHANGED
@@ -350,6 +350,10 @@ en:
|
|
350
350
|
config_info: "Synchronizing with triplestore: %{target_info}"
|
351
351
|
config_warning: "Triplestore has not been configured yet."
|
352
352
|
batch_hint: "For a large data sets please advise your sysadmin to execute `rake sync:all[%{host}]`."
|
353
|
+
concept_scheme:
|
354
|
+
save:
|
355
|
+
success: "Concept scheme has been saved."
|
356
|
+
error: "Concept scheme could not be saved."
|
353
357
|
|
354
358
|
models:
|
355
359
|
label:
|
@@ -358,7 +362,7 @@ en:
|
|
358
362
|
concept:
|
359
363
|
uri: "Concept URI"
|
360
364
|
origin_error: "Invalid origin."
|
361
|
-
version_error: "New Concept version already exists
|
365
|
+
version_error: "New Concept version already exists: %{origin}"
|
362
366
|
no_pref_label_error: "At least one preferred label must be specified."
|
363
367
|
orphan_error: "Missing broader term or Top Term assignment."
|
364
368
|
top_term_exclusive_error: "A Top Term must not have any broader terms."
|
data/config/locales/pt.yml
CHANGED
@@ -348,6 +348,10 @@ pt:
|
|
348
348
|
config_info: "Sincronizando com o repositório de triplas: %{target_info}"
|
349
349
|
config_warning: "Repositório de triplas ainda não foi configurado."
|
350
350
|
batch_hint: "Para um conjunto de dados grande por favor oriente seu administrador de sistema a executar `rake sync:all[%{host}]`."
|
351
|
+
concept_scheme:
|
352
|
+
save:
|
353
|
+
success: "A esquema de conceito foi salva."
|
354
|
+
error: "Não foi possível salvar a esquema de conceito."
|
351
355
|
|
352
356
|
models:
|
353
357
|
label:
|
@@ -356,7 +360,7 @@ pt:
|
|
356
360
|
concept:
|
357
361
|
uri: "URI do conceito"
|
358
362
|
origin_error: "Origem inválida."
|
359
|
-
version_error: "Nova versão de Rótulo já existe
|
363
|
+
version_error: "Nova versão de Rótulo já existe: %{origin}"
|
360
364
|
no_pref_label_error: "No mínimo um Rótulo preferencial precisa ser especificado."
|
361
365
|
orphan_error: "Faltando termo geral ou atribuição de Termo Principal."
|
362
366
|
top_term_exclusive_error: "Um Termo Principal não pode ter nenhum termo geral."
|
data/config/routes.rb
CHANGED
@@ -2,23 +2,21 @@
|
|
2
2
|
|
3
3
|
# Copyright 2011 innoQ Deutschland GmbH
|
4
4
|
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the 'License');
|
6
6
|
# you may not use this file except in compliance with the License.
|
7
7
|
# You may obtain a copy of the License at
|
8
8
|
#
|
9
9
|
# http://www.apache.org/licenses/LICENSE-2.0
|
10
10
|
#
|
11
11
|
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an
|
12
|
+
# distributed under the License is distributed on an 'AS IS' BASIS,
|
13
13
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
Rails.application.routes.draw do
|
18
|
-
match 'schema(.:format)' => 'pages#schema', :as => 'schema'
|
19
|
-
|
20
18
|
scope ':lang', :constraints => lambda { |params, req|
|
21
|
-
langs = Iqvoc::Concept.pref_labeling_languages.join(
|
19
|
+
langs = Iqvoc::Concept.pref_labeling_languages.join('|').presence || 'en'
|
22
20
|
return params[:lang].to_s =~ /^#{langs}$/
|
23
21
|
} do
|
24
22
|
|
@@ -26,50 +24,55 @@ Rails.application.routes.draw do
|
|
26
24
|
|
27
25
|
resource :user_session, :only => [:new, :create, :destroy]
|
28
26
|
resources :users, :except => [:show]
|
29
|
-
|
30
27
|
resources :concepts
|
31
28
|
resources :collections
|
32
29
|
|
33
|
-
get
|
34
|
-
|
30
|
+
get 'scheme' => 'concepts/scheme#show', :as => 'scheme'
|
31
|
+
get 'scheme/edit' => 'concepts/scheme#edit', :as => 'edit_scheme'
|
32
|
+
put 'scheme' => 'concepts/scheme#update'
|
35
33
|
|
36
|
-
|
34
|
+
get 'hierarchy/:root' => 'hierarchy#show'
|
37
35
|
|
38
|
-
|
39
|
-
|
40
|
-
match "concepts/:origin/lock(.:format)" => "concepts/versions#lock", :as => "concept_versions_lock"
|
41
|
-
match "concepts/:origin/unlock(.:format)" => "concepts/versions#unlock", :as => "concept_versions_unlock"
|
42
|
-
match "concepts/:origin/to_review(.:format)" => "concepts/versions#to_review", :as => "concept_versions_to_review"
|
43
|
-
match "concepts/:origin/consistency_check(.:format)" => "concepts/versions#consistency_check", :as => "concept_versions_consistency_check"
|
36
|
+
get 'triplestore_sync' => 'triplestore_sync#index'
|
37
|
+
post 'triplestore_sync' => 'triplestore_sync#sync'
|
44
38
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
39
|
+
post 'concepts/:origin/branch' => 'concepts/versions#branch', :as => 'concept_versions_branch'
|
40
|
+
post 'concepts/:origin/merge' => 'concepts/versions#merge', :as => 'concept_versions_merge'
|
41
|
+
post 'concepts/:origin/lock' => 'concepts/versions#lock', :as => 'concept_versions_lock'
|
42
|
+
post 'concepts/:origin/unlock' => 'concepts/versions#unlock', :as => 'concept_versions_unlock'
|
43
|
+
post 'concepts/:origin/to_review' => 'concepts/versions#to_review', :as => 'concept_versions_to_review'
|
44
|
+
post 'concepts/:origin/consistency_check' => 'concepts/versions#consistency_check', :as => 'concept_versions_consistency_check'
|
49
45
|
|
50
|
-
|
46
|
+
get 'alphabetical_concepts(/:prefix)' => 'concepts/alphabetical#index', :as => 'alphabetical_concepts'
|
47
|
+
get 'untranslated_concepts/:prefix' => 'concepts/untranslated#index', :as => 'untranslated_concepts'
|
48
|
+
get 'hierarchical_concepts' => 'concepts/hierarchical#index', :as => 'hierarchical_concepts'
|
49
|
+
get 'expired_concepts' => 'concepts/expired#index', :as => 'expired_concepts'
|
51
50
|
|
52
|
-
get '
|
53
|
-
put 'config(.:format)' => 'instance_configuration#update'
|
51
|
+
get 'dashboard' => 'dashboard#index', :as => 'dashboard'
|
54
52
|
|
55
|
-
get
|
56
|
-
|
53
|
+
get 'config' => 'instance_configuration#index', :as => 'instance_configuration'
|
54
|
+
put 'config' => 'instance_configuration#update'
|
57
55
|
|
58
|
-
|
56
|
+
get 'import' => 'import#index', :as => 'import'
|
57
|
+
post 'import' => 'import#import'
|
59
58
|
|
60
|
-
get
|
59
|
+
get 'search' => 'search_results#index', :as => 'search'
|
61
60
|
|
61
|
+
get 'help' => 'pages#help', :as => 'help'
|
62
|
+
|
63
|
+
get '/' => 'frontpage#index'
|
62
64
|
root :to => 'frontpage#index', :format => nil
|
63
65
|
end
|
64
66
|
|
65
|
-
|
66
|
-
|
67
|
+
get 'schema' => redirect('/'), :as => 'schema'
|
68
|
+
|
69
|
+
get 'scheme' => 'concepts/scheme#show', :as => 'rdf_scheme'
|
70
|
+
get 'search' => 'search_results#index', :as => 'rdf_search'
|
67
71
|
|
68
|
-
get '
|
69
|
-
get '/:id(.:format)' => 'rdf#show', :as => 'rdf'
|
70
|
-
get '/collections/:id(.:format)', :as => "rdf_collection", :to => "collections#show"
|
71
|
-
get '/collections', :as => "rdf_collections", :to => "collections#index"
|
72
|
+
get ':id' => 'rdf#show', :as => 'rdf'
|
72
73
|
|
74
|
+
get 'collections/:id', :as => 'rdf_collection', :to => 'collections#show'
|
75
|
+
get 'collections', :as => 'rdf_collections', :to => 'collections#index'
|
73
76
|
|
74
77
|
root :to => 'frontpage#index', :format => nil
|
75
78
|
end
|