Commit 4aa22c54 authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade tests para comprobar la obtención de capas

Comprueba que trae las capas del getCapabilities
Comprueba que se mapea correctamente a LayerDTO
parent 79517b7d
Loading
Loading
Loading
Loading
+198 −0
Original line number Diff line number Diff line
package es.redmic.test.atlascommands.unit.aggregate.layer;

/*-
 * #%L
 * Atlas-management
 * %%
 * Copyright (C) 2019 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;

import org.geotools.data.ows.Layer;
import org.geotools.metadata.iso.citation.ResponsiblePartyImpl;
import org.geotools.ows.ServiceException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mapstruct.factory.Mappers;
import org.mockito.junit.MockitoJUnitRunner;

import com.fasterxml.jackson.databind.ObjectMapper;

import es.redmic.atlascommands.mapper.ContactMapper;
import es.redmic.atlascommands.mapper.LayerMapper;
import es.redmic.atlascommands.utils.Capabilities;
import es.redmic.atlaslib.dto.layer.LayerDTO;
import es.redmic.exception.custom.ResourceNotFoundException;
import es.redmic.jts4jackson.module.JTSModule;
import es.redmic.testutils.utils.JsonToBeanTestUtil;

@RunWith(MockitoJUnitRunner.class)
public class CapabilitiesTest {

	protected ObjectMapper mapper = new ObjectMapper().registerModule(new JTSModule());

	private LayerDTO expectedLayer;

	final String URL_CAPABILITIES = new File("src/test/resources/data/capabilities/wms.xml").toURI().toString();

	private HashMap<String, LayerDTO> layers;

	public CapabilitiesTest() throws IOException {
		// Obtiene las capas mediante la utilidad, ya transformada a dto
		layers = Capabilities.getCapabilities(URL_CAPABILITIES);

		expectedLayer = (LayerDTO) JsonToBeanTestUtil.getBean("/data/layers/layer.json", LayerDTO.class);
	}

	// TODO: cambiar excepción
	@Test(expected = ResourceNotFoundException.class)
	public void getCapabilities_ThrowException_IfUrlIsMalformed() throws IOException, ServiceException {

		Capabilities.getCapabilities("wms.xml");
	}

	// TODO: cambiar excepción
	@Test(expected = ResourceNotFoundException.class)
	public void getCapabilities_ThrowException_IfServiceIsInaccessible() throws IOException, ServiceException {

		Capabilities.getCapabilities(new File("wms.xml").toURI().toString());
	}

	@Test
	public void getCapabilities_ReturnLayers_IfUrlIsCorrect() throws IOException, ServiceException {

		assertEquals(1, layers.size());
	}

	/**
	 * Solo comprueba los datos recibidos de getCapabilities, no todo el dto.
	 */
	@Test
	public void layer_ContaintAllFields_IfMapperIsCorrect() throws IOException, ServiceException {

		LayerDTO layerDTO = layers.get("batimetriaGlobal");

		assertEquals(expectedLayer.getAbstractLayer(), layerDTO.getAbstractLayer());
		assertEquals(expectedLayer.getActivities(), layerDTO.getActivities());
		assertEquals(expectedLayer.getAlias(), layerDTO.getAlias());

		assertEquals(expectedLayer.getElevationDimension(), layerDTO.getElevationDimension());
		assertEquals(expectedLayer.getFormats(), layerDTO.getFormats());
		assertEquals(expectedLayer.getGeometry(), layerDTO.getGeometry());

		assertEquals(expectedLayer.getKeyword(), layerDTO.getKeyword());
		assertEquals(expectedLayer.getLatLonBoundsImage(), layerDTO.getLatLonBoundsImage());
		assertEquals(expectedLayer.getLegend(), layerDTO.getLegend());
		assertEquals(expectedLayer.getOpaque(), layerDTO.getOpaque());
		assertEquals(expectedLayer.getProtocols(), layerDTO.getProtocols());
		assertEquals(expectedLayer.getQueryable(), layerDTO.getQueryable());

		assertEquals(expectedLayer.getStylesLayer(), layerDTO.getStylesLayer());

		assertEquals(expectedLayer.getTimeDimension(), layerDTO.getTimeDimension());
		assertEquals(expectedLayer.getTitle(), layerDTO.getTitle());
		assertEquals(expectedLayer.getUrlSource(), layerDTO.getUrlSource());
		assertEquals(expectedLayer.getName(), layerDTO.getName());
	}

	@Test
	public void allLayers_ContaintContact_IfContactCapabilitiesIsNotNull() throws IOException, ServiceException {

		for (LayerDTO item : layers.values()) {
			assertEquals(expectedLayer.getContact(), item.getContact());
		}
	}

	@Test
	public void contact_NoThrowException_IfContactIsNull() throws IOException, ServiceException {

		Mappers.getMapper(ContactMapper.class).map(new ResponsiblePartyImpl());
	}

	@Test
	public void abstractLayer_ContainExpectedString_IfMapperIsCorrect() throws IOException, ServiceException {

		Layer layer = new Layer();

		String urlSource = "";

		layer.set_abstract("Isolíneas batimétricas " + "\n(Batimetría de las Islas Canarias)\nref#817#");
		LayerDTO layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getAbstractLayer(), "Isolíneas batimétricas (Batimetría de las Islas Canarias) ");

		layer.set_abstract("Isolíneas batimétricas ref#817,201,54556# (Batimetría de las Islas Canarias)");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getAbstractLayer(), "Isolíneas batimétricas (Batimetría de las Islas Canarias)");

		layer.set_abstract("Isolíneas batimétricas " + "\n(Batimetría de las Islas Canarias)\nref#155,# aaaaaaaaaa");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getAbstractLayer(),
				"Isolíneas batimétricas (Batimetría de las Islas Canarias) aaaaaaaaaa");

		layer.set_abstract("ref#155,#\nIsolíneas batimétricas (Batimetría de las Islas Canarias)\n");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getAbstractLayer(), " Isolíneas batimétricas (Batimetría de las Islas Canarias) ");

		layer.set_abstract("ref#155#");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getAbstractLayer(), "");
	}

	@Test
	public void activities_ContainExpectedIds_IfMapperIsCorrect() throws IOException, ServiceException {

		Layer layer = new Layer();

		String urlSource = "";

		layer.set_abstract("Isolíneas batimétricas " + "\n(Batimetría de las Islas Canarias)\nref#817#");
		LayerDTO layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getActivities().size(), 1);
		assertEquals(layerDTO.getActivities().get(0).getId(), "817");

		layer.set_abstract("Isolíneas batimétricas ref#817,201,54556# (Batimetría de las Islas Canarias)");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getActivities().size(), 3);
		assertEquals(layerDTO.getActivities().get(0).getId(), "817");
		assertEquals(layerDTO.getActivities().get(1).getId(), "201");
		assertEquals(layerDTO.getActivities().get(2).getId(), "54556");

		layer.set_abstract("Isolíneas batimétricas " + "\n(Batimetría de las Islas Canarias)\nref#155,# aaaaaaaaaa");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getActivities().size(), 1);
		assertEquals(layerDTO.getActivities().get(0).getId(), "155");

		layer.set_abstract("ref#155,#\nIsolíneas batimétricas (Batimetría de las Islas Canarias)\n");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getActivities().size(), 1);
		assertEquals(layerDTO.getActivities().get(0).getId(), "155");

		layer.set_abstract("ref#155#");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertEquals(layerDTO.getActivities().size(), 1);
		assertEquals(layerDTO.getActivities().get(0).getId(), "155");

		layer.set_abstract("Isolíneas batimétricas " + "\n(Batimetría de las Islas Canarias)\n");
		layerDTO = Mappers.getMapper(LayerMapper.class).map(layer, urlSource);
		assertNull(layerDTO.getActivities());
	}
}
+162 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?><WMS_Capabilities xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" version="1.3.0" updateSequence="3111" xmlns="http://www.opengis.net/wms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wms http://atlas.redmic.es:80/schemas/wms/1.3.0/capabilities_1_3_0.xsd http://inspire.ec.europa.eu/schemas/inspire_vs/1.0 http://inspire.ec.europa.eu/schemas/inspire_vs/1.0/inspire_vs.xsd">
  <Service>
    <Name>WMS</Name>
    <Title>GeoServer Web Map Service</Title>
    <Abstract>A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
    <KeywordList>
      <Keyword>WFS</Keyword>
      <Keyword>WMS</Keyword>
      <Keyword>GEOSERVER</Keyword>
    </KeywordList>
    <OnlineResource xlink:type="simple" xlink:href="http://geoserver.sourceforge.net/html/index.php"/>
    <ContactInformation>
      <ContactPersonPrimary>
        <ContactPerson>José Andrés Sevilla</ContactPerson>
        <ContactOrganization>Observatorio Ambiental Granadilla</ContactOrganization>
      </ContactPersonPrimary>
      <ContactPosition>GIS</ContactPosition>
      <ContactAddress>
        <AddressType>Work</AddressType>
        <Address>Edf. Puerto-Ciudad, of. 1b,</Address>
        <City>S/C de Tenerife</City>
        <StateOrProvince>Santa Cruz de Tenerife</StateOrProvince>
        <PostCode>38001</PostCode>
        <Country>Spain</Country>
      </ContactAddress>
      <ContactVoiceTelephone>+34922298700</ContactVoiceTelephone>
      <ContactFacsimileTelephone>+34922298704</ContactFacsimileTelephone>
      <ContactElectronicMailAddress>gis@oag-fundacion.org</ContactElectronicMailAddress>
    </ContactInformation>
    <Fees>NONE</Fees>
    <AccessConstraints>NONE</AccessConstraints>
  </Service>
  <Capability>
    <Request>
      <GetCapabilities>
        <Format>text/xml</Format>
        <DCPType>
          <HTTP>
            <Get>
              <OnlineResource xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?SERVICE=WMS&amp;"/>
            </Get>
            <Post>
              <OnlineResource xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?SERVICE=WMS&amp;"/>
            </Post>
          </HTTP>
        </DCPType>
      </GetCapabilities>
      <GetMap>
        <Format>image/png</Format>
        <Format>application/atom+xml</Format>
        <Format>application/pdf</Format>
        <Format>application/rss+xml</Format>
        <Format>application/vnd.google-earth.kml+xml</Format>
        <Format>application/vnd.google-earth.kml+xml;mode=networklink</Format>
        <Format>application/vnd.google-earth.kmz</Format>
        <Format>image/geotiff</Format>
        <Format>image/geotiff8</Format>
        <Format>image/gif</Format>
        <Format>image/jpeg</Format>
        <Format>image/png; mode=8bit</Format>
        <Format>image/svg+xml</Format>
        <Format>image/tiff</Format>
        <Format>image/tiff8</Format>
        <Format>text/html; subtype=openlayers</Format>
        <DCPType>
          <HTTP>
            <Get>
              <OnlineResource xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?SERVICE=WMS&amp;"/>
            </Get>
          </HTTP>
        </DCPType>
      </GetMap>
      <GetFeatureInfo>
        <Format>text/plain</Format>
        <Format>application/vnd.ogc.gml</Format>
        <Format>text/xml</Format>
        <Format>application/vnd.ogc.gml/3.1.1</Format>
        <Format>text/xml; subtype=gml/3.1.1</Format>
        <Format>text/html</Format>
        <Format>application/json</Format>
        <DCPType>
          <HTTP>
            <Get>
              <OnlineResource xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?SERVICE=WMS&amp;"/>
            </Get>
          </HTTP>
        </DCPType>
      </GetFeatureInfo>
    </Request>
    <Exception>
      <Format>XML</Format>
      <Format>INIMAGE</Format>
      <Format>BLANK</Format>
    </Exception>
    <Layer>
      <Title>GeoServer Web Map Service</Title>
      <Abstract>A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
      <!--Limited list of EPSG projections:-->
      <CRS>EPSG:32628</CRS>
      <CRS>EPSG:3857</CRS>
      <CRS>EPSG:4326</CRS>
      <CRS>CRS:84</CRS>
      <EX_GeographicBoundingBox>
        <westBoundLongitude>-50.2820053100586</westBoundLongitude>
        <eastBoundLongitude>-5.36545515060425</eastBoundLongitude>
        <southBoundLatitude>12.8178520202637</southBoundLatitude>
        <northBoundLatitude>41.6171493530273</northBoundLatitude>
      </EX_GeographicBoundingBox>
      <BoundingBox CRS="CRS:84" minx="-50.2820053100586" miny="12.8178520202637" maxx="-5.36545515060425" maxy="41.6171493530273"/>
      <BoundingBox CRS="EPSG:4326" minx="12.8178520202637" miny="-50.2820053100586" maxx="41.6171493530273" maxy="-5.36545515060425"/>
      <BoundingBox CRS="EPSG:32628" minx="-3566912.1649603797" miny="1417527.187789234" maxx="1550038.3477923165" maxy="5254389.1113971835"/>
      <BoundingBox CRS="EPSG:3857" minx="-5597367.227180402" miny="1438929.891094889" maxx="-597279.735239412" maxy="5103801.682153641"/>
      <Layer queryable="1">
        <Name>batimetriaGlobal</Name>
        <Title>Batimetrías</Title>
        <Abstract>Isolíneas batimétricas obtenidas por geoprocesamiento a partir del modelo batimétrico del "General Bathymetric Chart of the Oceans (GEBCO), www.gebco.net" con equidistancia de 100 m&#13;ref#817#</Abstract>
        <CRS>EPSG:4326</CRS>
        <EX_GeographicBoundingBox>
          <westBoundLongitude>-19.332800035</westBoundLongitude>
          <eastBoundLongitude>-12.666811229</eastBoundLongitude>
          <southBoundLatitude>27.404290052</southBoundLatitude>
          <northBoundLatitude>29.416379848</northBoundLatitude>
        </EX_GeographicBoundingBox>
        <BoundingBox CRS="EPSG:4326" minx="27.404290052" miny="-19.332800035" maxx="29.416379848" maxy="-12.666811229"/>
        <BoundingBox CRS="EPSG:32628" minx="-3566912.1649603797" miny="1417527.187789234" maxx="1550038.3477923165" maxy="5254389.1113971835"/>
        <BoundingBox CRS="EPSG:3857" minx="-5597367.227180402" miny="1438929.891094889" maxx="-597279.735239412" maxy="5103801.682153641"/>
        <Style>
          <Name>el:batimetria50mCanarias</Name>
          <Title>Isobatas cada 50 m azules</Title>
          <Abstract>Apropiado para representar isobatas con 50 m de equidistancia, en varios niveles de escala o zoom, en los que se adapta el etiquetado para mejorar la visualización</Abstract>
          <LegendURL width="139" height="240">
            <Format>image/png</Format>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias"/>
          </LegendURL>
        </Style>
        <Style>
          <Name>el:batimetriaMacaronesia</Name>
          <LegendURL width="22" height="360">
            <Format>image/png</Format>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias&amp;style=batimetriaMacaronesia"/>
          </LegendURL>
        </Style>
        <Style>
          <Name>el:batimetria1mCanarias</Name>
          <LegendURL width="132" height="240">
            <Format>image/png</Format>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias&amp;style=batimetria1mCanarias"/>
          </LegendURL>
        </Style>
        <Style>
          <Name>el:batimetria50mCanariasGroup</Name>
          <LegendURL width="139" height="240">
            <Format>image/png</Format>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias&amp;style=batimetria50mCanariasGroup"/>
          </LegendURL>
        </Style>
        <Dimension name="time" default="2017-03-15T08:15:38.742Z" units="ISO8601">2017-03-15T08:15:38.742Z</Dimension>
		<Dimension name="elevation" default="1" units="EPSG:5030" unitSymbol="m">-3301.0/1600.0/0</Dimension>
      </Layer>
    </Layer>
  </Capability>
