Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] How can I set namespace of classes in uml2
[ATL] How can I set namespace of classes in uml2 [message #81572] Mon, 19 May 2008 03:25
Victor Hugo is currently offline Victor HugoFriend
Messages: 20
Registered: July 2009
Junior Member
Hi people!

I have to migrate few atl transformations that uses uml1.4 to uml2.
I`m using version 1.1.1 of uml2 jar.

My original transformation is that:


rule MergeClass {
from s : UML2!Class (
if thisModule.inElements->includes(s) then
s.oclIsTypeOf(UML2!Class)
else
if thisModule.allMergeElements(s) and s.isValid() then
s.oclIsTypeOf(UML2!Class)
else
false
endif
endif
)
to t : UML2!Class mapsTo s (
isRoot <- s.isRoot,
isActive <- s.isActive,
isAbstract <- s.isAbstract,
visibility <- s.visibility,
name <- s.name,
isSpecification <- s.isSpecification,
isLeaf <- s.isLeaf,
comment <- s.comment,
constraint <- s.constraint,
namespace <-if thisModule.allMergeElements(s.namespace) --THIS IS MY
PROBLEM
then s.namespace
else s.namespace.fromSourceModel() endif,
feature <- s.feature
)

My problem is because in uml2 i cannot set the package (namespace) of
class using the same way that in the code.
The uml2 api have an method getNamespace() but dont have a set.

any help please? how can i set the namespace of classes in uml2?

best regards
Previous Topic:[ATL] metamodel element uml::Class not found
Next Topic:[ATL] Packaging bug in org.eclipse.m2m.atl.engine.vm plugin
Goto Forum:
  


Current Time: Fri Apr 26 23:29:29 GMT 2024

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

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

Back to the top