Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Annotate Ecore Model with Hibernate-Validator(within an Generic Ecore Modeler, adding Hibernate Validator annotations)
Annotate Ecore Model with Hibernate-Validator [message #1216540] Thu, 28 November 2013 14:21 Go to next message
namboka david is currently offline namboka davidFriend
Messages: 13
Registered: September 2013
Junior Member
Hello Martin.

As I keep using TEXO as my number one modeling tool, I would like to add annotations on my Ecore model. Do you have an Idea on how I could add Hibernate-Validator annotations and if they will be handled at generation time by Texo ?

Regards

David
Re: Annotate Ecore Model with Hibernate-Validator [message #1216729 is a reply to message #1216540] Thu, 28 November 2013 15:59 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi David,
There is no annotations model yet for hibernate validator annotations. What you can do is this:
http://wiki.eclipse.org/Texo/Direct_Java_Annotations

If you like/prefer an annotations model for validator annotations then feel free to enter a bugzilla on this! It can
take some time before I get to it, but it is interesting to cover.
Contributions in this are are also welcome ofcourse! :-)

gr. Martin

On 11/28/2013 03:21 PM, namboka david wrote:
> Hello Martin.
>
> As I keep using TEXO as my number one modeling tool, I would like to add annotations on my Ecore model. Do you have an
> Idea on how I could add Hibernate-Validator annotations and if they will be handled at generation time by Texo ?
>
> Regards
>
> David


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: Annotate Ecore Model with Hibernate-Validator [message #1219355 is a reply to message #1216729] Tue, 03 December 2013 14:05 Go to previous messageGo to next message
namboka david is currently offline namboka davidFriend
Messages: 13
Registered: September 2013
Junior Member
Fine,

I'm going to take a look at this. Do you have one or two links towards which I can start my research in order to integrate such a model in Texo ?

Regards
Re: Annotate Ecore Model with Hibernate-Validator [message #1219487 is a reply to message #1219355] Wed, 04 December 2013 08:02 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi David,
To start of:
- clone this repo: http://git.eclipse.org/gitroot/texo/org.eclipse.emf.texo.git/
- then import the projects into a workspace
- for an example of an annotations model see the org.eclipse.emf.texo.orm project
- in this project you can find a model folder with the texo-annotations-orm.ecore
- this shows an annotations model, for all the different model element types (eclass, efeature etc.). You can define a
eclass to annotate each model element type: for example an EPackageValidatorAnnotation which inherits from
EPackageAnnotation, an EClassValidatorAnnotation which inherits from EClassAnnotation, etc.
- To start with your own annotations model, create a new plugin project: org.eclipse.emf.texo.validator with a model
folder and an ecore file. Start of with a simple EClassValidatorAnnotation eclass.
- then within the validator Annotations you can add the eattributes/annotations needed to model the hibernate validators.
- from there you can generate the EMF model code for this model
- the next step is to automatically annotate the model. This is done through annotators. See the
org.eclipse.emf.texo.orm.annotator java package for example of those
- after that a java annotation generator has to be written which translates the validator annotations to java
annotations. Let me give more details when you/we get there.

Check it out and if you are interested (again you are welcome to participate) we can chat (skype: martintaal) about it,
or work together through a shared git project hosted on github.

gr, Martin


On 12/03/2013 03:05 PM, namboka david wrote:
> Fine,
> I'm going to take a look at this. Do you have one or two links towards which I can start my research in order to
> integrate such a model in Texo ?
>
> Regards


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:Teneo Persists and Retrieves superclass not subclass.
Next Topic:EMFClient .. very long startup of eclipse after ECP installation
Goto Forum:
  


Current Time: Wed Mar 03 07:06:29 GMT 2021

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

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

Back to the top