Довідка:Портал обмежень властивостей/Конфліктує з

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Help:Property constraints portal/Conflicts with and the translation is 61% complete.

conflicts-with constraint (Q21502838) вказує, що елементи, які використовують цю властивість, не повинні мати певного іншого твердження. Протилежним є item-requires-statement constraint (Q21503247).

Наприклад, елементи з author (P50) не повинні мати тверджень sex or gender (P21) або instance of (P31)human (Q5).

If no constraint scope (P4680) is specified, this constraint is only checked on the main value of a statement. This is also the only currently supported scope.

Historically, a “conflicts with” constraint with the same property and a certain set of items was sometimes used to disallow those items. This has been superseded by the “none of” constraint type, which is easier to understand and works not just on statements but also on qualifiers and references.

Можливі дії

Існують декілька можливих способів вирішення проблеми порушення цього обмеження:

  • Можливо, що суперечливе твердження стосується іншого елемента, і його треба перемістити.
  • Можливо, що твердження з обмеженням стосується іншого елемента, і його треба перемістити.
  • Можливо, що суперечливе твердження має використовувати подібну, але іншу властивість.
  • Можливо, що суперечливе твердження є неправильним, і його треба видалити.
  • Можливо, що елемент є рідкісним, але виправданим винятком з обмеження, і нічого не треба робити.

Параметри

Це обмеження має один обов'язковий і три необов'язкових параметри:

property (P2306)
Містить властивість суперечливого твердження. Має містити точно одну властивість (no value Help чи unknown value Help не допускається). Щоб додати декілька суперечливих тверджень, додайте декілька обмежень цього типу.
item of property constraint (P2305)
Необов'язковий; містить суперечливі значення. no value Help і unknown value Help інтерпретуються буквально, як будь-яке нормальне значення (твердження із no value Help або unknown value Help не допускаються, якщо ці спеціальні значення також вказані у дозволених значеннях).
Якщо цей параметр відсутній, обмеження не допускає будь-яке твердження з цією властивістю, незалежно від значення твердження.
replacement property (P6824)
Optional; contains a single property that should have been used instead of all properties listed by item of property constraint (P2305), or no value Help if no alternative property should exist..
If there are multiple properties specified by item of property constraint (P2305) which should have different values for replacement property (P6824) then this constraint will need to be split into multiple statements.
replacement value (P9729)
Optional; specifies a single alternative value that should be used, or no value Help if no alternative value should exist.
If there are multiple values specified by item of property constraint (P2305) which should have different values for replacement value (P9729) then this constraint will need to be split into multiple statements.


Приклади

Приклад 1

Example setting for author (P50). Meaning of this setting is as follows:

  • Item which has author (P50) statement is generally about book, scientific paper and so on. So such item is not instance of human.
  • On WikiData, sometimes it is difficult to distinguish item of Wikimedia disambiguation page and "actual" item page, from label alone. This setting prevents such confusion.
  • In software items, generally developer (P178) is used, instead of author (P50).
property constraint
Normal rank conflicts-with constraint
property instance of
item of property constraint human
Wikimedia disambiguation page
software
0 references
add reference


add value

Приклад 2

Example setting for MusicBrainz instrument ID (P1330). This property is for identifiers about music instruments. So the item which has this property statement is about music instrument (piano, guitar), is not item about artist (Mariah Carey, John Denver). So such item should not have MusicBrainz artist ID (P434).

Шаблон

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 “conflicts-with constraint (Q21502838)” declaration error: “Module:Constraints/search:24: attempt to index a nil value”.

Списки

Lists of properties which are set conflicts-with constraint.