Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/services/DistanceInfoService.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | af13ceeba52a |
children | 6ae0c5116d58 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
31 * | 31 * |
32 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 32 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
33 */ | 33 */ |
34 public class DistanceInfoService extends D4EService { | 34 public class DistanceInfoService extends D4EService { |
35 | 35 |
36 /** The logger used in this service. */ | 36 /** The log used in this service. */ |
37 private static Logger logger = Logger.getLogger(DistanceInfoService.class); | 37 private static Logger log = Logger.getLogger(DistanceInfoService.class); |
38 | 38 |
39 public static final String RIVER_XPATH = "/art:river/text()"; | 39 public static final String RIVER_XPATH = "/art:river/text()"; |
40 | 40 |
41 public static final String FILTER_XPATH = "/art:river/art:filter/text()"; | 41 public static final String FILTER_XPATH = "/art:river/art:filter/text()"; |
42 | 42 |
52 public Document doProcess( | 52 public Document doProcess( |
53 Document data, | 53 Document data, |
54 GlobalContext globalContext, | 54 GlobalContext globalContext, |
55 CallMeta callMeta | 55 CallMeta callMeta |
56 ) { | 56 ) { |
57 logger.debug("DistanceInfoService.process"); | 57 log.debug("DistanceInfoService.process"); |
58 | 58 |
59 String river = XMLUtils.xpathString( | 59 String river = XMLUtils.xpathString( |
60 data, RIVER_XPATH, ArtifactNamespaceContext.INSTANCE); | 60 data, RIVER_XPATH, ArtifactNamespaceContext.INSTANCE); |
61 | 61 |
62 String filterName = XMLUtils.xpathString( | 62 String filterName = XMLUtils.xpathString( |
63 data, FILTER_XPATH, ArtifactNamespaceContext.INSTANCE); | 63 data, FILTER_XPATH, ArtifactNamespaceContext.INSTANCE); |
64 | 64 |
65 if (river == null || (river = river.trim()).length() == 0) { | 65 if (river == null || (river = river.trim()).length() == 0) { |
66 logger.warn("No river specified. Cannot return distance info!"); | 66 log.warn("No river specified. Cannot return distance info!"); |
67 return XMLUtils.newDocument(); | 67 return XMLUtils.newDocument(); |
68 } | 68 } |
69 | 69 |
70 logger.debug("Search distances for river: " + river); | 70 log.debug("Search distances for river: " + river); |
71 | 71 |
72 FastAnnotations fas = LocationProvider.getAnnotations(river); | 72 FastAnnotations fas = LocationProvider.getAnnotations(river); |
73 | 73 |
74 FastAnnotations.Filter filter = selectFilter(filterName); | 74 FastAnnotations.Filter filter = selectFilter(filterName); |
75 | 75 |