Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » problem with load value of property of object stereotyped
problem with load value of property of object stereotyped [message #478226] Mon, 09 March 2009 08:00 Go to next message
fiorella is currently offline fiorellaFriend
Messages: 11
Registered: July 2009
Junior Member
Hello,
How can I get the value of property of object stereotyped?
If I use getStereotypePropertyValue() this return IllegalArgument
Exception.

So, i have implemented a method with first parameter a metaclass of object
but I don't know how call this method in the class main.

The method is:

public static String loadREAccessProb(org.eclipse.uml2.uml.Actor
actor,Stereotype stereotipo)
{

String risultato=null;

String appliedStereotype=stereotipo.getQualifiedName();

risultato=(String) ((Element) actor).getValue(((Element)
actor).getAppliedStereotype(appliedStereotype), "REaccessProb");

return risultato;


}

the model is:

<<REUser>><Actor>Elevator user

and REUser has as property REAccessprob


I must get the value of REAccessProb on object Elevator user.
How can i do?
Re: problem with load value of property of object stereotyped [message #478229 is a reply to message #478226] Mon, 09 March 2009 13:54 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Fiorella,

If this code is not working, I'd suggest debugging it to see why the illegal
argument exception is occurring...

Kenn

"fiorella " <fiorellaepablo@hotmail.it> wrote in message
news:9f47b6b7285bf7e14b7393fff51f3850$1@www.eclipse.org...
> Hello,
> How can I get the value of property of object stereotyped?
> If I use getStereotypePropertyValue() this return IllegalArgument
> Exception.
>
> So, i have implemented a method with first parameter a metaclass of object
> but I don't know how call this method in the class main.
>
> The method is:
>
> public static String loadREAccessProb(org.eclipse.uml2.uml.Actor
> actor,Stereotype stereotipo)
> {
> String risultato=null;
>
> String appliedStereotype=stereotipo.getQualifiedName();
> risultato=(String) ((Element) actor).getValue(((Element)
> actor).getAppliedStereotype(appliedStereotype), "REaccessProb");
>
> return risultato;
>
> }
>
> the model is:
>
> <<REUser>><Actor>Elevator user
>
> and REUser has as property REAccessprob
>
>
> I must get the value of REAccessProb on object Elevator user.
> How can i do?
>
Re: problem with load value of property of object stereotyped [message #478233 is a reply to message #478229] Mon, 09 March 2009 16:40 Go to previous message
fiorella is currently offline fiorellaFriend
Messages: 11
Registered: July 2009
Junior Member
The method return nothing,no an illegal exception, but the problem is how
call the method in the main class.
Re: problem with load value of property of object stereotyped [message #627426 is a reply to message #478226] Mon, 09 March 2009 13:54 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Fiorella,

If this code is not working, I'd suggest debugging it to see why the illegal
argument exception is occurring...

Kenn

"fiorella " <fiorellaepablo@hotmail.it> wrote in message
news:9f47b6b7285bf7e14b7393fff51f3850$1@www.eclipse.org...
> Hello,
> How can I get the value of property of object stereotyped?
> If I use getStereotypePropertyValue() this return IllegalArgument
> Exception.
>
> So, i have implemented a method with first parameter a metaclass of object
> but I don't know how call this method in the class main.
>
> The method is:
>
> public static String loadREAccessProb(org.eclipse.uml2.uml.Actor
> actor,Stereotype stereotipo)
> {
> String risultato=null;
>
> String appliedStereotype=stereotipo.getQualifiedName();
> risultato=(String) ((Element) actor).getValue(((Element)
> actor).getAppliedStereotype(appliedStereotype), "REaccessProb");
>
> return risultato;
>
> }
>
> the model is:
>
> <<REUser>><Actor>Elevator user
>
> and REUser has as property REAccessprob
>
>
> I must get the value of REAccessProb on object Elevator user.
> How can i do?
>
Re: problem with load value of property of object stereotyped [message #627429 is a reply to message #478229] Mon, 09 March 2009 16:40 Go to previous message
fiorella is currently offline fiorellaFriend
Messages: 11
Registered: July 2009
Junior Member
The method return nothing,no an illegal exception, but the problem is how
call the method in the main class.
Previous Topic:Re: get property'value of stereotype
Next Topic:How read uml model in java?
Goto Forum:
  


Current Time: Thu Apr 25 05:50:56 GMT 2024

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

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

Back to the top