Axuda:Portal de restricións nas propiedades

This page is a translated version of the page Help:Property constraints portal and the translation is 47% complete.
Outdated translations are marked like this.
Informe de vulneración dunha restrición de propiedade nunha páxina de elemento Wikidata.

As restricións de propiedade son regras sobre as propiedades que especifican como se poden usar as propiedades. O modelo de datos de Wikidata é moi flexible: nada impide que engadas Universe (Q1) como head of government (P6). Porén, unha restrición na propiedade pode indicarche que head of government (P6) soe ser ser humano.

As restricións son pistas, non restricións estritas, e pretenden axudar ou guiar ás persoas que editan. Poden ter excepcións: por exemplo, a cidade Talkeetna (Q668224) escolleu un gato Stubbs (Q7627362) como alcalde.

Some constraint types, currently one-of constraint and allowed qualifiers constraint, are also used to provide better suggestions when editing statements.

Note: Technically a property constraint is a statement (on a property) of a particular constraint type, specified via property constraint (P2302). So strictly speaking constraint and constraint type refer to two different things, for the sake of brevity this page however sometimes refers to constraint types simply as constraints.

Item Páxina de axuda Mensaxe de vulneración de restricións
single-value constraint (Q19474404) Help:Property constraints portal/Single value MediaWiki:Wbqc-violation-message-single-value
distinct-values constraint (Q21502410) Help:Property constraints portal/Unique value
format constraint (Q21502404) Help:Property constraints portal/Format
subject type constraint (Q21503250) Help:Property constraints portal/Type
value-type constraint (Q21510865) Help:Property constraints portal/Value type
multi-value constraint (Q21510857) Help:Property constraints portal/Multi value MediaWiki:wbqc-violation-message-multi-value

Datatype-independent constraints

Constraints to restrict where a property may be added

property scope constraint
This property should only be used for certain scopes (main value of a statement, in a reference, as qualifier).
allowed-entity-types constraint
This property should only be used on certain entity types. Example: Wikidata property example (P1855) (properties).
subject type constraint
Os elementos con esta propiedade deberían ter un tipo concreto. Exemplo: elementos con date of birth (P569) deberían ser instance of (P31) human (Q5) ou animal (Q729).
conflicts-with constraint
Os elementos con esta propiedade non deberían ter determinadas propiedades ou declaracións a maiores. Exemplos: sex or gender (P21) entra en conflito con author (P50), que, á súa vez, entra en conflito con instance of (P31)human (Q5).
item-requires-statement constraint
Os elementos que usan esta propiedade deberían levar tamén uns tipos determinados de declaracións. Por exemplo, os elementos con killed by (P157) deben levar place of death (P20), date of death (P570) e manner of death (P1196)homicide (Q149086).
contemporary constraint
Elementos con esta propiedade e estes valores específicos de propiedade deberían coexistir chegado o momento. Exemplos: mother (P25), country of citizenship (P27).
label in language constraint
Items using this property should also have a label in a certain language. For example, items with Vietnamese middle name (P8500) should have a Vietnamese label.
description in language constraint
Items using this property should also have a description in a certain language.
lexeme requires language constraint
This property should be used on lexemes in a certain language. For example, Gran Enciclopèdia Catalana ID (former scheme) (P1296) should be used on Catalan (Q7026) lexemes.
lexeme requires lexical category constraint
lexeme-value-requires-lexical-category constraint


Constraints regarding the number of values

single-value constraint
Os elementos non deberían levar máis dunha declaración con esta propiedade. É de uso común en identificadores, pero tamén no caso doutras propiedades: por exemplo, as persoas xeralmente só levan un único place of birth (P19) e place of death (P20).
single-best-value constraint
Items should have one “best” statement with this property. Often used for properties that can change over time: for example, cities and countries usually have a single current head of government (P6).
multi-value constraint
Os elementos deberían ter máis dunha declaración con esta propiedade (ou ningunha). Úsase moi pouco, pero dentro dos exemplos atopamos cast member (P161), has tense (P3103) e has grammatical mood (P3161).
distinct-values constraint
tamén coñecido como. valor único e valor distinto. Dous obxectos non poden compartir o valor para esta propiedade, cada valor de obxecto debe ser único en tódalas declaracións desta propiedade en toda a Wikidata. Case tódolos identificadores de propiedade teñen esta restrición, xa que un identificador (ISBN, freebase ID, …) debería identificar de forma única a unha entidade. Outros exemplos inclúen flag (P163) e anthem (P85).

