Property

From HackerspaceWiki
(Redirected from Semantic Property)
Jump to: navigation, search

In Semantic MediaWiki, a property gives machine-processable description of some feature of an object, such as its weight, size, location, or its owner. The property is written as an annotation in the article about the object that it describes.

The default for a property is that its value has its own article in the wiki. For example, given [[My Prop::Some Value]], SMW assumes Some Value has its own page in the wiki (whether or not it exists) and displays it as a link. This means that by inserting Some Prop Name:: in front of a regular MediaWiki link in an article, you can express why one article links to another. Properties that establish relationships between two pages this way are sometimes called relations.

A property can have, but does not require, a page in the wiki, in the special namespace Property:. Like Categories, if there are any pages using a property they will appear on its page, even if it has no user-written text. You can and should add text to the page for each property explaining its intended use. By specifying Has type in the page for the property, you can specify the type of the property is a string, or a date, or a user-defined type such as area or currency (the default is Type:Page). Once you have done this, by replacing a value in with [[Another Prop::the value]], you can express what the value means.

The special page Special:Properties lists all user-created properties in a wiki.

Many-valued Properties[edit]

Many-valued properties (a.k.a N-ary relations) are properties that do not only have one value or link target, but can have several. See Help:Many-valued properties.

Reserved property names[edit]

Several property names have predefined meaning in Semantic MediaWiki, such as "has type" and "allows value". These special properties appear in italics in the factbox of pages that use them. See a list of these special property names, and do not use these reserved names for your own properties.

Property replaces Relation and Attribute in earlier SMW versions[edit]

In versions of SMW prior to 1.0, there were separate namespaces and syntax for properties establish a relationship with other articles, and properties that just give a data value to the object. The former were known as Relations, the latter as Attributes. SMW 1.0 unifies these; a property that relates to another article has Type:Page, which is the default for a property.