Hi Modesto,
I think you may have misunderstood Sparxian.
isRoot, says the class cannot have been specialized from another class. isLeaf, says the class cannot be specialized from.
HTH,
Paolo
isRoot was in UML 1.5 and we haven't got around to removing it yet (there's sure to be someone somewhere using it).
A Class where isRoot is set must not be the source of a Generalization.
A Class where isLeaf is set must not be the target of a Generalization.
Let's see if we can translate Sparxian into normal English.
With isRoot set, a class cannot be the source of Generalization as per KP reply but can be the target of Generalization. This means the class can be specialised but cannot be generalised, this what I think Paolo is saying. This is very useful to create an ontology model where the root cannot be further generalised.
The UML 2.4.1 specification states
isFinalSpecialization: Boolean
if true, the Classifier cannot be specialized by generalization. Note that this property is preserved through package
merge operations; that is, the capability to specialize a Classifier (i.e., isFinalSpecialization =false) must be preserved
in the resulting Classifier of a package merge operation where a Classifier with isFinalSpecialization =false is merged
with a matching Classifier with isFinalSpecialization =true: the resulting Classifier will have isFinalSpecialization
=false. Default is false.
I find this a bit confusing, but my original understanding it that I need to set isLeaf to True to prevent a class from been further specialised, which is Sparx EA behaviour. Whether, this makes it a Final Classifier I am not sure, let's say I have an ontology like (please note I am aware this may not be the best of examples):
Party (isRoot = True, isLeaf= False)
----Person
----Organisation
--------Internal Organisation (isRoot = False, isLeaf= True)
--------External Organisation
Party cannot be further generalised, intentionally or by accident, and Internal Organisation cannot be further specialised, intentionally or by accident. Which is class is the Final Classifier (Party or Internal Organisation)?