Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Problems with UML2::NamedElement::isDistinguishableFrom
Problems with UML2::NamedElement::isDistinguishableFrom [message #473891] Sat, 07 July 2007 11:49 Go to next message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050401060106020101050204
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I seem to have a problem with my reading understanding of the query
NamedElement::isDistinguishableFrom()

UML 2007-02-03, "The query isDistinguishableFrom() determines whether
two NamedElements may logically co-exist within a Namespace.
By default, two named elements are distinguishable if (a) they have
unrelated types or (b) they have related types but
different names."


A warning is issued for atttached small file.
"Not all the members of namespace '<Class> Class' are distinguishable
within it."

note: Im using the latest Europe 3.3 release.

thanks
/anders

--------------050401060106020101050204
Content-Type: text/xml;
name="default.uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="default.uml"

<?xml version="1.0" encoding="UTF-8"?>
<uml:Package xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xmi:id="_xZ0P4SpPEdybW4WcTRWaZg">
<eAnnotations xmi:id="_2CQoASx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CQoAix7EdyIN_9H57vYNQ" key="uuid" value="_2CQoACx7EdyIN_9H57vYNQ"/>
</eAnnotations>
<packagedElement xmi:type="uml:DataType" xmi:id="_3MagoCpPEdybW4WcTRWaZg" name="A">
<eAnnotations xmi:id="_2CQoBCx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CQoBSx7EdyIN_9H57vYNQ" key="uuid" value="_2CQoAyx7EdyIN_9H57vYNQ"/>
</eAnnotations>
<ownedAttribute xmi:id="_5XvIsCpPEdybW4WcTRWaZg" name="property" type="_PNCdICx2EdyhfbRgxFvqZQ" aggregation="composite">
<eAnnotations xmi:id="_2CQoByx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CQoCCx7EdyIN_9H57vYNQ" key="uuid" value="_2CQoBix7EdyIN_9H57vYNQ"/>
</eAnnotations>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_7f7kQCpPEdybW4WcTRWaZg" name="Class">
<eAnnotations xmi:id="_2CQoCix7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CQoCyx7EdyIN_9H57vYNQ" key="uuid" value="_2CQoCSx7EdyIN_9H57vYNQ"/>
</eAnnotations>
<ownedAttribute xmi:id="_B9caQCpQEdybW4WcTRWaZg" name="property" type="_3MagoCpPEdybW4WcTRWaZg" isReadOnly="true" isDerived="true" isDerivedUnion="true" aggregation="composite">
<eAnnotations xmi:id="_2CaZASx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CaZAix7EdyIN_9H57vYNQ" key="uuid" value="_2CaZACx7EdyIN_9H57vYNQ"/>
</eAnnotations>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_uG_-0CpQEdybW4WcTRWaZg" value="*">
<eAnnotations xmi:id="_2CaZBCx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CaZBSx7EdyIN_9H57vYNQ" key="uuid" value="_2CaZAyx7EdyIN_9H57vYNQ"/>
</eAnnotations>
</upperValue>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ti8PgCpQEdybW4WcTRWaZg">
<eAnnotations xmi:id="_2CaZByx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CaZCCx7EdyIN_9H57vYNQ" key="uuid" value="_2CaZBix7EdyIN_9H57vYNQ"/>
</eAnnotations>
</lowerValue>
</ownedAttribute>
<ownedAttribute xmi:id="_Dq9sACpQEdybW4WcTRWaZg" name="property" type="_8k7dcCpPEdybW4WcTRWaZg" aggregation="composite">
<eAnnotations xmi:id="_2CaZCix7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CaZCyx7EdyIN_9H57vYNQ" key="uuid" value="_2CaZCSx7EdyIN_9H57vYNQ"/>
</eAnnotations>
</ownedAttribute>
<ownedAttribute xmi:type="uml:Port" xmi:id="_m1ptMCx2EdyhfbRgxFvqZQ" name="port" aggregation="composite">
<eAnnotations xmi:id="_2Cji8Sx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2Cji8ix7EdyIN_9H57vYNQ" key="uuid" value="_2Cji8Cx7EdyIN_9H57vYNQ"/>
</eAnnotations>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:DataType" xmi:id="_8k7dcCpPEdybW4WcTRWaZg" name="B">
<eAnnotations xmi:id="_2Cji9Cx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2Cji9Sx7EdyIN_9H57vYNQ" key="uuid" value="_2Cji8yx7EdyIN_9H57vYNQ"/>
</eAnnotations>
</packagedElement>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="_9pxloCpPEdybW4WcTRWaZg" name="P">
<eAnnotations xmi:id="_2Cji9yx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2Cji-Cx7EdyIN_9H57vYNQ" key="uuid" value="_2Cji9ix7EdyIN_9H57vYNQ"/>
</eAnnotations>
<ownedAttribute xmi:id="_AKZvUCpQEdybW4WcTRWaZg" name="property" aggregation="composite">
<eAnnotations xmi:id="_2Cji-ix7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2Cji-yx7EdyIN_9H57vYNQ" key="uuid" value="_2Cji-Sx7EdyIN_9H57vYNQ"/>
</eAnnotations>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:DataType" xmi:id="_PNCdICx2EdyhfbRgxFvqZQ" name="DataType">
<eAnnotations xmi:id="_2CtT-ix7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CtT-yx7EdyIN_9H57vYNQ" key="uuid" value="_2CtT-Sx7EdyIN_9H57vYNQ"/>
</eAnnotations>
<ownedAttribute xmi:id="_QX2DYCx2EdyhfbRgxFvqZQ" name="property" aggregation="composite">
<eAnnotations xmi:id="_2CtUACx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2CtUASx7EdyIN_9H57vYNQ" key="uuid" value="_2CtT_yx7EdyIN_9H57vYNQ"/>
</eAnnotations>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Component" xmi:id="_oATicCx2EdyhfbRgxFvqZQ" name="Component">
<eAnnotations xmi:id="_2C3E8Sx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2C3E8ix7EdyIN_9H57vYNQ" key="uuid" value="_2C3E8Cx7EdyIN_9H57vYNQ"/>
</eAnnotations>
<ownedAttribute xmi:type="uml:Port" xmi:id="_oh_TMCx2EdyhfbRgxFvqZQ" name="port" aggregation="composite">
<eAnnotations xmi:id="_2C3E9Cx7EdyIN_9H57vYNQ" source="http://www.topcased.org/uuid">
<details xmi:id="_2C3E9Sx7EdyIN_9H57vYNQ" key="uuid" value="_2C3E8yx7EdyIN_9H57vYNQ"/>
</eAnnotations>
</ownedAttribute>
</packagedElement>
</uml:Package>

--------------050401060106020101050204
Content-Type: image/gif;
name="default.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="default.gif"

R0lGODlh+AHsAff/AP///7CwsLSQPbKPPq6NQKqKQKWIQp+GQ5uDRZWAR49+ SYp7S4Z5TYF3
Tnt0UPr7/fj6/ff5/PT3/PH1++7y++vx+ujv+uft+t3d3fb5/PT3++7z++vw +ujv+eft+fb4
/fT2+/H0++zx+unu+ff4/e7z+unu+vb4/PP2/Ovx+3E8F/j6/L+CMcF3K791 KsF6LZNVH65j
JcWDMvf4/Nu/nuXJoc6ri55wWNe5mMeggvnxu9e4l3lPQPn6/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GAJv3aavwhBv7s+ p3XtyqJNoeDL
0/07Ea6+4HG80vltpdpYvpo37MSu6QTR7VD27RLe3mkOi+SeebWu6qiu6wKh 7kFK1u2eWIQ1
7tteEKeO67lu7PNJpRF9zhMe6/9OEOe+6QT/6mya1cze7/DcTdqOuQnhMJLu MtMe1k+Os48u
6IE+6Wf+/uNZO7/SPtxTa+Q3O+ss6/IrC+zB/rQy/0YLD+RXy/Jkq9Mw/LdN zZRPLdBr+/Pd
iad67PNVHcRnSd68FpZb7diou922Pdvsvm7xjnmHre9iLmSb2egnL91aT/VR zGZeP/SgHfZz
/teEHb8Yn/SNrOhMX65Y3uQrn+MyC/Mqi/cpW/M237R8P2lt79lfT+R3r/M1 uzQ3rcLQ7uQm
b/bEDaPuOfe9muVvPvhgKvZdj/m/VvmOr+KLPOBqDm2uHfieH+ds7duZb9Y3 n9ppH5hj+tvP
XvfgZdkz3cjI3exlT7eWTuk5iyI7jee6T/gx+/eAT/PE/zOr/9+k79w5/9yt 5yr75Mlgi/+Y
qor0TY2YRjy5T9/llr/7s1uhctXF0O/9ufpcn/jWSj7+Jmzw5p9zD3f1l+cj Ef5zfX68y2/C
2J/sTq/9H978wg8QAAQOJFjQ4EGECRUuZNjQ4UOIESVOpFjR4kWMGTVuPBiA 40eQCz2GJFnS
5EmUKVWuZNmyo0uYDUfGpFnT5k2cOXVaDNDT50+gQYUOJVrU6FGkRHcuZdrU 6VOoUaVOpVrV
6lWsWbVu5drV61ewYcWOJVvW7Fm0adWuZdvW7Vu4ceXOpVvX7l28efXu5dvX 71/AgQUPJlzY
8GHEiUEGBAA7
--------------050401060106020101050204--
Re: Problems with UML2::NamedElement::isDistinguishableFrom [message #473893 is a reply to message #473891] Mon, 09 July 2007 15:21 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Anders,

The query isDistinguishableFrom() is checking metatypes not types.
In your case, the warning appears because the metatypes of "property" in
"Class" are the same ( Propety ) and the names are also the same.

The OCL as it appears in the spec is not entirely correct since it uses
"..self.oclType", where "oclType" is not properly formed OCL (I double
checked that with Christian Damus <aka Mr.OCL > )
The query behaves as you would expect most programming languages to behave
( Java in particular ). For example, you would get a warning if you had
two attributes with the same name even if their types were different.

The query should return true in a scenario where you have a nested Class and
a nested Interface under a namespace that have the same name. In that case,
the metatypes would be different.

Regards,

- James.

<user@domain.com> wrote in message news:468F7DC6.8050409@domain.com...
> Hi,
>
> I seem to have a problem with my reading understanding of the query
> NamedElement::isDistinguishableFrom()
>
> UML 2007-02-03, "The query isDistinguishableFrom() determines whether
> two NamedElements may logically co-exist within a Namespace.
> By default, two named elements are distinguishable if (a) they have
> unrelated types or (b) they have related types but
> different names."
>
>
> A warning is issued for atttached small file.
> "Not all the members of namespace '<Class> Class' are distinguishable
> within it."
>
> note: Im using the latest Europe 3.3 release.
>
> thanks
> /anders
>


------------------------------------------------------------ ----------------
----


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Package xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
xmi:id="_xZ0P4SpPEdybW4WcTRWaZg">
> <eAnnotations xmi:id="_2CQoASx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoAix7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoACx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <packagedElement xmi:type="uml:DataType"
xmi:id="_3MagoCpPEdybW4WcTRWaZg" name="A">
> <eAnnotations xmi:id="_2CQoBCx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoBSx7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoAyx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_5XvIsCpPEdybW4WcTRWaZg" name="property"
type="_PNCdICx2EdyhfbRgxFvqZQ" aggregation="composite">
> <eAnnotations xmi:id="_2CQoByx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoCCx7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoBix7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_7f7kQCpPEdybW4WcTRWaZg"
name="Class">
> <eAnnotations xmi:id="_2CQoCix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoCyx7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoCSx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_B9caQCpQEdybW4WcTRWaZg" name="property"
type="_3MagoCpPEdybW4WcTRWaZg" isReadOnly="true" isDerived="true"
isDerivedUnion="true" aggregation="composite">
> <eAnnotations xmi:id="_2CaZASx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZAix7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZACx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <upperValue xmi:type="uml:LiteralUnlimitedNatural"
xmi:id="_uG_-0CpQEdybW4WcTRWaZg" value="*">
> <eAnnotations xmi:id="_2CaZBCx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZBSx7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZAyx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </upperValue>
> <lowerValue xmi:type="uml:LiteralInteger"
xmi:id="_ti8PgCpQEdybW4WcTRWaZg">
> <eAnnotations xmi:id="_2CaZByx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZCCx7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZBix7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </lowerValue>
> </ownedAttribute>
> <ownedAttribute xmi:id="_Dq9sACpQEdybW4WcTRWaZg" name="property"
type="_8k7dcCpPEdybW4WcTRWaZg" aggregation="composite">
> <eAnnotations xmi:id="_2CaZCix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZCyx7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZCSx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Port" xmi:id="_m1ptMCx2EdyhfbRgxFvqZQ"
name="port" aggregation="composite">
> <eAnnotations xmi:id="_2Cji8Sx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji8ix7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji8Cx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:DataType"
xmi:id="_8k7dcCpPEdybW4WcTRWaZg" name="B">
> <eAnnotations xmi:id="_2Cji9Cx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji9Sx7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji8yx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </packagedElement>
> <packagedElement xmi:type="uml:PrimitiveType"
xmi:id="_9pxloCpPEdybW4WcTRWaZg" name="P">
> <eAnnotations xmi:id="_2Cji9yx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji-Cx7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji9ix7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_AKZvUCpQEdybW4WcTRWaZg" name="property"
aggregation="composite">
> <eAnnotations xmi:id="_2Cji-ix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji-yx7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji-Sx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:DataType"
xmi:id="_PNCdICx2EdyhfbRgxFvqZQ" name="DataType">
> <eAnnotations xmi:id="_2CtT-ix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CtT-yx7EdyIN_9H57vYNQ" key="uuid"
value="_2CtT-Sx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_QX2DYCx2EdyhfbRgxFvqZQ" name="property"
aggregation="composite">
> <eAnnotations xmi:id="_2CtUACx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CtUASx7EdyIN_9H57vYNQ" key="uuid"
value="_2CtT_yx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Component"
xmi:id="_oATicCx2EdyhfbRgxFvqZQ" name="Component">
> <eAnnotations xmi:id="_2C3E8Sx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2C3E8ix7EdyIN_9H57vYNQ" key="uuid"
value="_2C3E8Cx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:type="uml:Port" xmi:id="_oh_TMCx2EdyhfbRgxFvqZQ"
name="port" aggregation="composite">
> <eAnnotations xmi:id="_2C3E9Cx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2C3E9Sx7EdyIN_9H57vYNQ" key="uuid"
value="_2C3E8yx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> </uml:Package>
>


------------------------------------------------------------ ----------------
----
Re: Problems with UML2::NamedElement::isDistinguishableFrom [message #473947 is a reply to message #473893] Wed, 11 July 2007 13:23 Go to previous messageGo to next message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
Hi James,

Thanks with the reading help, i see now what i missed!

Unfortunately I was hoping that the rule was wider than what its is.

Im trying to layer different kinds of naming-conventions ontop of CMOF
and UML2 (namespace, named element), but one of the really tricky one
allows same named properties with different property-type:s.

Personally I objected to that particular rule but for some reasons it
was needed.

It would have been great if the Infrastructure: E/CMOF Namedelement
isDistinguishableFrom would have been more permissive in order to allow
flexible naming conventions. And then UML2 could have restricted the
query to get better alignment with realisation technologies..

thanks
/anders


James Bruck wrote:
> Hi Anders,
>
> The query isDistinguishableFrom() is checking metatypes not types.
> In your case, the warning appears because the metatypes of "property" in
> "Class" are the same ( Propety ) and the names are also the same.
>
> The OCL as it appears in the spec is not entirely correct since it uses
> "..self.oclType", where "oclType" is not properly formed OCL (I double
> checked that with Christian Damus <aka Mr.OCL > )
> The query behaves as you would expect most programming languages to behave
> ( Java in particular ). For example, you would get a warning if you had
> two attributes with the same name even if their types were different.
>
> The query should return true in a scenario where you have a nested Class and
> a nested Interface under a namespace that have the same name. In that case,
> the metatypes would be different.
>
> Regards,
>
> - James.
>
> <user@domain.com> wrote in message news:468F7DC6.8050409@domain.com...
>> Hi,
>>
>> I seem to have a problem with my reading understanding of the query
>> NamedElement::isDistinguishableFrom()
>>
>> UML 2007-02-03, "The query isDistinguishableFrom() determines whether
>> two NamedElements may logically co-exist within a Namespace.
>> By default, two named elements are distinguishable if (a) they have
>> unrelated types or (b) they have related types but
>> different names."
>>
>>
>> A warning is issued for atttached small file.
>> "Not all the members of namespace '<Class> Class' are distinguishable
>> within it."
>>
>> note: Im using the latest Europe 3.3 release.
>>
>> thanks
>> /anders
>>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xmi:id="_xZ0P4SpPEdybW4WcTRWaZg">
>> <eAnnotations xmi:id="_2CQoASx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoAix7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoACx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <packagedElement xmi:type="uml:DataType"
> xmi:id="_3MagoCpPEdybW4WcTRWaZg" name="A">
>> <eAnnotations xmi:id="_2CQoBCx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoBSx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoAyx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_5XvIsCpPEdybW4WcTRWaZg" name="property"
> type="_PNCdICx2EdyhfbRgxFvqZQ" aggregation="composite">
>> <eAnnotations xmi:id="_2CQoByx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoCCx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoBix7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Class" xmi:id="_7f7kQCpPEdybW4WcTRWaZg"
> name="Class">
>> <eAnnotations xmi:id="_2CQoCix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoCyx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoCSx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_B9caQCpQEdybW4WcTRWaZg" name="property"
> type="_3MagoCpPEdybW4WcTRWaZg" isReadOnly="true" isDerived="true"
> isDerivedUnion="true" aggregation="composite">
>> <eAnnotations xmi:id="_2CaZASx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZAix7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZACx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <upperValue xmi:type="uml:LiteralUnlimitedNatural"
> xmi:id="_uG_-0CpQEdybW4WcTRWaZg" value="*">
>> <eAnnotations xmi:id="_2CaZBCx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZBSx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZAyx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </upperValue>
>> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_ti8PgCpQEdybW4WcTRWaZg">
>> <eAnnotations xmi:id="_2CaZByx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZCCx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZBix7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </lowerValue>
>> </ownedAttribute>
>> <ownedAttribute xmi:id="_Dq9sACpQEdybW4WcTRWaZg" name="property"
> type="_8k7dcCpPEdybW4WcTRWaZg" aggregation="composite">
>> <eAnnotations xmi:id="_2CaZCix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZCyx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZCSx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Port" xmi:id="_m1ptMCx2EdyhfbRgxFvqZQ"
> name="port" aggregation="composite">
>> <eAnnotations xmi:id="_2Cji8Sx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji8ix7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji8Cx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:DataType"
> xmi:id="_8k7dcCpPEdybW4WcTRWaZg" name="B">
>> <eAnnotations xmi:id="_2Cji9Cx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji9Sx7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji8yx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </packagedElement>
>> <packagedElement xmi:type="uml:PrimitiveType"
> xmi:id="_9pxloCpPEdybW4WcTRWaZg" name="P">
>> <eAnnotations xmi:id="_2Cji9yx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji-Cx7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji9ix7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_AKZvUCpQEdybW4WcTRWaZg" name="property"
> aggregation="composite">
>> <eAnnotations xmi:id="_2Cji-ix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji-yx7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji-Sx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:DataType"
> xmi:id="_PNCdICx2EdyhfbRgxFvqZQ" name="DataType">
>> <eAnnotations xmi:id="_2CtT-ix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CtT-yx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CtT-Sx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_QX2DYCx2EdyhfbRgxFvqZQ" name="property"
> aggregation="composite">
>> <eAnnotations xmi:id="_2CtUACx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CtUASx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CtT_yx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Component"
> xmi:id="_oATicCx2EdyhfbRgxFvqZQ" name="Component">
>> <eAnnotations xmi:id="_2C3E8Sx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2C3E8ix7EdyIN_9H57vYNQ" key="uuid"
> value="_2C3E8Cx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:type="uml:Port" xmi:id="_oh_TMCx2EdyhfbRgxFvqZQ"
> name="port" aggregation="composite">
>> <eAnnotations xmi:id="_2C3E9Cx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2C3E9Sx7EdyIN_9H57vYNQ" key="uuid"
> value="_2C3E8yx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> </uml:Package>
>>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>
>
Re: Problems with UML2::NamedElement::isDistinguishableFrom [message #473949 is a reply to message #473947] Wed, 11 July 2007 13:48 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Anders,

You might want to bring that up with OMG and attempt getting the spec
changed.
You can try sending an email to issues@omg.org or uml2-rtf@omg.org.
Unless you have very strong arguments against how the spec defines this
currently you might have a bit of a battle getting the spec changed :)
The opensource API really tries to follow the spec to the letter; warts and
all.

- James.


<user@domain.com> wrote in message news:f72lki$80c$1@build.eclipse.org...
> Hi James,
>
> Thanks with the reading help, i see now what i missed!
>
> Unfortunately I was hoping that the rule was wider than what its is.
>
> Im trying to layer different kinds of naming-conventions ontop of CMOF
> and UML2 (namespace, named element), but one of the really tricky one
> allows same named properties with different property-type:s.
>
> Personally I objected to that particular rule but for some reasons it
> was needed.
>
> It would have been great if the Infrastructure: E/CMOF Namedelement
> isDistinguishableFrom would have been more permissive in order to allow
> flexible naming conventions. And then UML2 could have restricted the
> query to get better alignment with realisation technologies..
>
> thanks
> /anders
>
>
> James Bruck wrote:
> > Hi Anders,
> >
> > The query isDistinguishableFrom() is checking metatypes not types.
> > In your case, the warning appears because the metatypes of "property" in
> > "Class" are the same ( Propety ) and the names are also the same.
> >
> > The OCL as it appears in the spec is not entirely correct since it uses
> > "..self.oclType", where "oclType" is not properly formed OCL (I double
> > checked that with Christian Damus <aka Mr.OCL > )
> > The query behaves as you would expect most programming languages to
behave
> > ( Java in particular ). For example, you would get a warning if you
had
> > two attributes with the same name even if their types were different.
> >
> > The query should return true in a scenario where you have a nested Class
and
> > a nested Interface under a namespace that have the same name. In that
case,
> > the metatypes would be different.
> >
> > Regards,
> >
> > - James.
> >
> > <user@domain.com> wrote in message news:468F7DC6.8050409@domain.com...
> >> Hi,
> >>
> >> I seem to have a problem with my reading understanding of the query
> >> NamedElement::isDistinguishableFrom()
> >>
> >> UML 2007-02-03, "The query isDistinguishableFrom() determines whether
> >> two NamedElements may logically co-exist within a Namespace.
> >> By default, two named elements are distinguishable if (a) they have
> >> unrelated types or (b) they have related types but
> >> different names."
> >>
> >>
> >> A warning is issued for atttached small file.
> >> "Not all the members of namespace '<Class> Class' are distinguishable
> >> within it."
> >>
> >> note: Im using the latest Europe 3.3 release.
> >>
> >> thanks
> >> /anders
> >>
> >
> >
>
> ------------------------------------------------------------ --------------
--
> > ----
> >
> >
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <uml:Package xmi:version="2.1"
> > xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> > xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> > xmi:id="_xZ0P4SpPEdybW4WcTRWaZg">
> >> <eAnnotations xmi:id="_2CQoASx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoAix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoACx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <packagedElement xmi:type="uml:DataType"
> > xmi:id="_3MagoCpPEdybW4WcTRWaZg" name="A">
> >> <eAnnotations xmi:id="_2CQoBCx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoBSx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoAyx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_5XvIsCpPEdybW4WcTRWaZg" name="property"
> > type="_PNCdICx2EdyhfbRgxFvqZQ" aggregation="composite">
> >> <eAnnotations xmi:id="_2CQoByx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoCCx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoBix7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:Class"
xmi:id="_7f7kQCpPEdybW4WcTRWaZg"
> > name="Class">
> >> <eAnnotations xmi:id="_2CQoCix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoCyx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoCSx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_B9caQCpQEdybW4WcTRWaZg" name="property"
> > type="_3MagoCpPEdybW4WcTRWaZg" isReadOnly="true" isDerived="true"
> > isDerivedUnion="true" aggregation="composite">
> >> <eAnnotations xmi:id="_2CaZASx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZAix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZACx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <upperValue xmi:type="uml:LiteralUnlimitedNatural"
> > xmi:id="_uG_-0CpQEdybW4WcTRWaZg" value="*">
> >> <eAnnotations xmi:id="_2CaZBCx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZBSx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZAyx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </upperValue>
> >> <lowerValue xmi:type="uml:LiteralInteger"
> > xmi:id="_ti8PgCpQEdybW4WcTRWaZg">
> >> <eAnnotations xmi:id="_2CaZByx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZCCx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZBix7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </lowerValue>
> >> </ownedAttribute>
> >> <ownedAttribute xmi:id="_Dq9sACpQEdybW4WcTRWaZg" name="property"
> > type="_8k7dcCpPEdybW4WcTRWaZg" aggregation="composite">
> >> <eAnnotations xmi:id="_2CaZCix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZCyx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZCSx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> <ownedAttribute xmi:type="uml:Port"
xmi:id="_m1ptMCx2EdyhfbRgxFvqZQ"
> > name="port" aggregation="composite">
> >> <eAnnotations xmi:id="_2Cji8Sx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji8ix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji8Cx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:DataType"
> > xmi:id="_8k7dcCpPEdybW4WcTRWaZg" name="B">
> >> <eAnnotations xmi:id="_2Cji9Cx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji9Sx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji8yx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:PrimitiveType"
> > xmi:id="_9pxloCpPEdybW4WcTRWaZg" name="P">
> >> <eAnnotations xmi:id="_2Cji9yx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji-Cx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji9ix7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_AKZvUCpQEdybW4WcTRWaZg" name="property"
> > aggregation="composite">
> >> <eAnnotations xmi:id="_2Cji-ix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji-yx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji-Sx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:DataType"
> > xmi:id="_PNCdICx2EdyhfbRgxFvqZQ" name="DataType">
> >> <eAnnotations xmi:id="_2CtT-ix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CtT-yx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CtT-Sx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_QX2DYCx2EdyhfbRgxFvqZQ" name="property"
> > aggregation="composite">
> >> <eAnnotations xmi:id="_2CtUACx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CtUASx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CtT_yx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:Component"
> > xmi:id="_oATicCx2EdyhfbRgxFvqZQ" name="Component">
> >> <eAnnotations xmi:id="_2C3E8Sx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2C3E8ix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2C3E8Cx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:type="uml:Port"
xmi:id="_oh_TMCx2EdyhfbRgxFvqZQ"
> > name="port" aggregation="composite">
> >> <eAnnotations xmi:id="_2C3E9Cx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2C3E9Sx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2C3E8yx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> </uml:Package>
> >>
> >
> >
>
> ------------------------------------------------------------ --------------
--
> > ----
> >
> >
> >
> >
> >
Re: Problems with UML2::NamedElement::isDistinguishableFrom [message #623307 is a reply to message #473891] Mon, 09 July 2007 15:21 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Anders,

The query isDistinguishableFrom() is checking metatypes not types.
In your case, the warning appears because the metatypes of "property" in
"Class" are the same ( Propety ) and the names are also the same.

The OCL as it appears in the spec is not entirely correct since it uses
"..self.oclType", where "oclType" is not properly formed OCL (I double
checked that with Christian Damus <aka Mr.OCL > )
The query behaves as you would expect most programming languages to behave
( Java in particular ). For example, you would get a warning if you had
two attributes with the same name even if their types were different.

The query should return true in a scenario where you have a nested Class and
a nested Interface under a namespace that have the same name. In that case,
the metatypes would be different.

Regards,

- James.

<user@domain.com> wrote in message news:468F7DC6.8050409@domain.com...
> Hi,
>
> I seem to have a problem with my reading understanding of the query
> NamedElement::isDistinguishableFrom()
>
> UML 2007-02-03, "The query isDistinguishableFrom() determines whether
> two NamedElements may logically co-exist within a Namespace.
> By default, two named elements are distinguishable if (a) they have
> unrelated types or (b) they have related types but
> different names."
>
>
> A warning is issued for atttached small file.
> "Not all the members of namespace '<Class> Class' are distinguishable
> within it."
>
> note: Im using the latest Europe 3.3 release.
>
> thanks
> /anders
>


------------------------------------------------------------ ----------------
----


> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Package xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
xmi:id="_xZ0P4SpPEdybW4WcTRWaZg">
> <eAnnotations xmi:id="_2CQoASx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoAix7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoACx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <packagedElement xmi:type="uml:DataType"
xmi:id="_3MagoCpPEdybW4WcTRWaZg" name="A">
> <eAnnotations xmi:id="_2CQoBCx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoBSx7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoAyx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_5XvIsCpPEdybW4WcTRWaZg" name="property"
type="_PNCdICx2EdyhfbRgxFvqZQ" aggregation="composite">
> <eAnnotations xmi:id="_2CQoByx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoCCx7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoBix7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Class" xmi:id="_7f7kQCpPEdybW4WcTRWaZg"
name="Class">
> <eAnnotations xmi:id="_2CQoCix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CQoCyx7EdyIN_9H57vYNQ" key="uuid"
value="_2CQoCSx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_B9caQCpQEdybW4WcTRWaZg" name="property"
type="_3MagoCpPEdybW4WcTRWaZg" isReadOnly="true" isDerived="true"
isDerivedUnion="true" aggregation="composite">
> <eAnnotations xmi:id="_2CaZASx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZAix7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZACx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <upperValue xmi:type="uml:LiteralUnlimitedNatural"
xmi:id="_uG_-0CpQEdybW4WcTRWaZg" value="*">
> <eAnnotations xmi:id="_2CaZBCx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZBSx7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZAyx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </upperValue>
> <lowerValue xmi:type="uml:LiteralInteger"
xmi:id="_ti8PgCpQEdybW4WcTRWaZg">
> <eAnnotations xmi:id="_2CaZByx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZCCx7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZBix7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </lowerValue>
> </ownedAttribute>
> <ownedAttribute xmi:id="_Dq9sACpQEdybW4WcTRWaZg" name="property"
type="_8k7dcCpPEdybW4WcTRWaZg" aggregation="composite">
> <eAnnotations xmi:id="_2CaZCix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CaZCyx7EdyIN_9H57vYNQ" key="uuid"
value="_2CaZCSx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> <ownedAttribute xmi:type="uml:Port" xmi:id="_m1ptMCx2EdyhfbRgxFvqZQ"
name="port" aggregation="composite">
> <eAnnotations xmi:id="_2Cji8Sx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji8ix7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji8Cx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:DataType"
xmi:id="_8k7dcCpPEdybW4WcTRWaZg" name="B">
> <eAnnotations xmi:id="_2Cji9Cx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji9Sx7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji8yx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </packagedElement>
> <packagedElement xmi:type="uml:PrimitiveType"
xmi:id="_9pxloCpPEdybW4WcTRWaZg" name="P">
> <eAnnotations xmi:id="_2Cji9yx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji-Cx7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji9ix7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_AKZvUCpQEdybW4WcTRWaZg" name="property"
aggregation="composite">
> <eAnnotations xmi:id="_2Cji-ix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2Cji-yx7EdyIN_9H57vYNQ" key="uuid"
value="_2Cji-Sx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:DataType"
xmi:id="_PNCdICx2EdyhfbRgxFvqZQ" name="DataType">
> <eAnnotations xmi:id="_2CtT-ix7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CtT-yx7EdyIN_9H57vYNQ" key="uuid"
value="_2CtT-Sx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:id="_QX2DYCx2EdyhfbRgxFvqZQ" name="property"
aggregation="composite">
> <eAnnotations xmi:id="_2CtUACx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2CtUASx7EdyIN_9H57vYNQ" key="uuid"
value="_2CtT_yx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> <packagedElement xmi:type="uml:Component"
xmi:id="_oATicCx2EdyhfbRgxFvqZQ" name="Component">
> <eAnnotations xmi:id="_2C3E8Sx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2C3E8ix7EdyIN_9H57vYNQ" key="uuid"
value="_2C3E8Cx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> <ownedAttribute xmi:type="uml:Port" xmi:id="_oh_TMCx2EdyhfbRgxFvqZQ"
name="port" aggregation="composite">
> <eAnnotations xmi:id="_2C3E9Cx7EdyIN_9H57vYNQ"
source="http://www.topcased.org/uuid">
> <details xmi:id="_2C3E9Sx7EdyIN_9H57vYNQ" key="uuid"
value="_2C3E8yx7EdyIN_9H57vYNQ"/>
> </eAnnotations>
> </ownedAttribute>
> </packagedElement>
> </uml:Package>
>


------------------------------------------------------------ ----------------
----
Re: Problems with UML2::NamedElement::isDistinguishableFrom [message #623646 is a reply to message #473893] Wed, 11 July 2007 13:23 Go to previous message
user is currently offline userFriend
Messages: 296
Registered: July 2009
Senior Member
Hi James,

Thanks with the reading help, i see now what i missed!

Unfortunately I was hoping that the rule was wider than what its is.

Im trying to layer different kinds of naming-conventions ontop of CMOF
and UML2 (namespace, named element), but one of the really tricky one
allows same named properties with different property-type:s.

Personally I objected to that particular rule but for some reasons it
was needed.

It would have been great if the Infrastructure: E/CMOF Namedelement
isDistinguishableFrom would have been more permissive in order to allow
flexible naming conventions. And then UML2 could have restricted the
query to get better alignment with realisation technologies..

thanks
/anders


James Bruck wrote:
> Hi Anders,
>
> The query isDistinguishableFrom() is checking metatypes not types.
> In your case, the warning appears because the metatypes of "property" in
> "Class" are the same ( Propety ) and the names are also the same.
>
> The OCL as it appears in the spec is not entirely correct since it uses
> "..self.oclType", where "oclType" is not properly formed OCL (I double
> checked that with Christian Damus <aka Mr.OCL > )
> The query behaves as you would expect most programming languages to behave
> ( Java in particular ). For example, you would get a warning if you had
> two attributes with the same name even if their types were different.
>
> The query should return true in a scenario where you have a nested Class and
> a nested Interface under a namespace that have the same name. In that case,
> the metatypes would be different.
>
> Regards,
>
> - James.
>
> <user@domain.com> wrote in message news:468F7DC6.8050409@domain.com...
>> Hi,
>>
>> I seem to have a problem with my reading understanding of the query
>> NamedElement::isDistinguishableFrom()
>>
>> UML 2007-02-03, "The query isDistinguishableFrom() determines whether
>> two NamedElements may logically co-exist within a Namespace.
>> By default, two named elements are distinguishable if (a) they have
>> unrelated types or (b) they have related types but
>> different names."
>>
>>
>> A warning is issued for atttached small file.
>> "Not all the members of namespace '<Class> Class' are distinguishable
>> within it."
>>
>> note: Im using the latest Europe 3.3 release.
>>
>> thanks
>> /anders
>>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <uml:Package xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xmi:id="_xZ0P4SpPEdybW4WcTRWaZg">
>> <eAnnotations xmi:id="_2CQoASx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoAix7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoACx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <packagedElement xmi:type="uml:DataType"
> xmi:id="_3MagoCpPEdybW4WcTRWaZg" name="A">
>> <eAnnotations xmi:id="_2CQoBCx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoBSx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoAyx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_5XvIsCpPEdybW4WcTRWaZg" name="property"
> type="_PNCdICx2EdyhfbRgxFvqZQ" aggregation="composite">
>> <eAnnotations xmi:id="_2CQoByx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoCCx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoBix7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Class" xmi:id="_7f7kQCpPEdybW4WcTRWaZg"
> name="Class">
>> <eAnnotations xmi:id="_2CQoCix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CQoCyx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CQoCSx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_B9caQCpQEdybW4WcTRWaZg" name="property"
> type="_3MagoCpPEdybW4WcTRWaZg" isReadOnly="true" isDerived="true"
> isDerivedUnion="true" aggregation="composite">
>> <eAnnotations xmi:id="_2CaZASx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZAix7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZACx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <upperValue xmi:type="uml:LiteralUnlimitedNatural"
> xmi:id="_uG_-0CpQEdybW4WcTRWaZg" value="*">
>> <eAnnotations xmi:id="_2CaZBCx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZBSx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZAyx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </upperValue>
>> <lowerValue xmi:type="uml:LiteralInteger"
> xmi:id="_ti8PgCpQEdybW4WcTRWaZg">
>> <eAnnotations xmi:id="_2CaZByx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZCCx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZBix7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </lowerValue>
>> </ownedAttribute>
>> <ownedAttribute xmi:id="_Dq9sACpQEdybW4WcTRWaZg" name="property"
> type="_8k7dcCpPEdybW4WcTRWaZg" aggregation="composite">
>> <eAnnotations xmi:id="_2CaZCix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CaZCyx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CaZCSx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> <ownedAttribute xmi:type="uml:Port" xmi:id="_m1ptMCx2EdyhfbRgxFvqZQ"
> name="port" aggregation="composite">
>> <eAnnotations xmi:id="_2Cji8Sx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji8ix7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji8Cx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:DataType"
> xmi:id="_8k7dcCpPEdybW4WcTRWaZg" name="B">
>> <eAnnotations xmi:id="_2Cji9Cx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji9Sx7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji8yx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </packagedElement>
>> <packagedElement xmi:type="uml:PrimitiveType"
> xmi:id="_9pxloCpPEdybW4WcTRWaZg" name="P">
>> <eAnnotations xmi:id="_2Cji9yx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji-Cx7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji9ix7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_AKZvUCpQEdybW4WcTRWaZg" name="property"
> aggregation="composite">
>> <eAnnotations xmi:id="_2Cji-ix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2Cji-yx7EdyIN_9H57vYNQ" key="uuid"
> value="_2Cji-Sx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:DataType"
> xmi:id="_PNCdICx2EdyhfbRgxFvqZQ" name="DataType">
>> <eAnnotations xmi:id="_2CtT-ix7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CtT-yx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CtT-Sx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:id="_QX2DYCx2EdyhfbRgxFvqZQ" name="property"
> aggregation="composite">
>> <eAnnotations xmi:id="_2CtUACx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2CtUASx7EdyIN_9H57vYNQ" key="uuid"
> value="_2CtT_yx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> <packagedElement xmi:type="uml:Component"
> xmi:id="_oATicCx2EdyhfbRgxFvqZQ" name="Component">
>> <eAnnotations xmi:id="_2C3E8Sx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2C3E8ix7EdyIN_9H57vYNQ" key="uuid"
> value="_2C3E8Cx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> <ownedAttribute xmi:type="uml:Port" xmi:id="_oh_TMCx2EdyhfbRgxFvqZQ"
> name="port" aggregation="composite">
>> <eAnnotations xmi:id="_2C3E9Cx7EdyIN_9H57vYNQ"
> source="http://www.topcased.org/uuid">
>> <details xmi:id="_2C3E9Sx7EdyIN_9H57vYNQ" key="uuid"
> value="_2C3E8yx7EdyIN_9H57vYNQ"/>
>> </eAnnotations>
>> </ownedAttribute>
>> </packagedElement>
>> </uml:Package>
>>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>
>
Re: Problems with UML2::NamedElement::isDistinguishableFrom [message #623648 is a reply to message #473947] Wed, 11 July 2007 13:48 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Anders,

You might want to bring that up with OMG and attempt getting the spec
changed.
You can try sending an email to issues@omg.org or uml2-rtf@omg.org.
Unless you have very strong arguments against how the spec defines this
currently you might have a bit of a battle getting the spec changed :)
The opensource API really tries to follow the spec to the letter; warts and
all.

- James.


<user@domain.com> wrote in message news:f72lki$80c$1@build.eclipse.org...
> Hi James,
>
> Thanks with the reading help, i see now what i missed!
>
> Unfortunately I was hoping that the rule was wider than what its is.
>
> Im trying to layer different kinds of naming-conventions ontop of CMOF
> and UML2 (namespace, named element), but one of the really tricky one
> allows same named properties with different property-type:s.
>
> Personally I objected to that particular rule but for some reasons it
> was needed.
>
> It would have been great if the Infrastructure: E/CMOF Namedelement
> isDistinguishableFrom would have been more permissive in order to allow
> flexible naming conventions. And then UML2 could have restricted the
> query to get better alignment with realisation technologies..
>
> thanks
> /anders
>
>
> James Bruck wrote:
> > Hi Anders,
> >
> > The query isDistinguishableFrom() is checking metatypes not types.
> > In your case, the warning appears because the metatypes of "property" in
> > "Class" are the same ( Propety ) and the names are also the same.
> >
> > The OCL as it appears in the spec is not entirely correct since it uses
> > "..self.oclType", where "oclType" is not properly formed OCL (I double
> > checked that with Christian Damus <aka Mr.OCL > )
> > The query behaves as you would expect most programming languages to
behave
> > ( Java in particular ). For example, you would get a warning if you
had
> > two attributes with the same name even if their types were different.
> >
> > The query should return true in a scenario where you have a nested Class
and
> > a nested Interface under a namespace that have the same name. In that
case,
> > the metatypes would be different.
> >
> > Regards,
> >
> > - James.
> >
> > <user@domain.com> wrote in message news:468F7DC6.8050409@domain.com...
> >> Hi,
> >>
> >> I seem to have a problem with my reading understanding of the query
> >> NamedElement::isDistinguishableFrom()
> >>
> >> UML 2007-02-03, "The query isDistinguishableFrom() determines whether
> >> two NamedElements may logically co-exist within a Namespace.
> >> By default, two named elements are distinguishable if (a) they have
> >> unrelated types or (b) they have related types but
> >> different names."
> >>
> >>
> >> A warning is issued for atttached small file.
> >> "Not all the members of namespace '<Class> Class' are distinguishable
> >> within it."
> >>
> >> note: Im using the latest Europe 3.3 release.
> >>
> >> thanks
> >> /anders
> >>
> >
> >
>
> ------------------------------------------------------------ --------------
--
> > ----
> >
> >
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <uml:Package xmi:version="2.1"
> > xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> > xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> > xmi:id="_xZ0P4SpPEdybW4WcTRWaZg">
> >> <eAnnotations xmi:id="_2CQoASx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoAix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoACx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <packagedElement xmi:type="uml:DataType"
> > xmi:id="_3MagoCpPEdybW4WcTRWaZg" name="A">
> >> <eAnnotations xmi:id="_2CQoBCx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoBSx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoAyx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_5XvIsCpPEdybW4WcTRWaZg" name="property"
> > type="_PNCdICx2EdyhfbRgxFvqZQ" aggregation="composite">
> >> <eAnnotations xmi:id="_2CQoByx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoCCx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoBix7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:Class"
xmi:id="_7f7kQCpPEdybW4WcTRWaZg"
> > name="Class">
> >> <eAnnotations xmi:id="_2CQoCix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CQoCyx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CQoCSx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_B9caQCpQEdybW4WcTRWaZg" name="property"
> > type="_3MagoCpPEdybW4WcTRWaZg" isReadOnly="true" isDerived="true"
> > isDerivedUnion="true" aggregation="composite">
> >> <eAnnotations xmi:id="_2CaZASx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZAix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZACx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <upperValue xmi:type="uml:LiteralUnlimitedNatural"
> > xmi:id="_uG_-0CpQEdybW4WcTRWaZg" value="*">
> >> <eAnnotations xmi:id="_2CaZBCx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZBSx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZAyx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </upperValue>
> >> <lowerValue xmi:type="uml:LiteralInteger"
> > xmi:id="_ti8PgCpQEdybW4WcTRWaZg">
> >> <eAnnotations xmi:id="_2CaZByx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZCCx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZBix7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </lowerValue>
> >> </ownedAttribute>
> >> <ownedAttribute xmi:id="_Dq9sACpQEdybW4WcTRWaZg" name="property"
> > type="_8k7dcCpPEdybW4WcTRWaZg" aggregation="composite">
> >> <eAnnotations xmi:id="_2CaZCix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CaZCyx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CaZCSx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> <ownedAttribute xmi:type="uml:Port"
xmi:id="_m1ptMCx2EdyhfbRgxFvqZQ"
> > name="port" aggregation="composite">
> >> <eAnnotations xmi:id="_2Cji8Sx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji8ix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji8Cx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:DataType"
> > xmi:id="_8k7dcCpPEdybW4WcTRWaZg" name="B">
> >> <eAnnotations xmi:id="_2Cji9Cx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji9Sx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji8yx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:PrimitiveType"
> > xmi:id="_9pxloCpPEdybW4WcTRWaZg" name="P">
> >> <eAnnotations xmi:id="_2Cji9yx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji-Cx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji9ix7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_AKZvUCpQEdybW4WcTRWaZg" name="property"
> > aggregation="composite">
> >> <eAnnotations xmi:id="_2Cji-ix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2Cji-yx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2Cji-Sx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:DataType"
> > xmi:id="_PNCdICx2EdyhfbRgxFvqZQ" name="DataType">
> >> <eAnnotations xmi:id="_2CtT-ix7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CtT-yx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CtT-Sx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:id="_QX2DYCx2EdyhfbRgxFvqZQ" name="property"
> > aggregation="composite">
> >> <eAnnotations xmi:id="_2CtUACx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2CtUASx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2CtT_yx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> <packagedElement xmi:type="uml:Component"
> > xmi:id="_oATicCx2EdyhfbRgxFvqZQ" name="Component">
> >> <eAnnotations xmi:id="_2C3E8Sx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2C3E8ix7EdyIN_9H57vYNQ" key="uuid"
> > value="_2C3E8Cx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> <ownedAttribute xmi:type="uml:Port"
xmi:id="_oh_TMCx2EdyhfbRgxFvqZQ"
> > name="port" aggregation="composite">
> >> <eAnnotations xmi:id="_2C3E9Cx7EdyIN_9H57vYNQ"
> > source="http://www.topcased.org/uuid">
> >> <details xmi:id="_2C3E9Sx7EdyIN_9H57vYNQ" key="uuid"
> > value="_2C3E8yx7EdyIN_9H57vYNQ"/>
> >> </eAnnotations>
> >> </ownedAttribute>
> >> </packagedElement>
> >> </uml:Package>
> >>
> >
> >
>
> ------------------------------------------------------------ --------------
--
> > ----
> >
> >
> >
> >
> >
Previous Topic:How to get Project of Element or Model
Next Topic:UML2 XMI > SVG via XSLT
Goto Forum:
  


Current Time: Mon Sep 25 17:10:46 GMT 2017

Powered by FUDForum. Page generated in 0.06581 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software