Difference between revisions of "Wikispooks:Semantic Objects"

From Wikispooks
Jump to navigation Jump to search
(Bold for lede)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{HelpSection|image=SMW.png}}
 
{{HelpSection|image=SMW.png}}
Underpinning WikiSpooks' use of Semantic Mediawiki is a set of objects. None of these are complete as yet. The plan is to create templates first, then forms.
+
'''Wikispooks semantic objects''' are the core of the semantic data model, which allows the site to be machine readable. Each page is defined as a particular object from the list at [[SMWObject]]. For people, {{t|Person}} is used, for groups of people, use {{t|Group}} and so on. Each object has a specific set of parameters, although the objects have many parameters in common.
  
 
+
==Objects On Wikispooks==
==Objects On WikiSpooks==
+
'''All new pages ''must'' have exactly one object template.''' Some namespaces, such as {{t|document:}} mandate use of a particular template (e.g. [[Template:Document]], but a choice of templates is available for pages in the {{NS|main}}. In case of doubt, use [[Template:Concept]] to make the page a [[concept]] object.
'''All new pages in the {{NS|main}} ''should'' have exactly one object template.''' The table below lista the possible templates:
+
<!--
 
{| class="sortable wikitable" style="text-align: center; width: 95%"
 
{| class="sortable wikitable" style="text-align: center; width: 95%"
 
! Object
 
! Object
Line 11: Line 11:
 
! Form
 
! Form
 
! Notes
 
! Notes
|-
 
! <s>[[Book]]</s>
 
| <s>[[Template:Book]]</s>
 
| <s>[[Template:Infobox book]]</s>
 
| <s>[[Form:Book]]</s>
 
| ''Make this a sub-object of [[Document]]?''
 
 
|-
 
|-
 
! [[Concept]]
 
! [[Concept]]
Line 22: Line 16:
 
| ''None ''
 
| ''None ''
 
| [[Form:Concept]]
 
| [[Form:Concept]]
| The least complete object so far. '''This is a catch all, so if no other template seems to fit, use this one.'''
+
| '''This is the catch all, so if no other template seems to fit, use this one.'''
 
|-
 
|-
 
! [[Document]]
 
! [[Document]]
Line 28: Line 22:
 
| ''None''
 
| ''None''
 
| [[Form:Document]]
 
| [[Form:Document]]
| The most complete object so far, although the template has evolved and still contains some legacy code.
+
| Like website, this has non-standard presentation (No infobox).
 
|-
 
|-
 
! [[Event]]
 
! [[Event]]
Line 41: Line 35:
 
| [[Form:Group]]
 
| [[Form:Group]]
 
| Types= { Nation State, Secret Society, Think Tank, Foundations, Lobby, Corporation, NGO }
 
| Types= { Nation State, Secret Society, Think Tank, Foundations, Lobby, Corporation, NGO }
|-
 
! [[Operation]]
 
| [[Template:Operation]]
 
| [[Template:Infobox operational plan]]
 
| [[Form:Operation]]
 
| Maybe draw on [[:Category:Social_Control]] for different types
 
 
|-
 
|-
 
! [[Person]]
 
! [[Person]]
Line 52: Line 40:
 
| [[Template:Infobox person]]
 
| [[Template:Infobox person]]
 
| [[Form:Person]]
 
| [[Form:Person]]
| Types= { ? }
+
| ''The most used object.''
 
|-
 
|-
 
! [[Place]]
 
! [[Place]]
Line 65: Line 53:
 
| [[Form:Property]]
 
| [[Form:Property]]
 
| Types= { Special, Display, Data }
 
| Types= { Special, Display, Data }
 +
|-
 +
! [[Timeline]]
 +
| [[Template:Timeline]]
 +
| ''None''
 +
| [[Form:Timeline]]
 +
| ''Currently only used for sub-pages named "Timeline".''
 +
|-
 +
! [[Video]]
 +
| [[Template:Video]]
 +
| ''None''
 +
| [[Form:Website]]
 +
| ''None''
 
|-
 
|-
 
! [[Website]]
 
! [[Website]]
 
| [[Template:Website]]  
 
| [[Template:Website]]  
| [[Template:Infobox website]]
+
| ''None''
 
| [[Form:Website]]
 
| [[Form:Website]]
| Types= { ? }
+
| Non-standard presentation (No infobox) which might be updated.
|}
+
|-
 +
! [[Year]]
 +
| [[Template:Year]]
 +
| ''None''
 +
| ''None''
 +
| ''Only for calendar years, e.g. [[1984]]''
 +
|}-->
  
 
==Object Templates==
 
==Object Templates==
Most object templates share a common structure. Custom Wikispooks template code silently sets the [[Wikispooks:Semantic Properties|Semantic Properties]] (eventually, almost all parameters will have a corresponding property) and then calls an [[Template:infobox|infobox]] template from [[Wikipedia]] to display the information. These are lightly customised, e.g. to add a few extra parameters, such as {{t|{{!}}wikipedia}}.
+
The semantic object templates are deliberately similar. Custom Wikispooks template code silently sets the [[Project:Semantic Properties|Semantic Properties]] (eventually, almost all parameters will have a corresponding property) and then calls a standard [[Template:infobox|infobox]] template from [[Wikipedia]] to display the information. These are lightly customised, e.g. with a few extra parameters, such as {{t|{{!}}wikipedia}}.
 +
 
 +
===Parameters===
 +
All the semantic object templates share a common color coding scheme, summarised below:
 +
{{Template:Explain parameters}}
 +
 
 +
All parameters are optional, but you are ''strongly recommended'' to assign a {{t|{{!}}Wikipedia}} parameter, which connects this to the corresponding [[Wikipedia]] page, and so allows [[User:MaintenanceBot]] to automatically upgrade the page with appropriate information from that page. If there is no corresponding Wikipedia page, adding the parameter but leaving it blank (i.e. "{{t|{{!}}Wikipedia<nowiki>=</nowiki>}}" ) is a good way to save another editor the wasted time of looking for the page.
 +
 
 +
====Lists====
 +
The templates have a lot of {{GREEN|Green}} parameters. These are for comma-separated ''lists'' of pagenames. This means that the "," character is a reserved character and so should not be used in ordinary page titles (though it may be used in redirects). If you wish to indicate that a list is known to be incomplete, use the special word "[[...]]", which must be at the end of the list. To indicate that it is unknown whether or not the list is incomplete, end it with the special word "[[...?]]"
 +
 
 +
==Subobjects==
 +
In the longer term, a wider choice of objects might be beneficial. To do this, rather than code objects from scratch, most new objects will probably be derived as 'sub-objects' from another object types according to the 'type' parameter. These could then have 'type' parameters of their own, allowing sub-sub-objects etc. where needed. For this reason, use of the {{t|{{!}}type}} parameter is strongly recommended.
  
 
==See Also==
 
==See Also==
 
* [[:Category:Object Templates]]
 
* [[:Category:Object Templates]]
 
* [[{{TALKPAGENAME}}| The talk page]] for discussion/suggestion of other objects.
 
* [[{{TALKPAGENAME}}| The talk page]] for discussion/suggestion of other objects.
{{WikiSpooks Footer/Semantic Mediawiki}}
+
{{Wikispooks Footer/Semantic Mediawiki}}

Latest revision as of 15:38, 18 February 2020

SMW.png

Wikispooks semantic objects are the core of the semantic data model, which allows the site to be machine readable. Each page is defined as a particular object from the list at SMWObject. For people, Person is used, for groups of people, use Group and so on. Each object has a specific set of parameters, although the objects have many parameters in common.

Objects On Wikispooks

All new pages must have exactly one object template. Some namespaces, such as document: mandate use of a particular template (e.g. Template:Document, but a choice of templates is available for pages in the main: namespace. In case of doubt, use Template:Concept to make the page a concept object.

Object Templates

The semantic object templates are deliberately similar. Custom Wikispooks template code silently sets the Semantic Properties (eventually, almost all parameters will have a corresponding property) and then calls a standard infobox template from Wikipedia to display the information. These are lightly customised, e.g. with a few extra parameters, such as |wikipedia.

Parameters

All the semantic object templates share a common color coding scheme, summarised below:

Blue parameters are for a single Wikispooks page name (If no suitable page exists, then pick a title for a future page)
Brown parameters are for numbers
Green parameters are for comma-separated lists of page names (Or planned page names).
Navy parameters are for dates
Orange parameters are for booleans. (Usually, either "Yes" or just leave blank).
Purple parameters are URLs.
Violet parameters are slash-separated lists.
Pink parameters are for coordinates.
Crossed out parameters were formerly available, but have been upgraded. Some may still work, but do not use these.

All parameters are optional, but you are strongly recommended to assign a |Wikipedia parameter, which connects this to the corresponding Wikipedia page, and so allows User:MaintenanceBot to automatically upgrade the page with appropriate information from that page. If there is no corresponding Wikipedia page, adding the parameter but leaving it blank (i.e. "|Wikipedia=" ) is a good way to save another editor the wasted time of looking for the page.

Lists

The templates have a lot of Green parameters. These are for comma-separated lists of pagenames. This means that the "," character is a reserved character and so should not be used in ordinary page titles (though it may be used in redirects). If you wish to indicate that a list is known to be incomplete, use the special word "...", which must be at the end of the list. To indicate that it is unknown whether or not the list is incomplete, end it with the special word "...?"

Subobjects

In the longer term, a wider choice of objects might be beneficial. To do this, rather than code objects from scratch, most new objects will probably be derived as 'sub-objects' from another object types according to the 'type' parameter. These could then have 'type' parameters of their own, allowing sub-sub-objects etc. where needed. For this reason, use of the |type parameter is strongly recommended.

See Also

Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png SMW.png
Semantic
Mediawiki
Help.png