Help:Ограничения свойств/Допустимые квалификаторы
This is the documentation page for a particular constraint type. See Help:Property constraints portal for a general overview of property constraints. |
allowed qualifiers constraint (Q21510851) указывает, что только определенный набор квалификаторов может использоваться со свойством. Для указания требуемых квалификаторов, используйте обязательное ограничение квалификаторов.
Например, единственными квалификаторами, действительными для musical conductor (P3300), являются start time (P580) и end time (P582).
Это ограничение проверяется только для основного значения элемента. Если определена любая другая 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 musical conductor (P3300) statement will see the allowed qualifiers, start time (P580), end time (P582) and object named as (P1932), as suggestions when adding a qualifier. (Other properties can still be added by searching for them or pasting their property IDs.)
Возможные действия
На нарушение этого ограничения можно реагировать одним из следующих способов:
- Вполне возможно, что квалификатор не является правильным для использования в утверждении, и вместо него следует использовать аналогичное, но другое свойство. Проверьте список разрешенных квалификаторов для применяемого свойства.
- Возможно, это утверждение не должно содержать такого квалификатора, и этот квалификатор следует удалить.
- Возможно, что это утверждение является редким, но законным исключением из ограничения, и ничего делать не требуется.
Параметры
У этого ограничения один обязательный параметр:
- property (P2306)
- Содержит разрешенные квалификаторы. Должно содержать одно или несколько свойств или одно Template:Нет значения, чтобы указать, что утверждения для этого свойства не должны иметь никаких квалификаторов. (Template:Неизвестное значение не разрешено.)
Примеры
Пример 1
For example, valid qualifier for students count (P2196) is point in time.
property constraint |
| ||||||||||||
add value |
Example 2 - no qualifiers allowed
Setting for no qualifiers allowed. no value specify that statements for this property should not have any qualifiers. "no value" is added to statements by clicking on the icon beside the value field that looks like this .
property constraint |
| ||||||||||||
add value |
Universally allowed qualifiers
Certain properties are expected to be allowed as qualifiers on almost any statement: notably reason for deprecated rank (P2241), reason for preferred rank (P7452), and mapping relation type (P4390). WikibaseQualityConstraints knows nothing of these special properties; consequently, it’s expected that they are included in most allowed qualifiers constraint (Q21510851) constraints. (See T242797 for discussion.)
Шаблон
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 for some constraint messages are defined at Module:i18n/constraints; others, such as the message for allowed qualifiers constraint (Q21510851), are located on TranslateWiki.
List of violations of this constraint: Database reports/Constraint violations/P286#allowed qualifiers, SPARQL
Списки
Lists of properties which are set allowed qualifiers constraint.
- Category:Properties with qualifiers constraints
- SPARQL query - click the execute button at the linked page to see the query result.