Template talk:Constraint:Type

Latest comment: 6 years ago by Peter F. Patel-Schneider in topic How to specify "subclass or instance"?

Please review template name, property name, description and etc. My English is not well. — Ivan A. Krestinin (talk) 18:00, 9 June 2013 (UTC)Reply

How can I constraint type to more than one item like in this? Infovarius (talk) 10:15, 22 October 2013 (UTC)Reply

Do subclasses only go one level deep?

edit

I noticed that legislative body (P194) requires elements to have "instance of => administrative division" or one of its subclasses. The problem is that many pages have "instance of => US state" (or Canadian province or region of Italy, etc), all of which have "instance of => first-level administrative division (Q13220202)", which in turn has "subclass of => administrative division". Does that mean that this constraint is only looking one level deep for subclasses? If so, should all of the pages like US state, Canadian province, and region of Italy be given "subclass of => administrative division"? --Arctic.gnome (talk) 05:08, 26 November 2013 (UTC)Reply

How to specify "subclass or instance"?

edit

@Ivan A. Krestinin: For field of this occupation (P425) the type constraint {{Constraint:Type|class=Q13516667|relation=...}} refers to occupation (Q13516667) (and implicitly subclasses of it, like profession (Q28640) because of

). Now, both

are considered valid items to carry field of this occupation (P425) but playing with the "relation" parameter of Template:Constraint:Type between "subclass" and "instance" either one or the other item passes the constraint test, never both. Could the relation parameter be slightly extended to allow combinations of properties, perhaps even more than P31 and P279 (I could imagine that part of (P361) sometimes also would be useful here)? Or could any problem already be solved if "relation=subclass" would automatically imply "relation=instance"? -- Gymel (talk) 08:14, 23 September 2014 (UTC)Reply

Same discussions appears from time to time. Last time I saw discussion about chemical compound (Q11173). The question is: what is occupation (Q13516667)? Solution depends of answer to this question. — Ivan A. Krestinin (talk) 18:31, 23 September 2014 (UTC)Reply
Not at all. occupation (Q13516667) is just something broader than profession (Q28640) but the problem actually was exactly the same two weeks ago when we formulated {{Constraint:Type|class=28640|relation=...}}. The problem might be that is wrong and should be . But and this again "is a" profession (as instance or class) and so on: Not using P31 for professions but P279 IMHO would demand to remove any reference to profession (Q28640) from most professions since it should be P279-wise inherited from the top level item (probably scientist or something even broader). The current situation is, that some items with P245 are (P31) professions and other items are subclasses (P279) of such items and the "relation" parameter allows to specify one of these two cases, leaving the other one as constraint violation. -- Gymel (talk) 19:33, 23 September 2014 (UTC)Reply
I suppose that the solution here is to use - then we have no counter examples. profession (Q28640) we can consider as a metaclass (Q19361238). --Infovarius (talk) 10:54, 6 October 2016 (UTC)Reply

  Notified participants of WikiProject property constraints

@Gymel, Ivan A. Krestinin, D1gggg, Jura1: WikibaseQualityConstraints support for the instance or subclass of (Q30208840) relation is now deployed. Let me know if anything’s not working as expected. --Lucas Werkmeister (WMDE) (talk) 14:26, 12 February 2018 (UTC)Reply
I find this constratint type very suspect, and its need an indication that sloppy modelling has happened. Consider, for example, professions. It is not really the case that economist is a subclass of profession, but that economist is a subclass of professional (which is itself a subclass of person). So professions are instances of profession, and are themselves classes of people. Peter F. Patel-Schneider (talk) 12:01, 24 May 2018 (UTC)Reply
Return to "Constraint:Type" page.