Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom serialization/deserialization options for underlying diagram's model
Custom serialization/deserialization options for underlying diagram's model [message #529671] Mon, 26 April 2010 17:12 Go to next message
Eclipse UserFriend
Originally posted by: murbieta.gpi.com.ar

Hi,
We are facing an obstacle when trying to load a diagram that its
underlying model needs custom load options.
Currently the underlying model is using a dtd as its schema language but
it is not working properly when the computer is off-line. Therefore we
are currently turning off the dtd validation as you can see follow:

HashMap parserFeatures = new HashMap(2);

parserFeatures.put(" http://apache.org/xml/features/nonvalidating/load-external-d td",
Boolean.FALSE);
parserFeatures.put("http://xml.org/sax/features/validation",
Boolean.FALSE);
resourceSet.getLoadOptions().put(XMLResource.OPTION_PARSER_F EATURES,
parserFeatures);

Although it is working on our test where the XMLResourse is directly
created from the resoultset, It is not working in the diagram when we
set the same information in the
GMFResourceFactory.getDefaultLoadOptions() map.
It seems that this information is not used when the emf proxy is resolved.
Is there any way for setting load options to the XML resource that
represents holds business model?

Thanks in advance
Re: Custom serialization/deserialization options for underlying diagram's model [message #529675 is a reply to message #529671] Mon, 26 April 2010 17:36 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
Matias,

It's better to set these kind of options in your specialized resource
factory.


Matias Urbieta wrote:
> Hi,
> We are facing an obstacle when trying to load a diagram that its
> underlying model needs custom load options.
> Currently the underlying model is using a dtd as its schema language
> but it is not working properly when the computer is off-line.
> Therefore we are currently turning off the dtd validation as you can
> see follow:
>
> HashMap parserFeatures = new HashMap(2);
>
> parserFeatures.put(" http://apache.org/xml/features/nonvalidating/load-external-d td",
> Boolean.FALSE);
>
> parserFeatures.put("http://xml.org/sax/features/validation",
> Boolean.FALSE);
>
> resourceSet.getLoadOptions().put(XMLResource.OPTION_PARSER_F EATURES,
> parserFeatures);
>
> Although it is working on our test where the XMLResourse is directly
> created from the resoultset, It is not working in the diagram when we
> set the same information in the
> GMFResourceFactory.getDefaultLoadOptions() map.
> It seems that this information is not used when the emf proxy is
> resolved.
> Is there any way for setting load options to the XML resource that
> represents holds business model?
>
> Thanks in advance


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Converting properties "table" view in "form" view
Next Topic:Add EditPart (and Figure) to existing Diagram Type?
Goto Forum:
  


Current Time: Tue Mar 19 08:47:48 GMT 2024

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

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

Back to the top