Revision 19367
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/GPEKmlWriterHandlerImplementor.java | ||
---|---|---|
5 | 5 |
import java.io.StringWriter; |
6 | 6 |
import java.util.Stack; |
7 | 7 |
|
8 |
import org.gvsig.gpe.gml.GMLTags; |
|
8 |
import org.gvsig.gpe.gml.utils.GMLTags;
|
|
9 | 9 |
import org.gvsig.gpe.kml.KmlTags; |
10 | 10 |
import org.gvsig.gpe.kml.writer.profiles.IWriterProfile; |
11 | 11 |
import org.gvsig.gpe.warnings.FeatureNotSupportedWarning; |
12 | 12 |
import org.gvsig.gpe.xml.exceptions.GPEXmlToZipFileException; |
13 | 13 |
import org.gvsig.gpe.xml.writer.GPEXmlWriterHandlerImplementor; |
14 |
import org.gvsig.gpe.xml.writer.IWriter; |
|
14 | 15 |
import org.gvsig.gpe.xml.writer.Writer; |
15 | 16 |
|
16 | 17 |
|
... | ... | |
134 | 135 |
* (non-Javadoc) |
135 | 136 |
* @see org.gvsig.gpe.xml.writer.GPEXmlWriterHandler#createOutputStream() |
136 | 137 |
*/ |
137 |
protected Writer createWriter() throws IOException { |
|
138 |
protected IWriter createWriter() throws IOException {
|
|
138 | 139 |
return new Writer(new FileWriter(getOutputFile())); |
139 | 140 |
} |
140 | 141 |
|
... | ... | |
248 | 249 |
* @see org.gvsig.gpe.writers.GPEWriterHandler#endFeature() |
249 | 250 |
*/ |
250 | 251 |
public void endFeature() { |
251 |
Writer elementWriter = (Writer)currentElementStream.pop();
|
|
252 |
IWriter elementWriter = (IWriter)currentElementStream.pop();
|
|
252 | 253 |
currentElementName.pop(); |
253 | 254 |
try{ |
254 | 255 |
getProfile().getMetadataWriter().start(writer, this); |
... | ... | |
265 | 266 |
* @see org.gvsig.gpe.writer.GPEWriterHandler#startElement(java.lang.String, java.lang.Object, java.lang.Object) |
266 | 267 |
*/ |
267 | 268 |
public void startElement(String name, Object value, String type) { |
268 |
Writer buffer = ((Writer)currentElementStream.lastElement());
|
|
269 |
IWriter buffer = ((IWriter)currentElementStream.lastElement());
|
|
269 | 270 |
((Stack)currentElementName.lastElement()).push(name); |
270 | 271 |
try { |
271 | 272 |
getProfile().getElementWriter().start(buffer, this, name, value, type); |
... | ... | |
280 | 281 |
* @see org.gvsig.gpe.writer.GPEWriterHandler#endElement() |
281 | 282 |
*/ |
282 | 283 |
public void endElement() { |
283 |
Writer buffer = ((Writer)currentElementStream.lastElement());
|
|
284 |
IWriter buffer = ((IWriter)currentElementStream.lastElement());
|
|
284 | 285 |
String elementName = (String)((Stack)currentElementName.lastElement()).pop(); |
285 | 286 |
try { |
286 | 287 |
getProfile().getElementWriter().end(buffer, this, elementName); |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/DescriptionWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
85 | 85 |
* The description value |
86 | 86 |
* @throws IOException |
87 | 87 |
*/ |
88 |
public void write(Writer writer, GPEKmlWriterHandlerImplementor handler, String description) throws IOException{ |
|
88 |
public void write(IWriter writer, GPEKmlWriterHandlerImplementor handler, String description) throws IOException{
|
|
89 | 89 |
writer.write("\n"); |
90 | 90 |
writer.write("<" + KmlTags.DESCRIPTION + ">"); |
91 | 91 |
writer.write(description); |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/ElementWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.gml.utils.GMLUtilsParser; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
76 | 76 |
* Element type |
77 | 77 |
* @throws IOException |
78 | 78 |
*/ |
79 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String name, Object value, Object type) throws IOException{ |
|
79 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String name, Object value, Object type) throws IOException{
|
|
80 | 80 |
writer.write("\n"); |
81 | 81 |
writer.write("<" + GMLUtilsParser.addBlancSymbol(name) + ">"); |
82 | 82 |
if (value != null){ |
... | ... | |
94 | 94 |
* Element name |
95 | 95 |
* @throws IOException |
96 | 96 |
*/ |
97 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler, String name) throws IOException{ |
|
97 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler, String name) throws IOException{
|
|
98 | 98 |
writer.write("</" + GMLUtilsParser.addBlancSymbol(name) + ">"); |
99 | 99 |
} |
100 | 100 |
|
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/FeatureWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
88 | 88 |
* Feature type |
89 | 89 |
* @throws IOException |
90 | 90 |
*/ |
91 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String id, String tagName) throws IOException{ |
|
91 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String id, String tagName) throws IOException{
|
|
92 | 92 |
writer.write("\n"); |
93 | 93 |
writer.write("<" + tagName); |
94 | 94 |
if (id != null){ |
... | ... | |
108 | 108 |
* Feature type |
109 | 109 |
* @throws IOException |
110 | 110 |
*/ |
111 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor hanlder, String tagName) throws IOException{ |
|
111 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor hanlder, String tagName) throws IOException{
|
|
112 | 112 |
writer.write("\n"); |
113 | 113 |
writer.write("</" + tagName + ">"); |
114 | 114 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/FolderWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
103 | 103 |
* Folder description |
104 | 104 |
* @throws IOException |
105 | 105 |
*/ |
106 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String id, String name, String description) throws IOException{ |
|
106 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String id, String name, String description) throws IOException{
|
|
107 | 107 |
handler.getProfile().getFeatureWriter().start(writer, handler, id, KmlTags.FOLDER); |
108 | 108 |
if (name != null){ |
109 | 109 |
handler.getProfile().getNameWriter().write(writer, handler, name); |
... | ... | |
121 | 121 |
* The writer handler implementor |
122 | 122 |
* @throws IOException |
123 | 123 |
*/ |
124 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
124 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
125 | 125 |
handler.getProfile().getFeatureWriter().end(writer, handler, KmlTags.FOLDER); |
126 | 126 |
} |
127 | 127 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/DocumentWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
103 | 103 |
* Document description |
104 | 104 |
* @throws IOException |
105 | 105 |
*/ |
106 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String id, String name, String description) throws IOException{ |
|
106 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String id, String name, String description) throws IOException{
|
|
107 | 107 |
handler.getProfile().getFeatureWriter().start(writer, handler, id, KmlTags.DOCUMENT); |
108 | 108 |
if (name != null){ |
109 | 109 |
handler.getProfile().getNameWriter().write(writer, handler, name); |
... | ... | |
121 | 121 |
* The writer handler implementor |
122 | 122 |
* @throws IOException |
123 | 123 |
*/ |
124 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
124 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
125 | 125 |
handler.getProfile().getFeatureWriter().end(writer, handler, KmlTags.DOCUMENT); |
126 | 126 |
} |
127 | 127 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/PlaceMarkWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
100 | 100 |
* |
101 | 101 |
* @throws IOException |
102 | 102 |
*/ |
103 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String id, String name) throws IOException{ |
|
103 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String id, String name) throws IOException{
|
|
104 | 104 |
handler.getProfile().getFeatureWriter().start(writer, handler, id, KmlTags.PLACEMARK); |
105 | 105 |
if (id != null){ |
106 | 106 |
writer.write(" id=\"" + id + "\""); |
... | ... | |
119 | 119 |
* The writer handler implementor |
120 | 120 |
* @throws IOException |
121 | 121 |
*/ |
122 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
122 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
123 | 123 |
handler.getProfile().getFeatureWriter().end(writer, handler, KmlTags.PLACEMARK); |
124 | 124 |
} |
125 | 125 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/MetadataWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
73 | 73 |
* The writer handler implementor |
74 | 74 |
* @throws IOException |
75 | 75 |
*/ |
76 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor hanlder) throws IOException{ |
|
76 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor hanlder) throws IOException{
|
|
77 | 77 |
writer.write("\n"); |
78 | 78 |
writer.write("<" + KmlTags.METADATA + ">"); |
79 | 79 |
} |
... | ... | |
86 | 86 |
* The writer handler implementor |
87 | 87 |
* @throws IOException |
88 | 88 |
*/ |
89 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
89 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
90 | 90 |
writer.write("\n"); |
91 | 91 |
writer.write("</" + KmlTags.METADATA + ">"); |
92 | 92 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/features/NameWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
84 | 84 |
* The name value |
85 | 85 |
* @throws IOException |
86 | 86 |
*/ |
87 |
public void write(Writer writer, GPEKmlWriterHandlerImplementor hanlder, String name) throws IOException{ |
|
87 |
public void write(IWriter writer, GPEKmlWriterHandlerImplementor hanlder, String name) throws IOException{
|
|
88 | 88 |
writer.write("\n"); |
89 | 89 |
writer.write("<" + KmlTags.NAME + ">"); |
90 | 90 |
writer.write(name); |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/LatLonBoxWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
105 | 105 |
* in a clockwise direction. |
106 | 106 |
* @throws IOException |
107 | 107 |
*/ |
108 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler,double north, double south, |
|
108 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler,double north, double south,
|
|
109 | 109 |
double east, double west, double rotation) throws IOException{ |
110 | 110 |
writer.write("\n"); |
111 | 111 |
writer.write("<" + KmlTags.LATLONBOX + ">"); |
... | ... | |
139 | 139 |
* @param handler |
140 | 140 |
* The writer handler implementor |
141 | 141 |
*/ |
142 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
142 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
143 | 143 |
writer.write("\n"); |
144 | 144 |
writer.write("</" + KmlTags.LATLONBOX + ">"); |
145 | 145 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/GeometriesWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
86 | 86 |
* Geometry id |
87 | 87 |
* @throws IOException |
88 | 88 |
*/ |
89 |
public void startGeometry(Writer writer, GPEKmlWriterHandlerImplementor handler, String tagName,String id) throws IOException{ |
|
89 |
public void startGeometry(IWriter writer, GPEKmlWriterHandlerImplementor handler, String tagName,String id) throws IOException{
|
|
90 | 90 |
writer.write("\n"); |
91 | 91 |
writer.write("<" + tagName); |
92 | 92 |
if (id != null){ |
... | ... | |
105 | 105 |
* Geometry tag name |
106 | 106 |
* @throws IOException |
107 | 107 |
*/ |
108 |
public void endGeometry(Writer writer, GPEKmlWriterHandlerImplementor hanlder,String tagName) throws IOException{ |
|
108 |
public void endGeometry(IWriter writer, GPEKmlWriterHandlerImplementor hanlder,String tagName) throws IOException{
|
|
109 | 109 |
writer.write("\n"); |
110 | 110 |
writer.write("</" + tagName + ">"); |
111 | 111 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/LatLonAltBoxWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
106 | 106 |
* Specified in meters above sea levell |
107 | 107 |
* @throws IOException |
108 | 108 |
*/ |
109 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler,double north, double south, |
|
109 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler,double north, double south,
|
|
110 | 110 |
double east, double west, double minAltitude, |
111 | 111 |
double maxAltitude) throws IOException{ |
112 | 112 |
writer.write("\n"); |
... | ... | |
146 | 146 |
* The writer handler implementor |
147 | 147 |
* @throws IOException |
148 | 148 |
*/ |
149 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor hanlder) throws IOException{ |
|
149 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor hanlder) throws IOException{
|
|
150 | 150 |
writer.write("\n"); |
151 | 151 |
writer.write("</" + KmlTags.LATLONALTBOX + ">"); |
152 | 152 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/RegionWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
104 | 104 |
* Specified in meters above sea levell |
105 | 105 |
* @throws IOException |
106 | 106 |
*/ |
107 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler,double north, double south, |
|
107 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler,double north, double south,
|
|
108 | 108 |
double east, double west, double minAltitude, |
109 | 109 |
double maxAltitude) throws IOException{ |
110 | 110 |
writer.write("\n"); |
... | ... | |
121 | 121 |
* The writer handler implementor |
122 | 122 |
* @throws IOException |
123 | 123 |
*/ |
124 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
124 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
125 | 125 |
handler.getProfile().getLatLonAltBoxWriter().end(writer, handler); |
126 | 126 |
writer.write("\n"); |
127 | 127 |
writer.write("</" + KmlTags.REGION + ">"); |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/MultiGeometryWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
98 | 98 |
* Meters above sea level |
99 | 99 |
* @throws IOException |
100 | 100 |
*/ |
101 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String id) throws IOException{ |
|
101 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String id) throws IOException{
|
|
102 | 102 |
handler.getProfile().getGeometryWriter().startGeometry(writer, handler, KmlTags.MULTIGEOMETRY, id); |
103 | 103 |
} |
104 | 104 |
|
... | ... | |
110 | 110 |
* The writer handler implementor |
111 | 111 |
* @throws IOException |
112 | 112 |
*/ |
113 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
113 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
114 | 114 |
handler.getProfile().getGeometryWriter().endGeometry(writer, handler, KmlTags.MULTIGEOMETRY); |
115 | 115 |
} |
116 | 116 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/PolygonWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
100 | 100 |
* Array of altitudes (Meters above sea level) |
101 | 101 |
* @throws IOException |
102 | 102 |
*/ |
103 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String id, double[] longitudes, double[] latitudes, |
|
103 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String id, double[] longitudes, double[] latitudes,
|
|
104 | 104 |
double[] altitudes) throws IOException{ |
105 | 105 |
handler.getProfile().getGeometryWriter().startGeometry(writer, handler, KmlTags.POLYGON, id); |
106 | 106 |
handler.getProfile().getOuterBoundaryIsWriter().start(writer, handler, longitudes, latitudes, altitudes); |
... | ... | |
115 | 115 |
* The writer handler implementor |
116 | 116 |
* @throws IOException |
117 | 117 |
*/ |
118 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
118 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
119 | 119 |
handler.getProfile().getGeometryWriter().endGeometry(writer, handler, KmlTags.POLYGON); |
120 | 120 |
} |
121 | 121 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/PointWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
96 | 96 |
* Meters above sea level |
97 | 97 |
* @throws IOException |
98 | 98 |
*/ |
99 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, String id, double longitude, double latitude, |
|
99 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, String id, double longitude, double latitude,
|
|
100 | 100 |
double altitude) throws IOException{ |
101 | 101 |
handler.getProfile().getGeometryWriter().startGeometry(writer, handler, KmlTags.POINT, id); |
102 | 102 |
handler.getProfile().getCoordinatesWriter().write(writer, handler, longitude, latitude, altitude); |
... | ... | |
110 | 110 |
* The writer handler implementor |
111 | 111 |
* @throws IOException |
112 | 112 |
*/ |
113 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
113 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
114 | 114 |
handler.getProfile().getGeometryWriter().endGeometry(writer, handler, KmlTags.POINT); |
115 | 115 |
} |
116 | 116 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/CoordinatesWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
89 | 89 |
* Meters above sea level |
90 | 90 |
* @throws IOException |
91 | 91 |
*/ |
92 |
public void write(Writer writer, GPEKmlWriterHandlerImplementor handler, double longitude, double latitude, |
|
92 |
public void write(IWriter writer, GPEKmlWriterHandlerImplementor handler, double longitude, double latitude,
|
|
93 | 93 |
double altitude) throws IOException{ |
94 | 94 |
writer.write("\n"); |
95 | 95 |
writer.write("<" + KmlTags.COORDINATES + ">"); |
... | ... | |
112 | 112 |
* Array of altitudes (Meters above sea level) |
113 | 113 |
* @throws IOException |
114 | 114 |
*/ |
115 |
public void write(Writer writer, GPEKmlWriterHandlerImplementor handler,double[] longitudes, double[] latitudes, |
|
115 |
public void write(IWriter writer, GPEKmlWriterHandlerImplementor handler,double[] longitudes, double[] latitudes,
|
|
116 | 116 |
double[] altitudes) throws IOException{ |
117 | 117 |
writer.write("\n"); |
118 | 118 |
writer.write("<" + KmlTags.COORDINATES + ">"); |
... | ... | |
139 | 139 |
* Meters above sea level |
140 | 140 |
* @throws IOException |
141 | 141 |
*/ |
142 |
private void writeOneCoordinate(Writer writer, GPEKmlWriterHandlerImplementor handler,double x, double y, |
|
142 |
private void writeOneCoordinate(IWriter writer, GPEKmlWriterHandlerImplementor handler,double x, double y,
|
|
143 | 143 |
double z) throws IOException{ |
144 | 144 |
handler.getProfile().getDoubleWriter().write(writer, handler,x); |
145 | 145 |
writer.write(KmlTags.COORDINATES_SEPARATOR); |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/DoubleWriter.java | ||
---|---|---|
3 | 3 |
import java.io.IOException; |
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
6 |
import org.gvsig.gpe.xml.writer.Writer; |
|
6 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
7 | 7 |
|
8 | 8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
9 | 9 |
* |
... | ... | |
76 | 76 |
* Value to write |
77 | 77 |
* @throws IOException |
78 | 78 |
*/ |
79 |
public void write(Writer writer, GPEKmlWriterHandlerImplementor handler, double value)throws IOException{ |
|
79 |
public void write(IWriter writer, GPEKmlWriterHandlerImplementor handler, double value)throws IOException{
|
|
80 | 80 |
writer.write(new Double(value).toString()); |
81 | 81 |
} |
82 | 82 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/LinearRingWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
94 | 94 |
* Array of altitudes (Meters above sea level) |
95 | 95 |
* @throws IOException |
96 | 96 |
*/ |
97 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler, double[] longitudes, double[] latitudes, |
|
97 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler, double[] longitudes, double[] latitudes,
|
|
98 | 98 |
double[] altitudes) throws IOException{ |
99 | 99 |
writer.write("\n"); |
100 | 100 |
writer.write("<" + KmlTags.LINEARRING + ">"); |
... | ... | |
109 | 109 |
* The writer handler implementor |
110 | 110 |
* @throws IOException |
111 | 111 |
*/ |
112 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
112 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
113 | 113 |
writer.write("\n"); |
114 | 114 |
writer.write("</" + KmlTags.LINEARRING + ">"); |
115 | 115 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/InnerBoundaryIsWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
93 | 93 |
* Array of altitudes (Meters above sea level) |
94 | 94 |
* @throws IOException |
95 | 95 |
*/ |
96 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler,double[] longitudes, double[] latitudes, |
|
96 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler,double[] longitudes, double[] latitudes,
|
|
97 | 97 |
double[] altitudes) throws IOException{ |
98 | 98 |
writer.write("\n"); |
99 | 99 |
writer.write("<" + KmlTags.INNERBOUNDARYIS + ">"); |
... | ... | |
108 | 108 |
* The writer handler implementor |
109 | 109 |
* @throws IOException |
110 | 110 |
*/ |
111 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
111 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
112 | 112 |
handler.getProfile().getLinearRingWriter().end(writer, handler); |
113 | 113 |
writer.write("\n"); |
114 | 114 |
writer.write("</" + KmlTags.INNERBOUNDARYIS + ">"); |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/LineStringWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
97 | 97 |
* Array of altitudes (Meters above sea level) |
98 | 98 |
* @throws IOException |
99 | 99 |
*/ |
100 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler,String id, double[] longitudes, double[] latitudes, |
|
100 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler,String id, double[] longitudes, double[] latitudes,
|
|
101 | 101 |
double[] altitudes) throws IOException{ |
102 | 102 |
handler.getProfile().getGeometryWriter().startGeometry(writer, handler, KmlTags.LINESTRING, id); |
103 | 103 |
handler.getProfile().getCoordinatesWriter().write(writer, handler, longitudes, latitudes, altitudes); |
... | ... | |
111 | 111 |
* The writer handler implementor |
112 | 112 |
* @throws IOException |
113 | 113 |
*/ |
114 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
114 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
115 | 115 |
handler.getProfile().getGeometryWriter().endGeometry(writer, handler, KmlTags.LINESTRING); |
116 | 116 |
} |
117 | 117 |
} |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/v21/geometries/OuterBoundaryIsWriter.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.gvsig.gpe.kml.KmlTags; |
6 | 6 |
import org.gvsig.gpe.kml.writer.GPEKmlWriterHandlerImplementor; |
7 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
import org.gvsig.gpe.xml.writer.IWriter;
|
|
8 | 8 |
|
9 | 9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
10 | 10 |
* |
... | ... | |
93 | 93 |
* Array of altitudes (Meters above sea level) |
94 | 94 |
* @throws IOException |
95 | 95 |
*/ |
96 |
public void start(Writer writer, GPEKmlWriterHandlerImplementor handler,double[] longitudes, double[] latitudes, |
|
96 |
public void start(IWriter writer, GPEKmlWriterHandlerImplementor handler,double[] longitudes, double[] latitudes,
|
|
97 | 97 |
double[] altitudes) throws IOException{ |
98 | 98 |
writer.write("\n"); |
99 | 99 |
writer.write("<" + KmlTags.OUTERBOUNDARYIS + ">"); |
... | ... | |
108 | 108 |
* The writer handler implementor |
109 | 109 |
* @throws IOException |
110 | 110 |
*/ |
111 |
public void end(Writer writer, GPEKmlWriterHandlerImplementor handler) throws IOException{ |
|
111 |
public void end(IWriter writer, GPEKmlWriterHandlerImplementor handler) throws IOException{
|
|
112 | 112 |
handler.getProfile().getLinearRingWriter().end(writer, handler); |
113 | 113 |
writer.write("\n"); |
114 | 114 |
writer.write("</" + KmlTags.OUTERBOUNDARYIS + ">"); |
trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/GPEDeafultKmlParser.java | ||
---|---|---|
18 | 18 |
import org.gvsig.gpe.kml.parser.AbstractKmlParser; |
19 | 19 |
import org.gvsig.gpe.kml.parser.KmlParsersFactory; |
20 | 20 |
import org.gvsig.gpe.kml.parser.profiles.IBindingProfile; |
21 |
import org.gvsig.gpe.xml.GPEXmlParser; |
|
21 |
import org.gvsig.gpe.xml.parser.GPEXmlParser;
|
|
22 | 22 |
|
23 | 23 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
24 | 24 |
* |
Also available in: Unified diff