Mercurial > mxd2map
comparison src/java/de/intevation/mxd/writer/SymbolWriter.java @ 90:82a1f39214fd
Added method to save the symbolset.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 31 May 2011 19:04:55 +0200 |
parents | 7d4cf2db43f1 |
children | 3993b5adf67c |
comparison
equal
deleted
inserted
replaced
89:475ee3e4bc8b | 90:82a1f39214fd |
---|---|
1 package de.intevation.mxd.writer; | 1 package de.intevation.mxd.writer; |
2 | 2 |
3 import org.apache.log4j.Logger; | 3 import org.apache.log4j.Logger; |
4 import java.io.File; | |
5 import java.io.FileInputStream; | |
6 import java.io.BufferedInputStream; | |
7 import java.util.Properties; | |
4 | 8 |
5 import org.w3c.dom.Element; | 9 import org.w3c.dom.Element; |
6 | 10 |
7 import edu.umn.gis.mapscript.mapObj; | 11 import edu.umn.gis.mapscript.mapObj; |
8 import edu.umn.gis.mapscript.classObj; | 12 import edu.umn.gis.mapscript.classObj; |
59 writeCharacter(sym, symbolElement); | 63 writeCharacter(sym, symbolElement); |
60 } | 64 } |
61 else { | 65 else { |
62 return false; | 66 return false; |
63 } | 67 } |
68 | |
69 saveSymbolSet(symbolSet); | |
70 | |
64 return true; | 71 return true; |
65 } | 72 } |
66 | 73 |
67 private void writeSimple(symbolObj symbol) { | 74 private void writeSimple(symbolObj symbol) { |
68 logger.debug("writeSimple(symbolObj)"); | 75 logger.debug("writeSimple(symbolObj)"); |
106 } | 113 } |
107 else { | 114 else { |
108 return false; | 115 return false; |
109 } | 116 } |
110 } | 117 } |
118 | |
119 private void saveSymbolSet(symbolSetObj symbols) | |
120 throws Exception { | |
121 String path = "";// TODO Get the correct path. Mapfile path or symbolset path | |
122 if(path.equals("")) { | |
123 return; | |
124 } | |
125 else if(path.endsWith(".map")) { | |
126 path.replace(".map", ".sym"); | |
127 } | |
128 symbols.save(path); | |
129 } | |
111 } | 130 } |
112 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 131 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |