Custom serialization/deserialization options for underlying diagram's model [message #529671] |
Mon, 26 April 2010 17:12 |
Eclipse User |
|
|
|
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 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.01956 seconds