مساعدة:بوابة قيود الخواص/وحدات
This is the documentation page for a particular constraint type. See Help:Property constraints portal for a general overview of property constraints. |
يحدد allowed units constraint (Q21514353) أنه يمكن استخدام مجموعة معينة فقط من الوحدات مع بيان بنوع البيانات كمية.
على سبيل المثال، الوحدة الوحيدة الصالحة لـUTC timezone offset (P2907) هي hour (Q25235).
إذا لم يتم تحديد constraint scope (P4680)، فسيتم فحص هذا القيد في كل مكان.
الإجراءات الممكنة
هناك عدة طرق ممكنة لمعالجة انتهاك هذا القيد:
- من المحتمل ألا تكون الوحدة هي الصحيحة لاستخدامها للكمية، ويجب استخدام وحدة مماثلة ولكن مختلفة بدلا من ذلك، تحقق من قائمة الوحدات المسموح بها لاستخدام وحدة قابلة للتطبيق.
- من المحتمل ألا يتم تحديد الوحدة على الإطلاق (كمية لا بعدية)، وأنه تجب إزالة الوحدة.
- من الممكن أن تكون الوحدة استثناءً نادرا لكن شرعيا للقيود، ويجب عدم القيام بأي شيء.
الوسائط
لهذا القيد وسيط إلزامي واحد
- item of property constraint (P2305)
- يحتوي على الوحدات المسموح بها، يجب أن يحتوي على الوحدة(ات) المسموح بها، والتي إما عناصر أو no value Help للسماح بكميات بلا أبعاد. (unknown value Help غير مسموح بها.)
Examples
Example 1
Unit for temperature (P2076) should be one of degree Celsius (Q25267), kelvin (Q11579), or degree Fahrenheit (Q42289).
property constraint |
| ||||||||||||||||
add value |
Example 2 - no value
Mohs scale of mineral hardness (Q41472) is number used to represent hardness of materials. For example, quartz is 7, and diamond is 10. As definition, Mohs' hardness (P1088) doesn't have unit. In such case, "no value" is used as follows. "no value" is added to statements by clicking on the icon beside the value field that looks like this .
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.
List of violations of this constraint: Database reports/Constraint violations/P2076#Units
Lists
Lists of properties which are set allowed units constraint.
- Category:Properties with units constraints
- SPARQL query - click the execute button at the linked page to see the query result.