Pentru a putea vota, modifica pagini sau abona la modificările unei pagini trebuie să fiți autentificați. Cu această ocazie scăpați și de acest mesaj deranjant.

Ajutor:How can I create a new property?

De la
Versiunea din 15 noiembrie 2007 02:25, autor: (Discuție) (How can I create a new property?)
(dif) ← Versiunea anterioară | Versiunea curentă (dif) | Versiunea următoare → (dif)
Salt la: navigare, căutare
question:=How can I create a new property?
description:=Click "Create" in the "Properties" tool box.


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


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


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

The Properties section in 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.

Creating a new property for 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.

The range has been removed and a type was added.

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 density of a substance (float value) is specified for a temperature and a pressure (float value).

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 Type:Page with an additional range hint.