Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute
xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute [message #1368773] Tue, 20 May 2014 09:13 Go to next message
Philippe Favrais is currently offline Philippe FavraisFriend
Messages: 17
Registered: April 2011
Junior Member
Hello,
I am using xsdecorebuilder to dynamically create an ecore model from my xsd.

while visiting the ecore, i need to recognise whether an EAttribute is corresponding to an xsd:element (simple type) or and xsd:attribute. I clearly saw in the EAnnotation that there is an entry "kind" = "element or attribute" but i wonder whether there is another possibility than looking in the EAnnotation

Thank you in advance
Philippe
Re: xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute [message #1368967 is a reply to message #1368773] Tue, 20 May 2014 11:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26235
Registered: July 2009
Senior Member
On 20/05/2014 11:13 AM, Philippe Favrais wrote:
> Hello,
> I am using xsdecorebuilder to dynamically create an ecore model from
> my xsd.
>
> while visiting the ecore, i need to recognise whether an EAttribute is
> corresponding to an xsd:element (simple type) or and xsd:attribute. I
> clearly saw in the EAnnotation that there is an entry "kind" =
> "element or attribute" but i wonder whether there is another
> possibility than looking in the EAnnotation
You can use ExtendedMetaData.INSTANCE to "query" the annotations; in
this case using
org.eclipse.emf.ecore.util.ExtendedMetaData.getFeatureKind(EStructuralFeature).
>
> Thank you in advance
> Philippe
Re: xsdecorebuilder : how to recognise an xsd:element simpletype from an xsd:attribute [message #1373408 is a reply to message #1368967] Thu, 22 May 2014 06:41 Go to previous message
Philippe Favrais is currently offline Philippe FavraisFriend
Messages: 17
Registered: April 2011
Junior Member
thank you Ed, indeed it helps a lot.
Previous Topic:[ChangeRecoder] Problem with beginRecording() after endRecording() was called
Next Topic:URI#createFileURI() does not add the file scheme Windows?!
Goto Forum:
  


Current Time: Thu Nov 27 18:57:50 GMT 2014

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

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