Difference between revisions of "Help:SMWAddExtensions"

From Biowikifarm Metawiki
Jump to: navigation, search
Line 33: Line 33:
  
 
===Why are Internal Objects needed?===
 
===Why are Internal Objects needed?===
In most cases we assign one value to a given property per page, e.g. the population to a page on a country, or the name of a journal to a publication page. In some cases we want to assign more than one value for a given property on the same page. E.g. the publication page [[Environmental Entomology (2009) 38 (1), 143-152]] deals with the 2 plant diseases ''Ophiostoma splendens'' and ''Ophiostoma phasma''. We might have a property called "Plant disease" and we can assign these two species to this property, using:
+
In most cases we assign one value to a given property per page, e.g. the population to a page on a country, or the name of a journal to a publication page. In some cases we want to assign more than one value for a given property on the same page. E.g. the publication page [[Environmental Entomology (2008) 37 (2), 391-399]] deals with different host plant of the whitefly ''Bemisia tabci'' (collard, cowpea, cantaloupe and watermelon). If we have a properties called "Publication on pest" and "Pest host" we can assign the whitefly and its host plants to these properties in order to generate on a different page a list of publications dealing with host plants of ''Bemisia tabaci''. Thus we would use:
[[Plant disease::Ophiostoma splendens]] and [[Plant disease::Ophiostoma phasma]]
+
<pre>
However,  
+
[[Publication on pest::Bemisia tabaci]], [[Pest host::collard]]
 +
</pre>
 +
However, with this method we cannot define specific relationships between different properties on the same page. E.g.
  
  

Revision as of 16:22, 11 July 2010

Help sections
Contents · Semantic MediaWiki · Semantic Forms
Add Ontology · Semantic links and import/export features · Import external vocabulary
Other SemanticMW extensions · Other extensions



This section gives some guidance on, and provides examples for using other Semantic Mediawiki (Semantic MW) extensions. Basic features of the Semantic MW and the Semantic Forms extension are explained separately (see the box on help sections above). All SemanticMW extensions described here require prior installation of the basic Semantic Mediawiki components.

Semantic Drilldown extension

For more detailed descriptions of this extension see the Semantic Drilldown website. For installation notes see Semantic Drilldown.

Introduction

Semantic Drilldown is very useful for browsing and filtering the semantic data entered into a wiki. As with other SemanticMW features, Semantic Drilldown is closely linked to the category system of a wiki and Semantic Drilldown can only work through a specific category. As an example we explain here the different steps for modifying the Category:Publications to enable specific filter options.

Defining filters

  1. Create the page Filter:Journal by typing this name into the search box.
  2. The filter page basically needs only a statement on which property the filter is based in the form "[[Covers property::Property:Publication journal]]". However, you might want to add also some explanationary text.
  3. Create another filter for the property Publication year.

Adding filter definitions to a category

We now add these 2 filters to the page Category:Publications. For this we need statements like "[[Has filter::Filter:Journal]]".

Using Semantic Drilldown

Got to the "Semantic Drilldown" section of the Special:SpecialPages and select Browse data. In the top right of this page you find a box with the different categories of this wiki, sorted alphabetically. The first category on this list has been selected. Since most categories do not contain any filters, most "browse pages" do not look differently from the normal category pages. Select the category Publications. On the top of this page you can now click on different journals and publication years. The Drilldown system then filters out the category pages according to your selections. Of course, the Drilldown system is especially useful if many data have been entered into system.

Semantic Result Formats

The Semantic Result Formats extension adds several features for displaying query results with semantic data in different formats, e.g. a graphical format. For a detailed description of this extension see the Semantic Result Formats website. For installation notes see Semantic Result Formats.

The use of these features is very simple, just use the line "format=<format type>" together with the #ask function. The following examples demonstrate some of the format types:

Semantic Internal Objects

For more detailed descriptions of this extension see the Semantic Internal Objects website. For installation notes see Semantic Internal Objects.

Why are Internal Objects needed?

In most cases we assign one value to a given property per page, e.g. the population to a page on a country, or the name of a journal to a publication page. In some cases we want to assign more than one value for a given property on the same page. E.g. the publication page Environmental Entomology (2008) 37 (2), 391-399 deals with different host plant of the whitefly Bemisia tabci (collard, cowpea, cantaloupe and watermelon). If we have a properties called "Publication on pest" and "Pest host" we can assign the whitefly and its host plants to these properties in order to generate on a different page a list of publications dealing with host plants of Bemisia tabaci. Thus we would use:

[[Publication on pest::Bemisia tabaci]], [[Pest host::collard]]

However, with this method we cannot define specific relationships between different properties on the same page. E.g.


Host plantDistributionPublication
cantaloupeU.S.A. (SW)Environmental Entomology (2008) 37 (2), 391-399
collardU.S.A. (SE)Environmental Entomology (2008) 37 (2), 391-399
cottonU.S.A. (SW)Environmental Entomology (2008) 37 (6), 1514-1524
cowpeaU.S.A. (SE)Environmental Entomology (2008) 37 (2), 391-399
squashU.S.A. (Hawaii)Environmental Entomology (2009) 38 (2), 442-449
watermelonU.S.A. (SW)Environmental Entomology (2008) 37 (2), 391-399