Help:Ограничения свойств/Конфликтует с

This page is a translated version of the page Help:Property constraints portal/Conflicts with and the translation is 33% complete.

Ограничение «conflicts-with constraint (Q21502838)» определяет, что использующие это свойство элементы не должны содержать другого определённого утверждения. Это противоположно варианту «item-requires-statement constraint (Q21503247)».

Например, у элемента со свойством «author (P50)» не должно быть утверждений «sex or gender (P21)» или «instance of (P31)human (Q5)».

Если constraint scope (P4680) не определена, это ограничение проверяется только для основного значения элемента. Это также единственная поддерживаемая в настоящее время область.

Исторически ограничение «конфликтует с» с одним и тем же свойством и определенным набором элементов иногда использовалось чтобы запретить эти элементы. Это было заменено на ограничение типа «none of», которое легче понять и которое работает не только в утверждениях, но и в классификаторах и ссылках.

Возможные действия

На нарушение этого ограничения можно реагировать одним из следующих способов:

  • It’s possible that the conflicting statement belongs on a different item, and should be moved.
  • It’s possible that the statement with the constraint belongs on a different item, and should be moved.
  • It’s possible that the conflicting statement should use a similar, but different property.
  • It’s possible that the conflicting statement is incorrect, and should be removed.
  • It’s possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.

Параметры

This constraint has one mandatory and three optional parameters:

property (P2306)
Contains the property of the conflicting statement. Must contain exactly one property (no value Help or unknown value Help is not permitted). To add multiple conflicting statements, add multiple constraints of this type.
item of property constraint (P2305)
Optional; contains the conflicting 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 not permitted if these special values are also given in the allowed values).
If this parameter is missing, the constraint does not allow any statement with the given property, regardless of the value of the statement.
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
  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).

property constraint
  conflicts-with constraint
property MusicBrainz artist ID
0 references
add reference


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

Lists

Lists of properties which are set conflicts-with constraint.