Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: get property'value of stereotype
Re: get property'value of stereotype [message #478220] Fri, 06 March 2009 20:10 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Fiorella,

It's best to ask on the UML2 newsgroup, which I've added to the "to"
list of the reply, so no need to repost.

I'm having a very hard time reading your question. You many want to
clarify it...


fiorella wrote:
> Hello, I have a problem with eclipse.
> I have a uml model, which was exported by MagicDraw, which I would get
> the property values of certain stereotypes.
> I realizzayo the following method:
> public static object loadREaccessProb (org.eclipse.uml2.uml.Actor
> actor, Stereotype ste) (
>
> String Nameste= ste.getQualifiedName();
> object value = actor.getValue (getAppliedStereotype (nameste),
> "Reaccessprob"));
> return value;
> )
> reaccessprob where is the property I want to achieve.
> the metaclasse which I applied the stereotype is Actor.
> I would like now, in the main, chiamre this method.
> Parameters such as current pace?
> Hello thanks
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: get property'value of stereotype [message #478222 is a reply to message #478220] Fri, 06 March 2009 21:46 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Fiorella,

Have you tried debugging the code? Are you sure that the stereotype has been
successfully applied?

Kenn

"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:gorvuq$7t5$1@build.eclipse.org...
> Fiorella,
>
> It's best to ask on the UML2 newsgroup, which I've added to the "to" list
> of the reply, so no need to repost.
>
> I'm having a very hard time reading your question. You many want to
> clarify it...
>
>
> fiorella wrote:
>> Hello, I have a problem with eclipse.
>> I have a uml model, which was exported by MagicDraw, which I would get
>> the property values of certain stereotypes.
>> I realizzayo the following method:
>> public static object loadREaccessProb (org.eclipse.uml2.uml.Actor actor,
>> Stereotype ste) (
>>
>> String Nameste= ste.getQualifiedName();
>> object value = actor.getValue (getAppliedStereotype (nameste),
>> "Reaccessprob"));
>> return value;
>> )
>> reaccessprob where is the property I want to achieve.
>> the metaclasse which I applied the stereotype is Actor.
>> I would like now, in the main, chiamre this method.
>> Parameters such as current pace?
>> Hello thanks
>>
Re: get property'value of stereotype [message #478223 is a reply to message #478222] Sat, 07 March 2009 07:08 Go to previous messageGo to next message
fiorella is currently offline fiorellaFriend
Messages: 11
Registered: July 2009
Junior Member
Yes the stereotype has applied, but how get the value of the property of
stereotype?
my friend told me that I must refer to metaclasse to which I applied the
stereotype and I wanted to know how to pass as this parameter metaclasse.
another thing, as the subject in hand I want to take the value?
example:
ia have this model:
<model>Data
<<REUser>><Actor>Elevator user
<<REUser>><Actor>> user
..... etc

I wanted to know the value of property REAccessProb of the stereotype
REUser on object Elevator User and I must refer to metaclass of objec to
which is applied the stereotype REUser.
I have implemented this metod:

public static Object loadREAccessProb(org.eclipse.uml2.uml.Actor
actor,Stereotype ste){
String nameSte=ste.getQualifiedName();
Object
value=actor.getValue(getAppliedStereotype(nameSte),"ReAccessProb ");
return value;
}

Is that the metod right for get the value of the property REAccessprob?
Re: get property'value of stereotype [message #478228 is a reply to message #478223] Mon, 09 March 2009 13:53 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Fiorella,

Yes, that method looks correct. Of course, it will only work if the
stereotype is in fact applied and can successfully be resolved when the
method is executed...

Kenn

"fiorella " <fiorellaepablo@hotmail.it> wrote in message
news:e794fadb53567cc8c4bcc4e8f11e6fca$1@www.eclipse.org...
> Yes the stereotype has applied, but how get the value of the property of
> stereotype?
> my friend told me that I must refer to metaclasse to which I applied the
> stereotype and I wanted to know how to pass as this parameter metaclasse.
> another thing, as the subject in hand I want to take the value?
> example:
> ia have this model:
> <model>Data
> <<REUser>><Actor>Elevator user
> <<REUser>><Actor>> user
> ..... etc
>
> I wanted to know the value of property REAccessProb of the stereotype
> REUser on object Elevator User and I must refer to metaclass of objec to
> which is applied the stereotype REUser.
> I have implemented this metod:
>
> public static Object loadREAccessProb(org.eclipse.uml2.uml.Actor
> actor,Stereotype ste){
> String nameSte=ste.getQualifiedName();
> Object
> value=actor.getValue(getAppliedStereotype(nameSte),"ReAccessProb ");
> return value;
> }
>
> Is that the metod right for get the value of the property REAccessprob?
>
Re: get property'value of stereotype [message #627417 is a reply to message #478220] Fri, 06 March 2009 21:46 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Fiorella,

