Issue description
It should be possible to define names as a function of the properties of a topic.
Developer comments
There is two options here:
* the name is not a real (persisted) statement, but is added to the topic on demand (which item identifier does the name get?), then it is hard to search for it
* at some point (when?) the name is persisted and added to the topic
I think searchability is in this case not essential. A topic that cannot be named easily will probably not be searched for by name, but rather by its properties.
It is more important that when the name is given the subject can be recognized by the user (e.g. in a select box), so the statement should not be persisted.
The definition of the naming rule is best formulated as a TMQL query, but for now some other way has to do.
It is now possible to create label rules for topic types. The rules are formulated in PHP, and can use the following interface:
* $this->ovalue($ot_tr): get an occurrence value
* $this->nvalue($nt_tr): get a name value
* $this->cplayer($at_tr): get label of one counter player
* $this->cplayers($at_tr): get labels of all counter players
Return type is string except for cplayers which returns an array.
%ot_tr%, %nt_tr%, %at_tr% are references to statement types.
|
Work sessions4
Start |
2010-01-25T12:45:23
|
End |
2010-01-25T19:03:53
|
Participant |
Robert Cerny
|
Summary |
* Implementation of naming rules.
|
Start |
2010-01-26T08:55:50
|
End |
2010-01-26T10:30:25
|
Participant |
Robert Cerny
|
Summary |
Simplification of possiblities to write names with the following methods:
* nvalue(nt): name value,
* ovalue(ot): occurrence value
* cplayer(at): label of first counter player
* cplayers(at): array of labels of all counter players
|
Start |
2010-01-26T13:19:20
|
End |
2010-01-26T13:49:39
|
Participant |
Robert Cerny
|
Summary |
Improved the topic map which generates the necessary topics for the label rules.
|
Start |
2010-01-29T13:25:15
|
End |
2010-01-29T15:35:09
|
Participant |
Robert Cerny
|
Summary |
Made label rules reusable over topic types. Wrote label rules for some of the constraint types.
|
|