Open main menu

Changes

no edit summary
* <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.
* <code><nowiki>Ancestor items</nowiki></code> - A list that includes the page's superclasses, the superclasses of superclasses etc., but not itself.
 
In addition, it creates the following multivalued properties (lists):
* <code><nowiki>Parent Topic</nowiki></code> - The list of immediate parent terms (no grandparents).
* <code><nowiki>Child Topic</nowiki></code> - The list of immediate child terms (no grandchildren).
 
'''NOTE:''' As any "set" template, it doesn't print anything on the page, but merely sets the appropriate values.
-->{{#arrayprint:varParentsArray||@@@@|{{#set:Parent Topic=@@@@}}|}}<!--
--><!--
--><!-- set the inheritance hierarchy
-->{{#set:Subsumes items={{{term|}}}}}<!--
-->{{#arraydefine:varSubsumeArray|{{#ask: [[-Subsumes items::<q>[[Parent Topic::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!--
-->{{#arrayunique:varSubsumeArray}}<!--
-->{{#arrayprint:varSubsumeArray||@@@@|{{#set:Subsumes items=@@@@|Descendant items=@@@@}}|}}<!--
--><!--
--><!-- have to do it again to include the subsumed elements of the subsumed elements
-->{{#arraydefine:varSubsumeArray|{{#ask: [[-Subsumes items::<q>[[Parent Topic::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!--
-->{{#arrayunique:varSubsumeArray}}<!--
-->{{#arrayprint:varSubsumeArray||@@@@|{{#set:Subsumes items=@@@@|Descendant items=@@@@}}|}}<!--
--><!--
--><!-- set the children
-->{{#arraydefine:varChildrenArray<!--
--><!--
--><!-- set the inheritance hierarchy
-->{{#set:Subsumes items={{{term|}}}}}<!-- -->{{#arraydefine:varSubsumeArray|{{#ask: [[-Subsumes Ancestor items::<q>[[Parent Child Topic::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!--
-->{{#arrayunique:varSubsumeArray}}<!--
-->{{#arrayprint:varSubsumeArray||@@@@|{{#set:Subsumes items=@@@@|Descendant Ancestor items=@@@@}}|}}<!--
--><!--
--><!-- have to do it again to include the subsumed elements of the subsumed elements
-->{{#arraydefine:varSubsumeArray|{{#ask: [[-Subsumes Ancestor items::<q>[[Parent TopicChildTopic::{{{term|}}}]]</q>]]|headers=hide|link=none}}|,|}}<!--
-->{{#arrayunique:varSubsumeArray}}<!--
-->{{#arrayprint:varSubsumeArray||@@@@|{{#set:Subsumes items=@@@@|Descendant Ancestor items=@@@@}}|}}<!-- --><!--
--><!--
-->}}<!-- if term
--></includeonly>