Help:Semantics
| Case Wiki Help | |
|---|---|
| Category | Articles |
| General | FAQ | Terminology | Common Mistakes | Creating Articles |
| Basic Editing | Links | Categories | Organizing | Discussion | Redirects |
| Advanced | Images | Moving/Renaming | Templates | Footnotes Watching | Reverting | Math formula | Extensions | Semantics |
| Tutorials | Beginner | Basic editing | Advanced editing |
The Case Wiki uses Semantic MediaWiki, which allows Semantics to be documented in the wiki. All help documented on this article can most-likely be found in the official Semantic MediaWiki documentation.
Contents |
[edit] About
Semantics are properties that describe something. Semantics are expressed through language. For example, Jon is a boy. This sentence expresses the fact that Jon is a boy.
[edit] Vocabulary
To understand how to use the semantic extension, you need to understand some basic vocabulary.
- Relations
- Think of a relation as a category for a wiki link. If one article links to another, there is a reason for that link. The relation is the reason.
- Attribute
- Values for properties that the article subject has. For example, when writing about the city of Cleveland, an attribute would be the population, land area, etc.
[edit] Wiki Syntax
The semantic extension uses a slightly-modified wiki syntax to record information.
[edit] Relations
Relations are part of wiki links. To denote a relation, just add the relation name immediately at the beginning of the double square brackets. The relation is followed by two commas, which are followed by the destination article name. The syntax is the following:
[[relation::article]]
If you wish the displayed text to be different from the article, use the vertical pipe, as you would for normal links.
[[relation::article|display text]]
Relations do not need to be defined before they are used. However, it is a good idea to use existing relations, where possible. A list of all relations is on Special:Relations.
[edit] Attributes
Relations take the form of wiki links, but they don't actually link to anything.
Attributes are recorded using double square brackets, like wiki links. Attributes start with the opening square brackets, followed by the attribute name, followed by a colon and equal sign, which is followed by the value and finally the closing brackets. The visual form is:
[[attribute:=value]]
It is also possible to use alternative text for the attribute value assignment.
[[attribute:=value|display text]]
A list of all available attributes is available on Special:Attributes.
[edit] Defining an Attribute
Unlike relations, attributes must be defined before they are used. The reason is that the wiki must know the data type of the attribute. This is necessary because the wiki must verify that the attribute value is sane. For example, it would not make sense for the population to be a length value.
To define an attribute, one needs to create an article in the Attribute namespace with the name of the attribute. This article must contain the semantic relation has type with the value of the data type for the attribute.
Available types are:
- String
- Integer
- Float
- Temperature
- Geographic coordinate
- Date
- URI
It is also possible to create your own type. To do this, create an article in the Type namespace.
A list of all types is available at Special:Types
Case Referrers
Forum Threads
- Case Forum :: Case Things (11 referral)
- Case Forum :: Case Things (1 referral)
- Case Forum :: Case Things (1 referral)
