[PATCH 2 of 2] merged
Wald Commits
scm-commit at wald.intevation.org
Thu Feb 6 15:05:34 CET 2014
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1391695529 -3600
# Node ID 869f54874c3c5002e85d2e51c856f66624f10e45
# Parent 69c8d33a05e8c7a3ab35a25fa22ef4d081bd07f1
# Parent 72d0cec59c78ee2543c8230110784405bb896c67
merged
diff -r 69c8d33a05e8 -r 869f54874c3c artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSDBLayerFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSDBLayerFacet.java Thu Feb 06 15:04:29 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSDBLayerFacet.java Thu Feb 06 15:05:29 2014 +0100
@@ -9,6 +9,7 @@
package org.dive4elements.river.artifacts.model.map;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
+import org.dive4elements.artifactdatabase.state.Facet;
public class WMSDBLayerFacet extends WMSLayerFacet {
@@ -110,5 +111,27 @@
public boolean isQueryable() {
return true;
}
+
+ /** Clone Facet-bound data. */
+ protected void cloneData(WMSDBLayerFacet copy) {
+ super.cloneData(copy);
+ copy.setFilter(this.getFilter());
+ copy.setData(this.getData());
+ copy.setGeometryType(this.getGeometryType());
+ copy.setConnection(this.getConnection());
+ copy.setConnectionType(this.getConnectionType());
+ copy.setLabelItem(this.getLabelItem());
+ }
+
+ /** Copy deeply. */
+ @Override
+ public Facet deepCopy() {
+ WMSDBLayerFacet copy = new WMSDBLayerFacet();
+ copy.set(this);
+
+ cloneData(copy);
+
+ return copy;
+ }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
diff -r 69c8d33a05e8 -r 869f54874c3c artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSLayerFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSLayerFacet.java Thu Feb 06 15:04:29 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WMSLayerFacet.java Thu Feb 06 15:05:29 2014 +0100
@@ -173,18 +173,30 @@
}
+ /** Clone facet-bound data. */
+ protected void cloneData(WMSLayerFacet copy) {
+ copy.type = type;
+ copy.stateId = stateId;
+ copy.hash = hash;
+
+ if (layers != null) {
+ copy.layers = new ArrayList<String>(layers);
+ }
+ else {
+ copy.layers = new ArrayList<String>();
+ }
+
+ copy.url = url;
+ copy.extent = extent;
+ copy.srid = srid;
+ }
+
@Override
public Facet deepCopy() {
WMSLayerFacet copy = new WMSLayerFacet();
copy.set(this);
- copy.type = type;
- copy.layers = new ArrayList<String>(layers);
- copy.stateId = stateId;
- copy.hash = hash;
- copy.url = url;
- copy.extent = extent;
- copy.srid = srid;
+ cloneData(copy);
return copy;
}
diff -r 69c8d33a05e8 -r 869f54874c3c artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENLayerFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENLayerFacet.java Thu Feb 06 15:04:29 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENLayerFacet.java Thu Feb 06 15:05:29 2014 +0100
@@ -9,6 +9,7 @@
package org.dive4elements.river.artifacts.model.map;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
+import org.dive4elements.artifactdatabase.state.Facet;
public class WSPLGENLayerFacet
extends WMSLayerFacet
@@ -50,5 +51,17 @@
public boolean isQueryable() {
return true;
}
+
+
+ /** Copy deeply. */
+ @Override
+ public Facet deepCopy() {
+ WSPLGENLayerFacet copy = new WSPLGENLayerFacet();
+ copy.set(this);
+
+ cloneData(copy);
+
+ return copy;
+ }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
More information about the Dive4elements-commits
mailing list