</WMS_Capabilities>
+90 −0
Original line number Diff line number Diff line
{
	"alias": "Batimetrías",
	"queryable": true,
	"opaque": true,
	"name": "batimetriaGlobal",
	"title": "Batimetrías",
	"abstractLayer": "Isolíneas batimétricas obtenidas por geoprocesamiento a partir del modelo batimétrico del \"General Bathymetric Chart of the Oceans (GEBCO), www.gebco.net\" con equidistancia de 100 m ",
	"formats": [
		"image/png",
		"application/atom+xml",
		"application/pdf",
		"application/rss+xml",
		"application/vnd.google-earth.kml+xml",
		"application/vnd.google-earth.kml+xml;mode=networklink",
		"application/vnd.google-earth.kmz",
		"image/geotiff",
		"image/geotiff8",
		"image/gif",
		"image/jpeg",
		"image/png; mode=8bit",
		"image/svg+xml",
		"image/tiff",
		"image/tiff8",
		"text/html; subtype=openlayers"
	],
	"legend": null,
	"geometry": "POLYGON ((-19.332800035 27.404290052, -19.332800035 29.416379848, -12.666811229 29.416379848, -12.666811229 27.404290052, -19.332800035 27.404290052))",
	"srs": [
		"EPSG:3857",
		"EPSG:4326",
		"EPSG:32628",
		"CRS:84"
	],
	"stylesLayer": [
		{
			"name": "el:batimetria50mCanarias",
			"title": "Isobatas cada 50 m azules",
			"abstractStyle": "Apropiado para representar isobatas con 50 m de equidistancia, en varios niveles de escala o zoom, en los que se adapta el etiquetado para mejorar la visualización",
			"format": "image/png",
			"url": "http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias"
		},
		{
			"name": "el:batimetriaMacaronesia",
			"title": "",
			"abstractStyle": "",
			"format": "image/png",
			"url": "http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias&amp;style=batimetriaMacaronesia"
		},
		{
			"name": "",
			"title": "",
			"abstractStyle": "",
			"format": "image/png",
			"url": "http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias&amp;style=batimetria1mCanarias"
		},
		{
			"name": "",
			"title": "",
			"abstractStyle": "",
			"format": "image/png",
			"url": "http://atlas.redmic.es:80/el/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=batimetriaCanarias&amp;style=batimetria50mCanariasGroup"
		}
	],
	"contact": {
		"name": "José Andrés Sevilla",
		"contactPosition": "GIS",
		"organization": "Observatorio Ambiental Granadilla",
		"phone": "+34922298700",
		"fax": "+34922298704",
		"address": "Edf. Puerto-Ciudad, of. 1b, S/C de Tenerife 38001 Spain ",
		"email": "gis@oag-fundacion.org"
	},
	"activities": [
		{
			"id": "817",
			"name": null,
			"path": null
		}
	],
	"timeDimension": {
		"name": "time",
		"units": "ISO8601",
		"defaultValue": "2017-03-15T08:15:38.742Z"
	},
	"elevationDimension": {
		"name": "elevation",
		"units": "EPSG:5030",
		"defaultValue": "1"
	}
}
 No newline at end of file
