Довідка:Портал обмежень властивостей/Одне із значень
Це сторінка документації для певного типу обмеження. Див. Довідка:Портал обмежень властивостей, щоб отримати загальний огляд обмежень властивостей. |
one-of constraint (Q21510859) вказує, що для властивості допускаються лише певні значення. Його протилежність none-of constraint (Q52558054).
Наприклад, єдині допустимі значення driving side (P1622) є left (Q13196750) і right (Q14565199).
Якщо не вказано constraint scope (P4680), то це обмеження перевіряється всюди.
If such a constraint is defined on a property, its values are also used as suggestions when someone adds a new statement with that property. For example, someone adding a new driving side (P1622) statement will see the allowed values (left (Q13196750), right (Q14565199)) as suggestions. (Other values can still be added by searching for them or pasting their item IDs.)
Можливі дії
Існують декілька можливих способів вирішення проблеми порушення цього обмеження:
- It is possible that the value is erroneous, and one of the allowed values should be used instead, e. g. left (Q13196750) (direction) instead of left-wing (Q164597) (political term, has the same label in some languages).
- It is possible that the statement is incorrect and should be removed.
- It is possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.
Параметри
Це обмеження має один обов'язковий параметр:
- item of property constraint (P2305)
- Contains the allowed values. no value Help and unknown value Help are interpreted literally, like any normal value (statements with no value Help or unknown value Help are only allowed if these special values are also given in the allowed values).
Examples
Example 1
Example setting for driving side (P1622).
property constraint |
| ||||||||||||||||
add value |
Example 2
Example setting for disabled accessibility (P2846).
property constraint |
| ||||||||||||||||
add value |
Template
When the constraint is set to the property, the following template is automatically displayed in the property talk page. The template is created by Module:Constraints using Template:Constraint, invoked from Template:Property documentation. Translations are defined at Module:i18n/constraints.
constraint “one-of constraint (Q21510859)” declaration error: “Module:Constraints/search:24: attempt to index a nil value”.
Lists
Lists of properties which are set one-of constraint.
- Category:Properties with one-of constraints
- SPARQL query - click the execute button at the linked page to see the query result.