Difference between revisions of "Help:SemanticMW Service links"
(→Create property or modify an existing one) |
(→Property usage) |
||
Line 41: | Line 41: | ||
+ | Following previous steps, the Property with attached service could be used as usually. When the factbox or browse property will be called, for this property a special sign will be shown near (question sign). On clicking on this sign, the service names, separate by comma, will be available on a separate window as links. On following one of these services the parameters from property values will be transmited automatic. See bellow. | ||
+ | ETI thesaurus, | ||
+ | ETI thesaurus ID | ||
Revision as of 12:59, 21 April 2010
Help sections |
---|
Contents · Semantic MediaWiki · Semantic Forms |
Add Ontology · Semantic links and import/export features · Import external vocabulary |
Other SemanticMW extensions · Other extensions |
Semantic MediaWiki can provide links to online services when displaying certain data in the
Factbox and in property pages. For example, when an article contains a geographic coordinate, like Geocoordinate property from Template:Metadata has, it is useful to provide links to online mapping services so that users can retrieve a map of that location with one click. An other useful example is provided by ETI thesaurus service and further it will pointed out how to use this service in relation with a Semantic MediaWiki (SMW) property.
Attaching an external service to a SMW property consists on three steps:
Providing service links
- Create an entry in MediaWiki namespace having the following format:
Mediawiki:Smw_service_service_name
where service_name is a given name for the service. The first part of the new created service name is mandatory prefixed by Mediawiki:Smw_service_
- edit the new page and insert services provided having the following format:
label text1|http://someurl.com label text2|http://anotherurl.org .......
- save the page.
Following these steps have been created the service to accessing ETI thesaurus:
http://biowikifarm.net/test/MediaWiki:Smw_service_ETI_thesaurus
ETI thesaurus|http://www.catalogueoflife.org/annual-checklist/2010/webservice?response=full&name=$1 ETI thesaurus ID|http://www.catalogueoflife.org/annual-checklist/2010/webservice?response=full&format=xml&id=$1
Create property or modify an existing one
Create a SMW Property. When the Property already exists, edit it and add the service to the property as follows:
[[Provides service::service_name]]
For ETI thesaurus service:
[[Provides service::ETI thesaurus]]
Save the Property page.
Property usage
Following previous steps, the Property with attached service could be used as usually. When the factbox or browse property will be called, for this property a special sign will be shown near (question sign). On clicking on this sign, the service names, separate by comma, will be available on a separate window as links. On following one of these services the parameters from property values will be transmited automatic. See bellow.
ETI thesaurus, ETI thesaurus ID