how to match href element in uml diagram [message #997301] |
Sat, 05 January 2013 04:06  |
Eclipse User |
|
|
|
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"/>
</packageImport>
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{
from
s:UML!Model
to
t:UNIFY!Model(
id <- s.__xmiID__,
name<-s.name,
entities<-s.ownedElement
)
}
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(
id<-s.__xmiID__,
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.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04018 seconds