comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSQPSArtifact.java @ 5468:84da5ed67e93

Use getRiverId from the baseclass
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 27 Mar 2013 15:36:44 +0100
parents a2735a4bf75e
children 948a106bc4cd
comparison
equal deleted inserted replaced
5467:6aa04b30f7ff 5468:84da5ed67e93
75 public static class WMSQPSState extends WMSDBState implements FacetTypes { 75 public static class WMSQPSState extends WMSDBState implements FacetTypes {
76 76
77 private static final Logger logger = 77 private static final Logger logger =
78 Logger.getLogger(WMSQPSState.class); 78 Logger.getLogger(WMSQPSState.class);
79 79
80 protected int riverId;
81
82 public WMSQPSState(WMSDBArtifact artifact) { 80 public WMSQPSState(WMSDBArtifact artifact) {
83 super(artifact); 81 super(artifact);
84 riverId = 0;
85 }
86
87 public int getRiverId() {
88 if (riverId == 0) {
89 String ids = artifact.getDataAsString("ids");
90
91 try {
92 riverId = Integer.parseInt(ids);
93 }
94 catch (NumberFormatException nfe) {
95 logger.error("Cannot parse river id from '" + ids + "'");
96 }
97 }
98
99 return riverId;
100 } 82 }
101 83
102 @Override 84 @Override
103 protected String getFacetType() { 85 protected String getFacetType() {
104 return FLOODMAP_QPS; 86 return FLOODMAP_QPS;

http://dive4elements.wald.intevation.org