Help:Property constraints portal/Qualifiers/da
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) specifies that only a certain set of qualifiers may be used with a property. To specify required qualifiers, use mandatory qualifiers constraint.
For example, the only qualifiers valid for musical conductor (P3300) are start time (P580), end time (P582) and object named as (P1932).
This constraint can only be checked on the main value of a statement; if any other constraint scope (P4680) is specified, an error is reported.
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.)
Mulige handlinger
There are several possible ways to address a violation of this constraint:
- It’s possible that the qualifier is not the correct one to use for the statement, and a similar but different property should be used instead. Check the list of permitted qualifiers for an applicable property.
- It’s possible that the statement should not have the qualifier at all, and that the qualifier should be removed.
- It’s possible that the statement is a rare, but legitimate exception to the constraint, and nothing should be done.
Parametre
This constraint has one mandatory parameter:
- property (P2306)
- Contains the permitted qualifiers. Must contain one or more properties, or a single no value Help to specify that statements for this property should not have any qualifiers. (unknown value Help is not permitted.)
Eksempler
Eksempel 1
For example, valid qualifier for count of students (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.)
Skabelon
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
Lister
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.