Difference between revisions of "Template:Definitional Topic"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
This is the template for Definitional topics. This template is to be used for all terms (topics, the answers to which are definitions). It incorporates an ontology section where the ontology related to the term is summarized.  
 
This is the template for Definitional topics. This template is to be used for all terms (topics, the answers to which are definitions). It incorporates an ontology section where the ontology related to the term is summarized.  
 +
 +
Among other things, the template creates a hierarchy of classes and adds the following properties for ease of access:
 +
* <code><nowiki>Subsumed items</nowiki></code> - 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> - 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> - includes the page's superclasses, the superclasses of superclasses etc., but not itself.
 +
 +
NOTE: this inheritance hierarchy is created irrespective of the community and
 +
'''IMPORTANT:''' It is not to be conflated with the actual ontology of the term, stored in subobjects of <code><nowiki>SubObjectCategory=Topic Current Ontology</nowiki></code> with <code><nowiki>Ontological Question Type={Supertypes, Supertypes}</nowiki></code>.
  
 
It should be called in the following format:
 
It should be called in the following format:
Line 11: Line 19:
 
|Indefinite Article=
 
|Indefinite Article=
 
|Question=
 
|Question=
|Parent Topic=
 
 
|Description=
 
|Description=
 
|Authors List=
 
|Authors List=
Line 27: Line 34:
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
-->{{#set:Title={{PAGENAME}}|Question={{{Question|}}}|Order=1|Formulated Year={{{Formulated Year|}}}|Page Status={{{Page Status|Stub}}}|Editor Notes={{{Editor Notes|}}}|Authors List={{{Authors List|}}}|Topic Type=Definitional|}}<!--
 
-->{{#set:Title={{PAGENAME}}|Question={{{Question|}}}|Order=1|Formulated Year={{{Formulated Year|}}}|Page Status={{{Page Status|Stub}}}|Editor Notes={{{Editor Notes|}}}|Authors List={{{Authors List|}}}|Topic Type=Definitional|}}<!--
 +
--><!--
 +
--><!-- set the parents 
 +
-->{{#set:Subsumes items={{FULLPAGENAME}}}}<!--
 +
-->{{#arraydefine:varParentsArray<!--
 +
-->|{{#ask:<!--
 +
  -->[[SubObjectCategory::Topic Current Ontology]]<!--
 +
  -->[[Ontological Question Type::Supertypes]]<!--
 +
  -->[[Term::{{FULLPAGENAME}}]]<!--
 +
  -->|?Supertypes<!--
 +
  -->|format=list<!--
 +
  -->|mainlabel=-<!--
 +
  -->|headers=hide<!--
 +
  -->|link=none<!--
 +
  -->}}<!-- ask
 +
-->| , |unique<!--
 +
-->}}<!-- arraydefine
 +
-->{{#arrayunique:varParentsArray}}<!--
 +
-->{{#arrayprint:varParentsArray||@@@@|{{#set:Parent Topic=@@@@}}|}}<!--
 +
--><!--
 +
--><!-- set the inheritance hierarchy
 +
-->{{#set:Subsumes items={{FULLPAGENAME}}}}<!--
 +
-->{{#arraydefine:varChildrenArray|{{#ask: [[-Subsumes items::<q>[[Parent Topic::{{FULLPAGENAME}}]]</q>]]|headers=hide|link=none}}|,|}}<!--
 +
-->{{#arrayunique:varChildrenArray}}<!--
 +
-->{{#arrayprint:varChildrenArray||@@@@|{{#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::{{FULLPAGENAME}}]]</q>]]|headers=hide|link=none}}|,|}}<!--
 +
-->{{#arrayunique:varSubsumeArray}}<!--
 +
-->{{#arrayprint:varSubsumeArray||@@@@|{{#set:Subsumes items=@@@@|Descendants::@@@@}}}}|}}<!--
 
--><!--
 
--><!--
 
--><!-- set word forms
 
--><!-- set word forms

Revision as of 15:33, 12 January 2023

This is the template for Definitional topics. This template is to be used for all terms (topics, the answers to which are definitions). It incorporates an ontology section where the ontology related to the term is summarized.

Among other things, the template creates a hierarchy of classes and adds the following properties for ease of access:

  • Subsumed items - 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.
  • Descendant items - 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.
  • Ancestor items - includes the page's superclasses, the superclasses of superclasses etc., but not itself.

NOTE: this inheritance hierarchy is created irrespective of the community and IMPORTANT: It is not to be conflated with the actual ontology of the term, stored in subobjects of SubObjectCategory=Topic Current Ontology with Ontological Question Type={Supertypes, Supertypes}.

It should be called in the following format:

{{Definitional Topic
|Singular Capitalized=
|Singular Lowercase=
|Plural Capitalized=
|Plural Lowercase=
|Indefinite Article=
|Question=
|Description=
|Authors List=
|Formulated Year=
|Academic Events=
|Prehistory=
|History=
|Current View=
|Related Topics=
|Page Status=
|Editor Notes=
}}

Edit the page to see the template text.