Statistics
| Revision:

root / trunk / libraries / libGPE-GML / src / org / gvsig / gpe / gml / writer / v2 / features / NameWriter.java @ 19366

History | View | Annotate | Download (2.52 KB)

1
package org.gvsig.gpe.gml.writer.v2.features;
2

    
3
import java.io.IOException;
4

    
5
import org.gvsig.gpe.gml.utils.GMLTags;
6
import org.gvsig.gpe.gml.writer.GPEGmlWriterHandlerImplementor;
7
import org.gvsig.gpe.xml.writer.IWriter;
8

    
9
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
10
 *
11
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
12
 *
13
 * This program is free software; you can redistribute it and/or
14
 * modify it under the terms of the GNU General Public License
15
 * as published by the Free Software Foundation; either version 2
16
 * of the License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
26
 *
27
 * For more information, contact:
28
 *
29
 *  Generalitat Valenciana
30
 *   Conselleria d'Infraestructures i Transport
31
 *   Av. Blasco Ib??ez, 50
32
 *   46010 VALENCIA
33
 *   SPAIN
34
 *
35
 *      +34 963862235
36
 *   gvsig@gva.es
37
 *      www.gvsig.gva.es
38
 *
39
 *    or
40
 *
41
 *   IVER T.I. S.A
42
 *   Salamanca 50
43
 *   46005 Valencia
44
 *   Spain
45
 *
46
 *   +34 963163400
47
 *   dac@iver.es
48
 */
49
/* CVS MESSAGES:
50
 *
51
 * $Id: NameWriter.java 350 2008-01-09 12:53:07Z jpiera $
52
 * $Log$
53
 * Revision 1.3  2007/05/15 08:11:54  jorpiell
54
 * The element had to have end
55
 *
56
 * Revision 1.2  2007/05/08 10:24:16  jorpiell
57
 * Add comments to create javadocs
58
 *
59
 * Revision 1.1  2007/04/17 07:00:35  jorpiell
60
 * GML name, descripction and Id tags separated
61
 *
62
 *
63
 */
64
/**
65
 * This class writes the gml:name tag. Example:
66
 * <p>
67
 * <pre>
68
 * <code>
69
 * &lt;gml:name&gt;GML tag name&lt;/gml:name&gt;
70
 * </code>
71
 * </pre>
72
 * </p>
73
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
74
 */
75
public class NameWriter {
76
        
77
        /**
78
         * It writes a gml:name tag
79
         * @param writer
80
         * Writer to write the labels
81
         * @param handler
82
         * The writer handler implementor
83
         * @param name
84
         * Name to write
85
         * @throws IOException
86
         */
87
        public void write(IWriter writer, GPEGmlWriterHandlerImplementor handler, String name) throws IOException{
88
                if (name != null){
89
                        writer.write("\n");
90
                        writer.write("<" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_NAME + ">");
91
                        writer.write(name);
92
                        writer.write("</" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_NAME + ">");
93
                }
94
        }
95
}