Special property "Allows value"
Allows value | |
---|---|
Lists one permissible value for a property
| |
Further Information | |
Provided by: | extension "Semantic MediaWiki "Allows to store and query data annotated to pages |
Added: | 1.0 |
Removed: | still in use |
Alias: | has no alias |
Optional: | no |
Visible: | |
Annotable: | |
Declarative: | |
Key: | not specified |
Setting: | not specified |
Focus: | not specified |
In this wiki: | Property:Allows value |
Table of Contents | |
Contents |
The Allows value property is a special property in Semantic MediaWiki with a built-in meaning: it lists one permissible value for a property.
You can use this special property with a property of any datatype to limit its possible values. For example, the page for a Problem severity property might contain:
[[Allows value::Enhancement]] [[Allows value::Trivial]] [[Allows value::Minor]] [[Allows value::Normal]] [[Allows value::Major]] [[Allows value::Critical]]
Ordered properties[edit]
Enumerating several Allows value does not put the possible values of a property in that order. Properties of datatype String will still sort in alphabetical order. You can ensure that alphabetical sort order is appropriate by using a prefix, for example:
[[Allows value::a - Enhancement]] [[Allows value::b - Trivial]] [[Allows value::c - Minor]] ...
Thus you can query for greater-than-or-equal or less-than-or-equal values, for example [[property name::<c-Minor]]
You can also create a property of datatype Number and give it allowed values that are "pseudo-numbers", for example:
[[Allows value::1 - Low]] [[Allows value::2 - Medium]] [[Allows value::2 - Middling]] ...
SMW's number datatype ignores the "- description" after the number. This gives the set of properties a numerical order and lets you define two values as equivalent.
See the property page Allows value to see which pages use this special property on this wiki.