Difference between revisions of "Template:Concept"

From TDWG Terms Wiki
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
-->{{#vardefine: namspaceDerivedUri | {{#if: {{#var: preferredNamespaceUri}} | {{#var: preferredNamespaceUri}}{{#var: conceptName}} }} }}<!--
 
-->{{#vardefine: namspaceDerivedUri | {{#if: {{#var: preferredNamespaceUri}} | {{#var: preferredNamespaceUri}}{{#var: conceptName}} }} }}<!--
 
-->{{#vardefine: importUri | {{Concept to imported URI | {{PAGENAMEE}} | default=}} }}<!--
 
-->{{#vardefine: importUri | {{Concept to imported URI | {{PAGENAMEE}} | default=}} }}<!--
-->{{#vardefine: hasMultiplePreferredNamespacePrefix|{{#if: {{#pos: {{#var: namspaceDerivedUri}}|,}}|<!-- yes-->1|<!-- nothing -->}}}}<!--  
+
-->{{#vardefine: hasMultiplePreferredNamespacePrefix|{{#if: {{#pos: {{#var: namspaceDerivedUri}}|,}}|<!-- yes-->1|<!-- nothing -->}}<!-- -->}}<!--
 +
-->{{#vardefine: thisVannTermGroup|{{#show: {{PAGENAME}} |?vann:termGroup }} }}<!--  
 
-->{{#vardefine: queryBrowseByAskQueryPreviousNext | {{#arraymap: {{#ask: [[skos:inScheme::+]] [[{{PAGENAME}}]] | mainlabel=- | link=none | ?skos:inScheme#=}}<!--
 
-->{{#vardefine: queryBrowseByAskQueryPreviousNext | {{#arraymap: {{#ask: [[skos:inScheme::+]] [[{{PAGENAME}}]] | mainlabel=- | link=none | ?skos:inScheme#=}}<!--
 
   -->|,<!-- sep
 
   -->|,<!-- sep
Line 12: Line 13:
 
   -->| <!--output sep
 
   -->| <!--output sep
 
   -->}}<!-- end arraymap  
 
   -->}}<!-- end arraymap  
   --> [[Category:Concept]]}}<!--
+
   --> [[Category:Concept]]<!--
 +
-->}}<!--
 +
 
 +
// Check if vann:termGroup is present to filter out concepts within concept schemes that are “alone standing” while other concepts of the same concept scheme may be grouped into concept collections
 +
-->{{#if: {{#var: thisVannTermGroup}}<!--
 +
then-->|{{#set: terms-internal:has vannTermGroup=1}}<!--
 +
else-->|{{#set: terms-internal:has vannTermGroup=0}}<!--
 +
-->}}<!--
  
 
// Set hidden properties that are always present:
 
// Set hidden properties that are always present:
  -->{{#set: terms-internal:lowercasePagename ={{lc:{{PAGENAME}}}}}}<!-- for sorting purposes
+
-->{{#set: Page has default form=Concept}}<!-- override category/class defined forms
 +
  -->{{#set: terms-internal:lowercasePagename ={{lc:{{PAGENAME}}<!-- -->}}<!-- -->}}<!-- for sorting purposes
 
  -->{{#set: dc:language=en}}<!-- filter purposes on Special:BrowseData
 
  -->{{#set: dc:language=en}}<!-- filter purposes on Special:BrowseData
  -->{{#set: vann:usageNote={{Fix localhost bug|{{FULLURL:{{FULLPAGENAMEE}}|oldid={{REVISIONID}}}}}}}}<!--  TODO: {{REVISIONID}} seems not to work (30.11.2012 12:45, AP)
+
  -->{{#set: vann:usageNote={{Fix localhost bug|{{FULLURL: {{FULLPAGENAMEE}}|oldid={{REVISIONID}}}}}}}}<!--  TODO: {{REVISIONID}} seems not to work (30.11.2012 12:45, AP)
 
  -->{{#set: sioc:has_discussion={{Wiki Base URL}}{{TALKPAGENAMEE}}}}<!--
 
  -->{{#set: sioc:has_discussion={{Wiki Base URL}}{{TALKPAGENAMEE}}}}<!--
 
  -->{{#if: {{{rdfs:range|}}} | [[rdfs:range::{{{rdfs:range|}}}| ]]}}<!-- do we need this?
 
  -->{{#if: {{{rdfs:range|}}} | [[rdfs:range::{{{rdfs:range|}}}| ]]}}<!-- do we need this?
  -->{{#switch: {{{concept type|}}}  
+
  -->{{#switch: {{lc: {{{concept type|}}}}}
 
     | annotation property ={{#set: concept type=http://www.w3.org/2002/07/owl#AnnotationProperty}}[[Category:Property]]
 
     | annotation property ={{#set: concept type=http://www.w3.org/2002/07/owl#AnnotationProperty}}[[Category:Property]]
 
     | class={{#set: concept type=http://www.w3.org/2002/07/owl#Class}}[[Category:Class]]
 
     | class={{#set: concept type=http://www.w3.org/2002/07/owl#Class}}[[Category:Class]]
Line 30: Line 39:
 
   ////////////////////////////////////
 
   ////////////////////////////////////
 
   Navigation through the defined skos:inScheme pages
 
   Navigation through the defined skos:inScheme pages
   -->{{#ifexpr: {{#ask: {{#var: queryBrowseByAskQueryPreviousNext}} | format=count }} > 1 |<div class="noprint floatright navigation-arrows position-page-title-top" style="margin-bottom:0px;">{{BrowseByAskQueryPreviousNext | query= {{#var: queryBrowseByAskQueryPreviousNext}}}}</div>}}<!--  
+
   -->{{#ifexpr: {{#ask: {{#var: queryBrowseByAskQueryPreviousNext}} | format=count }} > 1 |<div class="noprint floatright navigation-arrows position-page-title-top" style="margin-bottom:0px;">{{BrowseByAskQueryPreviousNext | query= {{#var: queryBrowseByAskQueryPreviousNext}} }}</div>}}<!--  
  
 
   --><table class="infobox floatright" style="max-width:300px"><!--
 
   --><table class="infobox floatright" style="max-width:300px"><!--
Line 80: Line 89:
 
}}
 
}}
 
}}
 
}}
* ''URI:'' {{#if: {{#var: namspaceDerivedUri|{{#var: importUri}}}} | {{#var: namspaceDerivedUri|{{#var: importUri}}}}{{#set: dcterms:identifier={{#var: namspaceDerivedUri|{{#var: importUri}}}}}} | None defined yet.}}<!-- TODO add check URI from import
+
* ''URI:'' <!-- let importUri precede over namspaceDerivedUri -->{{#if: {{#var: importUri|{{#var: namspaceDerivedUri}}<!-- -->}}<!--
 +
then-->|{{#var: importUri|{{#var: namspaceDerivedUri}}<!-- -->}}<!--
 +
    -->{{#set: dcterms:identifier={{#var: importUri|{{#var: namspaceDerivedUri}}<!-- -->}}<!-- -->}}<!--
 +
else-->| None defined yet.}}<!--  
  
 
-->{{#if: {{{is defined by|}}}{{{replaced by|}}}{{{replaces|}}}<!--
 
-->{{#if: {{{is defined by|}}}{{{replaced by|}}}{{{replaces|}}}<!--
Line 93: Line 105:
 
   -->| {{{is defined by|}}}{{#set: rdfs:isDefinedBy={{{is defined by|}}} }}{{#set: terms-internal:isDefinedBy={{{is defined by|}}} }} <!--
 
   -->| {{{is defined by|}}}{{#set: rdfs:isDefinedBy={{{is defined by|}}} }}{{#set: terms-internal:isDefinedBy={{{is defined by|}}} }} <!--
 
   else  
 
   else  
   -->| [[{{{is defined by|}}}]]{{#set: rdfs:isDefinedBy={{Wiki Base URL}}{{{is defined by|}}} }}{{#set: terms-internal:isDefinedBy={{Wiki Base URL}}{{{is defined by|}}} }}}}<!-- end if def. by
+
   -->| [[{{{is defined by|}}}]]{{#set: rdfs:isDefinedBy={{Wiki Base URL}}{{{is defined by|}}} }}{{#set: terms-internal:isDefinedBy={{Wiki Base URL}}{{{is defined by|}}} }}<!-- -->}}<!-- end if def. by
 
   -->{{
 
   -->{{
 
       #if: {{{replaced by|}}}|<nowiki></nowiki>
 
       #if: {{{replaced by|}}}|<nowiki></nowiki>
Line 161: Line 173:
 
       --></div><!--
 
       --></div><!--
 
     --></td></tr><!--
 
     --></td></tr><!--
 
+
  --><tr><!--
   --></table><!--
+
    --><td style="border-top:1px solid #cccccc;padding-top:0.5ex;">[[Special:RunQuery/Query_concept|Search for values]] [[File:Crystal Clear action find.png|x22px|link=Special:RunQuery/Query_concept]]</td><!--
 +
   --></tr><!--
 +
--></table><!--
  
  
Line 169: Line 183:
 
   ////////////////////////////////////
 
   ////////////////////////////////////
  
-->'''<span class="hover-explain" title="skos:prefLabel followed by skos:definition">[[skos:prefLabel::en:{{{label|}}}|{{{label|}}}]]{{#set: terms-internal:enLabel={{{label|}}}}}</span>{{#if: {{{alternative labels|}}} |&#32;<span class="hover-explain" title="skos:altLabel">(also {{#arraymap: {{{alternative labels|}}}|;|§|[[skos:altLabel::en:§|§]] |,&#32;}})</span><!-- -->}}: ''' {{#if: {{{definition|}}}<!-- no empty definition -->|{{{definition}}}{{#set: skos:definition=en:{{{definition}}}}}{{#set: terms-internal:enDefinition={{{definition|}}}}}|<span style="font-color:red">(“Definition” is missing, please add it.)<span>[[Category: Internal - Missing definition]]}}{{
+
--><b><span class="hover-explain" title="preferred label (skos:prefLabel) followed definition (skos:definition)"><!--
 +
    -->{{#if: {{{label|}}}<!--
 +
    then-->|<!--
 +
    else-->|<span class="warning">Please specify the missing <code>label</code> parameter.</span>[[Category: Internal - Missing concept label]]<!--
 +
    -->}}<!-- end if {{{label|}}}
 +
    -->[[skos:prefLabel::en:{{{label|}}}|{{{label|}}}]]<!--
 +
  -->{{#set: terms-internal:enLabel={{{label|}}}}}<!--
 +
  -->{{#set: terms-internal:enLabel2Pagename=[[{{PAGENAME}}|{{{label|}}}]]}}<!--
 +
  -->{{#set: terms-internal:enLabel2LocalAnchor-conceptName=[[#{{PAGENAME}}|{{{label|}}}]]}}<!--
 +
  -->{{#set: terms-internal:enConcept2LocalAnchor-conceptName=[[#{{PAGENAME}}|{{PAGENAME}}]]}}<!--
 +
  --></span><!--
 +
  -->{{#if: {{{alternative labels|}}} <!--
 +
    then-->|&#32;<span class="hover-explain" title="alternative label (skos:altLabel)">(also {{#arraymap: {{{alternative labels|}}}|;|§|[[skos:altLabel::en:§|§]] |,&#32;}})</span><!--
 +
  -->}}:<!--
 +
  --></b> <!--
 +
  -->{{#if: {{{definition|}}}<!-- no empty definition  
 +
  then-->|{{{definition}}}<!--
 +
    -->{{#set: skos:definition=en:{{{definition}}}}}<!--
 +
    -->{{#set: terms-internal:enDefinition={{{definition|}}}}}<!--
 +
  else-->|<span style="font-color:red">(“Definition” is missing, please add it.)<span>[[Category: Internal - Missing definition]]<!--
 +
  -->}}{{
 
#if: {{{notes|}}}|<nowiki></nowiki>
 
#if: {{{notes|}}}|<nowiki></nowiki>
  
'''<span class="hover-explain" title="skos:note - combined for all schemes">Notes:</span>''' {{{notes|}}}{{#set: skos:note=en:{{{notes|}}}}}{{#set: terms-internal:enNote={{{notes|}}} }}}}{{
+
<b><span class="hover-explain" title="skos:note - combined for all schemes">Notes:</span></b> {{{notes|}}}<!--
 +
  -->{{#set: skos:note=en:{{{notes|}}}}}<!--
 +
  -->{{#set: terms-internal:enNote={{{notes|}}}}}<!--
 +
-->}}{{
 
#if: {{{example|}}}|<nowiki></nowiki>
 
#if: {{{example|}}}|<nowiki></nowiki>
  
'''<span class="hover-explain" title="skos:example">Example(s):</span>''' {{{example|}}}{{#set: skos:example=en:{{{example|}}}}}{{#set: terms-internal:enExample={{{example|}}} }}}}<!--
+
<b><span class="hover-explain" title="skos:example">Example(s):</span></b> {{{example|}}}<!--
 +
  -->{{#set: skos:example=en:{{{example|}}}}}<!--
 +
  -->{{#set: terms-internal:enExample={{{example|}}}}}<!--
 +
-->}}<!--
 +
 
 +
set generic table summary output
 +
 
 +
-->{{#set: terms-internal:summary (as table rows) of concept term={{#ask: [[{{PAGENAME}}]]
 +
|format=template
 +
|template=Concept Table grouped by Collection 2
 +
|mainlabel=-
 +
|? #-
 +
|?terms-internal:enLabel #-
 +
|?terms-internal:enDefinition #-
 +
|?terms-internal:enExample #-
 +
|?terms-internal:enNote #-
 +
|?rdfs:isDefinedBy #-
 +
|?dcterms:identifier #-
 +
}}}}<!--
  
 
set categories
 
set categories
  
-->[[{{ns:category}}: Concept]]<!-- always!!
+
-->[[Category: Concept]]<!-- always!!
 
--></includeonly><noinclude>
 
--></includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 14:32, 27 January 2020

[edit] [purge] Template-info.svg Template documentation

Create a concept

 


Usage / Technical documentation

This is the “Concept” template. For setting “concept scheme” or “concept collection” use template: Concept relation. Template “Concept” has the following parameter and their corresponding properties (bold=mandatory):

{{Concept
|label              = <!--property: skos:prefLabel/property: terms-internal:enLabel-->
|alternative labels = <!--property: skos:altLabel-->
|definition         =  <!--property: skos:definition-->
|notes              = <!--property: skos:note-->
|hidden notes       = <!--optional internal notes not to be displayed but kept for holdding informations-->
|example            = <!--property: skos:example-->
|is defined by      = <!--property: rdfs:isDefinedBy (an authoritative information about the resource, which are not necessarily RDF, often html, and in some cases PDF)-->
|issued             = <!--property: dcterms:issued-->
|modified           = <!--property: dcterms:modified
|replaces           = <!--property: dcterms:replaces-->
|replaced by        = <!--property: dcterms:isReplacedBy-->
|status             = <!--property: vs:term status-->
|concept type       = <!--
                      property  is itself a property
                       → sets concept type = http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
                      annotation property   properties that are used as annotations
                       → sets concept type = http://www.w3.org/2002/07/owl#AnnotationProperty
                      class     is itself a class
                       → sets concept type = http://www.w3.org/2002/07/owl#Class
                      value     is itself an instance of a class or a value of a property
                       → sets concept type = ??
                      data type
                      undecided
                      -->
}}

Template concept can be filled with data using form: Concept. The template sets automatically:

Editorial categories (management category for TODOs):

Additional properties

The following properties are set in addition:

Dependencies

Template concept evaluates SMW-subobjects set by template: Concept relation (that itself has no direct output). These data are appended in the factbox on the page right:

                                                 ╮
┌─ template concept ───┐   ┌─ fact box right ─┐  │
│                     → → → → details (techn.)│  │
│                      │   │  #ask            │  │
└──────────────────────┘   └ ↗ ───────────────┘  │
                          data                   ├─ form: Concept see Category: Concept
┌─ template ───────────┐ ↗                       │  that defines [[Has default form: Concept]]
│  concept scheme relation                       │
└──────────────────────┘                         │
┌─ template ───────────┐                         │
│  concept relation    |                         │
└──────────────────────┘                         │
┌─ template ───────────┐                         │
│  concept translation │                         │
└──────────────────────┘                         │
                                                 ╯

TODO

See also