Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsReplacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
https://www.eclipse.org/forums/index.php/mv/msg/149570/470224/#msg_470224
I got a use case where I need to replace the built in
NamedElement::isDistinguishableFrom query with another customized query
that also considers the NamedElement::type in the comparison.
Is this possible to do with current UML2 implementation using a new
profile where I define a new overriden/redefined operation
isDistinguishableFrom() for a stereotype <<MyClass>> ?
----------------------------
NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace): Boolean;
isDistinguishable =
if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
then
ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
else true
---------------
thanks
/anders]]>user2007-02-08T22:54:11-00:00Re: Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
https://www.eclipse.org/forums/index.php/mv/msg/149570/470226/#msg_470226
Unfortunately you cannot override such behavior in a profile. You might
want to consider some form of UML extension to accomplish this.
Have a look at the draft form of the "Extending UML" articles here https://bugs.eclipse.org/bugs/show_bug.cgi?id=77413 .... They explain the
pros and cons of extending UML and explore some options you have at your
disposal.
Regards,
- James.
<user@domain.com> wrote in message news:eqg9mk$321$1@utils.eclipse.org...
> Hi,
>
> I got a use case where I need to replace the built in
> NamedElement::isDistinguishableFrom query with another customized query
> that also considers the NamedElement::type in the comparison.
>
> Is this possible to do with current UML2 implementation using a new
> profile where I define a new overriden/redefined operation
> isDistinguishableFrom() for a stereotype <<MyClass>> ?
>
>
> ----------------------------
> NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace):
> Boolean;
> isDistinguishable =
> if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
> then
> ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
> else true
> ---------------
>
>
> thanks
> /anders
>
>]]>james bruck2007-02-09T03:33:12-00:00Re: Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
https://www.eclipse.org/forums/index.php/mv/msg/149570/586721/#msg_586721
Unfortunately you cannot override such behavior in a profile. You might
want to consider some form of UML extension to accomplish this.
Have a look at the draft form of the "Extending UML" articles here https://bugs.eclipse.org/bugs/show_bug.cgi?id=77413 .... They explain the
pros and cons of extending UML and explore some options you have at your
disposal.
Regards,
- James.
<user@domain.com> wrote in message news:eqg9mk$321$1@utils.eclipse.org...
> Hi,
>
> I got a use case where I need to replace the built in
> NamedElement::isDistinguishableFrom query with another customized query
> that also considers the NamedElement::type in the comparison.
>
> Is this possible to do with current UML2 implementation using a new
> profile where I define a new overriden/redefined operation
> isDistinguishableFrom() for a stereotype <<MyClass>> ?
>
>
> ----------------------------
> NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace):
> Boolean;
> isDistinguishable =
> if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
> then
> ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
> else true
> ---------------
>
>
> thanks
> /anders
>
>]]>james bruck2007-02-09T03:33:12-00:00Re: Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
https://www.eclipse.org/forums/index.php/mv/msg/149570/588584/#msg_588584
Sorry to hear this, It would have been super if possible. Ill have alook
at the articles but unfortunately compliance is important in the use case.
By any chance you dont know what, in the UML2 spec, that disallows
compliant appl to redefine such queries in a profile? and where in the
profiles chapter I can find these rules?
thanks
/anders
James Bruck wrote:
> Hi Anders,
>
> Unfortunately you cannot override such behavior in a profile. You might
> want to consider some form of UML extension to accomplish this.
>
> Have a look at the draft form of the "Extending UML" articles here
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=77413 .... They explain the
> pros and cons of extending UML and explore some options you have at your
> disposal.
>
> Regards,
>
> - James.
>
>
> <user@domain.com> wrote in message news:eqg9mk$321$1@utils.eclipse.org...
>> Hi,
>>
>> I got a use case where I need to replace the built in
>> NamedElement::isDistinguishableFrom query with another customized query
>> that also considers the NamedElement::type in the comparison.
>>
>> Is this possible to do with current UML2 implementation using a new
>> profile where I define a new overriden/redefined operation
>> isDistinguishableFrom() for a stereotype <<MyClass>> ?
>>
>>
>> ----------------------------
>> NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace):
>> Boolean;
>> isDistinguishable =
>> if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
>> then
>> ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
>> else true
>> ---------------
>>
>>
>> thanks
>> /anders
>>
>>
>
>]]>user2007-02-13T07:41:57-00:00Re: Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
https://www.eclipse.org/forums/index.php/mv/msg/149570/470383/#msg_470383
Sorry to hear this, It would have been super if possible. Ill have alook
at the articles but unfortunately compliance is important in the use case.
By any chance you dont know what, in the UML2 spec, that disallows
compliant appl to redefine such queries in a profile? and where in the
profiles chapter I can find these rules?
thanks
/anders
James Bruck wrote:
> Hi Anders,
>
> Unfortunately you cannot override such behavior in a profile. You might
> want to consider some form of UML extension to accomplish this.
>
> Have a look at the draft form of the "Extending UML" articles here
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=77413 .... They explain the
> pros and cons of extending UML and explore some options you have at your
> disposal.
>
> Regards,
>
> - James.
>
>
> <user@domain.com> wrote in message news:eqg9mk$321$1@utils.eclipse.org...
>> Hi,
>>
>> I got a use case where I need to replace the built in
>> NamedElement::isDistinguishableFrom query with another customized query
>> that also considers the NamedElement::type in the comparison.
>>
>> Is this possible to do with current UML2 implementation using a new
>> profile where I define a new overriden/redefined operation
>> isDistinguishableFrom() for a stereotype <<MyClass>> ?
>>
>>
>> ----------------------------
>> NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace):
>> Boolean;
>> isDistinguishable =
>> if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
>> then
>> ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
>> else true
>> ---------------
>>
>>
>> thanks
>> /anders
>>
>>
>
>]]>user2007-02-13T07:41:57-00:00Re: Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
https://www.eclipse.org/forums/index.php/mv/msg/149570/588659/#msg_588659
While the specification doesn't explicitly state that behavior cannot be
overridden by a profile, it does state that the purpose of a profile is to
constrain and/or extend a metamodel. The mechanism for overriding behavior
(and structure) in UML is redefinition, but since redefinition can only be
done in the context of generalization, and stereotypes can only specialize
stereotypes (not metaclasses), profiles effectively cannot be used to
redefine behavior in the metamodel...
Kenn
<user@domain.com> wrote in message news:45D16BC5.7040002@domain.com...
> Hi James,
>
> Sorry to hear this, It would have been super if possible. Ill have alook
> at the articles but unfortunately compliance is important in the use case.
>
> By any chance you dont know what, in the UML2 spec, that disallows
> compliant appl to redefine such queries in a profile? and where in the
> profiles chapter I can find these rules?
>
>
> thanks
> /anders
>
> James Bruck wrote:
>> Hi Anders,
>>
>> Unfortunately you cannot override such behavior in a profile. You
>> might want to consider some form of UML extension to accomplish this.
>>
>> Have a look at the draft form of the "Extending UML" articles here
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=77413 .... They explain
>> the pros and cons of extending UML and explore some options you have at
>> your disposal.
>>
>> Regards,
>>
>> - James.
>>
>>
>> <user@domain.com> wrote in message news:eqg9mk$321$1@utils.eclipse.org...
>>> Hi,
>>>
>>> I got a use case where I need to replace the built in
>>> NamedElement::isDistinguishableFrom query with another customized query
>>> that also considers the NamedElement::type in the comparison.
>>>
>>> Is this possible to do with current UML2 implementation using a new
>>> profile where I define a new overriden/redefined operation
>>> isDistinguishableFrom() for a stereotype <<MyClass>> ?
>>>
>>>
>>> ----------------------------
>>> NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace):
>>> Boolean;
>>> isDistinguishable =
>>> if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
>>> then
>>> ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
>>> else true
>>> ---------------
>>>
>>>
>>> thanks
>>> /anders
>>>
>>>
>>]]>Kenn Hussey2007-02-13T21:00:16-00:00Re: Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile?
https://www.eclipse.org/forums/index.php/mv/msg/149570/470402/#msg_470402
While the specification doesn't explicitly state that behavior cannot be
overridden by a profile, it does state that the purpose of a profile is to
constrain and/or extend a metamodel. The mechanism for overriding behavior
(and structure) in UML is redefinition, but since redefinition can only be
done in the context of generalization, and stereotypes can only specialize
stereotypes (not metaclasses), profiles effectively cannot be used to
redefine behavior in the metamodel...
Kenn
<user@domain.com> wrote in message news:45D16BC5.7040002@domain.com...
> Hi James,
>
> Sorry to hear this, It would have been super if possible. Ill have alook
> at the articles but unfortunately compliance is important in the use case.
>
> By any chance you dont know what, in the UML2 spec, that disallows
> compliant appl to redefine such queries in a profile? and where in the
> profiles chapter I can find these rules?
>
>
> thanks
> /anders
>
> James Bruck wrote:
>> Hi Anders,
>>
>> Unfortunately you cannot override such behavior in a profile. You
>> might want to consider some form of UML extension to accomplish this.
>>
>> Have a look at the draft form of the "Extending UML" articles here
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=77413 .... They explain
>> the pros and cons of extending UML and explore some options you have at
>> your disposal.
>>
>> Regards,
>>
>> - James.
>>
>>
>> <user@domain.com> wrote in message news:eqg9mk$321$1@utils.eclipse.org...
>>> Hi,
>>>
>>> I got a use case where I need to replace the built in
>>> NamedElement::isDistinguishableFrom query with another customized query
>>> that also considers the NamedElement::type in the comparison.
>>>
>>> Is this possible to do with current UML2 implementation using a new
>>> profile where I define a new overriden/redefined operation
>>> isDistinguishableFrom() for a stereotype <<MyClass>> ?
>>>
>>>
>>> ----------------------------
>>> NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace):
>>> Boolean;
>>> isDistinguishable =
>>> if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
>>> then
>>> ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
>>> else true
>>> ---------------
>>>
>>>
>>> thanks
>>> /anders
>>>
>>>
>>]]>Kenn Hussey2007-02-13T21:00:16-00:00