Open main menu

Changes

no edit summary
The template creates a hierarchy of classes for the given term by adding the following lists for ease of access:
* <code><nowiki>Subsumed Subsumes items</nowiki></code> - A list that includes the page itself as well as all of its subclasses, the subclasses of subclasses etc. This is similar to MediWiki's notion of Category where a category includes all of its subcategories as well as itself.* <code><nowiki>Descendant items</nowiki></code> - A list that includes the page's subclasses, the subclasses of subclasses etc., but not itself. This data can be used to check if a given class is a subtype (sub, subtype, etc.) of another class but not itself. I.e. the same as <code><nowiki>Subsumes items</nowiki></code> minus the term itself.* <code><nowiki>Subsumed items</nowiki></code> - A list that includes the page itself as well as all of its superclasses, the superclasses of superclasses etc. This list is useful when checking what heritable questions should be available for a given term.* <code><nowiki>Ancestor items</nowiki></code> - A list that includes the page's superclasses, the superclasses of superclasses etc., but not itself. I.e. the same as <code><nowiki>Subsumed items</nowiki></code> minus the term itself.
In addition, it creates the following multivalued properties (lists):
-->{{#arrayprint:varChildrenArray||@@@@|{{#set:Child Class=@@@@}}|}}<!--
--><!--
--><!-- set the inheritance hierarchysubsumes and descendants hierarchies
-->{{#set:Subsumes items={{{term|}}}}}<!--
-->{{#arraydefine:varSubsumeArrayvarSubsumesArray|{{#ask: [[-Subsumes items::<q>[[Parent Class::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!-- -->{{#arrayunique:varSubsumeArrayvarSubsumesArray}}<!-- -->{{#arrayprint:varSubsumeArrayvarSubsumesArray||@@@@|{{#set:Subsumes items=@@@@|Descendant items=@@@@}}|}}<!--
--><!--
--><!-- have to do it again to include the subsumed elements of the subsumed elements
-->{{#arraydefine:varSubsumeArrayvarSubsumesArray|{{#ask: [[-Subsumes items::<q>[[Parent Class::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!-- -->{{#arrayunique:varSubsumeArrayvarSubsumesArray}}<!-- -->{{#arrayprint:varSubsumeArrayvarSubsumesArray||@@@@|{{#set:Subsumes items=@@@@|Descendant items=@@@@}}|}}<!--
--><!--
--><!-- set the inheritance hierarchysubsumed and ancestor hierarchies -->{{#set:Subsumed items={{{term|}}}}}<!-- -->{{#arraydefine:varSubsumeArrayvarSubsumedArray|{{#ask: [[-Ancestor Subsumed items::<q>[[Child Class::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!-- -->{{#arrayunique:varSubsumeArrayvarSubsumedArray}}<!-- -->{{#arrayprint:varSubsumeArrayvarSubsumedArray||@@@@|{{#set:Subsumed items=@@@@|Ancestor items=@@@@}}|}}<!--
--><!--
--><!-- have to do it again to include the subsumed elements of the subsumed elements
-->{{#arraydefine:varSubsumeArrayvarSubsumedArray|{{#ask: [[-Ancestor Subsumed items::<q>[[Child Class::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!-- -->{{#arrayunique:varSubsumeArrayvarSubsumedArray}}<!-- -->{{#arrayprint:varSubsumeArrayvarSubsumedArray||@@@@|{{#set:Subsumed items=@@@@|Ancestor items=@@@@}}|}}<!--
--><!--
--><!--
-->}}<!-- if term
--></includeonly>