Statistics
| Revision:

root / branches / v10 / libraries / libRemoteServices / src / org / gvsig / remoteClient / gml / IGMLFeaturesIterator.java @ 12215

History | View | Annotate | Download (3.1 KB)

1
package org.gvsig.remoteClient.gml;
2

    
3
import org.gvsig.remoteClient.gml.exceptions.BaseException;
4
import org.gvsig.remoteClient.gml.exceptions.GMLException;
5
import org.gvsig.remoteClient.gml.factories.IGeometriesFactory;
6
import org.gvsig.remoteClient.gml.schemas.XMLSchemaParser;
7

    
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: IGMLFeaturesIterator.java 9917 2007-01-25 16:13:00Z jorpiell $
52
 * $Log$
53
 * Revision 1.1.2.1  2007-01-25 16:12:59  jorpiell
54
 * Se han sustituido las clases por las que hay en el nuevo driver de GML.
55
 *
56
 * Revision 1.3  2007/01/15 13:11:00  csanchez
57
 * Sistema de Warnings y Excepciones adaptado a BasicException
58
 *
59
 * Revision 1.2  2006/12/22 11:25:44  csanchez
60
 * Nuevo parser GML 2.x para gml's sin esquema
61
 *
62
 * Revision 1.1  2006/08/10 12:00:49  jorpiell
63
 * Primer commit del driver de Gml
64
 *
65
 *
66
 */
67
/**
68
 * Iterator to retrieve the GML objects parsed. It must to
69
 * be implemented by the iterators for GML 2.x and 3.x
70
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
71
 * @author Carlos S?nchez Peri??n (sanchez_carper@gva.es)
72
 * 
73
 */
74
public abstract class IGMLFeaturesIterator {
75
        private XMLSchemaParser parser = null;
76
        private IGeometriesFactory factory = null;
77
        private String featureRoot = null; 
78

    
79
        
80
        public IGMLFeaturesIterator(XMLSchemaParser parser, IGeometriesFactory factory) {
81
                this.parser = parser;
82
                this.factory = factory;
83
                //It takes the <featureMember> like featureRoot
84
                featureRoot = parser.getName();
85
        }
86
        /**
87
         * It Returns true if there are more features to parse
88
         * @return
89
         * @throws BaseException 
90
         */
91
        public abstract boolean hasNext()throws GMLException;
92
    
93
        /**
94
         * It returns the next feature
95
         * @return
96
         */
97
        public abstract Object next()throws GMLException;        
98
        
99
        /**
100
         * @return Returns the featureRoot.
101
         */
102
        public String getFeatureRoot() {
103
                return featureRoot;
104
        }
105
        /**
106
         * @return Returns the factory.
107
         */
108
        public IGeometriesFactory getFactory() {
109
                return factory;
110
        }
111
        /**
112
         * @return Returns the parser.
113
         */
114
        public XMLSchemaParser getParser() {
115
                return parser;
116
        }
117
}