Ayuda:Portal de restricciones de propiedad

This page is a translated version of the page Help:Property constraints portal and the translation is 41% complete.
Outdated translations are marked like this.
Informe de violación de restricción de propiedad de Wikidata en la página del artículo.

Las restricciones de propiedad son reglas sobre las propiedades que especifican cómo deben usarse las propiedades. El modelo de Wikidata en sí es muy flexible: nada impide agregar Universe (Q1) como head of government (P6). Sin embargo, una restricción en la propiedad puede indicar que head of government (P6) suele ser un humano.

Las restricciones son sugerencias, no restricciones firmes, y están pensadas como una ayuda u orientación para el editor. Pueden tener excepciones: por ejemplo, la ciudad de Talkeetna (Q668224) eligió al gato Stubbs (Q7627362) como alcalde honorario.

Algunos tipos de restricciones, actualmente one-of constraint y allowed qualifiers constraint, también se utilizan para proporcionar mejores sugerencias al editar declaraciones.

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.

Tipos de restricciones populares

Item Página de ayuda Mensaje de violación
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
Esta propiedad solo debe usarse en ciertos tipos de entidades. Ejemplo: Wikidata property example (P1855) (propiedades).
subject type constraint
Items with this property should have a certain type. Example: Items with date of birth (P569) should be instance of (P31) human (Q5) or animal (Q729).
conflicts-with constraint
Los elementos con esta propiedad no deben tener ciertas propiedades o declaraciones. Ejemplos: sex or gender (P21) entra en conflicto con author (P50), que a su vez entra en conflicto con instance of (P31)human (Q5).
item-requires-statement constraint
Los elementos que utilizan esta propiedad también deben tener ciertas declaraciones. Por ejemplo, los elementos con killed by (P157) deben tener place of death (P20), date of death (P570) y manner of death (P1196)homicide (Q149086).
contemporary constraint
Los elementos con esta propiedad y los valores de esta propiedad deben coexistir en algún momento en el tiempo. Ejemplos: mother (P25), country of citizenship (P27).
label in language constraint
Los elementos que utilizan esta propiedad también deben tener una etiqueta en un idioma determinado. Por ejemplo, los artículos con Vietnamese middle name (P8500) deben tener una etiqueta vietnamita.
description in language constraint
Items using this property should also have a description in a certain language.
lexeme requires language constraint
Esta propiedad debe usarse en lexemas en un idioma determinado. Por ejemplo, Gran Enciclopèdia Catalana ID (former scheme) (P1296) debe usarse en lexemas de Catalan (Q7026).
lexeme requires lexical category constraint
lexeme value requires lexical category constraint


Constraints regarding the number of values

single-value constraint
Items should have no more than one statement with this property. Often used for identifiers, but also many other properties: for example, people generally only have a single place of birth (P19) and 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
Los elementos deben tener más de una declaración con esta propiedad (o ninguna). Rara vez se usa, pero en los ejemplos se incluyen cast member (P161), has tense (P3103) y has grammatical mood (P3161).
distinct-values constraint
aka. unique value and distinct value. No two items should share a value for this property; each item’s value should be unique across all statements for this property in all of Wikidata. Almost all identifier properties have this constraint, since an identifier (ISBN, freebase ID, …) should uniquely identify an entity. Other examples include flag (P163) and anthem (P85).

Constraints regarding qualifiers

allowed qualifiers constraint
Statements for this property should not have any qualifiers other than the listed ones. Examples: continent (P30) with qualifiers start time (P580) and end time (P582), and Freebase ID (P646) with no qualifiers at all.
required qualifier constraint
Las declaraciones de esta propiedad deben tener todos los calificadores listados. Ejemplo: stock exchange (P414) con ticker symbol (P249) y start time (P580).

Constraints regarding references

citation needed constraint
Las declaraciones de esta propiedad deben tener al menos una referencia. Ejemplo: propiedades probables a ser impugnadas.

Datatype-specific constraints

