comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/GaugeDischargeCurveFacet.java @ 4187:21f4e4b79121

Refactor GaugeDischargeCurveFacet to be able to set a facet name For adding another output of the GaugeDischargeCurveArtifact it is necessary to provide to facet instances with different names. Therefore the GaugeDischargeCurveFacet is extended to set the facet name in the constructor.
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 19 Oct 2012 13:25:49 +0200
parents a5e1ca620f15
children 5d19a291bd9f
comparison
equal deleted inserted replaced
4186:eba517419832 4187:21f4e4b79121
27 implements FacetTypes 27 implements FacetTypes
28 { 28 {
29 private static final Logger log = 29 private static final Logger log =
30 Logger.getLogger(GaugeDischargeCurveFacet.class); 30 Logger.getLogger(GaugeDischargeCurveFacet.class);
31 31
32 public GaugeDischargeCurveFacet(String description) { 32 public GaugeDischargeCurveFacet(String name, String description) {
33 super(0, GAUGE_DISCHARGE_CURVE, description); 33 super(0, name, description);
34 } 34 }
35 35
36 @Override 36 @Override
37 public Object getData(Artifact art, CallContext context) { 37 public Object getData(Artifact art, CallContext context) {
38 38
68 } 68 }
69 69
70 @Override 70 @Override
71 public Facet deepCopy() { 71 public Facet deepCopy() {
72 GaugeDischargeCurveFacet copy = new GaugeDischargeCurveFacet( 72 GaugeDischargeCurveFacet copy = new GaugeDischargeCurveFacet(
73 this.name,
73 this.description); 74 this.description);
74 copy.set(this); 75 copy.set(this);
75 return copy; 76 return copy;
76 } 77 }
77 } 78 }

http://dive4elements.wald.intevation.org