Statistics
| Revision:

root / trunk / libraries / libRemoteServices / src / org / gvsig / remoteClient / gml / factories / GeometriesFactory.java @ 9507

History | View | Annotate | Download (3.26 KB)

1
package org.gvsig.remoteClient.gml.factories;
2

    
3
import java.awt.geom.Point2D;
4
import java.util.Map;
5

    
6
import org.gvsig.remoteClient.gml.types.IXMLType;
7
import org.gvsig.remoteClient.gml.v2.GMLSimpleFeature_v2;
8

    
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: GeometriesFactory.java 9507 2006-12-29 17:15:48Z jorpiell $
53
 * $Log$
54
 * Revision 1.3  2006-12-29 17:15:48  jorpiell
55
 * Se tienen en cuenta los simpleTypes y los choices, adem?s de los atributos multiples
56
 *
57
 * Revision 1.2  2006/12/22 11:25:44  csanchez
58
 * Nuevo parser GML 2.x para gml's sin esquema
59
 *
60
 * Revision 1.1  2006/08/10 12:00:49  jorpiell
61
 * Primer commit del driver de Gml
62
 *
63
 *
64
 */
65
/**
66
 * Geometries factory for the RemoteClient project.
67
 * 
68
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
69
 * @author Carlos S?nchez Peri??n (sanchez_carper@gva.es)
70
 * 
71
 */
72
public class GeometriesFactory implements IGeometriesFactory{
73
        /*
74
         *  (non-Javadoc)
75
         * @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createPoint2D(double, double)
76
         */
77
        public Object createPoint2D(double x, double y) {
78
                return new Point2D.Double(x,y);
79
        }
80
        
81
        /*
82
         *  (non-Javadoc)
83
         * @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createPoint2D(java.awt.geom.Point2D)
84
         */
85
        public Object createPoint2D(Point2D point2D) {
86
                return new Point2D.Double(point2D.getX(),point2D.getY());
87
        }
88

    
89
        /*
90
         *  (non-Javadoc)
91
         * @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createMultipoint2D(double[], double[])
92
         */
93
        public Object createMultipoint2D(double[] x, double[] y) {
94
                // TODO Auto-generated method stub
95
                return null;
96
        }
97

    
98
        /*
99
         *  (non-Javadoc)
100
         * @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createSimpleFeature(java.lang.String, java.lang.Object, java.util.ArrayList, java.util.ArrayList)
101
         */
102
        public Object createSimpleFeature(String element, IXMLType type, Map values, Object geometry) {
103
                GMLSimpleFeature_v2 feature = new GMLSimpleFeature_v2(element,type,values,geometry);
104
                return feature;
105
        }
106

    
107
        /*
108
         *  (non-Javadoc)
109
         * @see org.gvsig.remoteClient.gml.factories.IGeometriesFactory#createGeometry(java.lang.String)
110
         */
111
        public Object createGeometry(String gmlString) {
112
                return gmlString;
113
        }
114

    
115

    
116
}