root / trunk / libraries / libGPE-GML / src / org / gvsig / gpe / gml / parser / sfp0 / geometries / MultiPolygonTypeBinding.java @ 19366
History | View | Annotate | Download (2.95 KB)
1 |
package org.gvsig.gpe.gml.parser.sfp0.geometries; |
---|---|
2 |
|
3 |
import java.io.IOException; |
4 |
|
5 |
import org.gvsig.gpe.gml.parser.GPEDefaultGmlParser; |
6 |
import org.gvsig.gpe.gml.utils.CompareUtils; |
7 |
import org.gvsig.gpe.gml.utils.GMLTags; |
8 |
import org.xmlpull.v1.XmlPullParser; |
9 |
import org.xmlpull.v1.XmlPullParserException; |
10 |
|
11 |
|
12 |
|
13 |
|
14 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
15 |
*
|
16 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
17 |
*
|
18 |
* This program is free software; you can redistribute it and/or
|
19 |
* modify it under the terms of the GNU General Public License
|
20 |
* as published by the Free Software Foundation; either version 2
|
21 |
* of the License, or (at your option) any later version.
|
22 |
*
|
23 |
* This program is distributed in the hope that it will be useful,
|
24 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
* GNU General Public License for more details.
|
27 |
*
|
28 |
* You should have received a copy of the GNU General Public License
|
29 |
* along with this program; if not, write to the Free Software
|
30 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
31 |
*
|
32 |
* For more information, contact:
|
33 |
*
|
34 |
* Generalitat Valenciana
|
35 |
* Conselleria d'Infraestructures i Transport
|
36 |
* Av. Blasco Ib??ez, 50
|
37 |
* 46010 VALENCIA
|
38 |
* SPAIN
|
39 |
*
|
40 |
* +34 963862235
|
41 |
* gvsig@gva.es
|
42 |
* www.gvsig.gva.es
|
43 |
*
|
44 |
* or
|
45 |
*
|
46 |
* IVER T.I. S.A
|
47 |
* Salamanca 50
|
48 |
* 46005 Valencia
|
49 |
* Spain
|
50 |
*
|
51 |
* +34 963163400
|
52 |
* dac@iver.es
|
53 |
*/
|
54 |
/* CVS MESSAGES:
|
55 |
*
|
56 |
* $Id$
|
57 |
* $Log$
|
58 |
*
|
59 |
*/
|
60 |
/**
|
61 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
62 |
*/
|
63 |
public class MultiPolygonTypeBinding extends org.gvsig.gpe.gml.parser.v2.geometries.MultiPolygonTypeBinding{ |
64 |
|
65 |
/*
|
66 |
* (non-Javadoc)
|
67 |
* @see org.gvsig.gpe.gml.bindings.v2.geometries.MultiPolygonTypeBinding#parseTag(org.xmlpull.v1.XmlPullParser, org.gvsig.gpe.gml.GPEDefaultGmlParser, java.lang.String, java.lang.String, java.lang.Object, java.lang.String)
|
68 |
*/
|
69 |
protected void parseTag(XmlPullParser parser,GPEDefaultGmlParser handler, String tag, String id, Object multiPolygon, String srsName) throws XmlPullParserException, IOException{ |
70 |
super.parseTag(parser, handler, tag, id, multiPolygon, srsName);
|
71 |
if (CompareUtils.compareWithOutNamespace(tag,GMLTags.GML_SURFACEMEMBER)){
|
72 |
Object polygon = handler.getProfile().getPolygonMemberTypeBinding().parse(parser, handler);
|
73 |
handler.getContentHandler().addPolygonToMultiPolygon(polygon, multiPolygon); |
74 |
} |
75 |
} |
76 |
|
77 |
/*
|
78 |
* (non-Javadoc)
|
79 |
* @see org.gvsig.gpe.gml.bindings.v2.geometries.MultiPolygonTypeBinding#parseLastTag(org.xmlpull.v1.XmlPullParser, org.gvsig.gpe.gml.GPEDefaultGmlParser, java.lang.String)
|
80 |
*/
|
81 |
protected boolean parseLastTag(XmlPullParser parser,GPEDefaultGmlParser handler, String tag){ |
82 |
boolean endFeature = super.parseLastTag(parser, handler, tag); |
83 |
if (endFeature){
|
84 |
return true; |
85 |
} |
86 |
if (CompareUtils.compareWithOutNamespace(tag,GMLTags.GML_MULTISURFACE)){
|
87 |
return true; |
88 |
} |
89 |
return false; |
90 |
} |
91 |
|
92 |
} |