Re: TMQL: Direct (super|sub)types?

Robert Cerny <[email protected]>
Newsgroups gmane.text.xml.xtm.general
Message-ID <[email protected]>
Am 01.03.2011 um 10:02 schrieb Lars Heuer:

> Hi Robert,
> 
> [...]
>> Topic type A is a direct subtype of topic type B, if and only if 'A
>> ako B' is true.
> 
> Do you have a use case for it? In my way of thinking X is an instance
> of Y or not. Regardless how the relationship was established and how
> many associations are involved to model the relationship. Why do you
> need (in)direct (super|sub)types?

Sure. Here are some areas of Topincs where those terms are used:

* If i fill a select box with possible players, one or more topic role constraints come into play: i compute the union of *all* (direct and indirect = deep) instances of the constrained topic types (may be abstract) of the topic role constraints. The exact algorithm is more complicated than that, because of cardinalities and role combination constraints. I was actually close to going insane when implementing it. But now i am ok again. :)

* In Topincs Programming [1], you fetch a tobject to manipulate the topic map. This Tobject has a virtual interface which is driven by the constraints of all types of which the topic, which is represented by the tobject, is an instance of. Direct and indirect. It is acutally the same set of constraints that is used to generated the form for this topic.

This is not the whole story, but i hope it is still helpful to you. As far as i remember the issue only came into play when i added (partial) TMCL support for form generation.

Best,
Robert

[1] http://www.cerny-online.com/topincs/manual/programming
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.