Properties¶
Warning
Definition: « Properties »
Properties allow for encoding relationship information in the form of first-class specifications between
- wiki pages and other wiki pages as well as
- wiki pages and property values.
Their behaviour can be explicitly specified using reserved special properties that determine how properties are processed by Semantic MediaWiki. Properties resemble the edges in knowlegde graphs
Quelle: Eigene Definition
Properties are defined on property pages located in the Property:
namespace.
Property pages have 2 main purposes
- document properties ~> how and when to use a property
- declare properties ~> how should SMW treat them technically
Property Types¶
Semantic MediaWiki employs two types of properties
-
‘Normal’, i.e., User-Defined Properties
User-defined properties are the usual way of representing the relationships of a universe of discourse. Their names can be individually choosen but must be unique. The behaviour of user-defined properties can be controlled using special properties.The property pages of user-defined properties usually contains
- documentation information, ie. a description about how a property is intended to be used in modelling an excerpt of the universe of discourse (~> non-normative information) together with
- declaration information in which their semantics, ie., the rules that will be applied for processing the property by SMW is determined (~> normative information).
-
Special Properties
Semantic MediaWiki provides a set of so-called special properties that control the behavior and processing of user-defined properties. Special properties can not be changed or used otherwise, i.e., they are unique in naming and usage.There are a lot of special properties, e.g.
Has type
,Allows value
,Modification date
,Has improper value for
,Has subobject
,Has query
, etc.
~> TheSpecial:Properties
provide a list of special properties implemented in your wiki1.Some special properties are assigned manually
~> e.g. special propertyHas type
which assigns the datatype to a user defined property Some special properties are assigned automatically
~> e.g.Has improper value for
stores incorrect values assigned to a property
Property Declaration¶
Properties need to be specified in the Property:
namespace
Properties need to have a datatype
-
- Datatypes give properties a certain meaning
- e.g. a property of datatype
Telephone number
can only validely hold telephone numbers - Page namespace:
Property
Page name:Has telephone number
Page content:[[Has type::Telephone number]]
→ This is the datatype assignment.
Default is datatype
Page
if nothing was explicitly added. -
Datatypes allow to do a formal check of the assigned value
e.g. a property value ofabc
annotated to a property of datatypeTelephone number
→ An error message will be issued. -
Datatypes are needed to drive a certain behaviour, i.e. add links, add formatting, etc.
e.g. a property value of+49-30-45-08-49-40
added to a property of datatypeTelephone number
will automatically be linked and additionally preceeded with URI prefixtel:
-
Semantic MediaWiki provides a rich set of default datatypes
e.g.Page
,Text
,Number
,Email
,URL
,Telephone number
,Temperature
,Boolean
, etc.
The pageSpecial:Types
provides a list of all datatypes available in a Semantic MediaWiki instance
Properties can only have one datatype
Setting Property Values¶
Setting a single value for one property¶
Setting multiple values for one property¶
-
Please note that this notation can not be used in Semantic Templates when multiple values need to be added to one property. Use the
{{#set:}}
parser function (in conjunction with{{#show:...}}
when the values should be displayed in a page) instead.For example:
Setting a property value without displaying it on the page¶
-
Please note the pipe symbol and blank space ‘
|_
’ after the property valueThe property value is not directly shown on the page.
Probably better here: annotation using the#set
parser function.
Setting property values using the #set
parser function¶
-
Sets the property value but don’t displays it on the page
#set
annotation for multiple values (not directly shown on the page)Values of
#set
annotations can be displayed with a template (not recommended)The property value is directly shown on the page using the
template
parameter.Content of the template
Show property value
:
The annotated data value is directly shown with{{{value}}}
.Alternatively use the
{{#show:...}}
parser function in conjunction with{{PAGENAME}
and the property the values of which are the be displayed:
-
Special properties are listed in italics ↩