Difference between revisions of "Template:SetTermOntologySubtypes"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
* <code><nowiki>SubObjectCategory</nowiki></code> = "Topic Current Ontology".
 
* <code><nowiki>SubObjectCategory</nowiki></code> = "Topic Current Ontology".
 
* <code><nowiki>Community</nowiki></code> - the community that accepts the theory.
 
* <code><nowiki>Community</nowiki></code> - the community that accepts the theory.
* <code><nowiki>Term</nowiki></code> - the term page. Note that this should be the definitional topic page, not its the page for the respective ontological question.
+
* <code><nowiki>Term</nowiki></code> - the term page. Note that this should be the definitional topic page, not the page for the respective ontological question.
 
* <code><nowiki>Topic</nowiki></code> - the page for the respective ontological question for ease of access.
 
* <code><nowiki>Topic</nowiki></code> - the page for the respective ontological question for ease of access.
* <code><nowiki>Ontological Question Type</nowiki></code> - Disjointness
+
* <code><nowiki>Ontological Question Type</nowiki></code> - Subtypes
 
* <code><nowiki>Disjoint Group</nowiki></code> - the name of disjoint group.
 
* <code><nowiki>Disjoint Group</nowiki></code> - the name of disjoint group.
 
* <code><nowiki>Theory</nowiki></code> - the pages for the respective theories for ease of access (uses <code><nowiki>|+sep=,</nowiki></code>).
 
* <code><nowiki>Theory</nowiki></code> - the pages for the respective theories for ease of access (uses <code><nowiki>|+sep=,</nowiki></code>).
Line 20: Line 20:
 