Constraints regarding qualifiers

allowed qualifiers constraint
As declaracións para esta propiedade non debería levar máis cualificadores que os que se listan. Exemplos: continent (P30) con cualificadores start time (P580) e end time (P582), e Freebase ID (P646) con ningún tipo de cualificador.
required qualifier constraint
As declaracións usadas para esta propiedade deben ter todos os cualificadores que se listen. Exemplo: stock exchange (P414) con ticker symbol (P249) e start time (P580).

Constraints regarding references

citation-needed constraint
Statements for this property should have at least one reference. Example: properties likely to be challenged.

Datatype-specific constraints

Constraints for datatype item/entity

value-type constraint
Os valores para esta propiedade deberían ser dun tipo determinado. Exemplo: mother (P25) debería ser instance of (P31) human (Q5) ou animal (Q729).
one-of constraint
Os valores para esta propiedade deberían ser únicos dentro dun grupo de elementos determinado. Exemplo: driving side (P1622) debería ser left (Q13196750) ou ben right (Q14565199).
none-of constraint
Values for this property should not be one of a given set of items. Example: instance of (P31) should not be woman (Q467).
value-requires-statement constraint
tamén coñecido como "declaración requirida". Os valores desta propiedade deberían tamén levar unhas declaracións concretas. Por exemplo: os valores screenwriter (P58) deberían levar sex or gender (P21) e occupation (P106)screenwriter (Q28389).
symmetric constraint
As declaracións que usan esta propiedade deberían sempre indicarse nas dúas direccións. Exemplos:sibling (P3373), twinned administrative body (P190).
inverse constraint
Statements using this property should always have an inverse statement. Examples: father (P22)/mother (P25) with child (P40).
complex constraint value label
Values for this property have to have a label in a specific language that matches a specific format.

Constraints for Quantity

integer constraint
Values for this property should be integers without decimal places.
allowed units constraint
Os valores para esta declaración deberían facer uso só de certas unidades (ou de ningunha). Exemplo: term length of office (P2097) (unidade: year (Q577)), population (P1082) (sen unidades).
no-bounds constraint
Values for this property should not use upper and lower bounds. This applies to most non-physical properties with quantity data type, for which the concept of uncertainties is not defined.
range constraint
Os valores para esta propiedade deberían estar dentro dun determinado rango ou intervalo. Exemplos: flattening (P1102) debe estar sempre entre cero e un, e UTC date of spacecraft launch (P619) non debería ser anterior a .
difference-within-range constraint
tamén coñecido como. diferenza dentro dun rango. A diferenza entre os valores desta e doutra propiedade deberían cinxirse a un determinado rango ou intervalo. Por exemplo, a diferenza entre date of birth (P569) e date of death (P570) ten que estar entre cero e 150  anos.

Constraints for Time

range constraint
Values for this property should be within a certain range or interval. Examples: flattening (P1102) is always between 0 and 1, and UTC date of spacecraft launch (P619) should not be before .
difference-within-range constraint
aka. difference within range. The difference between values for this property and for another property should be within a certain range or interval. For example, the difference between date of birth (P569) and date of death (P570) should be between 0 and 150 years.

Constraints for string-based datatypes

The constraint types listed in this section can be used for properties that have a string-based datatype.

format constraint
Os valores desta propiedade deben ter un formato determinado. É común que se use para os identificadores (n máximo número de díxitos, ten que comezar por unha letra determinada, consiste en tantos díxitos, etc.).

Constraints for Commons links

Commons link constraint
Os valores para esta declaración deberían ser ligazóns válidas en Wikimedia Commons. Exemplos: image (P18) (Espazo de nomes de “Ficheiro”), Commons category (P373) (Espazo de nomes de “Categoría”).

Tipos de restricións por orde alfabética

Algunhas restricións teñen modelos de seu e están listadas en Help:Property constraints/list of constraints.

Instrucións de uso

Constraint reports are shown for all logged in users when they visit an entity page.

 
A constraint violation report displayed on an item page.

Tamén podes revisar todas as restricións para un elemento en Special:ConstraintReport e ver un resumo dos avisos de vulneración en todo Wikidata en Wikidata:Database reports/Constraint violations.