+5 −145
Original line number Diff line number Diff line
{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"title": "Layer DTO",
	"title": "Layer Info DTO",
	"type": "object",
	"properties": {
		"id": {
@@ -38,91 +38,12 @@
			"type": "integer",
			"default": "0"
		},
		"title": {
			"type": "string",
			"minLength": 3
		},
		"abstractLayer": {
			"type": ["string", "null"]
		},
		"keyword": {
			"type": ["array", "null"],
			"uniqueItems": true,
			"items": {
				"type": "string"
			}
		},
		"srs": {
			"type": "array",
			"minItems": 1,
			"uniqueItems": true,
			"items": {
				"type": "string"
			}
		},
		"styleLayer": {
			"$ref": "#/definitions/StyleLayerDTO"
		},
		"contact": {
			"$ref": "#/definitions/ContactDTO"
		},
		"activities": {
			"type": ["array", "null"],
			"uniqueItems": true,
			"items": {
				"$ref": "#/definitions/ActivityDTO"
			}
		},
		"urlSource": {
			"type": "string"
		},
		"queryable": {
			"type": "boolean",
			"default": "true"
		},
		"formats": {
			"type": "array",
			"minItems": 1,
			"uniqueItems": true,
			"items": {
				"type": "string"
			}
		},
		"image": {
			"type": ["string", "null"]
		},
		"geometry": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"type": {
					"type": "string",
					"enum": ["Polygon"],
					"default": "Polygon"
				},
				"coordinates": {
					"type": "array",
					"items": {
						"type": "array",
						"items": {
							"type": "array",
							"items": {
								"type": "number",
								"maximum": 9000000000000000,
								"minimum": -9000000000000000
							},
							"minItems": 2,
							"maxItems": 2
						},
						"minItems": 4
					},
					"minItems": 1
				}
			},
			"required": ["type", "coordinates"]
		"parent": {
			"type": ["integer", "null"],
			"url": "/api/atlas/commands/category"
		}
	},
	"required": ["protocols", "atlas", "refresh", "title", "srs", "urlSource", "queryable", "formats", "geometry"],
	"required": ["protocols", "atlas", "refresh"],
	"definitions": {
		"LatLonBoundingBoxDTO": {
			"type": ["object", "null"],
@@ -154,67 +75,6 @@
				}
			},
			"required": ["type", "url"]
		},
		"StyleLayerDTO": {
			"type": ["object", "null"],
			"properties": {
				"name": {
					"type": ["string", "null"]
				},
				"format": {
					"type": ["string", "null"]
				},
				"url": {
					"type": ["string", "null"]
				},
				"title": {
					"type": ["string", "null"]
				},
				"abstractStyle": {
					"type": ["string", "null"]
				}
			}
		},
		"ContactDTO": {
			"type": ["object", "null"],
			"properties": {
				"name": {
					"type": ["string", "null"]
				},
				"organization": {
					"type": ["string", "null"]
				},
				"contactPosition": {
					"type": ["string", "null"]
				},
				"email": {
					"type": ["string", "null"]
				},
				"phone": {
					"type": ["string", "null"]
				},
				"fax": {
					"type": ["string", "null"]
				},
				"address": {
					"type": ["string", "null"]
				}
			}
		},
		"ActivityDTO": {
			"type": ["object", "null"],
			"properties": {
				"id": {
					"type": "string"
				},
				"name": {
					"type": "string"
				},
				"path": {
					"type": "string"
				}
			},
			"required": ["id", "name", "path"]
		}
	}
}
 No newline at end of file