Statistics
| Revision:

root / branches / Mobile1.0 / org.gvsig.gpe.gml / src / org / gvsig / gpe / gml / writer / sfp0 / geometries / InnerBoundaryIsWriter.java @ 79

History | View | Annotate | Download (2.8 KB)

1
package org.gvsig.gpe.gml.writer.sfp0.geometries;
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.writer.ICoordinateSequence;
8
import org.gvsig.gpe.xml.stream.IXmlStreamWriter;
9

    
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
 *
12
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
 *
14
 * This program is free software; you can redistribute it and/or
15
 * modify it under the terms of the GNU General Public License
16
 * as published by the Free Software Foundation; either version 2
17
 * of the License, or (at your option) any later version.
18
 *
19
 * This program is distributed in the hope that it will be useful,
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 * GNU General Public License for more details.
23
 *
24
 * You should have received a copy of the GNU General Public License
25
 * along with this program; if not, write to the Free Software
26
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
 *
28
 * For more information, contact:
29
 *
30
 *  Generalitat Valenciana
31
 *   Conselleria d'Infraestructures i Transport
32
 *   Av. Blasco Ib??ez, 50
33
 *   46010 VALENCIA
34
 *   SPAIN
35
 *
36
 *      +34 963862235
37
 *   gvsig@gva.es
38
 *      www.gvsig.gva.es
39
 *
40
 *    or
41
 *
42
 *   IVER T.I. S.A
43
 *   Salamanca 50
44
 *   46005 Valencia
45
 *   Spain
46
 *
47
 *   +34 963163400
48
 *   dac@iver.es
49
 */
50
/* CVS MESSAGES:
51
 *
52
 * $Id$
53
 * $Log$
54
 *
55
 */
56
/**
57
 * It writes a gml:innerBoundaryType object. Example:
58
* <p>
59
* <pre>
60
* <code>
61
* &lt;interior&gt;
62
* &lt;LinearRing&gt;
63
* &lt;coordinates&gt;10.0,10.0 10.0,40.0 40.0,40.0 40.0,10.0 10.0,10.0&lt;/coordinates&gt;
64
* &lt;/LinearRing&gt;
65
* &lt;/interior&gt;
66
* </code>
67
* </pre>
68
* </p> 
69
* @author Jorge Piera LLodr? (jorge.piera@iver.es)
70
*/
71
public class InnerBoundaryIsWriter extends org.gvsig.gpe.gml.writer.v2.geometries.InnerBoundaryIsWriter {
72
        /**
73
         * It writes a gml:interior init tag
74
         * @param writer
75
         * Writer to write the labels
76
         * @param handler
77
         * The writer handler implementor
78
         * @param coords
79
         * A coordinates sequence
80
         * @throws IOException
81
         */
82
        public void start(IXmlStreamWriter writer, GPEGmlWriterHandlerImplementor handler, 
83
                        ICoordinateSequence coords) throws IOException{
84
                writer.writeStartElement(GMLTags.GML_INTERIOR);        
85
                handler.getProfile().getLinearRingWriter().start(writer, handler, null, coords, null);        
86
        }
87
        
88
        /**
89
         * It writes a gml:interior end tag
90
         * @param writer
91
         * Writer to write the labels
92
         * @param handler
93
         * The writer handler implementor
94
         * @throws IOException
95
         */
96
        public void end(IXmlStreamWriter writer, GPEGmlWriterHandlerImplementor handler) throws IOException{
97
                handler.getProfile().getLinearRingWriter().end(writer, handler);
98
                writer.writeEndElement();        
99
        }
100
}