مساعدة:بوابة قيود الخواص/النوع
This is the documentation page for a particular constraint type. See Help:Property constraints portal for a general overview of property constraints. |
تحدد 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)، يتم فحص هذا القيد فقط على القيمة الرئيسية لبيان.
الإجراءات الممكنة
هناك عدة طرق ممكنة لمعالجة انتهاك هذا القيد:
- من المحتمل ألا يحتوي هذا العنصر على البيان مطلقا، وأنه تجب إزالة البيان.
- من المحتمل أن العنصر يفتقد إلى بيان instance of (P31) أو subclass of (P279) المناسب.
- من المحتمل أن يحتوي العنصر على البيان الصحيح instance of (P31) أو subclass of (P279) ، لكن العنصر المرتبط يفتقد بيان subclass of (P279)، على سبيل المثال، إذا كان العنصر الذي يحتوي على population (P1082) instance of (P31) big city (Q1549591)، لكن big city (Q1549591) كان يفتقد subclass of (P279) city (Q515)، فقد يؤدي ذلك إلى حدوث انتهاك في العنصر على الرغم من الخطأ في الواقع في big city (Q1549591).
- من الممكن أن يكون هذا البند استثناء نادرا لكن شرعيا للقيود، ولا يجب فعل أي شيء.
الوسائط
يحتوي هذا القيد على وسيطين (كلاهما إلزامي):
- 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 |
| ||||||||||||||||||
add value |
Example 2
Item which has drug or therapy used for treatment (P2176) data should be subclass of disease.
property constraint |
| ||||||||||||||
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.
- Category:Properties with constraints on type
- SPARQL query - click the execute button at the linked page to see the query result.