Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/layer/LayerOutputState.java @ 835:2423cefe7d39
Removed trailing whitespace.
gnv-artifacts/trunk@936 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 17 Apr 2010 09:35:24 +0000 |
parents | 28028979c813 |
children | 05bf8534a35a |
comparison
equal
deleted
inserted
replaced
834:520a3b4da484 | 835:2423cefe7d39 |
---|---|
53 | 53 |
54 /** | 54 /** |
55 * The Basename of the Templates for the WMS-Exports | 55 * The Basename of the Templates for the WMS-Exports |
56 */ | 56 */ |
57 public static final String LAYER_MODEL = "layer"; | 57 public static final String LAYER_MODEL = "layer"; |
58 | 58 |
59 /** | 59 /** |
60 * The Name of the Shapefile which will be generated. | 60 * The Name of the Shapefile which will be generated. |
61 */ | 61 */ |
62 public static final String SHAPEFILE_NAME = "data.shp"; | 62 public static final String SHAPEFILE_NAME = "data.shp"; |
63 | 63 |
71 * which should be used to Clip the Layerdata | 71 * which should be used to Clip the Layerdata |
72 */ | 72 */ |
73 private String geometryQueryID = null; | 73 private String geometryQueryID = null; |
74 | 74 |
75 /** | 75 /** |
76 * The ID of the Query for fetching the Columnnames of the Table which | 76 * The ID of the Query for fetching the Columnnames of the Table which |
77 * should put into the Shapefile. | 77 * should put into the Shapefile. |
78 */ | 78 */ |
79 private String columnQueryID = null; | 79 private String columnQueryID = null; |
80 | 80 |
81 /** | 81 /** |
82 * The ID of the Query for fetching the Information which kind of Geometry | 82 * The ID of the Query for fetching the Information which kind of Geometry |
83 * should be put into the Shapefile. | 83 * should be put into the Shapefile. |
84 */ | 84 */ |
85 private String geometryTypeQueryID = null; | 85 private String geometryTypeQueryID = null; |
86 | 86 |
87 /** | 87 /** |
159 } | 159 } |
160 | 160 |
161 | 161 |
162 /** | 162 /** |
163 * Fetches the Data from the Databasebackend. | 163 * Fetches the Data from the Databasebackend. |
164 * | 164 * |
165 * @return the resultdata. | 165 * @return the resultdata. |
166 */ | 166 */ |
167 protected Collection<Result> fetchData(){ | 167 protected Collection<Result> fetchData(){ |
168 log.debug("LayerOutputState.fetchData"); | 168 log.debug("LayerOutputState.fetchData"); |
169 Collection<Result> result = this.getData(this.queryID); | 169 Collection<Result> result = this.getData(this.queryID); |
482 synchronized (shapeFileLock) { | 482 synchronized (shapeFileLock) { |
483 return shapeFilePath; | 483 return shapeFilePath; |
484 } | 484 } |
485 } | 485 } |
486 | 486 |
487 | 487 |
488 private static File shapefileDirectory(CallContext callContext) { | 488 private static File shapefileDirectory(CallContext callContext) { |
489 // TODO: Refactoring nessessary it should be used only one Shapefilepath | 489 // TODO: Refactoring nessessary it should be used only one Shapefilepath |
490 // for alle Modes. Code was taken from HorizontalCrossSectionMeshOutputState | 490 // for alle Modes. Code was taken from HorizontalCrossSectionMeshOutputState |
491 GNVArtifactContext context = | 491 GNVArtifactContext context = |
492 (GNVArtifactContext)callContext.globalContext(); | 492 (GNVArtifactContext)callContext.globalContext(); |
631 * @param geometryType | 631 * @param geometryType |
632 * @return | 632 * @return |
633 */ | 633 */ |
634 private String findParameterTitle(String geometryType) { | 634 private String findParameterTitle(String geometryType) { |
635 String paramType = LAYER_MODEL+"_"+templateID; | 635 String paramType = LAYER_MODEL+"_"+templateID; |
636 | 636 |
637 if (!MapfileGenerator.getInstance().templateExists(paramType)){ | 637 if (!MapfileGenerator.getInstance().templateExists(paramType)){ |
638 // If the template doesn't exist the Defaulttemplates will be used. | 638 // If the template doesn't exist the Defaulttemplates will be used. |
639 paramType = LAYER_MODEL+"_"+ | 639 paramType = LAYER_MODEL+"_"+ |
640 this.determineDefaultTemplateName(geometryType); | 640 this.determineDefaultTemplateName(geometryType); |
641 } | 641 } |
660 | 660 |
661 | 661 |
662 /** | 662 /** |
663 * Turns the geometry type into a form used for the templating mechanism | 663 * Turns the geometry type into a form used for the templating mechanism |
664 * while mapfile generation. | 664 * while mapfile generation. |
665 * | 665 * |
666 * @param geometryType The original geometry type. | 666 * @param geometryType The original geometry type. |
667 * @return a valid geometry type fpr the template mechanism. | 667 * @return a valid geometry type fpr the template mechanism. |
668 */ | 668 */ |
669 private String determineGeometryType(String geometryType){ | 669 private String determineGeometryType(String geometryType){ |
670 | 670 |