Skip to main content



      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 13: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 13:36 Go to previous message
Eclipse UserFriend
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
Previous Topic:Converting properties "table" view in "form" view
Next Topic:Add EditPart (and Figure) to existing Diagram Type?
Goto Forum:
  


Current Time: Wed Jul 16 01:41:43 EDT 2025

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

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

Back to the top