Elementos de tipo de restrición

Hai un elemento por cada tipo de restrición, por exemplo subject type constraint (Q21503250).

Declaracións de restrición sobre propiedades

As restricións que se lle aplican a unha propiedade están especificadas como declaracións na propiedade, usando property constraint (P2302) e o elemento de tipo de restrición. Exemplo: sibling (P3373)property constraint (P2302)symmetric constraint (Q21510862). As declaracións obsoletas ignóranse, de tal xeito que cambiar o rango dunha declaración de restrición a "obsoleto" é unha forma axeitada de invalidar temporalmente unha restrición sen ter que borrala por completo.

Parámetros de descrición

Moitas das restricións poden ser configuradas: "unha de" contén a lista dos valores permitidos, "tipo" contén os tipos, etc. Estas configuracións que dan forma á restrición chámanse "parámetros".

Os parámetros de restrición especifícanse como cualificadores na declaración. Por exemplo:

Hai varios parámetros xerais que poden ser engadidos a calquera declaración de restrición.

; constraint status (P2316): co valor mandatory constraint (Q21502408), é un parámetro que pode usarse para marcar unha restrición como obrigatoria. As violacións de restricións obrigatorias son máis severas que as das restricións non obrigatorias.
exception to constraint (P2303)
Fai un listado das excepcións a unha restrición que son coñecidas. Nos elementos listados baixo este parámetro non se revisa a restrición.
group by (P2304)
Contén unha propiedade polos valores en que as violación de restrición poden agruparse. Ou o que é o mesmo: cando o informe da base de datos fai unha listaxe de violacións dunha restrición (para todos os elementos), os elementos con violacións agrúpanse polo valor que teñen na propiedade indicada no parámetro group by (P2304). (A extensión de restricións/trebello non utilizan este parámetro.)
constraint scope (P4680)
Especifica en que parte da declaración se lle aplica a restrición, usando os tres valores especiais constraint checked on main value (Q46466787), constraint checked on qualifiers (Q46466783) e constraint checked on references (Q46466805). Usa calquera combinación destes valores para especificar onde debe ser revisa a restrición. Se non se especificou o parámetro, o alcance por defecto dependerá do tipo de restrición. (Ten en conta que o informe da base de datos só fai listaxes das violacións do principal valor dunha declaración.)
exception to constraint (P2303): Lists known exceptions to the constraint. On the items listed under this parameter, the constraint is not checked.
group by (P2304): Contains a property by the values of which constraint violations should be grouped. That is, when the database reports list violations for a constraint (for all items), the items with violations are grouped by the value they have for the property given in the group by (P2304) parameter. (The constraints extension does not use this parameter.)
constraint scope (P4680): Specifies in which part of a statement the constraints applies, using the three special values constraint checked on main value (Q46466787), constraint checked on qualifiers (Q46466783) and constraint checked on references (Q46466805). Use any combination of these values to specify where a constraint should be checked. If the parameter is not specified, the default scope depends on the constraint type. (Note that the database reports only list violations on the main value of a statement.)
constraint clarification (P6607): Provides a simple explanation for the purpose of the constraint (why it exists) and recommended actions to resolve the constraint.


When constraints aren’t checked

Each individual constraint can list exceptions in its constraint parameters (see above); on any statements of that item, that constraint will not be checked at all. (There is currently no mechanism for specifying other entity types as exceptions, or for listing exceptions in a different way.)

On properties like Wikidata property example (P1855), Wikidata property example for properties (P2271), etc., as defined in wgWBQualityConstraintsPropertiesWithViolatingQualifiers, all constraint checks on qualifiers are skipped. For these properties, qualifiers have a different meaning than usual: they’re more similar to main statements than qualifiers of that statement, so it doesn’t really make sense to check constraints on those qualifiers.

WikibaseQualityConstraints only uses normal-rank and preferred-rank constraint statements and ignores deprecated-rank ones, so setting a constraint’s rank to deprecated can be used to “hide” it from WikibaseQualityConstraints. (KrBot uses all constraint statements regardless of rank.)

Restricións personalizadas

Cun pouco de coñecemento da SPARQL podes facer restricións moi complexas para aplicar a determinadas propiedades, máis aló das restricións que xa mencionamos. Tes máis información en Template:Complex constraint. Mira tamén a lista de propiedades que usan restricións complexas.

See also