Difference between revisions of "Template:Concept Table grouped by Collection (AC1)"
m (fix docu) |
(refactored to minimise template calls (use of property: terms-internal:summary (as table rows) of concept term by template: Concept Table grouped by Collection 2 in template: Concept)) |
||
Line 1: | Line 1: | ||
− | <noinclude>This template is specific to [[Audubon Core]], mainly because of Layer 1 and Layer 2. Attempts to generalize it may follow later. | + | <noinclude>This template is specific to [[Audubon Core]], mainly because of filtering Layer 1 and Layer 2 additionally. Attempts to generalize it may follow later. |
− | The default value | + | The default value “Audubon Core Attribution Vocabulary” is provided only to simplify testing; it may later be removed. |
== Technical Documentation == | == Technical Documentation == | ||
+ | |||
+ | '''Bold parameters''' are mandatory, all other are optional: | ||
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | ! Parameter !! Comment, Example !! Property | ||
+ | |- | ||
+ | | | ||
+ | <nowiki>|1=</nowiki> | ||
+ | | | ||
+ | * a concept collection, e.g. <code>Audubon Core Attribution Vocabulary</code> | ||
+ | | | ||
+ | * see [[property: vann:termGroup]] | ||
+ | |- | ||
+ | | | ||
+ | <nowiki>|userparam=</nowiki> | ||
+ | | | ||
+ | * additional concept collections to filter in | ||
+ | * default: <code>Audubon Core Layer 1,Audubon Core Layer 2</code> | ||
+ | | | ||
+ | * see [[property: vann:termGroup]] | ||
+ | |- | ||
+ | | | ||
+ | <nowiki>|limit concepts=</nowiki> | ||
+ | | | ||
+ | * the limit of concepts to display for each collection | ||
+ | * default: <code>500</code> | ||
+ | | | ||
+ | |} | ||
+ | |||
=== Dependencies === | === Dependencies === | ||
− | * [[template:smwAsk InternalAnchorRef]] (used by #ask) | + | * [[template: Concept scheme/Concepts index list by label and name]] |
− | * | + | ** <s>[[template: smwAsk InternalAnchorRef]] (used by #ask)</s> |
− | ** [[template: | + | * {{FULLPAGENAME}} uses #ask and displays table results provided by: |
− | ** | + | ** [[template:Concept Table grouped by Collection (AC2)]] which ''redirects'' to [[template: Concept Table grouped by Collection 2]] |
− | ** | + | *** [[property: terms-internal:summary (as table rows) of concept term]] |
− | ** | + | *** [[property: terms-internal:enLabel]] |
− | ** | + | *** [[property: terms-internal:enDefinition]] |
− | ** | + | *** [[property: terms-internal:enExample]] |
− | ** | + | *** [[property: terms-internal:enNote]] |
+ | *** [[property: rdfs:isDefinedBy]]<br/> not passed but #ask-ed for in this subsequent template is subobject [[property: constraint of concept]] which holds: [[property: property domain]], [[property: property range]], [[property: cardinality]]) | ||
+ | *** [[property: dcterms:identifier]] (for the URI) | ||
− | [[ | + | Technically this template relies on values generated by [[template: Concept Table grouped by Collection 2]] via [[template: Concept]]. This approach ensures to get a quick display response time in Semantic MediaWiki to just display cached content and not to render the content during the #ask-inline query. [[Template: Concept Table grouped by Collection 2]] also produces the actual table layout. On a concept page it sets some thing like: |
+ | <pre> | ||
+ | {{#set: terms-internal:summary (as table rows) of concept term={{#ask: [[{{PAGENAME}}]] | ||
+ | |format=template | ||
+ | |template=Concept Table grouped by Collection 2 | ||
+ | |mainlabel=- | ||
+ | |? #- <!-- page name --> | ||
+ | |?terms-internal:enLabel #- <!-- english label --> | ||
+ | |?terms-internal:enDefinition #- <!-- english definition --> | ||
+ | |?terms-internal:enExample #- <!-- english example --> | ||
+ | |?terms-internal:enNote #- <!-- english notes --> | ||
+ | |?rdfs:isDefinedBy #- <!-- the is definded by --> | ||
+ | |?dcterms:identifier #- <!-- the URI --> | ||
+ | }} | ||
+ | }} | ||
+ | </pre> | ||
− | <big>'''Example below: [[Audubon Core Attribution Vocabulary]]'''</big> | + | <big>'''Example below: [[Audubon Core Attribution Vocabulary]]''' by using</big> |
+ | <nowiki>{{</nowiki>{{PAGENAME}}}} | ||
+ | … or by setting up a more comprehensive query to get ''all the collections'' of scheme “Audubon Core Development”: | ||
+ | <pre> | ||
+ | {{#ask: [[Category:Concept collection]] [[skos:inScheme::Audubon Core Development]] | ||
+ | | ? #- | ||
+ | | link=none | ||
+ | | mainlabel=- | ||
+ | | format=template | ||
+ | | template=Concept Table grouped by Collection (AC1) | ||
+ | | userparam = <!-- second level collections, not shown in first --> Audubon Core Layer 1, Audubon Core Layer 2 | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | [[Category: SMW ask template]] | ||
</noinclude>{{#if:{{#pos:{{{userparam}}},|{{{1}}},}} | </noinclude>{{#if:{{#pos:{{{userparam}}},|{{{1}}},}} | ||
|<!--THEN nothing, suppress output where the current collection is in the list of second level groupings (#pos returns empty if not found)--> | |<!--THEN nothing, suppress output where the current collection is in the list of second level groupings (#pos returns empty if not found)--> | ||
Line 27: | Line 87: | ||
then-->|<div style="margin:1em 0 1em 0;"><div style="font-weight:bold; font-size:100%">Index to [[{{{1|Audubon Core Attribution Vocabulary}}}]]</div> | then-->|<div style="margin:1em 0 1em 0;"><div style="font-weight:bold; font-size:100%">Index to [[{{{1|Audubon Core Attribution Vocabulary}}}]]</div> | ||
{{Concept scheme/Concepts index list by label and name | {{Concept scheme/Concepts index list by label and name | ||
− | | | + | |collection name={{{1|Audubon Core Attribution Vocabulary}}} |
− | | | + | |link style=local page link |
}}<!-- | }}<!-- | ||
// Using arraymap, loop through present userparam (containing the second level collections like Layer 1, Layer 2), passing the current collection as userparam to next template | // Using arraymap, loop through present userparam (containing the second level collections like Layer 1, Layer 2), passing the current collection as userparam to next template | ||
Line 35: | Line 95: | ||
-->|§<!-- assign temporary var | -->|§<!-- assign temporary var | ||
-->|<!--start arraymap output section: | -->|<!--start arraymap output section: | ||
− | + | ||
+ | OLD code: avoid rendering during the #ask: inline queries but use pre-rendered display property below. (AP 2020-01-27 16:31:47) | ||
+ | {{#ask: [[Category:Concept]] [[vann:termGroup::§]] [[vann:termGroup::{{{1|Audubon Core Attribution Vocabulary}}}]] | ||
| ? #- | | ? #- | ||
| ?terms-internal:enLabel #- | | ?terms-internal:enLabel #- | ||
Line 42: | Line 104: | ||
| ?terms-internal:enNote #- | | ?terms-internal:enNote #- | ||
| ?rdfs:isDefinedBy #- | | ?rdfs:isDefinedBy #- | ||
+ | | ?dcterms:identifier #- | ||
| link=none | | link=none | ||
| mainlabel=- | | mainlabel=- | ||
| format=template | | format=template | ||
| template=Concept_Table_grouped_by_Collection_(AC2) | | template=Concept_Table_grouped_by_Collection_(AC2) | ||
− | | limit=500 | + | | limit={{{limit concepts|500}}} |
+ | | sort=terms-internal:lowercasePagename | ||
+ | | intro =<div style="font-weight:bold; font-size:105%; margin:1.5em 0 1em 0;">Concept definitions in [[§]]</div> | ||
+ | <table cellspacing="0" cellpadding="2" border="0" style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; margin-bottom:10px; width:100%;"> | ||
+ | | outro =</table> | ||
+ | | default = | ||
+ | }} | ||
+ | |||
+ | It is better to render the content on concept level and save it to a property and then just display that property. | ||
+ | |||
+ | -->{{#ask: [[Category:Concept]] [[vann:termGroup::§]] [[vann:termGroup::{{{1|Audubon Core Attribution Vocabulary}}}]] | ||
+ | | ?terms-internal:summary (as table rows) of concept term =<!-- the property’s content is generated by template:Concept_Table_grouped_by_Collection_2 in template:Concept --> | ||
+ | | link=none | ||
+ | | mainlabel=- | ||
+ | | sep= | ||
+ | | limit={{{limit concepts|500}}} | ||
+ | | searchlabel=<i> … further results and concept collection §</i> | ||
| sort=terms-internal:lowercasePagename | | sort=terms-internal:lowercasePagename | ||
| intro =<div style="font-weight:bold; font-size:105%; margin:1.5em 0 1em 0;">Concept definitions in [[§]]</div> | | intro =<div style="font-weight:bold; font-size:105%; margin:1.5em 0 1em 0;">Concept definitions in [[§]]</div> |
Latest revision as of 15:08, 28 January 2020
This template is specific to Audubon Core, mainly because of filtering Layer 1 and Layer 2 additionally. Attempts to generalize it may follow later.
The default value “Audubon Core Attribution Vocabulary” is provided only to simplify testing; it may later be removed.
Technical Documentation
Bold parameters are mandatory, all other are optional:
Parameter | Comment, Example | Property |
---|---|---|
|1= |
|
|
|userparam= |
|
|
|limit concepts= |
|
Dependencies
- template: Concept scheme/Concepts index list by label and name
-
template: smwAsk InternalAnchorRef (used by #ask)
-
- Template:Concept Table grouped by Collection (AC1) uses #ask and displays table results provided by:
- template:Concept Table grouped by Collection (AC2) which redirects to template: Concept Table grouped by Collection 2
- property: terms-internal:summary (as table rows) of concept term
- property: terms-internal:enLabel
- property: terms-internal:enDefinition
- property: terms-internal:enExample
- property: terms-internal:enNote
- property: rdfs:isDefinedBy
not passed but #ask-ed for in this subsequent template is subobject property: constraint of concept which holds: property: property domain, property: property range, property: cardinality) - property: dcterms:identifier (for the URI)
- template:Concept Table grouped by Collection (AC2) which redirects to template: Concept Table grouped by Collection 2
Technically this template relies on values generated by template: Concept Table grouped by Collection 2 via template: Concept. This approach ensures to get a quick display response time in Semantic MediaWiki to just display cached content and not to render the content during the #ask-inline query. Template: Concept Table grouped by Collection 2 also produces the actual table layout. On a concept page it sets some thing like:
{{#set: terms-internal:summary (as table rows) of concept term={{#ask: [[{{PAGENAME}}]] |format=template |template=Concept Table grouped by Collection 2 |mainlabel=- |? #- <!-- page name --> |?terms-internal:enLabel #- <!-- english label --> |?terms-internal:enDefinition #- <!-- english definition --> |?terms-internal:enExample #- <!-- english example --> |?terms-internal:enNote #- <!-- english notes --> |?rdfs:isDefinedBy #- <!-- the is definded by --> |?dcterms:identifier #- <!-- the URI --> }} }}
Example below: Audubon Core Attribution Vocabulary by using
{{Concept Table grouped by Collection (AC1)}}
… or by setting up a more comprehensive query to get all the collections of scheme “Audubon Core Development”:
{{#ask: [[Category:Concept collection]] [[skos:inScheme::Audubon Core Development]] | ? #- | link=none | mainlabel=- | format=template | template=Concept Table grouped by Collection (AC1) | userparam = <!-- second level collections, not shown in first --> Audubon Core Layer 1, Audubon Core Layer 2 }}
Audubon Core Attribution Vocabulary
Concept Name: | ac:attributionLinkURL |
Normative URI | http://rs.tdwg.org/ac/terms/attributionLinkURL |
Label | Attribution Link URL |
Definition | The URL where information about ownership, attribution, etc. of the resource may be found. |
Defined By | http://terms.tdwg.org/wiki/Audubon_Core_Term_List#ac:attributionLinkURL |
Required: No — Repeatable: No | |
Notes: | Audubon Core: This URL may be used in creating a clickable logo. Providers should consider making this link as specific and useful to consumers as possible, e. g., linking to a metadata page of the specific image resource rather than to a generic page describing the owner or provider of a resource. |
Concept Name: | ac:attributionLogoURL |
Normative URI | http://rs.tdwg.org/ac/terms/attributionLogoURL |
Label | Attribution URL |
Definition | The URL of the icon or logo image to appear in source attribution. |
Defined By | http://terms.tdwg.org/wiki/Audubon_Core_Term_List#ac:attributionLogoURL |
Required: No — Repeatable: No | |
Notes: | Audubon Core: Entering this URL into a browser should only result in the icon (not in a webpage including the icon). |
Concept Name: | ac:licenseLogoURL |
Normative URI | http://rs.tdwg.org/ac/terms/licenseLogoURL |
Label | License Logo URL |
Definition | A URL providing access to a logo that symbolizes the License. |
Defined By | http://terms.tdwg.org/wiki/Audubon_Core_Term_List#ac:licenseLogoURL |
Required: No — Repeatable: No | |
Examples | Audubon Core: https://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png (providing access to: ) |
Notes: | Audubon Core: The originating metadata provider is strongly urged to choose a suitable logo as a graphical representation of the license. Failure to do so may leave downstream aggregators in a difficult position to supply a logo that adequately represents the professional, legal, or social aims of the licensors (license givers). |
Concept Name: | dcterms:rights |
Normative URI | http://purl.org/dc/terms/rights |
Label | Rights |
Definition | Information about rights held in and over the resource. |
Defined By | http://purl.org/dc/terms/ |
Required: No — Repeatable: No | |
Examples | Audubon Core: “Copyright XY 2008, all rights reserved”, “© 2008 XY Museum” , "Public Domain.", "Copyright unknown". This expresses rights over the media resource, not over the metadata text. |
Notes: | Dublin Core: Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights. Audubon Core: Copyright Statement contains information about rights held in and over the resource. A full-text, readable copyright statement, as required by the national legislation of the copyright holder. On collections, this applies to all contained objects, unless the object itself has a different statement. Do not place just the name of the copyright holder(s) here! That belongs in a list in the xmpRights:Owner field, which should be supplied if dcterms:rights is not 'Public Domain', appropriate only if the resource is known to be not under copyright. |
Concept Name: | dcterms:source |
Normative URI | http://purl.org/dc/terms/source |
Label | Source |
Definition | A related resource from which the described resource is derived. |
Defined By | http://dublincore.org/documents/dcmi-terms/#terms-source |
Required: No — Repeatable: No | |
Notes: | Dublin Core: The described resource may be derived from the related resource in whole or in part. Recommended best practice is to identify the related resource by means of a string conforming to a formal identification system. This term is intended to be used with non-literal values as defined in the DCMI Abstract Model (http://dublincore.org/documents/abstract-model/). As of December 2007, the DCMI Usage Board is seeking a way to express this intention with a formal range declaration.
Audubon Core: An identifiable source from which the described resources was derived. If the resource (image, sound, movie, identification key, etc.) was digitized from a non-digital resource, or was also previously published in a digital or printed publication, this describes the original. Do not put generally "related" publications in here. This field normally contains a free-form text description, but it may be a URI (e.g. “digitally-published://ISBN=961-90008-7-0”) if that URI can be resolved and dereferenced to provide a description of the source resource. Can be repeatable if a montage of images. Information about further provenance beyond the ultimate source should be put in the ac:derivedFrom attribute. |
Concept Name: | photoshop:Credit |
Normative URI | http://ns.adobe.com/photoshop/1.0/Credit |
Label | Credit Line |
Definition | The credit to person(s) and/or organisation(s) required by the supplier of the item to be used when published. This is a free-text field. |
Defined By | http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata-201007_1.pdf |
Required: No — Repeatable: No | |
Notes: | Audubon Core: Free text for "Please cite this as…" Note: URIs of IPTC terms for Adobe XMP terms are not resolvable. Visit IPTC Standard Photo Metadata (July 2010) for further documentation. |
Concept Name: | xmpRights:Owner |
Normative URI | http://ns.adobe.com/xap/1.0/rights/Owner |
Label | Copyright Owner |
Definition | A list of legal owners of the resource. |
Defined By | http://www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMPSpecificationPart1.pdf |
Required: No — Repeatable: No | |
Concept Name: | xmpRights:UsageTerms |
Normative URI | http://ns.adobe.com/xap/1.0/rights/UsageTerms |
Label | UsageTerms |
Definition | A collection of text instructions on how a resource can be legally used, given in a variety of languages. |
Defined By | http://www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMPSpecificationPart1.pdf |
Required: No — Repeatable: No | |
Examples | Audubon Core: "Available under Creative Commons BY-SA 3.0 license". |
Notes: | Audubon Core: The license statement defining how resources may be used. Information on a collection applies to all contained objects unless the object has a different statement.
This also informs on the commercial availability of items. Buying an identification tool or media resource is essentially the purchase of an individual license. Examples for such License statements: “Available through bookstores” for a commercially published CD, and “Individual licenses available for purchase” for a high-resolution image. Note that the medium or low resolution levels of the same image may be available under open access licenses. In general, this term determines the default licensing for the media. License terms specific to variants or representations of the media resource (e.g., different resolutions) are dealt within the Audubon Core Service Access Point Vocabulary. Note: URIs of Adobe XMP terms are not resolvable. Visit XMP Specification Part 1, Sec 8.5 for further documentation. XMP Schema is defined in RDF, not w3c schema. |
Concept Name: | xmpRights:WebStatement |
Normative URI | http://ns.adobe.com/xap/1.0/rights/WebStatement |
Label | License URL |
Definition | A web URL for a statement of the ownership and usage rights for this resource. |
Defined By | http://www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMPSpecificationPart1.pdf |
Required: No — Repeatable: No | |
Examples | Audubon Core: http://creativecommons.org/licenses/by-sa/3.0/us/. |
Notes: | Extensible Metadata Platform (XMP): This is a normal (non-URI) simple value because of historical usage.
Audubon Core: A URL defining or further elaborating on the license statement (e. g., a web page explaining the precise terms of use). The value of this field may provide a complete definition of the terms of use. For Creative Commons, the appropriate value is the URL of the defining Web page for the license. Where different quality variants (e. g. resolutions of images) are published under different licenses, the AC term “Licensing Exception Statement” supports variant-specific licenses. Note: URIs of Adobe XMP terms are not resolvable. Visit XMP Specification Part 1, Sec 8.5 for further documentation. XMP Schema is defined in RDF, not w3c schema. |