comparison flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java @ 5309:b55975761708

Changed visiblitiy of some methods. TODO: A lot of refactoring. A lot of functions may be moved to Utils.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 14 Mar 2013 17:18:41 +0100
parents 38ec171544de
children
comparison
equal deleted inserted replaced
5308:7712dacc27ab 5309:b55975761708
121 121
122 protected abstract String getVelocityLogfile(); 122 protected abstract String getVelocityLogfile();
123 123
124 protected abstract String getMapserverTemplatePath(); 124 protected abstract String getMapserverTemplatePath();
125 125
126 protected abstract String getMapserverUrl(); 126 public abstract String getMapserverUrl();
127 127
128 protected VelocityContext getVelocityContext() { 128 protected VelocityContext getVelocityContext() {
129 VelocityContext context = new VelocityContext(); 129 VelocityContext context = new VelocityContext();
130 130
131 try { 131 try {
153 * Returns a template specified by <i>model</i>. 153 * Returns a template specified by <i>model</i>.
154 * 154 *
155 * @param model The name of the template. 155 * @param model The name of the template.
156 * @return a template. 156 * @return a template.
157 */ 157 */
158 protected Template getTemplateByName(String model) { 158 public Template getTemplateByName(String model) {
159 if (model.indexOf(".vm") < 0) { 159 if (model.indexOf(".vm") < 0) {
160 model = model.concat(".vm"); 160 model = model.concat(".vm");
161 } 161 }
162 162
163 try { 163 try {
275 * @param dir The base dir for the LAYER snippet. 275 * @param dir The base dir for the LAYER snippet.
276 * @param filename The name of the file that is written. 276 * @param filename The name of the file that is written.
277 * @param tpl The Velocity template which is used to create the LAYER 277 * @param tpl The Velocity template which is used to create the LAYER
278 * section. 278 * section.
279 */ 279 */
280 protected void writeLayer( 280 public void writeLayer(
281 LayerInfo layerInfo, 281 LayerInfo layerInfo,
282 File layerFile, 282 File layerFile,
283 Template tpl 283 Template tpl
284 ) 284 )
285 throws FileNotFoundException 285 throws FileNotFoundException
324 /** 324 /**
325 * Creates a mapfile with the layer information stored in <i>layers</i>. 325 * Creates a mapfile with the layer information stored in <i>layers</i>.
326 * 326 *
327 * @param layers Layer information. 327 * @param layers Layer information.
328 */ 328 */
329 protected void writeMapfile(List<String> layers) { 329 public void writeMapfile(List<String> layers) {
330 String tmpMapName = "mapfile" + new Date().getTime(); 330 String tmpMapName = "mapfile" + new Date().getTime();
331 331
332 File mapfile = new File(getMapfilePath()); 332 File mapfile = new File(getMapfilePath());
333 333
334 File tmp = null; 334 File tmp = null;

http://dive4elements.wald.intevation.org