Added tests for publish and update style methods that use the raw format param

Conflicts:
	src/test/java/it/geosolutions/geoserver/rest/publisher/GeoserverRESTStyleTest.java
This commit is contained in:
andypower 2015-03-26 16:40:21 +01:00
parent e04dd7428e
commit 6327f699ff
2 changed files with 410 additions and 354 deletions

View File

@ -1,354 +1,381 @@
/* /*
* GeoServer-Manager - Simple Manager Library for GeoServer * GeoServer-Manager - Simple Manager Library for GeoServer
* *
* Copyright (C) 2007,2013 GeoSolutions S.A.S. * Copyright (C) 2007,2013 GeoSolutions S.A.S.
* http://www.geo-solutions.it * http://www.geo-solutions.it
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights * in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package it.geosolutions.geoserver.rest.publisher; package it.geosolutions.geoserver.rest.publisher;
import it.geosolutions.geoserver.rest.GeoserverRESTTest; import it.geosolutions.geoserver.rest.GeoserverRESTTest;
import static it.geosolutions.geoserver.rest.GeoserverRESTTest.publisher; import static it.geosolutions.geoserver.rest.GeoserverRESTTest.publisher;
import static it.geosolutions.geoserver.rest.GeoserverRESTTest.reader; import static it.geosolutions.geoserver.rest.GeoserverRESTTest.reader;
import it.geosolutions.geoserver.rest.decoder.RESTLayer; import it.geosolutions.geoserver.rest.decoder.RESTLayer;
import it.geosolutions.geoserver.rest.decoder.RESTStyle; import it.geosolutions.geoserver.rest.decoder.RESTStyle;
import it.geosolutions.geoserver.rest.decoder.utils.JDOMBuilder; import it.geosolutions.geoserver.rest.decoder.utils.JDOMBuilder;
import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder; import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.jdom.Element; import org.jdom.Element;
import org.jdom.Namespace; import org.jdom.Namespace;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
/** /**
* Testcase for publishing layers on geoserver. We need a running GeoServer to * Testcase for publishing layers on geoserver. We need a running GeoServer to
* properly run the tests. If such geoserver instance cannot be contacted, tests * properly run the tests. If such geoserver instance cannot be contacted, tests
* will be skipped. * will be skipped.
* *
* @author etj * @author etj
* @author Carlo Cancellieri - carlo.cancellieri@geo-solutions.it * @author Carlo Cancellieri - carlo.cancellieri@geo-solutions.it
*/ */
public class GeoserverRESTStyleTest extends GeoserverRESTTest { public class GeoserverRESTStyleTest extends GeoserverRESTTest {
private final static Logger LOGGER = LoggerFactory private final static Logger LOGGER = LoggerFactory
.getLogger(GeoserverRESTStyleTest.class); .getLogger(GeoserverRESTStyleTest.class);
@Test @Test
public void testStyles() throws IOException { public void testStyles() throws IOException {
if (!enabled()) if (!enabled())
return; return;
deleteAll(); deleteAll();
assertEquals(0, reader.getStyles().size()); assertEquals(0, reader.getStyles().size());
final String STYLENAME = "restteststyle"; final String STYLENAME = "restteststyle";
File sldFile = new ClassPathResource("testdata/restteststyle.sld") File sldFile = new ClassPathResource("testdata/restteststyle.sld")
.getFile(); .getFile();
// insert style // insert style
assertTrue(publisher.publishStyle(sldFile)); assertTrue(publisher.publishStyle(sldFile));
assertTrue(reader.existsStyle(STYLENAME)); assertTrue(reader.existsStyle(STYLENAME));
assertFalse(publisher.publishStyle(sldFile)); assertFalse(publisher.publishStyle(sldFile));
assertTrue(reader.existsStyle(STYLENAME)); assertTrue(reader.existsStyle(STYLENAME));
RESTStyle style = reader.getStyle(STYLENAME); final String STYLENAMEV110 = "restteststyleV110";
assertEquals(STYLENAME, style.getName()); File sldFileV110 = new ClassPathResource("testdata/" + STYLENAMEV110 + ".sld")
assertNull(style.getWorkspace()); .getFile();
String sld = reader.getSLD(STYLENAME); assertTrue(publisher.publishStyle(sldFileV110, STYLENAMEV110, true));
assertNotNull(sld); assertTrue(reader.existsStyle(STYLENAME));
Element styleEl = JDOMBuilder.buildElement(sld); assertFalse(publisher.publishStyle(sldFileV110, STYLENAMEV110, true));
assertNotNull(styleEl);
RESTStyle style = reader.getStyle(STYLENAME);
Namespace SLDNS = Namespace.getNamespace("sld", assertEquals(STYLENAME, style.getName());
"http://www.opengis.net/sld"); assertNull(style.getWorkspace());
try { String sld = reader.getSLD(STYLENAME);
assertNotNull(sld);
assertEquals(STYLENAME, styleEl.getChild("NamedLayer", SLDNS)
.getChild("Name", SLDNS).getText()); Element styleEl = JDOMBuilder.buildElement(sld);
assertEquals( assertNotNull(styleEl);
"STYLE FOR TESTING PURPOSES",
styleEl.getChild("NamedLayer", SLDNS) Namespace SLDNS = Namespace.getNamespace("sld",
.getChild("UserStyle", SLDNS) "http://www.opengis.net/sld");
.getChild("Title", SLDNS).getText());
} catch (NullPointerException npe) { try {
fail("Error in SLD");
} assertEquals(STYLENAME, styleEl.getChild("NamedLayer", SLDNS)
.getChild("Name", SLDNS).getText());
// assertEquals(1475, sld.length()); assertEquals(
"STYLE FOR TESTING PURPOSES",
assertEquals(1, reader.getStyles().size()); styleEl.getChild("NamedLayer", SLDNS)
} .getChild("UserStyle", SLDNS)
.getChild("Title", SLDNS).getText());
protected void cleanupTestStyle(final String styleName) { } catch (NullPointerException npe) {
// dry run delete to work in a known state fail("Error in SLD");
if (reader.existsStyle(styleName)) { }
LOGGER.info("Clearing stale test style " + styleName);
boolean ok = publisher.removeStyle(styleName); // assertEquals(1475, sld.length());
if (!ok) {
fail("Could not unpublish style " + styleName); assertEquals(1, reader.getStyles().size());
} }
}
assertFalse("Cleanup failed", reader.existsStyle(styleName)); protected void cleanupTestStyle(final String styleName) {
} // dry run delete to work in a known state
if (reader.existsStyle(styleName)) {
@Test LOGGER.info("Clearing stale test style " + styleName);
public void testPublishDeleteStyleFile() throws FileNotFoundException, boolean ok = publisher.removeStyle(styleName);
IOException { if (!ok) {
if (!enabled()) { fail("Could not unpublish style " + styleName);
return; }
} }
// Assume.assumeTrue(enabled); assertFalse("Cleanup failed", reader.existsStyle(styleName));
final String styleName = "restteststyle"; }
File sldFile = new ClassPathResource("testdata/restteststyle.sld") @Test
.getFile(); public void testPublishDeleteStyleFile() throws FileNotFoundException,
IOException {
// known state? if (!enabled()) {
cleanupTestStyle(styleName); return;
}
// test insert // Assume.assumeTrue(enabled);
boolean published = publisher.publishStyle(sldFile); // Will take the final String styleName = "restteststyle";
// name from sld
// contents File sldFile = new ClassPathResource("testdata/restteststyle.sld")
assertTrue("publish() failed", published); .getFile();
assertTrue(reader.existsStyle(styleName));
final String STYLENAMEV110 = "restteststyleV110";
sldFile = new ClassPathResource("testdata/restteststyle2.sld").getFile(); File sldFileV110 = new ClassPathResource("testdata/" + STYLENAMEV110 + ".sld")
published = publisher.updateStyle(sldFile, styleName); // update .getFile();
assertTrue("update() failed", published);
// known state?
// test delete cleanupTestStyle(styleName);
boolean ok = publisher.removeStyle(styleName); cleanupTestStyle(STYLENAMEV110);
assertTrue("Unpublish() failed", ok);
assertFalse(reader.existsStyle(styleName)); // test insert
} boolean published = publisher.publishStyle(sldFile); // Will take the
// name from sld
@Test // contents
public void testPublishDeleteStyleString() throws FileNotFoundException, assertTrue("publish() failed", published);
IOException { assertTrue(reader.existsStyle(styleName));
if (!enabled()) {
return; sldFile = new ClassPathResource("testdata/restteststyle2.sld").getFile();
} published = publisher.updateStyle(sldFile, styleName); // update
// Assume.assumeTrue(enabled); assertTrue("update() failed", published);
String styleName = "restteststyle";
// test delete
File sldFile = new ClassPathResource("testdata/restteststyle.sld") boolean ok = publisher.removeStyle(styleName);
.getFile(); assertTrue("Unpublish() failed", ok);
assertFalse(reader.existsStyle(styleName));
// known state?
cleanupTestStyle(styleName); published = publisher.publishStyle(sldFileV110, STYLENAMEV110, true);
// test insert assertTrue("publish() failed", published);
String sldContent = IOUtils.toString(new FileInputStream(sldFile)); assertTrue(reader.existsStyle(STYLENAMEV110));
boolean published = publisher.publishStyle(sldContent); // Will take the boolean updated = publisher.updateStyle(sldFileV110, STYLENAMEV110, true);
// name from sld assertTrue("update() failed", updated);
// contents
assertTrue("publish() failed", published); // test delete
assertTrue(reader.existsStyle(styleName)); ok = publisher.removeStyle(STYLENAMEV110);
// test delete assertTrue("Unpublish() failed", ok);
boolean ok = publisher.removeStyle(styleName); assertFalse(reader.existsStyle(STYLENAMEV110));
assertTrue("Unpublish() failed", ok); }
assertFalse(reader.existsStyle(styleName));
@Test
styleName = "restteststyle_with_name"; public void testPublishDeleteStyleString() throws FileNotFoundException,
// test insert with name IOException {
published = publisher.publishStyle(sldContent, styleName); // Will set if (!enabled()) {
// the name return;
assertTrue("publish() failed", published); }
assertTrue(reader.existsStyle(styleName)); // Assume.assumeTrue(enabled);
String newSldContent = sldContent.replace( String styleName = "restteststyle";
"<sld:Title>STYLE FOR TESTING PURPOSES</sld:Title>",
"<sld:Title>MODIFIED STYLE FOR TESTING</sld:Title>"); File sldFile = new ClassPathResource("testdata/restteststyle.sld")
published = publisher.updateStyle(newSldContent, styleName); // update .getFile();
assertTrue("publish() failed", published);
// known state?
// test delete cleanupTestStyle(styleName);
ok = publisher.removeStyle(styleName);
assertTrue("Unpublish() failed", ok); // test insert
assertFalse(reader.existsStyle(styleName)); String sldContent = IOUtils.toString(new FileInputStream(sldFile));
} boolean published = publisher.publishStyle(sldContent); // Will take the
// name from sld
@Test // contents
public void testUpdateDefaultStyle() throws FileNotFoundException, assertTrue("publish() failed", published);
IOException { assertTrue(reader.existsStyle(styleName));
if (!enabled()) { // test delete
return; boolean ok = publisher.removeStyle(styleName);
} assertTrue("Unpublish() failed", ok);
deleteAll(); assertFalse(reader.existsStyle(styleName));
String storeName = "resttestshp"; styleName = "restteststyle_with_name";
String layerName = "cities"; // test insert with name
published = publisher.publishStyle(sldContent, styleName); // Will set
final String styleName = "restteststyle"; // the name
{ assertTrue("publish() failed", published);
File sldFile = new ClassPathResource("testdata/restteststyle.sld") assertTrue(reader.existsStyle(styleName));
.getFile(); String newSldContent = sldContent.replace(
cleanupTestStyle(styleName); "<sld:Title>STYLE FOR TESTING PURPOSES</sld:Title>",
boolean sldpublished = publisher.publishStyle(sldFile); // Will take "<sld:Title>MODIFIED STYLE FOR TESTING</sld:Title>");
// the name published = publisher.updateStyle(newSldContent, styleName); // update
// from sld assertTrue("publish() failed", published);
// contents
assertTrue("style publish() failed", sldpublished); // test delete
assertTrue(reader.existsStyle(styleName)); ok = publisher.removeStyle(styleName);
} assertTrue("Unpublish() failed", ok);
assertFalse(reader.existsStyle(styleName));
final String styleName2 = "restteststyle2";
{ }
File sldFile = new ClassPathResource("testdata/restteststyle2.sld")
.getFile(); @Test
cleanupTestStyle(styleName2); public void testUpdateDefaultStyle() throws FileNotFoundException,
boolean sldpublished = publisher.publishStyle(sldFile, styleName2); IOException {
assertTrue("style publish() failed", sldpublished); if (!enabled()) {
assertTrue(reader.existsStyle(styleName2)); return;
} }
deleteAll();
File zipFile = new ClassPathResource("testdata/resttestshp.zip")
.getFile(); String storeName = "resttestshp";
String layerName = "cities";
assertTrue(publisher.createWorkspace(DEFAULT_WS));
final String styleName = "restteststyle";
// test insert {
boolean published = publisher.publishShp(DEFAULT_WS, storeName, File sldFile = new ClassPathResource("testdata/restteststyle.sld")
layerName, zipFile, "EPSG:4326", styleName); .getFile();
assertTrue("publish() failed", published); cleanupTestStyle(styleName);
assertTrue(existsLayer(layerName)); boolean sldpublished = publisher.publishStyle(sldFile); // Will take
// the name
{ // from sld
RESTLayer layer = reader.getLayer(layerName); // contents
LOGGER.info("Layer style is " + layer.getDefaultStyle()); assertTrue("style publish() failed", sldpublished);
assertEquals(styleName, layer.getDefaultStyle()); assertTrue(reader.existsStyle(styleName));
} }
GSLayerEncoder le = new GSLayerEncoder(); final String styleName2 = "restteststyle2";
le.setDefaultStyle(styleName2); {
publisher.configureLayer(DEFAULT_WS, layerName, le); File sldFile = new ClassPathResource("testdata/restteststyle2.sld")
.getFile();
{ cleanupTestStyle(styleName2);
RESTLayer layer = reader.getLayer(layerName); boolean sldpublished = publisher.publishStyle(sldFile, styleName2);
LOGGER.info("Layer style is " + layer.getDefaultStyle()); assertTrue("style publish() failed", sldpublished);
assertEquals(styleName2, layer.getDefaultStyle()); assertTrue(reader.existsStyle(styleName2));
} }
// remove layer and datastore File zipFile = new ClassPathResource("testdata/resttestshp.zip")
boolean dsRemoved = publisher.removeDatastore(DEFAULT_WS, storeName, .getFile();
true);
assertTrue("removeDatastore() failed", dsRemoved); assertTrue(publisher.createWorkspace(DEFAULT_WS));
}
// test insert
@Test boolean published = publisher.publishShp(DEFAULT_WS, storeName,
public void testStylesInWorkspace() throws IOException { layerName, zipFile, "EPSG:4326", styleName);
if (!enabled()) assertTrue("publish() failed", published);
return; assertTrue(existsLayer(layerName));
deleteAll();
{
final String WORKSPACE = "testWorkspace"; RESTLayer layer = reader.getLayer(layerName);
final String STYLENAME = "restteststyle"; LOGGER.info("Layer style is " + layer.getDefaultStyle());
File sldFile = new ClassPathResource("testdata/restteststyle.sld").getFile(); assertEquals(styleName, layer.getDefaultStyle());
}
publisher.createWorkspace(WORKSPACE);
GSLayerEncoder le = new GSLayerEncoder();
assertEquals(0, reader.getStyles().size()); le.setDefaultStyle(styleName2);
assertEquals(0, reader.getStyles(WORKSPACE).size()); publisher.configureLayer(DEFAULT_WS, layerName, le);
{
// insert style RESTLayer layer = reader.getLayer(layerName);
assertTrue(publisher.publishStyleInWorkspace(WORKSPACE, sldFile)); LOGGER.info("Layer style is " + layer.getDefaultStyle());
assertTrue(reader.existsStyle(WORKSPACE, STYLENAME)); assertEquals(styleName2, layer.getDefaultStyle());
assertFalse(reader.existsStyle(STYLENAME)); }
// insert style again // remove layer and datastore
assertFalse(publisher.publishStyleInWorkspace(WORKSPACE, sldFile)); boolean dsRemoved = publisher.removeDatastore(DEFAULT_WS, storeName,
assertTrue(reader.existsStyle(WORKSPACE, STYLENAME)); true);
assertFalse(reader.existsStyle(STYLENAME)); assertTrue("removeDatastore() failed", dsRemoved);
}
String sld = reader.getSLD(WORKSPACE, STYLENAME);
assertNotNull(sld); @Test
public void testStylesInWorkspace() throws IOException {
RESTStyle style = reader.getStyle(WORKSPACE, STYLENAME); if (!enabled())
assertEquals(STYLENAME, style.getName()); return;
assertEquals(WORKSPACE, style.getWorkspace()); deleteAll();
Element styleEl = JDOMBuilder.buildElement(sld); final String WORKSPACE = "testWorkspace";
assertNotNull(styleEl); final String STYLENAME = "restteststyle";
File sldFile = new ClassPathResource("testdata/restteststyle.sld").getFile();
Namespace SLDNS = Namespace.getNamespace("sld",
"http://www.opengis.net/sld"); publisher.createWorkspace(WORKSPACE);
try { assertEquals(0, reader.getStyles().size());
assertEquals(0, reader.getStyles(WORKSPACE).size());
assertEquals(STYLENAME, styleEl.getChild("NamedLayer", SLDNS)
.getChild("Name", SLDNS).getText());
assertEquals( // insert style
"STYLE FOR TESTING PURPOSES", assertTrue(publisher.publishStyleInWorkspace(WORKSPACE, sldFile));
styleEl.getChild("NamedLayer", SLDNS) assertTrue(reader.existsStyle(WORKSPACE, STYLENAME));
.getChild("UserStyle", SLDNS) assertFalse(reader.existsStyle(STYLENAME));
.getChild("Title", SLDNS).getText());
} catch (NullPointerException npe) { // insert style again
fail("Error in SLD"); assertFalse(publisher.publishStyleInWorkspace(WORKSPACE, sldFile));
} assertTrue(reader.existsStyle(WORKSPACE, STYLENAME));
assertFalse(reader.existsStyle(STYLENAME));
// assertEquals(1475, sld.length());
String sld = reader.getSLD(WORKSPACE, STYLENAME);
assertEquals(0, reader.getStyles().size()); assertNotNull(sld);
assertEquals(1, reader.getStyles(WORKSPACE).size());
} RESTStyle style = reader.getStyle(WORKSPACE, STYLENAME);
assertEquals(STYLENAME, style.getName());
@Test assertEquals(WORKSPACE, style.getWorkspace());
public void testRemoveStylesInWorkspace() throws IOException {
if (!enabled()) Element styleEl = JDOMBuilder.buildElement(sld);
return; assertNotNull(styleEl);
deleteAll();
Namespace SLDNS = Namespace.getNamespace("sld",
final String WORKSPACE = "testWorkspace"; "http://www.opengis.net/sld");
final String STYLENAME = "restteststyle";
final File sldFile = new ClassPathResource("testdata/restteststyle.sld").getFile(); try {
publisher.createWorkspace(WORKSPACE); assertEquals(STYLENAME, styleEl.getChild("NamedLayer", SLDNS)
.getChild("Name", SLDNS).getText());
assertEquals(0, reader.getStyles(WORKSPACE).size()); assertEquals(
"STYLE FOR TESTING PURPOSES",
// insert style styleEl.getChild("NamedLayer", SLDNS)
assertTrue(publisher.publishStyleInWorkspace(WORKSPACE, sldFile)); .getChild("UserStyle", SLDNS)
assertEquals(1, reader.getStyles(WORKSPACE).size()); .getChild("Title", SLDNS).getText());
assertTrue(reader.existsStyle(WORKSPACE, STYLENAME)); } catch (NullPointerException npe) {
fail("Error in SLD");
// remove style }
assertTrue(publisher.removeStyleInWorkspace(WORKSPACE, STYLENAME, true));
assertEquals(0, reader.getStyles(WORKSPACE).size()); // assertEquals(1475, sld.length());
assertFalse(reader.existsStyle(WORKSPACE, STYLENAME));
} assertEquals(0, reader.getStyles().size());
assertEquals(1, reader.getStyles(WORKSPACE).size());
} }
@Test
public void testRemoveStylesInWorkspace() throws IOException {
if (!enabled())
return;
deleteAll();
final String WORKSPACE = "testWorkspace";
final String STYLENAME = "restteststyle";
final File sldFile = new ClassPathResource("testdata/restteststyle.sld").getFile();
publisher.createWorkspace(WORKSPACE);
assertEquals(0, reader.getStyles(WORKSPACE).size());
// insert style
assertTrue(publisher.publishStyleInWorkspace(WORKSPACE, sldFile));
assertEquals(1, reader.getStyles(WORKSPACE).size());
assertTrue(reader.existsStyle(WORKSPACE, STYLENAME));
// remove style
assertTrue(publisher.removeStyleInWorkspace(WORKSPACE, STYLENAME, true));
assertEquals(0, reader.getStyles(WORKSPACE).size());
assertFalse(reader.existsStyle(WORKSPACE, STYLENAME));
}
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:se="http://www.opengis.net/se" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
<NamedLayer>
<se:Name>OCEANSEA_1M:Foundation</se:Name>
<UserStyle>
<se:Name>GEOSYM</se:Name>
<IsDefault>1</IsDefault>
<se:FeatureTypeStyle>
<se:FeatureTypeName>Foundation</se:FeatureTypeName>
<se:Rule>
<se:Name>main</se:Name>
<se:PolygonSymbolizer uom="http://www.opengis.net/sld/units/pixel">
<se:Name>MySymbol</se:Name>
<se:Description>
<se:Title>Example Symbol</se:Title>
<se:Abstract>This is just a simple example.</se:Abstract>
</se:Description>
<se:Geometry>
<ogc:PropertyName>GEOMETRY</ogc:PropertyName>
</se:Geometry>
<se:Fill>
<se:SvgParameter name="fill">#96C3F5</se:SvgParameter>
</se:Fill>
</se:PolygonSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>