Revision 11216
trunk/libraries/libGPE-GML/src/org/gvsig/gpe/gml/writer/features/DescriptionWriter.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.writer.features; |
|
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
|
|
5 |
import org.gvsig.gpe.gml.GMLTags; |
|
6 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
/* CVS MESSAGES: |
|
49 |
* |
|
50 |
* $Id$ |
|
51 |
* $Log$ |
|
52 |
* Revision 1.1 2007-04-17 07:00:35 jorpiell |
|
53 |
* GML name, descripction and Id tags separated |
|
54 |
* |
|
55 |
* |
|
56 |
*/ |
|
57 |
/** |
|
58 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
59 |
*/ |
|
60 |
public class DescriptionWriter { |
|
61 |
public static void write(Writer writer,String description) throws IOException{ |
|
62 |
if (description != null){ |
|
63 |
writer.write("\n"); |
|
64 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_DESCRIPTION + ">"); |
|
65 |
writer.write(description); |
|
66 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_DESCRIPTION + ">"); |
|
67 |
} |
|
68 |
} |
|
69 |
} |
|
0 | 70 |
trunk/libraries/libGPE-GML/src/org/gvsig/gpe/gml/writer/features/GidWriter.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.writer.features; |
|
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
|
|
5 |
import org.gvsig.gpe.gml.GMLTags; |
|
6 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
/* CVS MESSAGES: |
|
49 |
* |
|
50 |
* $Id$ |
|
51 |
* $Log$ |
|
52 |
* Revision 1.1 2007-04-17 07:00:35 jorpiell |
|
53 |
* GML name, descripction and Id tags separated |
|
54 |
* |
|
55 |
* |
|
56 |
*/ |
|
57 |
/** |
|
58 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
59 |
*/ |
|
60 |
public class GidWriter { |
|
61 |
public static void write(Writer writer,String id) throws IOException{ |
|
62 |
if (id != null){ |
|
63 |
writer.write("\n"); |
|
64 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_ID + ">"); |
|
65 |
writer.write(id); |
|
66 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_ID + ">"); |
|
67 |
} |
|
68 |
} |
|
69 |
} |
|
0 | 70 |
trunk/libraries/libGPE-GML/src/org/gvsig/gpe/gml/writer/features/NameWriter.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.writer.features; |
|
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
|
|
5 |
import org.gvsig.gpe.gml.GMLTags; |
|
6 |
import org.gvsig.gpe.xml.writer.Writer; |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
/* CVS MESSAGES: |
|
49 |
* |
|
50 |
* $Id$ |
|
51 |
* $Log$ |
|
52 |
* Revision 1.1 2007-04-17 07:00:35 jorpiell |
|
53 |
* GML name, descripction and Id tags separated |
|
54 |
* |
|
55 |
* |
|
56 |
*/ |
|
57 |
/** |
|
58 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
59 |
*/ |
|
60 |
public class NameWriter { |
|
61 |
|
|
62 |
public static void write(Writer writer,String name) throws IOException{ |
|
63 |
if (name != null){ |
|
64 |
writer.write("\n"); |
|
65 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_NAME + ">"); |
|
66 |
writer.write(name); |
|
67 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_NAME + ">"); |
|
68 |
} |
|
69 |
} |
|
70 |
} |
|
0 | 71 |
trunk/libraries/libGPE-GML/src/org/gvsig/gpe/gml/writer/GPEGmlWriterHandler.java | ||
---|---|---|
9 | 9 |
import org.gvsig.gpe.GPEDefaults; |
10 | 10 |
import org.gvsig.gpe.GPEErrorHandler; |
11 | 11 |
import org.gvsig.gpe.gml.GMLTags; |
12 |
import org.gvsig.gpe.gml.writer.features.DescriptionWriter; |
|
12 | 13 |
import org.gvsig.gpe.gml.writer.features.ElementWriter; |
13 | 14 |
import org.gvsig.gpe.gml.writer.features.FeatureMemberWriter; |
15 |
import org.gvsig.gpe.gml.writer.features.GidWriter; |
|
16 |
import org.gvsig.gpe.gml.writer.features.NameWriter; |
|
14 | 17 |
import org.gvsig.gpe.gml.writer.geometries.BoundedByWriter; |
15 | 18 |
import org.gvsig.gpe.gml.writer.geometries.BoxWriter; |
16 | 19 |
import org.gvsig.gpe.gml.writer.geometries.InnerBoundaryIs; |
... | ... | |
72 | 75 |
* |
73 | 76 |
* $Id$ |
74 | 77 |
* $Log$ |
75 |
* Revision 1.5 2007-04-14 16:07:30 jorpiell |
|
78 |
* Revision 1.6 2007-04-17 07:00:35 jorpiell |
|
79 |
* GML name, descripction and Id tags separated |
|
80 |
* |
|
81 |
* Revision 1.5 2007/04/14 16:07:30 jorpiell |
|
76 | 82 |
* The writer has been created |
77 | 83 |
* |
78 | 84 |
* Revision 1.4 2007/04/13 13:16:00 jorpiell |
... | ... | |
170 | 176 |
} |
171 | 177 |
oneLayer = true; |
172 | 178 |
try { |
173 |
if (id != null){ |
|
174 |
writer.write("\n"); |
|
175 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_ID + ">"); |
|
176 |
writer.write(id); |
|
177 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_ID + ">"); |
|
178 |
} |
|
179 |
if (name != null){ |
|
180 |
writer.write("\n"); |
|
181 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_NAME + ">"); |
|
182 |
writer.write(name); |
|
183 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_NAME + ">"); |
|
184 |
} |
|
185 |
if (description != null){ |
|
186 |
writer.write("\n"); |
|
187 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_DESCRIPTION + ">"); |
|
188 |
writer.write(description); |
|
189 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_DESCRIPTION + ">"); |
|
190 |
} |
|
179 |
GidWriter.write(writer, id); |
|
180 |
NameWriter.write(writer, name); |
|
181 |
DescriptionWriter.write(writer, description); |
|
191 | 182 |
//TODO: EL SRS SE PIERDE DEBIDO A LA SEMANTICA DEL GML |
192 | 183 |
} catch (IOException e) { |
193 | 184 |
getErrorHandler().addError(e); |
Also available in: Unified diff