-->{{#if: {{{term|}}}<!--
 
-->{{#if: {{{term|}}}<!--
 
  -->|<!--  
 
  -->|<!--  
 +
  -->{{#vardefine: varTerm|{{{term|}}}}}<!--
 
   --><!-- get the topic page
 
   --><!-- get the topic page
   -->{{#vardefine: varTopic|{{FormatSubtypesTopicTitle|term={{{term|}}}|}}|}}<!--
+
   -->{{#vardefine: varTopic|{{FormatSubtypesTopicTitle|term={{#var: varTerm}}|}}|}}<!--
 
   --><!--  
 
   --><!--  
 
   --><!-- get the list of the communities where the topic is accepted  
 
   --><!-- get the list of the communities where the topic is accepted  
   -->{{#arraydefine: varCommunities|{{PrintTopicCurrentlyAcceptedInCommunitiesList|topic={{#var: varTopic}}|link=none}}|,|}}<!--  
+
   -->{{#arraydefine: varCommunities|{{PrintTopicCurrentlyAcceptedInCommunitiesList|topic={{#var: varTopic}}|link=none}}|,|unique}}<!--  
 
   -->{{#arrayunique: varCommunities}}<!-- remove duplicates and empty values
 
   -->{{#arrayunique: varCommunities}}<!-- remove duplicates and empty values
 
   -->{{#arrayprint: varCommunities||varCommunity<!--
 
   -->{{#arrayprint: varCommunities||varCommunity<!--
Line 30: Line 31:
 
     -->{{#arraydefine: varTheories|{{PrintTopicAnswerAcceptedInCommunity|topic={{#var: varTopic}}|community=varCommunity|link=none}}|,|}}<!--
 
     -->{{#arraydefine: varTheories|{{PrintTopicAnswerAcceptedInCommunity|topic={{#var: varTopic}}|community=varCommunity|link=none}}|,|}}<!--
 
     -->{{#arrayunique: varTheories}}<!-- remove duplicates and empty values
 
     -->{{#arrayunique: varTheories}}<!-- remove duplicates and empty values
     -->{{#ifexpr: {{#arraysize:varTheories}} = 0<!-- check if the array exists
+
     -->{{#ifexpr: {{#arraysize:varTheories}} = 0 <!-- check if the array exists
 
     -->|<!--
 
     -->|<!--
 
       --><!-- no claims found: store a subobject leaving Disjoint Group, Disjoints, and theory empty
 
       --><!-- no claims found: store a subobject leaving Disjoint Group, Disjoints, and theory empty
 
       -->{{#subobject:<!--  
 
       -->{{#subobject:<!--  
 
       -->|SubObjectCategory=Topic Current Ontology<!--  
 
       -->|SubObjectCategory=Topic Current Ontology<!--  
       -->|Term={{{term|}}}<!--  
+
       -->|Term={{#var: varTerm}}<!--  
 
       -->|Topic={{#var: varTopic}}<!--  
 
       -->|Topic={{#var: varTopic}}<!--  
 
       -->|Ontological Question Type=Subtypes<!--  
 
       -->|Ontological Question Type=Subtypes<!--  
Line 47: Line 48:
 
     -->|<!--
 
     -->|<!--
 
       --><!-- some claims are found: get the names of disjoint groups in the correct order  
 
       --><!-- some claims are found: get the names of disjoint groups in the correct order  
       -->{{#arraydefine: varGroups|{{PrintAcceptedDisjointGroupsList|term={{{term|}}}|Community=varCommunity}}|,|}}<!--
+
       -->{{#arraydefine: varGroups|{{PrintAcceptedDisjointGroupsList|term={{#var: varTerm}}|community=varCommunity}}|,|}}<!--
 
       --><!--
 
       --><!--
 
       --><!-- for each group, get the accepted theories
 
       --><!-- for each group, get the accepted theories
 
       -->{{#arrayprint: varGroups||varGroup<!--
 
       -->{{#arrayprint: varGroups||varGroup<!--
 
       -->|<!--  
 
       -->|<!--  
        --><!-- get the group order
 
        --><!-- TODO HERE
 
 
         --><!--  
 
         --><!--  
 
         --><!-- get the children
 
         --><!-- get the children
         -->{{#arraydefine: varSubtypes<!--
+
         -->{{#arraydefine: arraySubtypes<!--
 
           -->|<!--
 
           -->|<!--
 
           -->{{#ask:<!--
 
           -->{{#ask:<!--
Line 69: Line 68:
 
             -->|sort=Element.Child<!--
 
             -->|sort=Element.Child<!--
 
             -->|order=asc<!--
 
             -->|order=asc<!--
 +
            -->|link=none<!--
 
             -->|limit=10000<!--
 
             -->|limit=10000<!--
 
           -->}}<!--
 
           -->}}<!--
Line 75: Line 75:
 
         --><!--
 
         --><!--
 
         --><!-- get the theories
 
         --><!-- get the theories
         -->{{#arraydefine: varSubtypeTheories<!--
+
         -->{{#arraydefine: arraySubtypeTheories<!--
 
           -->|<!--
 
           -->|<!--
 
           -->{{#ask:<!--
 
           -->{{#ask:<!--
Line 88: Line 88:
 
             -->|sort=Element.Child<!--
 
             -->|sort=Element.Child<!--
 
             -->|order=asc<!--
 
             -->|order=asc<!--
 +
            -->|link=none<!--
 
             -->|limit=10000<!--
 
             -->|limit=10000<!--
 
           -->}}<!--
 
           -->}}<!--
 
           -->| , |unique<!--
 
           -->| , |unique<!--
 
         -->}}<!-- arraydefine theories
 
         -->}}<!-- arraydefine theories
 +
        --><!--
 
         --><!--
 
         --><!--
 
         --><!-- store the subobject
 
         --><!-- store the subobject
 +
        --><!-- store the subobject
 
         -->{{#subobject:<!--  
 
         -->{{#subobject:<!--  
 
           -->|SubObjectCategory=Topic Current Ontology<!--  
 
           -->|SubObjectCategory=Topic Current Ontology<!--  
           -->|Term={{{term|}}}<!--  
+
           -->|Term={{#var: varTerm}}<!--  
 
           -->|Topic={{#var: varTopic}}<!--  
 
           -->|Topic={{#var: varTopic}}<!--  
 
           -->|Ontological Question Type=Subtypes<!--  
 
           -->|Ontological Question Type=Subtypes<!--  
 
           -->|Community=varCommunity<!--  
 
           -->|Community=varCommunity<!--  
 
           -->|Disjoint Group=varGroup<!--  
 
           -->|Disjoint Group=varGroup<!--  
           -->|Disjoint Group Order=<!--  
+
           -->|Disjoint Group Order={{PrintDisjointGroupOrder|disjointgroup=varGroup}}<!--  
           -->|Theory={{#arrayprint: varSubtypeTheories|,&#32;|@@@@|@@@@}}<!--  
+
           -->|Theory={{#arrayprint: arraySubtypeTheories|,|@@@@|@@@@}}|+sep=,<!--  
           -->|Subtypes={{#arrayprint: varSubtypes|,&#32;|@@@@|@@@@}}<!--  
+
           -->|Subtypes={{#arrayprint: arraySubtypes|,|@@@@|@@@@}}|+sep=,<!--  
 
         -->}}<!-- subobject
 
         -->}}<!-- subobject
 +
        --><!--
 
         --><!--
 
         --><!--
 
         --><!--
 
         --><!--

Latest revision as of 16:19, 31 December 2022

This template is used to save the currently accepted subtypes claims of the given class.

For each community where the term is currently accepted, the template searches for subtype claims, groups these claims by their Disjoint Group, and then for each group as well as each ungrouped claim creates a subobject with the following properties:

  • SubObjectCategory = "Topic Current Ontology".
  • Community - the community that accepts the theory.
  • Term - the term page. Note that this should be the definitional topic page, not the page for the respective ontological question.
  • Topic - the page for the respective ontological question for ease of access.
  • Ontological Question Type - Subtypes
  • Disjoint Group - the name of disjoint group.
  • Theory - the pages for the respective theories for ease of access (uses |+sep=,).
  • Subtypes - a comma separated list of children classes (uses |+sep=,).

NOTE: As any "set" template, it doesn't print anything on the page, but merely sets the appropriate values.

Parameters:

  • |term= - the term page.