Hi,
In general, a relationship requires your knowledge about both ends.
If you have only half of the information, the model will be in an
incomplete state, and analyses typically suppose the model is complete.
But, in particular, you are asking if a class having no children
shouldn't appear in Inheritance Relationships. Well, in this case, it
is not that you do not know the other half of the information, but
you certainly know there is no relationship. To state this, the
simplest thing is to not have the relationship in the model :).
Perhaps the confusion comes from not knowing what is required and
what is not. But, the problem of required is only valid for
properties of entities, not for entities. Thus, the properties
"superclass" and "subclass" are required for an
InheritanceDefinition, but we do not require an InheritanceDefinition
for each Class.
And please ask as many questions as you need, and do not be stressed
about our time too much (at least not until we said so) :).
Cheers,
Doru
On May 18, 2007, at 6:07 PM, Muhammad Bhatti wrote:
Thanx Tudor, the response was quick and it worked!!
I would like some more precision regarding my question about
absence of child
classes: what do we do for the relationships whose one entity
doesn't exist, do
we not consider them? For example, a class having no children
shouldn't appear
in Inheritance Relationship? If no, how do we represent them? I am
working on a
system where inheritance is very rarely used and thus these
relationships will
not appear in MOOSE.
thanx once more for your time,
usman
Selon Tudor Girba <girba(a)iam.unibe.ch>ch>:
Hi Usman,
1. What I understood from the earlier discussion:
we do generate
Inheritance
definitions for framework classes/system classes that are
referenced by user
defined classes. My questions is that what does their inheritance
definition
look like. In the simplest case, the inheritance definition for a
system class
may look like this (my assumption: we discard the belongsTo
attribute):
FAMIX.Class
{
id: 121
name: 'FrameworkClass'
stub: true
}
I do not understand this question.
2. What about the inheritance definition of user
definied classes
that do not
have any children. How do we assign their subclass attribute. I
have tried the
following by putting stub: true
(FAMIX.InheritanceDefinition
(id: 18)
(stub true)
(subclass 0)
(superclass 5)
)
But it didn't work.
There are several reasons why it did not work.
First, the inheritance definition is between 2 ***existent***
classes, not between a class and its non existent children. So, in
this case, because an entity with id = 0 does not exist you would get
an error when loading the file.
Second, it also would not work because whenever you make a reference
to an entity via an id, you have to use (idref: xxx). Thus, an
inheritance definition would look like:
(FAMIX.InheritanceDefinition
(id: ZZZ)
(subclass (idref: XXX))
(superclass (idref: YYY))
)
Furthermore, we usually do not mark stub the relationships, but we
mark as stub only the structural entities. Thus, if the superclass is
stub, we know the inheritance points to an outside class.
I attached here the corrected file.
For a more detailed example of a valid MSE file, please take a
look at:
http://smallwiki.unibe.ch/moose/lansamplemodel/?action=MimeView
--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.
--
Muhammad Bhatti
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.
--
Tudor Girba
www.iam.unibe.ch/~girba
www.iam.unibe.ch/~girba/blog/
"No matter how many recipes we'll know, we'll still value a chef."