Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-dev] EMF Resource Handling o LayerLegendItem

Thanks for your fast reponse!

I tried to set

saveOptions.put(XMLResource.OPTION_SKIP_ESCAPE_URI, Boolean.FALSE.toString());

Project.Plugin.java without any effect to layer reference of legend.

Wondering Ith there is a problem in the model itself how to handle this resource-reference. Or is it a problem that the code was geneared with an older version of EMF, if so could you guide use to upgrade to the latest EMF-Version provided by the target-platform?

Thanks a ton!
--
Frank


Am Mo., 18. Jan. 2021 um 09:50 Uhr schrieb Erdal Karaca <erdal.karaca.de@xxxxxxxxx>:
Hi Frank,
Have a look at org.eclipse.emf.ecore.xmi.XMLResource.OPTION_SKIP_ESCAPE_URI
You should set that option on serialization of the model.

...
options = new map
options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_SKIP_ESCAPE_URI, Boolean.FALSE)
resource.save(model, options);

Am Mo., 18. Jan. 2021 um 09:26 Uhr schrieb Frank Gasdorf <fgdrf@xxxxxxxxxxxxxxxxxxxxx>:
Hello everybody!

If I open an empty Map with uDig and add a WMS Layer to it, e.g. localhost:8091/geoserver/ows?service=wms&request=GetCapabilities#my_layer

the map is fine. After I closed the application the umap resource file has been written with a legend element as follows:

<?xml version="1.0" encoding="UTF-8"?>
<org.locationtech.udig.project.internal:Map xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" [...]>
[...]
  <legend xsi:type="org.locationtech.udig.project.internal:LayerLegendItem" layer="http://localhost:8091/geoserver/ows?service=wms&request=GetCapabilities#my_layer"/>
</org.locationtech.udig.project.internal:Map>

the problem: the XML document isn't valid due to an "&" right befor request-Parameter.

This leads to an SAXParserException when starting uDig again without the "clean" option:

[..]
lineNumber: 19; columnNumber: 139; The reference to entity "request" must end with the ';' delimiter. 
[..]

How should be the EMF-Model look like to get a valid refernce to layer  OR with other words: How can I save valid encoded XML from the Model?

--
Thanks in advance
Frank
_______________________________________________
udig-dev mailing list
udig-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/udig-dev

Back to the top