wontomedia 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +14 -7
- data/VERSION.yml +2 -2
- data/app/controllers/admin_controller.rb +5 -4
- data/app/controllers/items_controller.rb +128 -35
- data/app/helpers/connections_helper.rb +18 -0
- data/app/helpers/format_helper.rb +6 -0
- data/app/helpers/items_helper.rb +6 -6
- data/app/views/admin/index.html.erb +4 -3
- data/app/views/connections/index.html.erb +6 -3
- data/app/views/connections/show.html.erb +6 -4
- data/app/views/items/_content_examples.html.erb +2 -1
- data/app/views/items/_show_outbound_links.html.erb +1 -1
- data/app/views/items/edit.html.erb +1 -1
- data/app/views/items/index.html.erb +2 -1
- data/app/views/items/show.html.erb +24 -19
- data/app/views/layouts/_navigation_menu.html.erb +8 -15
- data/assets/wontomedia-sample.rb +3 -0
- data/config/caliper.yml +24 -0
- data/config/routes.rb +24 -13
- data/db/fixtures/connections.yml +138 -0
- data/db/fixtures/items.yml +348 -21
- data/default-custom/app/views/items/home.html.erb +2 -1
- data/default-custom/app/views/{items/_home_extern_list.html.erb → layouts/_local_navigation.html.erb} +12 -13
- data/lib/helpers/tripple_navigation.rb +23 -0
- data/public/javascripts/forConnectionsForms.js +1 -1
- data/public/javascripts/forItemsForms.js +2 -1
- data/public/javascripts/itemCreatePopup.js +1 -1
- data/public/robots.txt +5 -5
- metadata +6 -5
- /data/{public → default-custom/public}/favicon.ico +0 -0
data/db/fixtures/items.yml
CHANGED
@@ -19,12 +19,304 @@
|
|
19
19
|
# "item" schema: name, sti_type, title, description
|
20
20
|
|
21
21
|
|
22
|
+
#### Category items at the root of the built-in schema:
|
23
|
+
|
24
|
+
Item_Class:
|
25
|
+
name: Item_Class
|
26
|
+
sti_type: CategoryItem
|
27
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
28
|
+
title: Class of all Items (foundation class)
|
29
|
+
description: >-
|
30
|
+
This category item is the foundation for the hierarchy of items
|
31
|
+
that represent "classes." A class is an item, some of whose
|
32
|
+
properties make statements about the other items that are
|
33
|
+
"instances" of that class. Wontologies can be constructed where
|
34
|
+
the membership (set of instances) in the class are determined by
|
35
|
+
rules that compare against the other items in the wontology, but
|
36
|
+
more commonly, a class' instance items are explicitly identified
|
37
|
+
using the is_instance_of property.
|
38
|
+
|
39
|
+
Any item that is to represent a "class" (a category whose child
|
40
|
+
items are "instances" of the class) should be identified as a
|
41
|
+
child of this category or one of this category's other children
|
42
|
+
using the sub_class_of property.
|
43
|
+
|
44
|
+
|
45
|
+
Property_Item:
|
46
|
+
name: Property_Item
|
47
|
+
sti_type: CategoryItem
|
48
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
49
|
+
title: Class of all Property Items (foundation class)
|
50
|
+
description: >-
|
51
|
+
This category item is the base of the hierarchy of items that are
|
52
|
+
properties. It is a class, and is therefore identified as such by
|
53
|
+
the connection "Property_Item is_instance_of Item_Class". The
|
54
|
+
absolute requirement to identify items as being "property type"
|
55
|
+
(as opposed to individual or category) is to specify that when
|
56
|
+
they are created. However, most properties will also be
|
57
|
+
identified as such by the existence of either the connection
|
58
|
+
"[property] sub_property_of [another property]" or "[property]
|
59
|
+
is_instance_of [another property class]". In the second of these
|
60
|
+
connection forms "another property class" will be either
|
61
|
+
Property_Item or one of its children.
|
62
|
+
|
63
|
+
|
64
|
+
Type_Item:
|
65
|
+
name: Type_Item
|
66
|
+
sti_type: CategoryItem
|
67
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
68
|
+
title: Class of all Scalar Types (foundation class)
|
69
|
+
description: >-
|
70
|
+
This category item is the class that contains all items
|
71
|
+
representing possible "types" for the values of property objects
|
72
|
+
that are constants (rather than other items). For example, in the
|
73
|
+
connection "SallySinger sBirthdayIs 'March 10, 1977'", the object
|
74
|
+
of the "sBirthdayIs" property is a date constant. The type for
|
75
|
+
data constants is represented in the system by the item
|
76
|
+
"Date_Value", which is one of the members of this class. All of
|
77
|
+
the constant types that the system is capable of handling are
|
78
|
+
represented by members of "Type_Item". (Note that, if the type of
|
79
|
+
information you want to use as a constant object doesn't have a
|
80
|
+
matching "Type_Item" member, you can use the generic
|
81
|
+
"String_Value" type.)
|
82
|
+
|
83
|
+
|
84
|
+
String_Value:
|
85
|
+
name: String_Value
|
86
|
+
sti_type: CategoryItem
|
87
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
88
|
+
title: String (scalar type)
|
89
|
+
description: >-
|
90
|
+
This item represents a particular type of constant value that can
|
91
|
+
be used as the object of connections. For example, in the
|
92
|
+
statement "SallySinger sFavoriteColorIs 'Blue'", "Blue" is a
|
93
|
+
String-type constant value. The system doesn't perform any
|
94
|
+
checks on the content of String constant aside from ensuring that
|
95
|
+
they are not empty and not too long.
|
96
|
+
|
97
|
+
|
98
|
+
Integer_Value:
|
99
|
+
name: Integer_Value
|
100
|
+
sti_type: CategoryItem
|
101
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
102
|
+
title: Integer (scalar type)
|
103
|
+
description: >-
|
104
|
+
This item represents a particular type of consant value that can
|
105
|
+
be used as the object of connections. For example, in the
|
106
|
+
statement "SallySinger sTestScoreIs '45'", "45" is an Integer-type
|
107
|
+
constant. The system will only allow the digits 0 through 9
|
108
|
+
(possibly with a leading minus sign, '-') to be entered for a
|
109
|
+
connections constant object if it is marked as "Integer_Value".
|
110
|
+
|
111
|
+
|
112
|
+
Number_Value:
|
113
|
+
name: Number_Value
|
114
|
+
sti_type: CategoryItem
|
115
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
116
|
+
title: Any Number (scalar type)
|
117
|
+
description: >-
|
118
|
+
This item represents a particular type of constant value that can
|
119
|
+
be used as the object of connections. For example, in the
|
120
|
+
statement "SallySinger sPercentileRankingInClassIs '88.75'", the
|
121
|
+
object value "88.75" is a number (in this point, a floating-point
|
122
|
+
number with a fractional part). The system will accept any number
|
123
|
+
that can be typed, and attempts to parse number formats that
|
124
|
+
include non-number characters (such as the "e" or "E" in
|
125
|
+
scientific notation). The system does not have a way to represent
|
126
|
+
fractions, imaginary numbers, repeating digits, or significant
|
127
|
+
figures.
|
128
|
+
|
129
|
+
|
130
|
+
Boolean_Value:
|
131
|
+
name: Boolean_Value
|
132
|
+
sti_type: CategoryItem
|
133
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
134
|
+
title: Boolean ('True' or 'False' scalar type)
|
135
|
+
description: >-
|
136
|
+
This item represents a particular type of constant value that can
|
137
|
+
be used as the object of connections. For example, in the
|
138
|
+
statement "SallySinger paysTaxesOnTime-Is 'True'", "true" is the
|
139
|
+
Boolean constant object of the connection. Sometimes the value of
|
140
|
+
a Boolean-type constant can be input by selecting a specific
|
141
|
+
web-page control, and other types it has to be typed into a
|
142
|
+
text-entry box. When typed, only the words "true" or "false"
|
143
|
+
should be used, although the capitalization ("true", "True",
|
144
|
+
"TRUE") doesn't matter. In addition, for connections that use
|
145
|
+
properties that express a true/false state but whose objects are
|
146
|
+
Items rather than constants, the system provides the built-in
|
147
|
+
Items "Value_True" and "Value_False" that can be selected as a
|
148
|
+
relationship's object.
|
149
|
+
|
150
|
+
|
151
|
+
Value_True:
|
152
|
+
name: Value_True
|
153
|
+
sti_type: IndividualItem
|
154
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
155
|
+
title: True (a constant value)
|
156
|
+
description: >-
|
157
|
+
This item is provide for use as the object of connections that
|
158
|
+
express a simple (true or false) fact. For example, "Value_True"
|
159
|
+
is the object of the connection "BillTheDog hasFleas Value_True".
|
160
|
+
|
161
|
+
|
162
|
+
Value_False:
|
163
|
+
name: Value_False
|
164
|
+
sti_type: IndividualItem
|
165
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
166
|
+
title: False (a constant value)
|
167
|
+
description: >-
|
168
|
+
This item is provide for use as the object of connections that
|
169
|
+
express a simple (true or false) fact. For example, "Value_False"
|
170
|
+
is the object of the connection "BettyTheCat hasFleas
|
171
|
+
Value_False".
|
172
|
+
|
173
|
+
|
174
|
+
URL_Value:
|
175
|
+
name: URL_Value
|
176
|
+
sti_type: CategoryItem
|
177
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
178
|
+
title: Web Address (scalar type for URL strings)
|
179
|
+
description: >-
|
180
|
+
This item represents a particular type of constant value that can
|
181
|
+
be used as the object of connections. For example, in the
|
182
|
+
statement "SallySinger webSiteIs 'http://sally-stringer.tld/'",
|
183
|
+
the "http..." string is a Web Address-type constant value. The
|
184
|
+
system checks the address (URL) supplied for syntax, but does not
|
185
|
+
currently test that the location referenced actually exists. In
|
186
|
+
addition to the web address itself, a URL_Value-constant can
|
187
|
+
contain additional text, separated from the web address by
|
188
|
+
spaces. (Note that URLs are not allowed to contain spaces, so
|
189
|
+
there is no opportunity for confusion.) When creating pages that
|
190
|
+
use a URL_Value to create links, if additional text is present in
|
191
|
+
the URL_Value, it will be used for the text of the link instead of
|
192
|
+
the actual web address.
|
193
|
+
|
194
|
+
|
22
195
|
#### Minimal set of types (predicates) for connections
|
23
196
|
#### this is WontoMedia's native "schema", and represents the minimal
|
24
197
|
#### typing information used by the UI
|
25
198
|
|
26
|
-
|
27
199
|
# relationships we expect ontology-contributors to use
|
200
|
+
property_subject_is:
|
201
|
+
name: property_subject_is
|
202
|
+
sti_type: PropertyItem
|
203
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
204
|
+
title: Property's Subject is a (defining relationship)
|
205
|
+
description: >-
|
206
|
+
This property is used to define/restrict the set of items that
|
207
|
+
are permissable choices for the subject item of another property.
|
208
|
+
For example, consider the connection "myRelationship
|
209
|
+
property_subject_is MyClass". The existence of this connection
|
210
|
+
restricts the content of the wontology so that the only acceptable
|
211
|
+
subject items for relationships where "myRelationship" is the
|
212
|
+
predicate are items that are instances of "MyClass" or of one of
|
213
|
+
MyClass' child sub-classes.
|
214
|
+
|
215
|
+
When a property_subject_is relationship is created, it affects the
|
216
|
+
options available for creating and editing connections--pages
|
217
|
+
will be populated only with options consistent with the current
|
218
|
+
state of the data.
|
219
|
+
|
220
|
+
|
221
|
+
property_object_is:
|
222
|
+
name: property_object_is
|
223
|
+
sti_type: PropertyItem
|
224
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
225
|
+
title: Property's Object is a (defining relationship)
|
226
|
+
description: >-
|
227
|
+
This property is used to define/restrict the set of items that are
|
228
|
+
permissable choices for the object item of another property. For
|
229
|
+
example, consider the statement "myRelationship
|
230
|
+
property_object_is myClass". The existence of this connection
|
231
|
+
restricts the content of the wontology so that the only acceptable
|
232
|
+
subject items for relationships where "myRelationship" is the
|
233
|
+
predicate are items that are instances of "myClass" or of one of
|
234
|
+
myClass' child sub-classes.
|
235
|
+
|
236
|
+
|
237
|
+
applies_to_class:
|
238
|
+
name: applies_to_class
|
239
|
+
sti_type: PropertyItem
|
240
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
241
|
+
title: Applies to the Class (defining relationship)
|
242
|
+
description: >-
|
243
|
+
This property is used to provide hints about the connections a
|
244
|
+
user will likely create to go with items that are instances of a
|
245
|
+
particular class. For example, a wontology that is intended to
|
246
|
+
contain a number of items that represent people, might contain a
|
247
|
+
category item named "Person" to represent the class of all the
|
248
|
+
individual person items. Given that class, the connection
|
249
|
+
"birthDate applies_to_class Person" makes the statement that it is
|
250
|
+
likely (not mandatory) that each item which is_instance_of Person
|
251
|
+
will have at least one connection using the property "birthDate"
|
252
|
+
as a predicate. The system uses this information to automatically
|
253
|
+
create, each time a user makes a new instance item, a list of
|
254
|
+
connections (with empty object item references) for the user to
|
255
|
+
fill in.
|
256
|
+
|
257
|
+
|
258
|
+
has_scalar_object:
|
259
|
+
name: has_scalar_object
|
260
|
+
sti_type: PropertyItem
|
261
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
262
|
+
title: Has a Scalar Value for its Object (defining relationship)
|
263
|
+
description: >-
|
264
|
+
This property is used to define/restrict the permissable choices
|
265
|
+
for the object item of another property. For example, consider
|
266
|
+
the statement "myRelationship has_scalar_object String_Value".
|
267
|
+
This connection says that the objects of all connections that use
|
268
|
+
"myRelationship" as their predicate should be scalar (single
|
269
|
+
valued) constants, and that String_Value is the acceptable type
|
270
|
+
for those constants.
|
271
|
+
|
272
|
+
When a connection like this is present, and a new connection is
|
273
|
+
being defined, once a has_scalar_object-property is selected, only
|
274
|
+
a text-entry box (and not an item selector) will be displayed, and
|
275
|
+
its content will be limited to what is acceptable for the type
|
276
|
+
specified by the has_scalar_object relationship's own object item.
|
277
|
+
|
278
|
+
|
279
|
+
has_item_object:
|
280
|
+
name: has_item_object
|
281
|
+
sti_type: PropertyItem
|
282
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
283
|
+
title: Has an Item for its Object (defining relationship)
|
284
|
+
description: >-
|
285
|
+
This property is used to define/restrict the set of permissable
|
286
|
+
choices for the object item of another property. For example,
|
287
|
+
consider the statement "myRelationship has_item_object
|
288
|
+
'True'". This connection says that the objects of all
|
289
|
+
connections that use "myRelationship" as their predicate should be
|
290
|
+
an item and not a constant. (Note that the existence of a
|
291
|
+
connection using has_item_object is the important thing, and that
|
292
|
+
the object of such a connection is ignored. By convention it is
|
293
|
+
filled in with the String "True", but this is not checked by the
|
294
|
+
system.)
|
295
|
+
|
296
|
+
When a connection like this is present, and a new connection is
|
297
|
+
being defined, once a has_item_object-property is selected, only
|
298
|
+
an item selector (and not a text-entry box) will be displayed.
|
299
|
+
|
300
|
+
|
301
|
+
max_uses_per_item:
|
302
|
+
name: max_uses_per_item
|
303
|
+
sti_type: PropertyItem
|
304
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
305
|
+
title: Maximum Number of Uses Per Item is (defining relationship)
|
306
|
+
description: >-
|
307
|
+
This property is used to define/restrict how connections using a
|
308
|
+
particular predicate item can be made. The subject of connections
|
309
|
+
using max_uses_per_item must be a property item, and the object
|
310
|
+
must be an integer constant. For example, if a wontology contains
|
311
|
+
the connection "myProperty max_uses_per_item 7", it will prevent
|
312
|
+
users from creating more than seven connections using "myProperty"
|
313
|
+
as predicate with the same subject item. Connections using this
|
314
|
+
property affect the count (cardinality) of the specified
|
315
|
+
relationship's subject items only, and does not place restrictions
|
316
|
+
on the number of times an item can be referenced as the object of
|
317
|
+
connections.
|
318
|
+
|
319
|
+
|
28
320
|
peer_of:
|
29
321
|
name: peer_of
|
30
322
|
sti_type: PropertyItem
|
@@ -35,13 +327,13 @@ peer_of:
|
|
35
327
|
relationship between equals. This would be appropriate, for
|
36
328
|
example, as a description of the "synonym" relationship that might
|
37
329
|
occur between the entries for two words in a thesaurus.
|
38
|
-
|
330
|
+
The system makes two assumptions about individuals that have a
|
39
331
|
Peer-Of relationship to each other. First, the relationship is
|
40
332
|
assumed to be bidirectional. Saying that "A is a Peer-Of B"
|
41
333
|
implies that "B is a Peer-Of A", and it doesn't matter which of
|
42
334
|
the two "directions" is used when the relationship is first
|
43
335
|
created. Second, when showing the graph of relationships between
|
44
|
-
individuals,
|
336
|
+
individuals, the system will attempt to indicate Peer-Of
|
45
337
|
relationships as primarily horizontal.
|
46
338
|
|
47
339
|
|
@@ -57,7 +349,7 @@ one_of:
|
|
57
349
|
"macintosh" in "macintosh is One-Of computer") is assumed to be
|
58
350
|
more specific or more narrow than the object of the relationship
|
59
351
|
("B" and "computer"). When showing a graph of connections
|
60
|
-
between items,
|
352
|
+
between items, the system will attempt to indicate 'One-Of'
|
61
353
|
relationships as primarily vertical, with the object-item drawn
|
62
354
|
nearer "the root" of the graph and the subject-item toward "the
|
63
355
|
leaves".
|
@@ -87,7 +379,7 @@ contains:
|
|
87
379
|
relationship ("A" in the relationship "A Contains B", and like
|
88
380
|
"spacecraft" in "spacecraft Contains apollo") is more general or
|
89
381
|
broad than the object of the relationship ("B" and "apollo").
|
90
|
-
When showing a graph of connections between items,
|
382
|
+
When showing a graph of connections between items, the system
|
91
383
|
will attempt to indicate 'Contains' relationships as primarily
|
92
384
|
vertical, with the subject-item drawn nearer "the root" of the
|
93
385
|
graph and the object-item toward "the leaves".
|
@@ -101,7 +393,7 @@ contains:
|
|
101
393
|
'Child Of' are opposites of each other, and 'One Of' is a child of
|
102
394
|
'Child Of'. But this does not make 'Contains' and 'Child Of'
|
103
395
|
opposites of each other, though an approximation of opposite-ness
|
104
|
-
could be inferred.
|
396
|
+
could be inferred. The system will not automatically cause a
|
105
397
|
'Child Of' relationship to be created when a 'Contains'
|
106
398
|
relationship is.
|
107
399
|
|
@@ -118,7 +410,7 @@ parent_of:
|
|
118
410
|
like "vehicle" in "vehicle is Parent-Of spacecraft") is a
|
119
411
|
super-set of the object of the relationship ("B" and
|
120
412
|
"spacecraft"). When showing a graph of connections between
|
121
|
-
items,
|
413
|
+
items, the system will attempt to indicate 'Parent Of'
|
122
414
|
relationships as primarily vertical, with the subject-item drawn
|
123
415
|
nearer "the root" of the graph and the object-item toward "the
|
124
416
|
leaves".
|
@@ -131,7 +423,7 @@ parent_of:
|
|
131
423
|
'Parent Of' is the opposite of 'Child Of'. Creating a
|
132
424
|
relationship that states one category is 'Parent Of' another is
|
133
425
|
exactly the same as creating a 'Child Of' relationship with the
|
134
|
-
subject and object reversed, and
|
426
|
+
subject and object reversed, and the system will list the
|
135
427
|
relationship between then using both relationship names (which
|
136
428
|
name is given priority depends on which item is more central to
|
137
429
|
the display).
|
@@ -148,7 +440,7 @@ child_of:
|
|
148
440
|
relationship ("A" in the relationship "A is a Child-Of B", and
|
149
441
|
like "spacecraft" in "spacecraft is Child-Of vehicle") is a subset
|
150
442
|
of the object of the relationship ("B" and "vehicle"). When
|
151
|
-
showing a graph of connections between items,
|
443
|
+
showing a graph of connections between items, the system will
|
152
444
|
attempt to indicate 'Child Of' relationships as primarily
|
153
445
|
vertical, with the object-item drawn nearer "the root" of the
|
154
446
|
graph and the subject-item toward "the leaves".
|
@@ -161,7 +453,7 @@ child_of:
|
|
161
453
|
'Child Of' is the opposite of 'Parent Of'. Creating a
|
162
454
|
relationship that states one category is 'Child Of' another is
|
163
455
|
exactly the same as creating a 'Parent Of' relationship with the
|
164
|
-
subject and object reversed, and
|
456
|
+
subject and object reversed, and the system will list the
|
165
457
|
relationship between then using both relationship names (which
|
166
458
|
name is given priority depends on which item is more central to
|
167
459
|
the display).
|
@@ -202,11 +494,11 @@ inverse_relationship:
|
|
202
494
|
relationships relate to each other. This relationship is used to
|
203
495
|
denote that two other relationships are symmetric and inseparable
|
204
496
|
opposites of each other. For example, "Child-Of has
|
205
|
-
Inverse-Relationship to Parent-Of".
|
497
|
+
Inverse-Relationship to Parent-Of". The system will interpret any
|
206
498
|
two relationships linked by 'Inverse Relationship' (or by a
|
207
499
|
non-built in relationship that is marked as a 'SubProperty Of'
|
208
500
|
'Inverse Relationship') as being identical antonyms of each
|
209
|
-
other. Any time one relationship is created,
|
501
|
+
other. Any time one relationship is created, the system will
|
210
502
|
automatically infer, create, and show the matching opposite
|
211
503
|
(inverse) relationship's name.
|
212
504
|
|
@@ -220,18 +512,53 @@ sub_property_of:
|
|
220
512
|
This relationship is used to relate two other relationships to
|
221
513
|
each other. The statement "A is a SubProperty-Of B" says that the
|
222
514
|
relationship A makes a more specific, narrow claim about items it
|
223
|
-
relates than the relationship B does. However, if
|
515
|
+
relates than the relationship B does. However, if the system has
|
224
516
|
special behavior or handling for relationship B, the 'SubProperty
|
225
517
|
Of' statement allows it to determine it should apply that special
|
226
518
|
behavior to A as well.
|
227
519
|
|
228
|
-
For example, when drawing relationship graphs,
|
520
|
+
For example, when drawing relationship graphs, the system attempts
|
229
521
|
to draw all instances of 'Symmetric Relationship" in a primarily
|
230
522
|
horizontal way. There is a built-in statement that "Peer-Of is a
|
231
523
|
SubProperty-Of Symmetric-Relationship", which causes 'Peer Of'
|
232
524
|
relationships to be (preferentially) drawn horizontally, as will
|
233
|
-
be any other types of relationships that are added to
|
234
|
-
|
525
|
+
be any other types of relationships that are added to a sontology.
|
526
|
+
|
527
|
+
|
528
|
+
sub_class_of:
|
529
|
+
name: sub_class_of
|
530
|
+
sti_type: PropertyItem
|
531
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
532
|
+
title: SubClass Of (basic relationship type)
|
533
|
+
description: >-
|
534
|
+
This relationship is used to connect two items, both representing
|
535
|
+
classes, indicating that the subject item is a sub-class of the
|
536
|
+
object item. For example, the connection "Ships is a SubClass-Of
|
537
|
+
Vehicles" links the two class items, and makes the statement that
|
538
|
+
"Ships" are a more specific kind of "Vehicles". Once this
|
539
|
+
connection is established, the system will behave as if everything
|
540
|
+
that is true about "Vehicles" is also true for "Ships" (although
|
541
|
+
not vice-versa). For example, if another property is defined such
|
542
|
+
that its object items are required to be instances of the "Vehicles"
|
543
|
+
class, then having this connection allows instances of "Ships" to
|
544
|
+
be used as well. But, another property whose objects are required
|
545
|
+
to be "Ships" is not affected, and other "Vehicles" still cannot
|
546
|
+
be used.
|
547
|
+
|
548
|
+
|
549
|
+
is_instance_of:
|
550
|
+
name: is_instance_of
|
551
|
+
sti_type: PropertyItem
|
552
|
+
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
553
|
+
title: Is an Instance Of (basic relationship type)
|
554
|
+
description: >-
|
555
|
+
This relationship is used to connect one item with a second item
|
556
|
+
representing the class of which the first item is a member. For
|
557
|
+
example, the connection "QueenMary is_instance_of Ships" states
|
558
|
+
that the Queen Mary is a ship, and allows the system to apply all
|
559
|
+
of the rules that pertain to instances of "Ships" to the
|
560
|
+
"QueenMary" item, and allows the "QueenMary" item to be referenced
|
561
|
+
from contexts that require a member of "Ships".
|
235
562
|
|
236
563
|
|
237
564
|
# fundamental property classes; the root of the property universe
|
@@ -241,7 +568,7 @@ symmetric_relationship:
|
|
241
568
|
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
242
569
|
title: Symmetric Relationship (root relationship type)
|
243
570
|
description: >-
|
244
|
-
This is a root element in
|
571
|
+
This is a root element in the system's internal schema. All
|
245
572
|
relationship (property) classes are children of one of three root
|
246
573
|
relationship types, including this one.
|
247
574
|
|
@@ -251,7 +578,7 @@ value_relationship:
|
|
251
578
|
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
252
579
|
title: Value Relationship (root relationship type)
|
253
580
|
description: >-
|
254
|
-
This is a root element in
|
581
|
+
This is a root element in the system's internal schema. All
|
255
582
|
relationship (property) classes are children of one of three root
|
256
583
|
relationship types, including this one.
|
257
584
|
|
@@ -261,7 +588,7 @@ hierarchical_relationship:
|
|
261
588
|
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
262
589
|
title: Hierarchical Relationship (root relationship type)
|
263
590
|
description: >-
|
264
|
-
This is a root element in
|
591
|
+
This is a root element in the system's internal schema. All
|
265
592
|
relationship (property) classes are children of one of three root
|
266
593
|
relationship types, including this one.
|
267
594
|
|
@@ -271,7 +598,7 @@ ordered_relationship:
|
|
271
598
|
flags: <%= Item::DATA_IS_UNALTERABLE %>
|
272
599
|
title: Ordered Relationship (root relationship type)
|
273
600
|
description: >-
|
274
|
-
This is a root element in
|
601
|
+
This is a root element in the system's internal schema.
|
275
602
|
Properties should be made sub_property_of this property if they
|
276
603
|
imply an order between their subject and object. Among other
|
277
|
-
things, this property allows
|
604
|
+
things, this property allows the system to make UI decisions.
|
@@ -59,8 +59,9 @@
|
|
59
59
|
<% end -%>
|
60
60
|
|
61
61
|
<% content_for :left_column do %>
|
62
|
+
<%= render :partial => "layouts/local_navigation",
|
63
|
+
:layout => "layouts/navigation_menu" %>
|
62
64
|
<% if @display_unimplemented %>
|
63
|
-
<%= render :partial => "common/navigation_menu" %>
|
64
65
|
<div id="block-announcements" class="box">
|
65
66
|
<p class="unimplemented">[area for displaying announcements (new
|
66
67
|
feature deployments, scheduled down-time, etc.) to users]</p>
|
@@ -17,16 +17,15 @@
|
|
17
17
|
# see "http://www.gnu.org/licenses/".
|
18
18
|
%>
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
<li><%= link_to "Contact Us", site_content_url("Contact_Us") -%></li>
|
21
|
+
<li><%= link_to "Press Shortcut", site_content_url("Press_Info") -%></li>
|
22
|
+
<li>Follow
|
23
|
+
<%= image_tag 'twitter_icon.png', :alt=>'twitter', :class=>'image-in-text' %>
|
24
|
+
<ul style="font-size: 80%; padding-left: 0.4em;">
|
25
|
+
<li>
|
26
|
+
<%= link_to "@wontology", "http://twitter.com/wontology" -%> (this site)
|
27
|
+
</li><li>
|
28
|
+
<%= link_to "@wontomedia", "http://twitter.com/wontomedia" -%>
|
29
|
+
(hosting software)
|
30
|
+
</li></ul>
|
31
|
+
</li>
|
@@ -155,4 +155,27 @@ module TrippleNavigation
|
|
155
155
|
end
|
156
156
|
return false
|
157
157
|
end
|
158
|
+
|
159
|
+
# This method find a property's inverse property (if it exists). It
|
160
|
+
# returns the inverse property's ID or nil.
|
161
|
+
def self.propertys_inverse( original_property_id )
|
162
|
+
spo_id = Item.find_by_name("sub_property_of").id
|
163
|
+
inverse_id = Item.find_by_name("inverse_relationship").id
|
164
|
+
|
165
|
+
# Note: We require both "A-to-B" and "B-to-A" connections to be
|
166
|
+
# present in the database to define two properties as the inverse
|
167
|
+
# of each other, so we only need to gather the connections that
|
168
|
+
# refer to original_property as their subject.
|
169
|
+
possible_inverse_defining_connections = Connection.all(
|
170
|
+
:conditions => [ "subject_id = ?", original_property_id ])
|
171
|
+
|
172
|
+
possible_inverse_defining_connections.each do |connection|
|
173
|
+
if TrippleNavigation.check_properties(
|
174
|
+
:does => connection.predicate_id, :inherit_from => inverse_id,
|
175
|
+
:via => spo_id )
|
176
|
+
return connection.obj_id
|
177
|
+
end
|
178
|
+
end
|
179
|
+
nil
|
180
|
+
end
|
158
181
|
end
|
@@ -84,7 +84,7 @@ function createOnchangeHandler(thisName){
|
|
84
84
|
else {
|
85
85
|
clearError(thisName);
|
86
86
|
divToWorking(thisName);
|
87
|
-
new Ajax.Request(base + "/items/" + thisElem.value + ".json", {
|
87
|
+
new Ajax.Request(base + "/w/items/" + thisElem.value + ".json", {
|
88
88
|
method: 'get',
|
89
89
|
onSuccess: function(response){
|
90
90
|
var itemObject = response.responseJSON;
|
@@ -422,7 +422,8 @@ function launchNameUniquenessCheck(){
|
|
422
422
|
uniquenessTimerId = -1;
|
423
423
|
|
424
424
|
var l = window.location;
|
425
|
-
var lookup = l.protocol + "//" + l.hostname + ":" + l.port +
|
425
|
+
var lookup = l.protocol + "//" + l.hostname + ":" + l.port +
|
426
|
+
'/w/items/lookup';
|
426
427
|
ajaxRequestInProgress = new Ajax.Request(
|
427
428
|
lookup, {
|
428
429
|
method: 'get', parameters: "name=" + $F(controlNamePrefix + 'item_name'),
|
@@ -27,7 +27,7 @@ function itemCreatePopup(selectElem, itemType, priorValue){
|
|
27
27
|
|
28
28
|
var l = window.location;
|
29
29
|
var newpop = l.protocol + "//" + l.hostname + ":" + l.port +
|
30
|
-
"/items/new-pop?type=" + itemType;
|
30
|
+
"/w/items/new-pop?type=" + itemType;
|
31
31
|
Modalbox.show(newpop, {
|
32
32
|
title: "Create a new item",
|
33
33
|
height: itemCreatePopup_Height(),
|
data/public/robots.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
User-agent: *
|
2
|
-
Disallow: /admin
|
3
|
-
Disallow: /items.yaml
|
4
|
-
Disallow: /connections.n3
|
5
|
-
Disallow: /items
|
6
|
-
Disallow: /connections/new
|
2
|
+
Disallow: /w/admin
|
3
|
+
Disallow: /w/items.yaml
|
4
|
+
Disallow: /w/connections.n3
|
5
|
+
Disallow: /w/items/*
|
6
|
+
Disallow: /w/connections/new
|
7
7
|
Disallow: /*/edit
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: 0.0.2
|
9
|
+
version: 0.1.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Glen E. Ivey
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-14 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- assets/wontomedia-sample.rb
|
97
97
|
- config/asset_packages.yml
|
98
98
|
- config/boot.rb
|
99
|
+
- config/caliper.yml
|
99
100
|
- config/cucumber.yml
|
100
101
|
- config/database-mysql-development.yml
|
101
102
|
- config/database-mysql.yml
|
@@ -121,9 +122,10 @@ files:
|
|
121
122
|
- db/migrate/20090605213800_flags_columns_not_null.rb
|
122
123
|
- db/migrate/20090605215028_flags_columns_default_zero.rb
|
123
124
|
- db/schema.rb
|
124
|
-
- default-custom/app/views/items/_home_extern_list.html.erb
|
125
125
|
- default-custom/app/views/items/_home_introductory_text.html.erb
|
126
126
|
- default-custom/app/views/items/home.html.erb
|
127
|
+
- default-custom/app/views/layouts/_local_navigation.html.erb
|
128
|
+
- default-custom/public/favicon.ico
|
127
129
|
- default-custom/public/images/logo.png
|
128
130
|
- default-custom/public/images/logo.svg
|
129
131
|
- default-custom/public/stylesheets/wm.css
|
@@ -144,7 +146,6 @@ files:
|
|
144
146
|
- public/dispatch.cgi
|
145
147
|
- public/dispatch.fcgi
|
146
148
|
- public/dispatch.rb
|
147
|
-
- public/favicon.ico
|
148
149
|
- public/images/alert_background.png
|
149
150
|
- public/images/blank_error_icon.png
|
150
151
|
- public/images/blank_status_icon.png
|
File without changes
|