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) :).
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
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
not appear in MOOSE.
thanx once more for your time,
Selon Tudor Girba <girba(a)iam.unibe.ch>:
> Hi Usman,
>> 1. What I understood from the earlier discussion: we do generate
>> definitions for framework classes/system classes that are
>> referenced by user
>> defined classes. My questions is that what does their inheritance
>> look like. In the simplest case, the inheritance definition for a
>> system class
>> may look like this (my assumption: we discard the belongsTo
>> 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
>> (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:
> (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:
> Ce message a ete verifie par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ete trouve.
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.
"No matter how many recipes we'll know, we'll still value a chef."