-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Hibernate and flat files (xml / CSV)
PostPosted: Mon Jan 31, 2005 8:35 pm 
Regular
Regular

Joined: Mon Nov 03, 2003 6:10 am
Posts: 75
I was looking for some suggestions on a good (or suggested) way to utilize hibernate when working with text data files.

In my case I have to do a lot of work with cvs imports and exports. I initially found it very convenient to use HSQL with Hibernate to read from DB and read/write from/to (HSQL) CSV via hibernate. This has become increasingly difficult to maintain as the file formats change. HSQL is also a bit troublesome to work with, because it locks files etc. So basically I want to get away from it for a more elegant solution.

I am now considering using XSLT to convert to/from XML. I was wondering if there is a nice way to go between Hibernate and XML.

I have considered Castor XML but wanted to get some feedback first.


Thanks

Troy


Top
 Profile  
 
 Post subject: xml marshalling
PostPosted: Mon Jan 31, 2005 8:49 pm 
Regular
Regular

Joined: Mon Nov 03, 2003 6:10 am
Posts: 75
After posting I found some details on the DataBinder and its marshalling features but it is 'experimental'.

http://www.hibernate.org/hib_docs/api/n ... inder.html


Curious if this ok to use now? And if there is any documentation on it. I looked in Hibernate in Action but found only a small reference to it on page 389.


Troy


Top
 Profile  
 
 Post subject: No help
PostPosted: Tue Feb 01, 2005 3:39 pm 
Regular
Regular

Joined: Mon Nov 03, 2003 6:10 am
Posts: 75
Well, since no one has any helpful feedback.. I must push on.

Think I will be using Castor XML since the hibernate marshalling is minimal.


Top
 Profile  
 
 Post subject: Re: No help
PostPosted: Tue Feb 01, 2005 4:53 pm 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
tmckinnon wrote:
Well, since no one has any helpful feedback.. I must push on.

Think I will be using Castor XML since the hibernate marshalling is minimal.


Use hibernate for your object persistence API.
Use castor to convert your object model to XML and vice versa
use XSL to transform your XML into whatever.

I don't think your original question was very related to hibernate to be honest

_________________
On the information super B road


Top
 Profile  
 
 Post subject: Hibernate Relavancy
PostPosted: Tue Feb 01, 2005 6:41 pm 
Regular
Regular

Joined: Mon Nov 03, 2003 6:10 am
Posts: 75
I think it was very relavant since Hibernate does data binding and has some built in functionality to do unmarshaling. (DataBinder)

I would have preferred to use a pure Hibernate solution rather than having to now use Castor as well.


Top
 Profile  
 
 Post subject: Re: Hibernate Relavancy
PostPosted: Tue Feb 01, 2005 7:01 pm 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
tmckinnon wrote:
I think it was very relavant since Hibernate does data binding and has some built in functionality to do unmarshaling. (DataBinder)

I would have preferred to use a pure Hibernate solution rather than having to now use Castor as well.


OK, thats an area of hibernate I don't know about, so apologies. Having said that Castor XML is a very mature and functional api so its a good alternative.

_________________
On the information super B road


Top
 Profile  
 
 Post subject: How do you solved your problem finally?
PostPosted: Mon Jan 30, 2006 7:41 pm 
Beginner
Beginner

Joined: Mon Nov 28, 2005 11:03 am
Posts: 39
Location: Madrid
Dear tmckinnon,

I have almoust the same problem like you, please you be contact with me in order to tell what was your finally solution and how do you design the solution using Castor?

Thanks in advance,

David Leal
achepati67@yahoo.es

_________________
David Leal


Top
 Profile  
 
 Post subject: Re: How do you solved your problem finally?
PostPosted: Tue Jan 31, 2006 7:04 pm 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
dleal wrote:
Dear tmckinnon,

I have almoust the same problem like you, please you be contact with me in order to tell what was your finally solution and how do you design the solution using Castor?

Thanks in advance,

David Leal
achepati67@yahoo.es


Why not do what I suggested before:

populate your domain model via Hibernate.

use castor to create an XML representation of your loaded domain model instance.

use XSL to transform your XML to whatever ormat you want.

It's pretty easy to code all of this too.

_________________
On the information super B road


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.