| Status: | effective |
| Progress: | 100% |
| Version: | 1.9.0+ |
Extension "Semantic Internal Objects"
| Semantic Internal Objects | |
|---|---|
| Allows setting of internal objects in Semantic MediaWiki | |
| Further Information | |
| Homepage: | → external page |
| Maintainer(s): | Yaron Koren |
| First released: | August 2009 |
| Release: | stable |
| Development: | active |
| Area of usage: | Storing additional data |
| Association:SMW = Semantic MediaWiki, SB = Extension "Semantic Bundle", MW = MediaWiki | SMW |
| Shortcut:This is the shortcut to mark the beginning of the subject line when writing a support request to the mailing list or to the extension's author directly. See also this help page. | SIO |
| Wikidata-ID: | Q21678487 |
#subobject parser function and the #set_recurring_event parser function respectively since Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x.. All users are advised to migrate to the the new parser functions.
Semantic Internal Objects (SIO) is an extension to Semantic MediaWiki (SMW). It provides two parser functions, #set_internal and #set_internal_recurring_event, both of which are used to define so-called "internal objects" (now "subobjects") within the Semantic MediaWiki system. SIO's main contribution to SMW is in the introduction of certain compound types of information, sometimes known as 'n-ary relations', which ensures that pages can include more than one group of associated property-value pairs. SIO lets you define a two-dimensional table of information on a single page, with a call to #set_internal or #set_internal_recurring_event being used to store each row.
This functionality has been adopted by SMW so that #set_internal and #set_internal_recurring_event are now broadly equivalent to SMW's own parser functions #subobject (introduced in Semantic MediaWiki 1.7.0Released on 1 January 2012 and compatible with MW 1.16.x - 1.19.x.) and #set_recurring_event (since Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x.) respectively, both of which are used to define "subobjects". Since SIO 0.7, the differences have become even less significant as SIO's parser functions now serve as a wrapper for SMW subobjects, which are called internally with SMWSQLStore3.
Historical outline[edit]
- The functionality of parser function
#set_internalwas introduced into SMW core with parser function#subobjectin Semantic MediaWiki 1.7.0Released on 1 January 2012 and compatible with MW 1.16.x - 1.19.x. . - The functionality of parser function
#set_internal_recurring_eventwas applied to#set_recurring_eventin Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x.. - As of v0.7, SMW subobjects are called when using SMWSQLStore3 (for Semantic MediaWiki 1.8.0Released on 2 December 2012 and compatible with MW 1.17.0 - 1.22.x
(except 1.22.1). and later).
#set_internal_recurring_event[edit]
SIO's #set_internal_recurring_event was created as a solution to a problem with #set_recurring_event: in versions of SMW prior to 1.9, #set_recurring_event allows you to store recurrent events but individual instances of an event can't be (easily) separated from one another. SIO defines a separate "internal object" for each instance of an event, with a different date for each, and so allows for more precise querying and display of only those event instances that fall within a certain date range. As of SMW 1.9, however, SMW's #set_recurring_event adopts a similar approach by defining a separate subobject for each instance of an event. The two parser functions behave alike and they both allow you to separate individual instances of an event.
Syntax[edit]
The (abridged) syntax for #set_internal_recurring_event is:
{{#set_internal_recurring_event:
object_to_page_property
...all parameters allowed by #set_recurring_event...
}}
Example[edit]
Here is an example of such a call, on a page that defines a recurring event:
Using #set_internal_recurring_event
{{#set_internal_recurring_event:
Is instance of
|property=Has date
|start=January 4, 2012
|end=June 8, 2013
|unit=week
|period=1
}}
You could then display a table of all the events that happened in a certain week, along with their date, with the following call:
Calling for events happening in a certain week
{{#ask:
[[Has date::>February 1, 2012]]
[[Has date::<February 7, 2012]]
|mainlabel=-
|?Is instance of
|?Has date
}}
Known issues[edit]
- Having more than one call to
#set_internal_recurring_eventin the same page sometimes causes duplicate objects to be stored.