Help:How can I create a new property?


 * Question
 * question:=How can I create a new property?


 * Answer
 * description:=Click "Create" in the "Properties" tool box.



Prerequisites

You are editing a page. The "Properties" tool box is available in the semantic toolbar.

Goal

You want to create a property. If you are editing a category, the domain of the new property should be the category.

Workflow

Click "Create" in the section "Properties" of the semantic toolbar.

Then the name of the property and its range or type have to be specified. If you are editing a category, the domain is already set to the current category.



When you click "Create", the new property is created and its properties are set in the corresponding new article. A new window opens (popups have to be accepted from this page) and shows the newly created property page for further elaboration.

Ranges and types

Normally, binary properties are created. They have a domain and a type. By default the type is "Type:Page" i.e. the value of the property is another article. For reasoning and gardening purposes, the category of these articles should be specified in the input field "Range:".

Range hints are generated in the wiki text e.g. Has range hint::Category:Product

On the other hand, types are simple data types like integer numbers or strings. To define a type, the range can be removed with the red cross. Then the new type is added by clicking the link "Add type". All built-in and user defined types can be selected in the selection field.



For the example above, the following type definition is added to the wiki text: has type:=Type:Float

Defining n-ary properties

In the same way as described above you can define n-ary properties. You can add additional types and ranges with the corresponding links.

N-ary properties are like binary properties with additional conditions. For instance, the density is a property of a substance. But it varies with temperature and pressure. This can be expressed with an n-ary property.



The following type definition will be generated in the wiki text: Has type:=Type:Temperature;Type:Float;Type:Float

If proper types are defined in the wiki, this specification can be made even more precise: Has type:=Type:Temperature;Type:Pressure;Type:Density

So, n-ary properties are defined by a semi-colon separated list of types. What appears as range in the semantic toolbar will be encoded as  with an additional range hint.