Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Obtaining the text value of a FeatureMap entry(How do I obtain the raw text value of a FeatureMap entry?)
Obtaining the text value of a FeatureMap entry [message #1787549] Mon, 28 May 2018 16:21 Go to next message
James Clark is currently offline James ClarkFriend
Messages: 8
Registered: December 2016
Junior Member
I am writing a Batch-mode Validator for a BPMN model in Rational Software Architect. Specifically, I'm checking for the existence and format of a specific "Tag" assigned to the Definitions node of a BPMN model. Here is what the Tags look like in this fragment of the model (they are implemented as the extensionElements node).
index.php/fa/32941/0/
extensionElements are implemented via a FeatureMap. I don't have a good enough understanding of FeatureMaps to be able to obtain the text such as that in the model fragment attached ( "BPM2363"), which I would like my validator to check for its existence and format.
Here is a dump of the FeatureMap:
tagging:tag=org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@c9d139db (mixed: [ecore.xml.type:text=To-Be], anyAttribute: null),
tagging:tag=org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@8acc1d9d (mixed: [ecore.xml.type:text=BPM2363], anyAttribute: null),
tagging:tag=org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@169b852c (mixed: [ecore.xml.type:text=Order:1], anyAttribute: null)

Attached is the validate code which needs to be corrected to properly obtain the raw text value of a FeatureMap entry (such as "BPM2363"). Can you please direct me to the proper API to obtain the raw text value? Thanks in advance for any help you could provide!
index.php/fa/32942/0/
Re: Obtaining the text value of a FeatureMap entry [message #1787554 is a reply to message #1787549] Mon, 28 May 2018 19:20 Go to previous message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1176
Registered: July 2009
Location: Canada
Senior Member

Hi, James,

The implementation of support for XML concepts like mixed content using EMF's feature maps can get pretty complex. The definitive guide to how it all works is still this article:

https://www.theserverside.com/news/1364302/Binding-XML-to-Java

This should help to explain how EMF's AnyType deals with XML text nodes.

HTH,
Christian
Previous Topic:Use getEStructuralFeatures or getAllEStructuralFeatures?
Next Topic:MDA
Goto Forum:
  


Current Time: Sat Sep 22 05:57:17 GMT 2018

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

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

Back to the top