Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » XPath query for list of UML class attributes that are not associations
icon5.gif  XPath query for list of UML class attributes that are not associations [message #1752826] Fri, 27 January 2017 20:06 Go to next message
James Clark is currently offline James ClarkFriend
Messages: 8
Registered: December 2016
Junior Member
I have a UML model developed with Rational Software Architect v9.1.2. I'm crafting a BIRT report with which I would like to show all of the class attributes that are NOT associations. I have the following XPath query:
resolveURI($classURI)/ownedAttribute[not(@association)]

This query returns all (2) of the attributes on the sample class EmailAddress, screen shot and xmi model fragment attached, both the String address and the association emailAddressStatus.
index.php/fa/28247/0/
index.php/fa/28248/0/
It seems that the @association attribute is not recognized. This might be a namespace issue, but I'm not sure. Can anyone offer help, or suggest an alternative approach?
Re: XPath query for list of UML class attributes that are not associations [message #1752839 is a reply to message #1752826] Sat, 28 January 2017 06:16 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5930
Registered: July 2009
Senior Member
Hi

While I never use BIRT, I was involved on some of the integration activity for OCL, so I know that it once worked.

XPath is nice and compact, but the "X" for extensible means that typos are extensions returning null.

You might try OCL where typos are errors. I doubt that the UI has been integrated into BIRT, so you might want to parctice your OCL expressions using the Xtext OCL Console.

Regards

Ed Willink
Re: XPath query for list of UML class attributes that are not associations [message #1752936 is a reply to message #1752839] Mon, 30 January 2017 22:53 Go to previous message
James Clark is currently offline James ClarkFriend
Messages: 8
Registered: December 2016
Junior Member
Thanks for the tip Ed! I instead employed OCL and this query did the trick:
oclQuery(resolveURI($classURI)/ownedAttribute, "self.association = null")
Previous Topic:UML/OCL metamodel documentation
Next Topic:getAppliedStereotypes is empty but the stereotype has been applied
Goto Forum:
  


Current Time: Mon Jun 25 00:34:19 GMT 2018

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

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

Back to the top