Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » how to match href element in uml diagram
how to match href element in uml diagram [message #997301] Sat, 05 January 2013 09:06 Go to next message
Beatus Ding is currently offline Beatus DingFriend
Messages: 18
Registered: November 2012
Junior Member
I'm trying to transform UML Class Diagram to other models.I have trouble in accessing the href in the following format:
<packageImport xmi:id="_A78LYDdmEeKttLPFIKJkEA">
      <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>

I want to get the value of href in the importedPackage.According to the uml class meta-model,the type of importedPackage is "uml:Model",but my match rule package2entity cannot identify it,my rule like this
rule Model2Model{
			id <- s.__xmiID__,

My packageimp2entity rule can identify the packageImport element,the rule listed below
rule packageimp2entity{
	from s:UML!PackageImport(s.oclIsTypeOf(UML!PackageImport))
	to	 t:UNIFY!Entity(
			subEntities <- s.importedPackage

But I don't know how to get the href value.Expression s.importedPackage can match an outside package,not the child element of packageImport.Any help will be appreciated.
Re: how to match href element in uml diagram [message #997437 is a reply to message #997301] Mon, 07 January 2013 14:01 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 667
Registered: July 2009
Senior Member

href is not an attribute or reference of the PackageImport element, it is an XMI serialization-specific feature that is not intended to be handled manually at the model level.
In order to know the model elements (and corresponding attributes/references) you can actually handle, you should take a look to the UML2 metamodel.

Generally, to avoid this kind of misunderstanding, I encourage you to open your metamodels and models with a model editor/browser rather than reading them in XMI (which can be often quite confusing). You can use the generic MoDisco Model Browser for instance.


Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
Re: how to match href element in uml diagram [message #997461 is a reply to message #997437] Mon, 07 January 2013 15:55 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 552
Registered: July 2009
Senior Member
I think you could try
Previous Topic:ATL transformation to XSD Schema
Next Topic:Format Code (Ctrl+Shift+F) deletes 'drop' keyword. Does this effect the program in anyway?
Goto Forum:

Current Time: Sun May 20 14:12:14 GMT 2018

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

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

Back to the top