مساعدة:بوابة قيود الخواص/النوع

This page is a translated version of the page Help:Property constraints portal/Subject class and the translation is 62% complete.

تحدد subject type constraint (Q21503250) أن العناصر ذات خاصية معينة يجب أن يكون لها نوع معطى، يُعرَف أيضًا باسم نطاق الخاصية.

على سبيل المثال، يجب أن تكون العناصر التي تحتوي على date of birth (P569) instance of (P31) human (Q5) أو animal (Q729)، ويجب أن تكون العناصر ذات sRGB color hex triplet (P465) subclass of (P279) color (Q1075).

تُؤخَذ في الاعتبار العلاقات بين الفئات الفرعية وفقا لـ subclass of (P279): إذا كان القيد يقتضي أن يكون العنصر $41476، فإنه لا يمثل انتهاكا إذا كان العنصر skyscraper (Q11303); بسبب وجود subclass of (P279) من skyscraper (Q11303) إلى building (Q41176). (في حالة عدم السماح بعلاقة غير مباشرة، يمكن استخدام item-requires-statement constraint (Q21503247)).

إذا لم يتم تحديد constraint scope (P4680)، يتم فحص هذا القيد فقط على القيمة الرئيسية لبيان.

الإجراءات الممكنة

هناك عدة طرق ممكنة لمعالجة انتهاك هذا القيد:

الوسائط

يحتوي هذا القيد على وسيطين (كلاهما إلزامي):

relation (P2309)
يجب أن يكون instance of (Q21503252) أو subclass of (Q21514624) أو instance or subclass of (Q30208840)، يصف ما إذا كان يجب أن يكون العنصر مثيلا للفئة(ات)، أو فئة فرعية منه/ها، أو ما إذا كان كلاهما مسموحا به، يجب إعطاء هذا الوسيط مرة واحدة فقط.
class (P2308)
يسرد الفئات التي ينبغي أن تكون للعنصر، يجب أن تكون كل فئة معرف عنصر (no value Help أو unknown value Help غير مسموح بها).

Examples

Example 1

Item which has place of birth (P19) data should be instance of human, fictional character or animal.

property constraint
  subject type constraint
class human
fictional character
animal
relation instance of
0 reference
add reference


add value

Example 2

Item which has drug or therapy used for treatment (P2176) data should be subclass of disease.

property constraint
  subject type constraint
class disease
relation subclass of
0 reference
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.

Lists

Lists of properties which are set type constraint.