Difference between revisions of "Template:Metadata"
GiselaWeber (Talk | contribs) |
GiselaWeber (Talk | contribs) |
||
Line 13: | Line 13: | ||
}}<span title="Content of Title field" style="font-weight:bold; font-size:120%;">{{ | }}<span title="Content of Title field" style="font-weight:bold; font-size:120%;">{{ | ||
#ifeq:{{{Type}}}|Collection|Resource Collection:<nowiki> </nowiki>| | #ifeq:{{{Type}}}|Collection|Resource Collection:<nowiki> </nowiki>| | ||
− | }}{{{Title<includeonly>|<span style="color:red">Please add a title for the resource</span></includeonly>}}}</span> | + | }}[[Title::{{{Title<includeonly>|<span style="color:red">Please add a title for the resource</span></includeonly>}}}]]</span> |
</td></tr>{{ | </td></tr>{{ | ||
#if: {{{Description<includeonly>|</includeonly>}}} | #if: {{{Description<includeonly>|</includeonly>}}} | ||
Line 32: | Line 32: | ||
#if: {{{Creation Technique<includeonly>|</includeonly>}}} | #if: {{{Creation Technique<includeonly>|</includeonly>}}} | ||
|<tr class="note"><td colspan="2">''Creation Technique'': {{{Creation Technique}}}</td></tr> | |<tr class="note"><td colspan="2">''Creation Technique'': {{{Creation Technique}}}</td></tr> | ||
− | }}{{<!-- no data | + | }}{{<!-- no data ? no hr --> |
#if:{{{Creation Technique<includeonly>|</includeonly>}}}{{{Content Modification<includeonly>|</includeonly>}}}{{{Description<includeonly>|</includeonly>}}}{{{Caption<includeonly>|</includeonly>}}} | <!-- values are given:<hr> --> <tr><td colspan="2"><hr /></td></tr> | #if:{{{Creation Technique<includeonly>|</includeonly>}}}{{{Content Modification<includeonly>|</includeonly>}}}{{{Description<includeonly>|</includeonly>}}}{{{Caption<includeonly>|</includeonly>}}} | <!-- values are given:<hr> --> <tr><td colspan="2"><hr /></td></tr> | ||
}} | }} | ||
Line 52: | Line 52: | ||
--><!-- check Creators? or ?Creators -->{{ | --><!-- check Creators? or ?Creators -->{{ | ||
#switch: {{{Type}}} | #switch: {{{Type}}} | ||
− | | Collection=<!-- nothing | + | | Collection=<!-- nothing necessary--> |
| #default =<!-- check Creators? or ?Creators -->{{#if: {{{Creators|}}} |<!--Creators given --> <!-- check ?first charcter =='?' -->{{#ifeq: {{#sub:{{{Creators|}}}|0|1}} |?| [[Category:Missing - creator unknown]]}}<!-- check last? charcter =='?' -->{{#ifeq: {{#sub:{{{Creator|}}}|-1}} |?| [[Category:Missing - creator unknown]]}} |<!--Creators not given --> {{#if:{{{Type}}} }}[[Category:Missing - creator unknown]]}} | | #default =<!-- check Creators? or ?Creators -->{{#if: {{{Creators|}}} |<!--Creators given --> <!-- check ?first charcter =='?' -->{{#ifeq: {{#sub:{{{Creators|}}}|0|1}} |?| [[Category:Missing - creator unknown]]}}<!-- check last? charcter =='?' -->{{#ifeq: {{#sub:{{{Creator|}}}|-1}} |?| [[Category:Missing - creator unknown]]}} |<!--Creators not given --> {{#if:{{{Type}}} }}[[Category:Missing - creator unknown]]}} | ||
}}<!-- end check Creators? or ?Creators -->{{ | }}<!-- end check Creators? or ?Creators -->{{ | ||
#if: {{{Contributors<includeonly>|</includeonly>}}} | #if: {{{Contributors<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Contributors:''' {{ | + | |<tr class="note"><td>'''Contributors:'''{{#arraymap:{{{Contributors|}}}|;|x|[[Contributors::x]]| • }}</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Attribution Statement<includeonly>|</includeonly>}}} | #if: {{{Attribution Statement<includeonly>|</includeonly>}}} | ||
Line 62: | Line 62: | ||
}}{{ | }}{{ | ||
#if: {{{Attribution Logo URL<includeonly>|</includeonly>}}} | #if: {{{Attribution Logo URL<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Attribution Logo URL:''' {{ | + | |<tr class="note"><td>'''Attribution Logo URL:''' {{#arraymap:{{{Attribution Logo URL|}}}|;|x|[[Attribution Logo URL::x]]| • }}</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Attribution Link URL<includeonly>|</includeonly>}}} | #if: {{{Attribution Link URL<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Attribution Link URL:''' {{ | + | |<tr class="note"><td>'''Attribution Link URL:''' {{#arraymap:{{{Attribution Link URL|}}}|;|x|[[Attribution Link URL::x]]| • }}</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Copyright Owner<includeonly>|</includeonly>}}} | #if: {{{Copyright Owner<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Copyright Owner:''' {{ | + | |<tr class="note"><td>'''Copyright Owner:''' {{#arraymap:{{{Copyright Owner|}}}|;|x|[[Copyright Owner::x]]| • }}</td></tr> |
}}{{ | }}{{ | ||
#switch: {{{Type}}}<!-- Copyright, License, Country Code, World Region required, except for Type=Collection:--> | #switch: {{{Type}}}<!-- Copyright, License, Country Code, World Region required, except for Type=Collection:--> | ||
| Collection=<!-- Display only if present: -->{{ | | Collection=<!-- Display only if present: -->{{ | ||
#if: {{{Copyright Statement<includeonly>|</includeonly>}}} | #if: {{{Copyright Statement<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Copyright Statement:''' {{{Copyright Statement}}}</td></tr> | + | |<tr class="note"><td>'''Copyright Statement:'''[[Copyright Statement::{{{Copyright Statement|}}}]]</td></tr> |
}}{{ | }}{{ | ||
#if: {{{License Statement<includeonly>|</includeonly>}}} | #if: {{{License Statement<includeonly>|</includeonly>}}} | ||
Line 96: | Line 96: | ||
}} | }} | ||
| #default =<!-- Display a notice if certain fields are missing: --> | | #default =<!-- Display a notice if certain fields are missing: --> | ||
− | <tr class="note"><td>'''Copyright Statement:''' {{First-of |1={{{Copyright Statement|}}}|2=Copyrighted Material; the copyright remains with the author (not this web publication)}}</td></tr> | + | <tr class="note"><td>'''Copyright Statement:''' [[Copyright Statement::{{First-of |1={{{Copyright Statement|}}}|2=Copyrighted Material; the copyright remains with the author (not this web publication)}}]]</td></tr> |
<tr class="note"><td>'''License Statement:''' {{First-of |1={{{License Statement|}}}|2=Creative Commons: Author Attribution Required, Share-Alike (cc-by-sa 3.0)}}</td></tr>{{ | <tr class="note"><td>'''License Statement:''' {{First-of |1={{{License Statement|}}}|2=Creative Commons: Author Attribution Required, Share-Alike (cc-by-sa 3.0)}}</td></tr>{{ | ||
#if: {{{License URL<includeonly>|</includeonly>}}} | #if: {{{License URL<includeonly>|</includeonly>}}} | ||
Line 114: | Line 114: | ||
}}{{ | }}{{ | ||
#if: {{{City or Place Name<includeonly>|</includeonly>}}} | #if: {{{City or Place Name<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''City or Place Name:''' {{{City or Place Name}}}</td></tr> | + | |<tr class="note"><td>'''City or Place Name:''' [[City or Place Name::{{{City or Place Name|}}}]]</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Locality<includeonly>|</includeonly>}}} | #if: {{{Locality<includeonly>|</includeonly>}}} | ||
Line 152: | Line 152: | ||
}}{{ | }}{{ | ||
#if: {{{Common Names<includeonly>|</includeonly>}}} | #if: {{{Common Names<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Common Names:''' {{ | + | |<tr class="note"><td>'''Common Names:''' {{#arraymap:{{{Common Names|}}}|;|x|[[Common Names::x]]| • }}</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Associated Specimen ID<includeonly>|</includeonly>}}} | #if: {{{Associated Specimen ID<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Associated Specimen ID:''' {{{Associated Specimen ID}}}</td></tr> | + | |<tr class="note"><td>'''Associated Specimen ID:''' [[Associated Specimen ID::{{{Associated Specimen ID|}}}]]</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Associated Observation ID<includeonly>|</includeonly>}}} | #if: {{{Associated Observation ID<includeonly>|</includeonly>}}} | ||
Line 161: | Line 161: | ||
}}{{ | }}{{ | ||
#if: {{{Association Info<includeonly>|</includeonly>}}} | #if: {{{Association Info<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><td>'''Association Info:''' {{{Association Info}}}</td></tr> | + | |<tr class="note"><td>'''Association Info:''' [[Association Info::{{{Association Info|}}}]]</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Published Source<includeonly>|</includeonly>}}} | #if: {{{Published Source<includeonly>|</includeonly>}}} | ||
Line 182: | Line 182: | ||
{{ | {{ | ||
#switch: {{{Type}}} | #switch: {{{Type}}} | ||
− | | Collection = <!-- Nothing output here; resource collections display prefix in the colored title line! --> | + | | Collection = <!-- Nothing output here; resource collections display prefix in the colored title line! --><span style="display:none">[[Type::{{{Type|}}}]]</span> |
| StillImage | | StillImage | ||
| Sound | | Sound | ||
Line 197: | Line 197: | ||
| IdentificationTool | | IdentificationTool | ||
| Service | | Service | ||
− | | InteractiveResource=<!--do not move before switch, e.g. collection should not display at all!--><tr class="note"><th style="text-align:right; padding-right:0.75em;">[[Resource Type|Type]]</th><td>{{{Type|}}}</td></tr> | + | | InteractiveResource=<!--do not move before switch, e.g. collection should not display at all!--><tr class="note"><th style="text-align:right; padding-right:0.75em;">[[Resource Type|Type]]</th><td>[[Type::{{{Type|}}}]]</td></tr> |
| #default =<tr class="note"><th style="text-align:right; padding-right:0.75em;">[[Resource Type|Type]]</th><td><span style="color:red">“<tt>Type={{#if: {{{Type|}}}|{{{Type}}}|‹empty›}}</tt>” is no recognized value. <!-- | | #default =<tr class="note"><th style="text-align:right; padding-right:0.75em;">[[Resource Type|Type]]</th><td><span style="color:red">“<tt>Type={{#if: {{{Type|}}}|{{{Type}}}|‹empty›}}</tt>” is no recognized value. <!-- | ||
* (Hints for common mistakes: is case sensitive) --> | * (Hints for common mistakes: is case sensitive) --> | ||
Line 276: | Line 276: | ||
}}{{ | }}{{ | ||
#if: {{{Compass Heading<includeonly>|</includeonly>}}} | #if: {{{Compass Heading<includeonly>|</includeonly>}}} | ||
− | |<tr class="note"><th style="text-align:right; padding-right:0.75em;">Compass Heading</th><td>{{{Compass Heading}}}</td></tr> | + | |<tr class="note"><th style="text-align:right; padding-right:0.75em;">Compass Heading</th><td>[[Compass Heading::{{{Compass Heading|}}}]]</td></tr> |
}}{{ | }}{{ | ||
#if: {{{Taxon Count<includeonly>|</includeonly>}}} | #if: {{{Taxon Count<includeonly>|</includeonly>}}} | ||
Line 365: | Line 365: | ||
<span style="display:none"> | <span style="display:none"> | ||
<!--add the annotation for Semantic Properties without displaying them --> | <!--add the annotation for Semantic Properties without displaying them --> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Country Codes::{{{Country Codes|}}}]] | [[Country Codes::{{{Country Codes|}}}]] | ||
[[Country Names::{{{Country Name|}}}]] | [[Country Names::{{{Country Name|}}}]] | ||
Line 421: | Line 419: | ||
[[Accession Date::{{{Accession Date|}}}]] | [[Accession Date::{{{Accession Date|}}}]] | ||
[[Taxonomic Coverage::{{{Taxonomic Coverage|}}}]] | [[Taxonomic Coverage::{{{Taxonomic Coverage|}}}]] | ||
− | + | ||
− | + | ||
[[Description::{{{Description|}}}]] | [[Description::{{{Description|}}}]] | ||
[[Caption::{{{Caption|}}}]] | [[Caption::{{{Caption|}}}]] | ||
Line 430: | Line 427: | ||
[[General Keywords::{{{General Keywords|}}}]] | [[General Keywords::{{{General Keywords|}}}]] | ||
[[Creators::{{{Creators|}}}]] | [[Creators::{{{Creators|}}}]] | ||
− | + | ||
− | + | ||
[[Subject Category::{{{Subject Category|}}}]] | [[Subject Category::{{{Subject Category|}}}]] | ||
[[License Statement::{{{License Statement|}}}]] | [[License Statement::{{{License Statement|}}}]] | ||
Line 446: | Line 443: | ||
TODO: | TODO: | ||
− | * eval multiple languages to code like „it; en; de“ | + | * eval multiple languages to code like „it; en; de“ ? Italiano • English • Deutsch (replace with File:… works but mot with language) |
</noinclude> | </noinclude> |
Revision as of 14:19, 19 April 2010
{{{Metadata Language}}} {{{Title}}}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description: {{{Description}}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Caption: {{{Caption}}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Content Modification: {{{Content Modification}}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Creation Technique: {{{Creation Technique}}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
— Collection: [[{{{Collection Page}}}]] — Provided by: [[{{{Provider Page}}}]] |
[edit]
DocumentationThe metadata template[1] allows you to store metadata on external resources, especially identification tools or media resources, directly in a Wiki page. The template supports a number of metadata fields, some of which will only rarely be used. The set of metadata fields was decided upon in collaboration between Key to Nature, NBII, GBIF-MRTG, and Morphbank (see Resource Metadata Exchange Agreement on Key to Nature).
Resource collections are considered just another type of resources and can be described using the same template (using Type=Collection instead of Type=StillImage, IdentificationTool, etc.).
The importance of the metadata template is that it contains structured information that can be read by software agents. While it is possible to do some searches directly in the Wiki, software agents reading the information into a database can do more complex external queries. It is possible to design the system such that metadata editing is done directly in external databases, but we believe that the current solution has some advantages. For high value resources such as collections or identification tools, contributors are free to structure a special wiki page describing their resource in text and images, the structured metadata record being just a small part of that information. In other cases, where metadata are typically batch converted and submitted from another database, the Wiki-submission offers a simple low-tech and accessible method for batch submission, including some support for syntax checking on behalf of the submitter.
You can use this form to edit metadata:
See How to add resource metadata on the Wiki for further information.
- ↑ A template is a Wiki page that, using a syntax of "
{{pagename | parameter1=value1 | parameter2=value2 }}
", can be called with parameters and thus reused many times.
Contents
Test records
Ascochyta allii-cepae | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
|
| ||||||||||||||||||||
This record was specified as below (raw edit view):
{{Metadata | Type=StillImage | Title=Ascochyta allii-cepae | Creators = Mr. Smith | Description = {{Metadata/Description|language code=en|content=This can be long text, describing the item in free-form text. This can be long text, describing the item in free-form text. This can be long text, describing the item in free-form text. This can be long text, describing the item in free-form text.}} | Metadata Language=en | Language=zxx | Resource ID=768479362 | Copyright Statement= (c) xyz xxx | License Statement=Creative commons cc-by-sa 3.0 | Scientific Names=Ascochyta allii-cepae; | Scientific Names with Author=Ascochyta allii-cepae Punith., Gladders & McKeown.; | Taxon Count= 20 | Taxon Count= 1 | Interactivity = hyperlinked | ID Tool Structure = Dichotomous | Best Quality URI=http://160.45.63.11/Storage/Fungi/Coelos/AscochytaPunith/edt/AscP88-006.png | Best Quality Availability=online (login) | Medium Quality URI=http://160.45.63.11/Storage/Fungi/Coelos/AscochytaPunith/low/AscP88-006.png | Medium Quality Availability=online (free) }}
Note that blanks before or after the "=", and new lines between metadata fields do not matter. Also, the sequence of parameters does not matter. If parameters are repeated, only the last occurrence of the parameter will define the value (compare Taxon Count in the example above).
As shown below this template tries to give apropriate information if something is missing:
Example for erroneous resource type and missing URI | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||
A minimum example can look like:
{{Metadata | Type = StillImage | Title = Bombus barbutellus color pattern (female) | Scientific Names = Bombus barbutellus; | Metadata Language = en | Language = zxx | Copyright Statement = © Paul Williams, NHM | Creators = Paul Williams - NHM | Subject Category = Insecta | General Keywords = Schematic drawings; Bumblebees; }}
Additional temporary or technical documentation
This metadata infobox is full width, non-floating. It has two columns of fields (i.e. 3-4 table column) in the middle, plus some fields column spanning as a Header (Title, Logo, Descriptions) and Footer (URIs). Not all fields are labeled; those that are not are labeled with a tooltip (pop-up if mouse hovers).
Used semantic properties
Additional properties are:
Further semantic properties are named after the template parameters, but note that most of them are mapped in the property name space to well defined ontology vocabulary concepts using the import mechanism by Semantic Media Wiki.
Dependencies
- Template:WikiSyntaxToHTMLEntities
- replace simple Wiki syntax to HTML
- Template:Metadata/Description
- for template parameter “description” a language specific description
- Template:Metadata/Caption
- for template parameter “caption” a language specific caption
- Template:Metadata/List to property
- for “Creators”, “Contributors” or “Copyright Owner” (remove Wiki syntax like [[User:…]])
- Form:Metadata
- form for metadata
- Template:Edit or create metadata
- form for creating metadata
- Form:Search media by metadata
- form for searching metadata
- Template:Search media by metadata
- template for searching metadata
Additional temporary or technical documentation
This metadata infobox is full width, non-floating. It has two columns of fields (i.e. 3-4 table column) in the middle, plus some fields column spanning as a Header (Title, Logo, Descriptions) and Footer (URIs). Not all fields are labeled; those that are not are labeled with a tooltip (pop-up if mouse hovers).
TODO:
- eval multiple languages to code like „it; en; de“ ? Italiano • English • Deutsch (replace with File:… works but mot with language)