Difference between revisions of "Template:Concept relation/doc"
m (+docu) |
m (+category) |
||
Line 106: | Line 106: | ||
<includeonly> | <includeonly> | ||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> | ||
+ | [[Category: Helper tool for ontologies]] | ||
</includeonly> | </includeonly> |
Revision as of 10:58, 26 September 2012
Template “Concept relation” sets a SMW-subobject and template: Concept queries these data to display them in a fact box.
NOTE: This template was named “Concept relation” and not ”Concept mapping” because, e.g. disjunct is not a mapping but a relation.
Usage
It should be called in the following format:
{{Concept relation | relation = … | internal page = … }} |
or relating to an URI |
{{Concept relation | relation = … | uri = … }} |
Parameter “relation” can be one of the following strings (=first column):
Technical documentation
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) └ Template:Concept relation/doc
For displaying data in a fact box the template sets:
- property: Concept relation
- property: Concept relation display text
- property: URI (do not create it, it’s already a SMW-special property)
- property: internal page (target page)
- property: definition page (page where definition is made, properties set)
- relation properties, e.g. [[rdfs:subPropertyOf::URI or internal page]]
This display information is stored in indexed SMW-subobjects, e.g. #skos:inScheme-1, #skos:inScheme-2, #rdfs:subPropertyOf-1, #rdfs:subPropertyOf-2 etc. Saving these data in subobjects makes it easier to retrive, count and render these data. Using not indexed subobjects but standard SMW-assignments ([[property::xxxx]]) makes it impossible to count multiple values set on a page, it always returns 1.
Dependency on http://www.mediawiki.org/wiki/Extension:Variables
See also
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: