Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Pattern EMF
Pattern EMF [message #104403] Mon, 10 December 2007 13:48 Go to next message
Eclipse UserFriend
Originally posted by: dpoirier.unedic.fr

Hello,

How to use pattern ..

These characters are OK a-zA-Z0-9_
But the underscore character is valid except at end of the value.

012354aazAZAZ__zazaz8AZAZ is OK..
but
012354aazAZAZ__zazaz8AZAZ_ is BAD..

I have an ExtendesMetaData with a pattern like this.

"[0-9a-zA-Z_]*[^_]$"

Thank's
Re: Pattern EMF [message #104451 is a reply to message #104403] Mon, 10 December 2007 22:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Dominique,

The extended metadata APIs use patterns exactly the way <xsd:pattern>
constraints define them. So writing/finding simple schema with a
pattern constraints and converting it to Ecore (as is done in the
tutorials) should help you understand how it works.

Dominique Poirier wrote:
> Hello,
>
> How to use pattern ..
>
> These characters are OK a-zA-Z0-9_
> But the underscore character is valid except at end of the value.
>
> 012354aazAZAZ__zazaz8AZAZ is OK..
> but
> 012354aazAZAZ__zazaz8AZAZ_ is BAD..
>
> I have an ExtendesMetaData with a pattern like this.
>
> "[0-9a-zA-Z_]*[^_]$"
>
> Thank's
>
>
Re: Pattern EMF [message #104465 is a reply to message #104451] Tue, 11 December 2007 09:39 Go to previous message
Eclipse UserFriend
Originally posted by: dPoirier.unedic.fr

Thank'a lot.

My new ecore pattern based on this xsd pattern is OK.

<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9a-zA-Z_]*[^_]{1}" />
</xsd:restriction>


Bye
Re: Pattern EMF [message #612782 is a reply to message #104403] Mon, 10 December 2007 22:12 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Dominique,

The extended metadata APIs use patterns exactly the way <xsd:pattern>
constraints define them. So writing/finding simple schema with a
pattern constraints and converting it to Ecore (as is done in the
tutorials) should help you understand how it works.

Dominique Poirier wrote:
> Hello,
>
> How to use pattern ..
>
> These characters are OK a-zA-Z0-9_
> But the underscore character is valid except at end of the value.
>
> 012354aazAZAZ__zazaz8AZAZ is OK..
> but
> 012354aazAZAZ__zazaz8AZAZ_ is BAD..
>
> I have an ExtendesMetaData with a pattern like this.
>
> "[0-9a-zA-Z_]*[^_]$"
>
> Thank's
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Pattern EMF [message #612786 is a reply to message #104451] Tue, 11 December 2007 09:39 Go to previous message
Dominique Poirier is currently offline Dominique PoirierFriend
Messages: 4
Registered: July 2009
Junior Member
Thank'a lot.

My new ecore pattern based on this xsd pattern is OK.

<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9a-zA-Z_]*[^_]{1}" />
</xsd:restriction>


Bye
Previous Topic:[Net4J] Bluetooth and/or comm port connectivity
Next Topic:Registration timeout after 5000 milliseconds
Goto Forum:
  


Current Time: Tue Apr 16 07:55:17 GMT 2024

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

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

Back to the top