Difference between revisions of "Form:Concept"
From TDWG Terms Wiki
m (#info) |
m (added #formlink: form=Concept scheme class) |
||
Line 26: | Line 26: | ||
--></tr><tr><!-- | --></tr><tr><!-- | ||
--><td colspan="2">'''URI''' (<abbr title="namespace">NS</abbr>-URI definition pages) {{#info: message=Normally the preferred namespace URI is set on a concept scheme page. (TODO add link to Help page)}}<br/> <!-- | --><td colspan="2">'''URI''' (<abbr title="namespace">NS</abbr>-URI definition pages) {{#info: message=Normally the preferred namespace URI is set on a concept scheme page. (TODO add link to Help page)}}<br/> <!-- | ||
− | just show URI | + | just show URI |
--><div style="margin-left:1em;">{{Validate and render identifier URI | namespace prefix = {{#explode:{{PAGENAME}}}}|:|0}} | concept page={{PAGENAME}}| return value=URI and page}}</div><!-- | --><div style="margin-left:1em;">{{Validate and render identifier URI | namespace prefix = {{#explode:{{PAGENAME}}}}|:|0}} | concept page={{PAGENAME}}| return value=URI and page}}</div><!-- | ||
--></td><!-- | --></td><!-- | ||
--></tr><tr><!-- | --></tr><tr><!-- | ||
− | --><td>'''Concept type:'''</td><td>{{#ifexist: Property:{{PAGENAME}}<!-- | + | --><td>'''Concept type:'''</td><td>{{#ifexist: Property:{{PAGENAME}}<!-- |
− | THEN property exists-->|{{#ifexist: Category:{{PAGENAME}}<!-- | + | THEN property exists-->|{{#ifexist: Category:{{PAGENAME}}<!-- |
− | + | then property + class exists-->|<!-- | |
-->{{{field|concept type|mandatory|input type=dropdown|values=class,property,annotation property,value,data type,undecided|default=undecided}}}<!-- | -->{{{field|concept type|mandatory|input type=dropdown|values=class,property,annotation property,value,data type,undecided|default=undecided}}}<!-- | ||
-->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.|icon=warning}}<!-- | -->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.|icon=warning}}<!-- | ||
-->Warning: Both a [{{fullurl: Category:{{PAGENAME}} }} class-] and [{{fullurl: Property:{{PAGENAME}} }} property page] exist. A concept should normally only be one of Property, Class, or Value. Please delete the erroneous class or property page.<!-- | -->Warning: Both a [{{fullurl: Category:{{PAGENAME}} }} class-] and [{{fullurl: Property:{{PAGENAME}} }} property page] exist. A concept should normally only be one of Property, Class, or Value. Please delete the erroneous class or property page.<!-- | ||
− | + | else only property (no class)-->|<!-- | |
-->{{{field|concept type|mandatory|input type=dropdown|values=class,property,annotation property,value,data type,undecided|default=property|show on select=class=>id_is_class;annotation property=>id_is_annotation_property;property=>id_is_property}}}<!-- | -->{{{field|concept type|mandatory|input type=dropdown|values=class,property,annotation property,value,data type,undecided|default=property|show on select=class=>id_is_class;annotation property=>id_is_annotation_property;property=>id_is_property}}}<!-- | ||
-->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.}}<!-- | -->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.}}<!-- | ||
− | --><span id="id_class" style="display:none;"> | + | --><span id="id_class" style="display:none;">{{#formlink: form=Concept scheme class |
+ | |target=Class:{{PAGENAME}} | ||
+ | |link type=link | ||
+ | |link text=Create “Class:{{PAGENAME}}” | ||
+ | |query string=<!-- | ||
+ | Testing Imported from drictly with {{#ask: [[Imported from::wrong-name-space]]}} produces a <span>SMW-error, not a void return as expected | ||
+ | generate query link e.g. "Concept scheme class[Imported from]=rdfs:Class&" | ||
+ | -->{{#ask: [[MediaWiki:Smw import {{#explode: {{PAGENAME}}|:|0}}]]|format=list|mainlabel=-|link=none|limit=1|intro=Concept scheme class[Imported from]={{PAGENAME}}&|default=}}<!-- | ||
+ | -->}}<!-- end formlink | ||
+ | -->. Warning: You have selected “Class”, but a property page ([{{fullurl: Property:{{PAGENAME}} }} Property:{{PAGENAME}}]) already exists. “Concept type=property” might be correct.</span><!-- | ||
--><span id="id_is_property" style="display:none;">→ [{{fullurl:Property:{{PAGENAME}} }} Property:{{PAGENAME}}]</span><!-- | --><span id="id_is_property" style="display:none;">→ [{{fullurl:Property:{{PAGENAME}} }} Property:{{PAGENAME}}]</span><!-- | ||
--><span id="id_is_annotation_property" style="display:none;">→ [{{fullurl:Property:{{PAGENAME}} }} Property:{{PAGENAME}}]</span><!-- | --><span id="id_is_annotation_property" style="display:none;">→ [{{fullurl:Property:{{PAGENAME}} }} Property:{{PAGENAME}}]</span><!-- | ||
Line 46: | Line 55: | ||
ELSE no property | ELSE no property | ||
-->|{{#ifexist: Category:{{PAGENAME}}<!-- | -->|{{#ifexist: Category:{{PAGENAME}}<!-- | ||
− | + | then only class exists-->|{{{field|concept type|mandatory|input type=dropdown|values=class,property,annotation property,value,data type,undecided|default=class|show on select=class=>id_is_class;annotation property=>id_is_annotation_property;property=>id_is_property}}}<!-- | |
-->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.}}<!-- | -->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.}}<!-- | ||
--><span id="id_is_class" style="display:none;">→ [{{fullurl: Category:{{PAGENAME}} }} Category:{{PAGENAME}}]</span><!-- | --><span id="id_is_class" style="display:none;">→ [{{fullurl: Category:{{PAGENAME}} }} Category:{{PAGENAME}}]</span><!-- | ||
Line 55: | Line 64: | ||
|link text=Create “Property:{{PAGENAME}}” | |link text=Create “Property:{{PAGENAME}}” | ||
|query string=Property setting[has type]=String{{ | |query string=Property setting[has type]=String{{ | ||
− | + | #if: {{#pos: {{PAGENAME}}|:}}<!-- prefix:name in page name | |
− | + | THEN-->|&Property setting[imported from]={{#explode: {{PAGENAME}} |:|0 }}<!-- | |
− | + | ELSE-->|<!-- additional no query string | |
-->}} }}<!-- end if, end formlink | -->}} }}<!-- end if, end formlink | ||
--></span><!-- | --></span><!-- | ||
Line 66: | Line 75: | ||
|link text=Create “Property:{{PAGENAME}}” | |link text=Create “Property:{{PAGENAME}}” | ||
|query string=Property setting[has type]=String{{ | |query string=Property setting[has type]=String{{ | ||
− | + | #if: {{#pos: {{PAGENAME}}|:}}<!-- prefix:name in page name | |
− | + | THEN-->|&Property setting[imported from]={{#explode: {{PAGENAME}} |:|0 }}<!-- | |
− | + | ELSE-->|<!-- additional no query string | |
-->}} }}<!-- end if, end formlink | -->}} }}<!-- end if, end formlink | ||
--></span><!-- | --></span><!-- | ||
− | + | else neither class nor property found -->|{{{field|concept type|mandatory|input type=dropdown|values=class,property,annotation property,value,data type,undecided|default=undecided|show on select=class=>id_is_class;annotation property=>id_is_annotation_property;property=>id_is_property}}}<!-- | |
-->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.}}<!-- | -->{{#info: message=The semantic web distinguishes between different kinds of concepts (class, property, instance/value, etc.) You can create concepts and leave this decision open (select "undecided"). Another worker can then add the information at a later time.}}<!-- | ||
− | --><span id="id_is_class" style="display:none;"> | + | --><span id="id_is_class" style="display:none;">{{#formlink: form=Concept scheme class |
+ | |target=Class:{{PAGENAME}} | ||
+ | |link type=link | ||
+ | |link text=Create “Class:{{PAGENAME}}” | ||
+ | |query string=<!-- | ||
+ | Testing Imported from drictly with {{#ask: [[Imported from::wrong-name-space]]}} produces a <span>SMW-error, not a void return as expected | ||
+ | generate query link e.g. "Concept scheme class[Imported from]=rdfs:Class&" | ||
+ | -->{{#ask: [[MediaWiki:Smw import {{#explode: {{PAGENAME}}|:|0}}]]|format=list|mainlabel=-|link=none|limit=1|intro=Concept scheme class[Imported from]={{PAGENAME}}&|default=}}<!-- | ||
+ | -->}}</span><!-- | ||
--><span id="id_is_property" style="display:none;">{{#formlink: form=Property setting | --><span id="id_is_property" style="display:none;">{{#formlink: form=Property setting | ||
|target=Property:{{PAGENAME}} | |target=Property:{{PAGENAME}} | ||
|link type=link | |link type=link | ||
|link text=Create “Property:{{PAGENAME}}” | |link text=Create “Property:{{PAGENAME}}” | ||
− | |query string=Property setting[has type]=String&Property setting[imported from]= | + | |query string=Property setting[has type]=String&Property setting[imported from]={{ |
− | + | #if: {{#pos: {{PAGENAME}}|:}}<!-- prefix:name, assume prefix refers to import page | |
− | + | then-->|{{PAGENAME}}<!-- | |
− | + | else-->|check SMW import<!-- Page has no prefix:name | |
− | + | ||
-->}} }}<!-- end if, end formlink | -->}} }}<!-- end if, end formlink | ||
--></span><!-- | --></span><!-- | ||
Line 98: | Line 114: | ||
--></span><!-- | --></span><!-- | ||
-->}}<!-- | -->}}<!-- | ||
− | -->}}<!-- end ifexist class/property-pages | + | -->}}<!-- end ifexist class/property-pages |
--></td><!-- | --></td><!-- | ||
--></tr><tr><!-- | --></tr><tr><!-- | ||
Line 131: | Line 147: | ||
<table><!-- | <table><!-- | ||
--><tr><!-- | --><tr><!-- | ||
− | --><th style="border-bottom:1px dotted black;">Scheme:</th><!-- | + | --><th style="border-bottom:1px dotted black;">Scheme:</th><!-- |
--><td style="border-bottom:1px dotted black;">{{{field|scheme | input type=text with autocomplete | mandatory | values from category=Concept scheme }}} <!-- #info does not work at the moment --><span title="Page name of the concept scheme.">{{#info: message=Page name of the concept scheme.}}</span></td><!-- | --><td style="border-bottom:1px dotted black;">{{{field|scheme | input type=text with autocomplete | mandatory | values from category=Concept scheme }}} <!-- #info does not work at the moment --><span title="Page name of the concept scheme.">{{#info: message=Page name of the concept scheme.}}</span></td><!-- | ||
--></tr><!-- | --></tr><!-- | ||
--><tr><!-- | --><tr><!-- | ||
− | --><th>Property<br/>Constraints:</th><!-- | + | --><th>Property<br/>Constraints:</th><!-- |
--><td><div class="floating-form-parts">Cardinality: {{{field|property cardinality |input type=dropdown | values=0..1, 0..n, 1..1, 1..n}}} <!-- #info does not work at the moment --><span title="Explanation: | --><td><div class="floating-form-parts">Cardinality: {{{field|property cardinality |input type=dropdown | values=0..1, 0..n, 1..1, 1..n}}} <!-- #info does not work at the moment --><span title="Explanation: | ||
0..1 (optional single occurrence) | 0..1 (optional single occurrence) | ||
Line 149: | Line 165: | ||
<div class="minimized-margin-padding"> | <div class="minimized-margin-padding"> | ||
− | {{{for template|Concept relation|multiple|label=Relations of this concept|add button text=Add another relation}}}<!-- | + | {{{for template|Concept relation|multiple|label=Relations of this concept|add button text=Add another relation}}}<!-- |
Note: for field relation "values from concept" is possible but a concept returns just page names that can be used further and a display "Property:…" is not the correct display text | Note: for field relation "values from concept" is possible but a concept returns just page names that can be used further and a display "Property:…" is not the correct display text | ||
--> | --> |
Revision as of 13:27, 7 January 2013
This is the "Concept" form. To create a page with this form, enter the page name below. If a page with that name already exists, this page will be opened in the form.