Have you tried debugging the code? Are you sure that the stereotype has been
successfully applied?

Kenn

"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:gorvuq$7t5$1@build.eclipse.org...
> Fiorella,
>
> It's best to ask on the UML2 newsgroup, which I've added to the "to" list
> of the reply, so no need to repost.
>
> I'm having a very hard time reading your question. You many want to
> clarify it...
>
>
> fiorella wrote:
>> Hello, I have a problem with eclipse.
>> I have a uml model, which was exported by MagicDraw, which I would get
>> the property values of certain stereotypes.
>> I realizzayo the following method:
>> public static object loadREaccessProb (org.eclipse.uml2.uml.Actor actor,
>> Stereotype ste) (
>>
>> String Nameste= ste.getQualifiedName();
>> object value = actor.getValue (getAppliedStereotype (nameste),
>> "Reaccessprob"));
>> return value;
>> )
>> reaccessprob where is the property I want to achieve.
>> the metaclasse which I applied the stereotype is Actor.
>> I would like now, in the main, chiamre this method.
>> Parameters such as current pace?
>> Hello thanks
>>
Re: get property'value of stereotype [message #627418 is a reply to message #478222] Sat, 07 March 2009 07:08 Go to previous message
fiorella is currently offline fiorellaFriend
Messages: 11
Registered: July 2009
Junior Member
Yes the stereotype has applied, but how get the value of the property of
stereotype?
my friend told me that I must refer to metaclasse to which I applied the
stereotype and I wanted to know how to pass as this parameter metaclasse.
another thing, as the subject in hand I want to take the value?
example:
ia have this model:
<model>Data
<<REUser>><Actor>Elevator user
<<REUser>><Actor>> user
..... etc

I wanted to know the value of property REAccessProb of the stereotype
REUser on object Elevator User and I must refer to metaclass of objec to
which is applied the stereotype REUser.
I have implemented this metod:

public static Object loadREAccessProb(org.eclipse.uml2.uml.Actor
actor,Stereotype ste){
String nameSte=ste.getQualifiedName();
Object
value=actor.getValue(getAppliedStereotype(nameSte),"ReAccessProb ");
return value;
}

Is that the metod right for get the value of the property REAccessprob?
Re: get property'value of stereotype [message #627423 is a reply to message #478223] Mon, 09 March 2009 13:53 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Fiorella,

Yes, that method looks correct. Of course, it will only work if the
stereotype is in fact applied and can successfully be resolved when the
method is executed...

Kenn

"fiorella " <fiorellaepablo@hotmail.it> wrote in message
news:e794fadb53567cc8c4bcc4e8f11e6fca$1@www.eclipse.org...
> Yes the stereotype has applied, but how get the value of the property of
> stereotype?
> my friend told me that I must refer to metaclasse to which I applied the
> stereotype and I wanted to know how to pass as this parameter metaclasse.
> another thing, as the subject in hand I want to take the value?
> example:
> ia have this model:
> <model>Data
> <<REUser>><Actor>Elevator user
> <<REUser>><Actor>> user
> ..... etc
>
> I wanted to know the value of property REAccessProb of the stereotype
> REUser on object Elevator User and I must refer to metaclass of objec to
> which is applied the stereotype REUser.
> I have implemented this metod:
>
> public static Object loadREAccessProb(org.eclipse.uml2.uml.Actor
> actor,Stereotype ste){
> String nameSte=ste.getQualifiedName();
> Object
> value=actor.getValue(getAppliedStereotype(nameSte),"ReAccessProb ");
> return value;
> }
>
> Is that the metod right for get the value of the property REAccessprob?
>
Previous Topic:How read uml model in java?
Next Topic:problem with load value of property of object stereotyped
Goto Forum:
  


Current Time: Wed Apr 24 16:09:31 GMT 2024

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

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

Back to the top