Loading atlas-lib/src/main/java/es/redmic/atlaslib/dto/layer/ProtocolDTO.java +47 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,9 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse( "{\"type\":\"record\",\"name\":\"ProtocolDTO\",\"namespace\":\"es.redmic.atlaslib.dto.layer\",\"fields\":[" + "{\"name\": \"type\",\"type\": \"string\"}," + "{\"name\": \"url\",\"type\": \"string\"}]}"); + "{\"name\": \"url\",\"type\": \"string\"}," + "{\"name\": \"style\",\"type\": [\"string\", \"null\"]}," + "{\"name\": \"version\",\"type\": [\"string\", \"null\"]}]}"); // @formatter:on @NotNull Loading @@ -51,6 +53,10 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase @NotNull private String url; private String style; private String version; public ProtocolDTO() { } Loading Loading @@ -88,12 +94,30 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase this.url = url; } public String getStyle() { return this.style; } public void setStyle(String style) { this.style = style; } public String getVersion() { return this.version; } public void setVersion(String version) { this.version = version; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((url == null) ? 0 : url.hashCode()); result = prime * result + ((style == null) ? 0 : style.hashCode()); result = prime * result + ((version == null) ? 0 : version.hashCode()); return result; } Loading @@ -116,6 +140,16 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase return false; } else if (!url.equals(other.url)) return false; if (style == null) { if (other.style != null) return false; } else if (!style.equals(other.style)) return false; if (version == null) { if (other.version != null) return false; } else if (!version.equals(other.version)) return false; return true; } Loading @@ -133,6 +167,10 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase return type; case 1: return url; case 2: return style; case 3: return version; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } Loading @@ -148,6 +186,12 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase case 1: url = value$ != null ? value$.toString() : null; break; case 2: style = style != null ? value$.toString() : null; break; case 3: version = version != null ? value$.toString() : null; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } Loading atlas-view/src/main/java/es/redmic/atlasview/model/layer/Protocol.java +22 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,10 @@ public class Protocol { private String url; private String style; private String version; public Protocol() { } Loading @@ -44,4 +48,20 @@ public class Protocol { public void setUrl(String url) { this.url = url; } public String getStyle() { return this.style; } public void setStyle(String style) { this.style = style; } public String getVersion() { return this.version; } public void setVersion(String version) { this.version = version; } } atlas-view/src/test/resources/data/dto/layer/layer.json +3 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,9 @@ "protocols": [ { "type": "WMS", "url": "https://atlas.redmic.es/geoserver/sd/wms" "url": "https://atlas.redmic.es/geoserver/sd/wms", "style": "el:batimetria50mCanarias", "version": "1.1.1" } ], "geometry": { Loading atlas-view/src/test/resources/data/dto/layer/searchWrapperLayerDTO.json +3 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,9 @@ "protocols": [ { "type": "WMS", "url": "https://atlas.redmic.es/geoserver/sd/wms" "url": "https://atlas.redmic.es/geoserver/sd/wms", "style": "el:batimetria50mCanarias", "version": "1.1.1" } ], "geometry": { Loading atlas-view/src/test/resources/data/model/layer/layer.json +3 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,9 @@ "protocols": [ { "type": "WMS", "url": "https://atlas.redmic.es/geoserver/sd/wms" "url": "https://atlas.redmic.es/geoserver/sd/wms", "style": "el:batimetria50mCanarias", "version": "1.1.1" } ], "geometry": { Loading Loading
atlas-lib/src/main/java/es/redmic/atlaslib/dto/layer/ProtocolDTO.java +47 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,9 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse( "{\"type\":\"record\",\"name\":\"ProtocolDTO\",\"namespace\":\"es.redmic.atlaslib.dto.layer\",\"fields\":[" + "{\"name\": \"type\",\"type\": \"string\"}," + "{\"name\": \"url\",\"type\": \"string\"}]}"); + "{\"name\": \"url\",\"type\": \"string\"}," + "{\"name\": \"style\",\"type\": [\"string\", \"null\"]}," + "{\"name\": \"version\",\"type\": [\"string\", \"null\"]}]}"); // @formatter:on @NotNull Loading @@ -51,6 +53,10 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase @NotNull private String url; private String style; private String version; public ProtocolDTO() { } Loading Loading @@ -88,12 +94,30 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase this.url = url; } public String getStyle() { return this.style; } public void setStyle(String style) { this.style = style; } public String getVersion() { return this.version; } public void setVersion(String version) { this.version = version; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((url == null) ? 0 : url.hashCode()); result = prime * result + ((style == null) ? 0 : style.hashCode()); result = prime * result + ((version == null) ? 0 : version.hashCode()); return result; } Loading @@ -116,6 +140,16 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase return false; } else if (!url.equals(other.url)) return false; if (style == null) { if (other.style != null) return false; } else if (!style.equals(other.style)) return false; if (version == null) { if (other.version != null) return false; } else if (!version.equals(other.version)) return false; return true; } Loading @@ -133,6 +167,10 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase return type; case 1: return url; case 2: return style; case 3: return version; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } Loading @@ -148,6 +186,12 @@ public class ProtocolDTO extends org.apache.avro.specific.SpecificRecordBase case 1: url = value$ != null ? value$.toString() : null; break; case 2: style = style != null ? value$.toString() : null; break; case 3: version = version != null ? value$.toString() : null; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } Loading
atlas-view/src/main/java/es/redmic/atlasview/model/layer/Protocol.java +22 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,10 @@ public class Protocol { private String url; private String style; private String version; public Protocol() { } Loading @@ -44,4 +48,20 @@ public class Protocol { public void setUrl(String url) { this.url = url; } public String getStyle() { return this.style; } public void setStyle(String style) { this.style = style; } public String getVersion() { return this.version; } public void setVersion(String version) { this.version = version; } }
atlas-view/src/test/resources/data/dto/layer/layer.json +3 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,9 @@ "protocols": [ { "type": "WMS", "url": "https://atlas.redmic.es/geoserver/sd/wms" "url": "https://atlas.redmic.es/geoserver/sd/wms", "style": "el:batimetria50mCanarias", "version": "1.1.1" } ], "geometry": { Loading
atlas-view/src/test/resources/data/dto/layer/searchWrapperLayerDTO.json +3 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,9 @@ "protocols": [ { "type": "WMS", "url": "https://atlas.redmic.es/geoserver/sd/wms" "url": "https://atlas.redmic.es/geoserver/sd/wms", "style": "el:batimetria50mCanarias", "version": "1.1.1" } ], "geometry": { Loading
atlas-view/src/test/resources/data/model/layer/layer.json +3 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,9 @@ "protocols": [ { "type": "WMS", "url": "https://atlas.redmic.es/geoserver/sd/wms" "url": "https://atlas.redmic.es/geoserver/sd/wms", "style": "el:batimetria50mCanarias", "version": "1.1.1" } ], "geometry": { Loading