comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
1 package org.dive4elements.river.artifacts.model.minfo;
2
3 import org.apache.log4j.Logger;
4
5 import org.dive4elements.artifactdatabase.state.Facet;
6 import org.dive4elements.artifacts.Artifact;
7 import org.dive4elements.artifacts.CallContext;
8 import org.dive4elements.river.artifacts.FLYSArtifact;
9 import org.dive4elements.river.artifacts.model.DataFacet;
10 import org.dive4elements.river.artifacts.model.FacetTypes;
11 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
12
13
14 public class MorphologicWidthFacet
15 extends DataFacet
16 implements FacetTypes
17 {
18 private static Logger logger = Logger.getLogger(SedimentLoadFacet.class);
19
20
21 public MorphologicWidthFacet() {
22 }
23
24 public MorphologicWidthFacet(String facetName, String description) {
25 super(facetName, description);
26 }
27
28 public MorphologicWidthFacet(int idx, String name, String description,
29 ComputeType type, String stateId, String hash) {
30 super(idx, name, description, type, hash, stateId);
31 }
32
33 public Object getData(Artifact artifact, CallContext context) {
34
35 FLYSArtifact flys = (FLYSArtifact) artifact;
36 String width_id = flys.getDataAsString("width_id");
37
38 MorphologicWidth width =
39 MorphologicWidthFactory.getWidth(Integer.valueOf(width_id));
40
41 return width;
42 }
43
44 /** Copy deeply. */
45 @Override
46 public Facet deepCopy() {
47 MorphologicWidthFacet copy = new MorphologicWidthFacet();
48 copy.set(this);
49 copy.type = type;
50 copy.hash = hash;
51 copy.stateId = stateId;
52 return copy;
53 }
54 }

http://dive4elements.wald.intevation.org