Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Teneo HibernateResource
Teneo HibernateResource [message #56398] Wed, 04 October 2006 08:56 Go to next message
Eclipse UserFriend
Originally posted by: hodi_.gmx.at

Hi,

I'm using EMF with a database and also with XMLs being stored on clients.
What I want to do is receive XMLResources from a client and store them to
the database using a HibernateResource. Tried to do this by using the
method Resource.load(InputStream arg0, Map arg1) for building the resource
from a XML-String, anyway, I saw that HibernateResource doesn't implement
this method.
Is there a way to fill a HibernateResource with a xml string?

I'm new to EMF and teneo so I'm even not sure if this would be the best
way to store XMLResources into the database. So any tips would be
helpful...thanks!

Cheers,
- Dietmar -
Re: Teneo HibernateResource [message #56429 is a reply to message #56398] Wed, 04 October 2006 09:15 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Dietmar,
You can also use the hbDataStore.importDataStore method. The second format parameter of this method
determines if a xml or xmi import should be done (you can use the constants
HbConstants.EXCHANGE_FORMAT_XML or HbConstants.EXCHANGE_FORMAT_XMI for this).

If you want more control you can also write the import yourselve on the basis of the code in this
method (see cvs), it is only a few lines of code.

The hbDataStore also offers an export method to export the content of a database to xml or xmi.

gr. Martin

Dietmar Holzer wrote:
> Hi,
>
> I'm using EMF with a database and also with XMLs being stored on
> clients. What I want to do is receive XMLResources from a client and
> store them to the database using a HibernateResource. Tried to do this
> by using the method Resource.load(InputStream arg0, Map arg1) for
> building the resource from a XML-String, anyway, I saw that
> HibernateResource doesn't implement this method.
> Is there a way to fill a HibernateResource with a xml string?
>
> I'm new to EMF and teneo so I'm even not sure if this would be the best
> way to store XMLResources into the database. So any tips would be
> helpful...thanks!
>
> Cheers,
> - Dietmar -


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Teneo HibernateResource [message #56754 is a reply to message #56429] Thu, 05 October 2006 10:34 Go to previous message
Eclipse UserFriend
Originally posted by: hodi_.gmx.at

Hi Martin,
thanks a lot, seems to be exactly that what I was looking for...

Cheers,
- Dietmar -
Re: Teneo HibernateResource [message #593570 is a reply to message #56398] Wed, 04 October 2006 09:15 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Dietmar,
You can also use the hbDataStore.importDataStore method. The second format parameter of this method
determines if a xml or xmi import should be done (you can use the constants
HbConstants.EXCHANGE_FORMAT_XML or HbConstants.EXCHANGE_FORMAT_XMI for this).

If you want more control you can also write the import yourselve on the basis of the code in this
method (see cvs), it is only a few lines of code.

The hbDataStore also offers an export method to export the content of a database to xml or xmi.

gr. Martin

Dietmar Holzer wrote:
> Hi,
>
> I'm using EMF with a database and also with XMLs being stored on
> clients. What I want to do is receive XMLResources from a client and
> store them to the database using a HibernateResource. Tried to do this
> by using the method Resource.load(InputStream arg0, Map arg1) for
> building the resource from a XML-String, anyway, I saw that
> HibernateResource doesn't implement this method.
> Is there a way to fill a HibernateResource with a xml string?
>
> I'm new to EMF and teneo so I'm even not sure if this would be the best
> way to store XMLResources into the database. So any tips would be
> helpful...thanks!
>
> Cheers,
> - Dietmar -


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Teneo HibernateResource [message #593759 is a reply to message #56429] Thu, 05 October 2006 10:34 Go to previous message
Eclipse UserFriend
Originally posted by: hodi_.gmx.at

Hi Martin,
thanks a lot, seems to be exactly that what I was looking for...

Cheers,
- Dietmar -
Previous Topic:Teneo: HibernateException when trying to save HibernateResource
Next Topic:JET templates for interfaces missing with EMF 2.2.1
Goto Forum:
  


Current Time: Sat Nov 09 04:52:33 GMT 2024

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

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

Back to the top