[topicmapmail] Any design guidelines for roletyping?
Bernard Vatant
bernard.vatant@mondeca.com
Thu, 2 Jan 2003 23:06:10 +0100
Marc
The way we deal with that in Mondeca solutions now is definitely
approach 2). We've tried approach 1) in some very radical way, where
classification was only inheritance from role types ... and it turned
out to be very messy.
As a matter of fact, a topic class and a role type are not exactly the
same subject if you look closely their semantics. I've already given the
following example in this forum, if I remember well.
In a topic map about music, "composer" (as class) will have instances
who are people of which composition is a "classifying activity" like
Verdi, Mozart, Bach ... Those guys are "essentially" composers.
OTOH, maybe I have myself composed one or two pieces of music some years
ago. But they are known of no one but me and one or two old friends, and
that's certainly better that way... Although I am linked to those pieces
by a role of type "composer" in some "composition" association, I will
hopefully not infer from that my belonging to the "composer" class.
So I'm better off with two different topics, one called "composer-class"
and the other "composer-role" for those two animals.
Those distinct identities can be supported by different technical names.
What Tom suggests is one way ("COMPOSER" vs "composer"). We have used
sometimes for end-user interfaces "Composers" for the class and
"composer" for the role, but this is not very conform to classification
science recommended practices.
If you are not fixed by the TNC, and if it makes sense always in
context, and end-users do not care, you can in fact use the same name
for the two topics, if it's not a baseName constrained by TNC. This is
quite dangerous. Better to keep two explicit distinct names at least in
some "technical" scope, like "composer-class" and "composer-role".
Another avantage of the clean separation is that you can manage
independently the classes and instances, on one hand, and the
association templates (association types and role types) on the other.
Hope that helps.
Bernard
============================================
Bernard Vatant
Knowledge Engineering
Mondeca - www.mondeca.com
OASIS Published Subjects Technical Committee
www.oasis-open.org/committees/tm-pubsubj
============================================
|-----Original Message-----
|From: topicmapmail-admin@infoloom.com [mailto:topicmapmail-
|admin@infoloom.com] On Behalf Of Marc de Graauw
|Sent: mercredi 1 janvier 2003 15:09
|To: topicmapmail@infoloom.com
|
|Hi,
|
|When I have role types in an association there are two possible
approaches:
|
|1) Use topic types as role types.
|
|The Opera Topic Map does this frequently, i.e.: 'Aida' composed-by
'Verdi',
|in
|this association the roleSpec of 'Verdi' is the topic 'composer'.
Verdi,
|however, is a topic of topic type 'composer' too. So the topic
'composer'
|is
|used both to type topic 'Verdi' and to specify the role 'Verdi' plays
in an
|association. ('Composer' is also a subclass of 'person'.)
|
|2) Keep topic types and role types separate.
|
|Sometimes solution 1) is unnatural. I have a lot of topics of type
|'person'.
|The persons can be married, and this is modelled with a 'marriage'
|association
|between two topics of type 'person'. I.e. 'Susan Smith' is-married-to
'John
|Smith'. Now the types of the roles in the association naturally become
|'husband' and 'wife'. Making 'Susan Smith' a topic of type 'wife' and
make
|'wife' a subclass of 'person' is unnatural, since Susan is only a wife
by
|virtue of her participation in the 'marriage' association, so when the
|association is deleted we would have to change Susan's topic type from
|'wife'
|to 'person' (or 'unmarried person').
|
|My question: is it preferable to use approach 1 only, or approach 2?
|Approach
|1 seems to make it easier to build user interfaces, since we could make
a
|user
|interface which allows only topics of type 'composer' to be used as the
|'composer' role in in the composed-by association. If I want to do that
|with
|approach 2, I need to record somewhere which topic types are eligible
as
|'wife' in the 'marriage' association. On the other hand, playing a role
in
|an
|association and being a topic of a certain type seem different things,
so
|mixing the two seems wrong. Is mixing the two approaches harmless or is
it
|better to avoid this?
|
|Does anyone have any design guidelines they follow themselves?
|
|Cheers, Marc
|
|
|_______________________________________________
|topicmapmail mailing list
|topicmapmail@infoloom.com
|http://www.infoloom.com/mailman/listinfo/topicmapmail