|Re: How/Can an OCL expression access a UML Class Diagram? [message #1184718 is a reply to message #1184602]
||Wed, 13 November 2013 11:42
| Christian W. Damus
Registered: July 2009
You might try something like
inv: self.<whatever-identifies-the-special-class-type> implies
notation::Diagram.allInstances()->exists(element = self)
but that depends on what the scope of 'allInstances' is. In Papyrus,
for example, it would have to be the ResourceSet because Papyrus stores
the diagram content in a different resource than the UML content.
On 2013-11-13 15:11:32 +0000, DavidH Mising name said:
> I'm writing OCL expressions to validate a UML model. One thing I'd like
> to do is check the model for the existence of a specifically named UML
> Class Diagram. Is that possible?
> I have a modeling rule that says for certain types of Classes, modelers
> must create a corresponding UML class diagram of the same name. I'd
> like to enforce that decoratively with OCL.
Powered by FUDForum
. Page generated in 0.01514 seconds