Difference between revisions of "Template:Concept relation/doc"
m |
m (Further import pages) |
||
(31 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Documentation/subpage}} | {{Documentation/subpage}} | ||
− | Template “ | + | Template “{{#titleparts:{{PAGENAME}}|1}}” sets relations which are further analysed/displayed in [[Template: Concept]]. Results appear in a floating fact box of a concept page (=a page having [[template: Concept]] on it). |
− | + | ||
− | + | ||
− | + | ||
=== Usage === | === Usage === | ||
− | + | ||
+ | On Concept pages (using Template/[[Form:Concept]]) the following The template call can be repeated any number of times: | ||
{| | {| | ||
|- | |- | ||
Line 23: | Line 21: | ||
| relation = … | | relation = … | ||
| uri = … | | uri = … | ||
+ | }} | ||
+ | </pre> | ||
+ | |- | ||
+ | | | ||
+ | | | ||
+ | |<pre> | ||
+ | {{Concept relation | ||
+ | | relation = … | ||
+ | | uri = {{Concept to imported URI|Article namespace Wiki page of imported concept}} | ||
}} | }} | ||
</pre> | </pre> | ||
|} | |} | ||
− | + | Use [[Template: Concept to imported URI]] if you reuse an imported page and want to relate to the imported URI. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | Parameter “relation” can be any of the strings displayed in column ''relation value'' (note that skos:inScheme is handled by [[template: Concept scheme relation]]): | ||
+ | {{#ask: [[Property:+]] [[terms-internal:conceptRelationDisplayText::+]] | ?terms-internal:conceptRelationDisplayGroup=Group | ?terms-internal:conceptRelationDisplayText = relation value (=Display text) | ? = Property page | mainlabel=- | format=table | limit=500 |sort=terms-internal:conceptRelationDisplayGroup,terms-internal:conceptRelationDisplayText }} | ||
+ | |||
+ | Some relations are bound to categories to have auto-complete function available in forms: | ||
+ | * skos: in scheme — autocomplete on class: Concept Scheme (title case) with [[Imported from::skos:ConceptScheme]] | ||
+ | * skos: collection — autocomplete on class: Concept Collection (title case) with [[Imported from::vann:termGroup]] | ||
+ | *:(Note: vann:termGroup relates to the skos concept collection (label in picklist is "skos: collection"); skos has not property from concept to collection (only the inverse)) | ||
+ | *:(Note: we chose to present a pseudo-property "skos: collection" to the user) | ||
+ | |||
+ | Note: “rdfs: subclass of” and “rdfs: subproperty of” are no longer set to specific autocompletes, to avoid workflow complications (e.g. a skos concept may not yet have been defined as property or class) | ||
=== Technical documentation === | === Technical documentation === | ||
+ | |||
+ | ==== Add a new relation ==== | ||
+ | |||
+ | <ol> | ||
+ | <li> add the following properties to a property page:<div class="no-pre-border"><pre> | ||
+ | [[terms-internal:conceptRelationDisplayText::‹my display text›| ]] | ||
+ | [[terms-internal:conceptRelationDisplayGroup::‹a number›| ]]<!-- the lower, the first it is displayed --></pre></div> | ||
+ | </li> | ||
+ | <li>add new display texts (''my display text'' from above) to [[Template:Concept relation/relation to property]].</li> | ||
+ | </ol> | ||
+ | |||
+ | ==== Related templates ==== | ||
+ | |||
{{#titleparts: {{PAGENAME}} | 1 | 1 }} | {{#titleparts: {{PAGENAME}} | 1 | 1 }} | ||
├ [[Template:Concept relation/return listelement from query]] return a list element to format an #ask-query with “format = template“ in an #ask-query | ├ [[Template:Concept relation/return listelement from query]] return a list element to format an #ask-query with “format = template“ in an #ask-query | ||
− | ├ [[Template:Concept relation/relation to property]] (map relation-string from template input to correct property page) | + | ├ [[Template:Concept relation/relation to property]] (map relation-string from template input to correct property page, add new relations here) |
└ [[Template:Concept relation/doc]] | └ [[Template:Concept relation/doc]] | ||
− | + | For displaying relation data in the fact box of [[template: Concept]] the following templates are used: | |
+ | * [[Template: Concept/render relation as form link]] (for concept scheme, and concept collection) | ||
+ | * [[Template: Concept/render relation as list item]] (for all other relations) | ||
+ | |||
+ | Those templates evaluate display- and sorting properties set on a property page that itself is used as a relation: | ||
+ | * [[property: terms-internal:conceptRelationDisplayText]] (for display, e.g. further used in forms) | ||
+ | * [[property: terms-internal:conceptRelationDisplayGroup]] (for sorting purposes, lowest value is the first one, highest the last) | ||
+ | |||
+ | ==== Auto-generated list for Form Concept ==== | ||
+ | Auto-generated list of relation values for [[Form:Concept]] (field: relation):<br/> | ||
+ | :{{#ask: [[Property:+]] [[terms-internal:conceptRelationDisplayText::+]] | ?terms-internal:conceptRelationDisplayText#= | mainlabel=- | format=list | limit=500 |sort=terms-internal:conceptRelationDisplayGroup,terms-internal:conceptRelationDisplayText }} | ||
+ | |||
+ | ==== Dependencies ==== | ||
+ | * http://www.mediawiki.org/wiki/Extension:Variables | ||
=== See also === | === See also === | ||
+ | * [[template: Concept scheme]] | ||
+ | * [[template: Concept scheme relation]] (for [[property: skos:inScheme]]) | ||
+ | * [[Template: Concept/render relation as form link]] (for concept scheme, and concept collection) | ||
+ | * [[Template: Concept/render relation as list item]] (for all other relations) | ||
+ | |||
+ | {{Hidden | ||
+ | |1= '''Further import pages …''' | ||
+ | |toggle position = left | ||
+ | | toggle text = + / – | ||
+ | | contentstyle = border-left: 1px solid #ccc;border-bottom: 1px solid #ccc;padding:0ex 1em; | ||
+ | | content=Hint: Before terms can be imported as annotation properties they need to be declared by a special page in the MediaWiki namespace followed by the local prefix you wish to use: "MediaWiki:Smw_import_''local-namespace-prefix''". A list of all imported vocabulary schemes is: | ||
+ | {{List all smw imports|output format=three-columns}} | ||
+ | }} | ||
<includeonly> | <includeonly> | ||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
− | + | [[Category: Helper tool for ontologies]] | |
</includeonly> | </includeonly> |
Latest revision as of 15:47, 3 February 2020
Template “Concept relation” sets relations which are further analysed/displayed in Template: Concept. Results appear in a floating fact box of a concept page (=a page having template: Concept on it).
Contents
Usage
On Concept pages (using Template/Form:Concept) the following The template call can be repeated any number of times:
{{Concept relation | relation = … | internal page = … }} |
or relating to an URI |
{{Concept relation | relation = … | uri = … }} |
{{Concept relation | relation = … | uri = {{Concept to imported URI|Article namespace Wiki page of imported concept}} }} |
Use Template: Concept to imported URI if you reuse an imported page and want to relate to the imported URI.
Parameter “relation” can be any of the strings displayed in column relation value (note that skos:inScheme is handled by template: Concept scheme relation):
Group | relation value (=Display text) | Property page |
---|---|---|
1 | skos: collection | vann:termGroup |
10 | dcterms: has part | dcterms:hasPart |
10 | dcterms: is part of | dcterms:isPartOf |
10 | rdfs: see also | rdfs:seeAlso |
10 | rdfs: subclass of | rdfs:subClassOf |
10 | rdfs: subproperty of | rdfs:subPropertyOf |
10 | skos: has broader match | skos:broadMatch |
10 | skos: has close match | skos:closeMatch |
10 | skos: has exact match | skos:exactMatch |
10 | skos: has narrower match | skos:narrowMatch |
10 | skos: has related match | skos:relatedMatch |
10 | skos: is in mapping relation with | skos:mappingRelation |
20 | owl: disjoint with | owl:disjointWith |
20 | owl: equivalent class | owl:equivalentClass |
20 | owl: equivalent property | owl:equivalentProperty |
20 | owl: inverse of | owl:inverseOf |
30 | biorel: adjacent to | biorel:adjacent to |
30 | biorel: aligned with | biorel:aligned with |
30 | biorel: connected to | biorel:connected to |
30 | biorel: derived by descent from | biorel:derived by descent from |
30 | biorel: derives from | biorel:derives from |
30 | biorel: develops from | biorel:develops from |
30 | biorel: develops from part of | biorel:develops from part of |
30 | biorel: develops in | biorel:develops in |
30 | biorel: develops into | biorel:develops into |
30 | biorel: has habitat | biorel:has habitat |
30 | biorel: has part | biorel:has part |
30 | biorel: has participant | biorel:has participant |
30 | biorel: has site of | biorel:has site of |
30 | biorel: is bearer of | biorel:is bearer of |
30 | biorel: is preceded by | biorel:is preceded by |
30 | biorel: occurs in | biorel:occurs in |
30 | biorel: overlaps | biorel:overlaps |
30 | biorel: part of | biorel:part of |
30 | biorel: participates in | biorel:participates in |
30 | biorel: precedes | biorel:precedes |
30 | biorel: produced by | biorel:produced by |
30 | biorel: produces | biorel:produces |
30 | biorel: spatially disjoint from | biorel:spatially disjoint from |
30 | biorel: surrounds | biorel:surrounds |
30 | biorel: variant of | biorel:variant of |
Some relations are bound to categories to have auto-complete function available in forms:
- skos: in scheme — autocomplete on class: Concept Scheme (title case) with skos:ConceptScheme (Simple Knowledge Organization System (SKOS))
- skos: collection — autocomplete on class: Concept Collection (title case) with vann:termGroup (Vocabulary for annotating vocabulary descriptions)
- (Note: vann:termGroup relates to the skos concept collection (label in picklist is "skos: collection"); skos has not property from concept to collection (only the inverse))
- (Note: we chose to present a pseudo-property "skos: collection" to the user)
Note: “rdfs: subclass of” and “rdfs: subproperty of” are no longer set to specific autocompletes, to avoid workflow complications (e.g. a skos concept may not yet have been defined as property or class)
Technical documentation
Add a new relation
- add the following properties to a property page:
[[terms-internal:conceptRelationDisplayText::‹my display text›| ]] [[terms-internal:conceptRelationDisplayGroup::‹a number›| ]]<!-- the lower, the first it is displayed -->
- add new display texts (my display text from above) to Template:Concept relation/relation to property.
Related templates
Concept relation ├ Template:Concept relation/return listelement from query return a list element to format an #ask-query with “format = template“ in an #ask-query ├ Template:Concept relation/relation to property (map relation-string from template input to correct property page, add new relations here) └ Template:Concept relation/doc
For displaying relation data in the fact box of template: Concept the following templates are used:
- Template: Concept/render relation as form link (for concept scheme, and concept collection)
- Template: Concept/render relation as list item (for all other relations)
Those templates evaluate display- and sorting properties set on a property page that itself is used as a relation:
- property: terms-internal:conceptRelationDisplayText (for display, e.g. further used in forms)
- property: terms-internal:conceptRelationDisplayGroup (for sorting purposes, lowest value is the first one, highest the last)
Auto-generated list for Form Concept
Auto-generated list of relation values for Form:Concept (field: relation):
- skos: collection, dcterms: has part, dcterms: is part of, rdfs: see also, rdfs: subclass of, rdfs: subproperty of, skos: has broader match, skos: has close match, skos: has exact match, skos: has narrower match, skos: has related match, skos: is in mapping relation with, owl: disjoint with, owl: equivalent class, owl: equivalent property, owl: inverse of, biorel: adjacent to, biorel: aligned with, biorel: connected to, biorel: derived by descent from, biorel: derives from, biorel: develops from, biorel: develops from part of, biorel: develops in, biorel: develops into, biorel: has habitat, biorel: has part, biorel: has participant, biorel: has site of, biorel: is bearer of, biorel: is preceded by, biorel: occurs in, biorel: overlaps, biorel: part of, biorel: participates in, biorel: precedes, biorel: produced by, biorel: produces, biorel: spatially disjoint from, biorel: surrounds, biorel: variant of
Dependencies
See also
- template: Concept scheme
- template: Concept scheme relation (for property: skos:inScheme)
- Template: Concept/render relation as form link (for concept scheme, and concept collection)
- Template: Concept/render relation as list item (for all other relations)
Hint: Before terms can be imported as annotation properties they need to be declared by a special page in the MediaWiki namespace followed by the local prefix you wish to use: "MediaWiki:Smw_import_local-namespace-prefix". A list of all imported vocabulary schemes is:
- Iptc4xmpExt (→ MediaWiki:Smw import Iptc4xmpExt)
- abcd2 (→ MediaWiki:Smw import abcd2)
- ac (→ MediaWiki:Smw import ac)
- biorel (→ MediaWiki:Smw import biorel)
- dc (→ MediaWiki:Smw import dc)
- dcclass (→ MediaWiki:Smw import dcclass)
- voc (→ MediaWiki:Smw import dcmi voc)
- dcmitype (→ MediaWiki:Smw import dcmitype)
- dcsyntax (→ MediaWiki:Smw import dcsyntax)
- dcterms (→ MediaWiki:Smw import dcterms)
- dwc (→ MediaWiki:Smw import dwc)
- dwcattributes (→ MediaWiki:Smw import dwcattributes)
- dwctype (→ MediaWiki:Smw import dwctype)
- eol (→ MediaWiki:Smw import eol)
- foaf (→ MediaWiki:Smw import foaf)
- geo (→ MediaWiki:Smw import geo)
- geotime (→ MediaWiki:Smw import geotime)
- germplasmType (→ MediaWiki:Smw import germplasmType)
- ggbn (→ MediaWiki:Smw import ggbn)
- gna (→ MediaWiki:Smw import gna)
- interaction (→ MediaWiki:Smw import interaction)
- mixs (→ MediaWiki:Smw import mixs)
- mst (→ MediaWiki:Smw import mst)
- ncd (→ MediaWiki:Smw import ncd)
- owl (→ MediaWiki:Smw import owl)
- photoshop (→ MediaWiki:Smw import photoshop)
- rdf (→ MediaWiki:Smw import rdf)
- rdfs (→ MediaWiki:Smw import rdfs)
- sioc (→ MediaWiki:Smw import sioc)
- skos (→ MediaWiki:Smw import skos)
- spi (→ MediaWiki:Smw import spi)
- test (→ MediaWiki:Smw import test)
- toi (→ MediaWiki:Smw import toi)
- tp (→ MediaWiki:Smw import tp)
- vann (→ MediaWiki:Smw import vann)
- vs (→ MediaWiki:Smw import vs)
- xmp (→ MediaWiki:Smw import xmp)
- xmpRights (→ MediaWiki:Smw import xmpRights)
- xsd (→ MediaWiki:Smw import xsd)