Constraints for datatype item/entity

value-type constraint
Values for this property should have a certain type. Example: mother (P25) should be instance of (P31) human (Q5) or animal (Q729).
one-of constraint
Values for this property should be one of a given set of items. Example: driving side (P1622) should be either left (Q13196750) or right (Q14565199).
none-of constraint
Los valores de esta propiedad no deben ser uno de un conjunto dado de elementos. Ejemplo: instance of (P31) no debería ser woman (Q467).
value-requires-statement constraint
aka. target required statement. Values for this property should also have certain other statements. For example, screenwriter (P58) values should have sex or gender (P21) and occupation (P106)screenwriter (Q28389).
symmetric constraint
Statements using this property should always exist in both directions. Examples: sibling (P3373), twinned administrative body (P190).
inverse constraint
Las declaraciones que utilizan esta propiedad siempre deben tener una declaración inversa. Ejemplos: father (P22) o mother (P25) con 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
Los valores de esta propiedad deben ser enteros sin decimales.
allowed units constraint
Values for this statement should only use certain units (or none). Examples: term length of office (P2097) (unit: year (Q577)), population (P1082) (no units).
no-bounds constraint
Los valores de esta propiedad no deben usar límites superiores e inferiores. Esto se aplica a la mayoría de las propiedades no físicas con tipo de datos de «cantidad», para los cuales no está definido el concepto de incertidumbre.
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
alias diferencia dentro del rango. La diferencia entre los valores de esta propiedad y de otra propiedad debe estar dentro de un cierto rango o intervalo. Por ejemplo, la diferencia entre date of birth (P569) y date of death (P570) debe estar entre 0 y 150 años.

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
Los valores de esta propiedad deben tener un formato determinado. A menudo se usa para identificadores (n dígitos de longitud, comienza con una letra determinada, consta de dígitos, ...).

Constraints for Commons links

Commons link constraint
Los valores de esta declaración deben ser enlaces válidos a Wikimedia Commons. Ejemplos: image (P18) (espacio de nombres «Archivo»), Commons category (P373) (espacio de nombres «Categoría»).

Tipos de restricción ordenados alfabéticamente

Several constraints have their own predefined templates and are listed at Help:Property constraints/list of constraints.

Instrucciones de uso

Los informes de restricciones se muestran para todos los usuarios registrados cuando visitan una página de entidad.

 
Un informe de infracción de restricciones que se muestra en la página de un artículo.

You can also check all constraints for an item on Special:ConstraintReport. This page is provided by WikibaseQualityConstraints (also known as "constraints extension"). A bot also maintains reports of constraint violation; see a summary of violations across Wikidata on Wikidata:Database reports/Constraint violations.

Elementos de tipo de restricción

There is an item for each constraint type, e.g. subject type constraint (Q21503250).

Declaraciones de restricción sobre propiedades

Constraints for a property are specified as statements on the property, using property constraint (P2302) and the constraint type item. For example: sibling (P3373)property constraint (P2302)symmetric constraint (Q21510862). Deprecated statements are ignored, so changing a constraint statement’s rank to “deprecated” is a convenient way to temporarily disable a constraint without completely removing it.

Parámetros de restricción

Many constraints are configurable: one of has a list of the permitted values, type contains the type, etc. These settings which configure the constraint are called parameters.

Constraint parameters are specified as qualifiers on the statement. For example:

There are several general parameters that can be added to any constraint statement:

constraint status (P2316): With the value mandatory constraint (Q21502408), this parameter can be used to mark a constraint as mandatory. Violations of mandatory constraints are more severe than violations of non-mandatory ones. Non-mandatory constraints should have a value of suggestion constraint (Q62026391).
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.)

Restricciones personalizadas

With some knowledge of SPARQL one can make very complex constraints for certain properties, above and beyond the restrictions mentioned above. More information is available at Template:Complex constraint. The reports are maintained by a third-party bot and not part of Wikibase software. See also the list of properties using complex constraints.

Véase también