Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to avoid creating OutputStream on (Resource) save operation (How to avoid creating OutputStream on (Resource) save operation )
How to avoid creating OutputStream on (Resource) save operation [message #491892] Fri, 16 October 2009 12:50 Go to next message
Giorgio Asino is currently offline Giorgio AsinoFriend
Messages: 3
Registered: October 2009
Junior Member
Hi,

I have to implement an EMF (2.4.0) extension to be able to serialize model data to a special file type.

In the org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Map<?, ?> options) operation, how can I avoid creating the Resource file by 'org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterI mpl.createOutputStream(URI uri, Map<?, ?> options) ' automatically.

Is there any option to set which avoids the creation?

I want to create it by my own Resource implementation, because its a special file type with special access right management, and should not be created by the OutputStream.Write method.

Any help?

TIA

[Updated on: Fri, 16 October 2009 12:53]

Report message to a moderator

Re: EMF Extension [message #491900 is a reply to message #491892] Fri, 16 October 2009 13:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Giorgio,

Comments below.

Giorgio Asino wrote:
> Hi,
>
> I have to implement an EMF (2.4.0) extension to be able to serialize
> model data to a special file type.
> In the org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Map<?, ?>
> options) operation, how can I avoid creating the Resource file by
> 'org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterI
> mpl.createOutputStream(URI uri, Map<?, ?> options) ' automatically.
Override the whole method...
>
> Is there any option to set which avoids the creation?
> I want to create it by my own Resource implementation, because its a
> special file type with special access right management, and should not
> be created by the OutputStream.Write method.
Throw an exception in doSave.
>
> Any help?
>
> TIA


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Dynamic templates to use OCL
Next Topic:Trouble Loading (Deserializing) EMF Document Outside Of Eclipse (Ganymede)
Goto Forum:
  


Current Time: Tue Apr 23 10:14:49 GMT 2024

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

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

Back to the top