root / branches / v2_0_0_prep / extensions / extGeocoding / src / org / gvsig / geocoding / utils / LayerGenerator.java @ 27564
History | View | Annotate | Download (2.52 KB)
1 | 26843 | vsanjaime | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 2
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | */
|
||
22 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2009 Prodevelop S.L vsanjaime programador
|
||
26 | */
|
||
27 | |||
28 | package org.gvsig.geocoding.utils; |
||
29 | |||
30 | import java.io.File; |
||
31 | import java.util.List; |
||
32 | |||
33 | 26851 | vsanjaime | import org.gvsig.fmap.dal.feature.Feature; |
34 | 27140 | csanchez | import org.slf4j.Logger; |
35 | import org.slf4j.LoggerFactory; |
||
36 | 26843 | vsanjaime | |
37 | /**
|
||
38 | 27338 | vsanjaime | * This class generates a Layer from feature store
|
39 | 26843 | vsanjaime | *
|
40 | * @author Jorge Gaspar Sanz Salinas (jsanz@prodevelop.es)
|
||
41 | * @author Vicente Sanjaime Calvet (vsanjaime@prodevelop.es)
|
||
42 | *
|
||
43 | */
|
||
44 | |||
45 | public class LayerGenerator extends Thread { |
||
46 | |||
47 | 27140 | csanchez | private Logger log = LoggerFactory.getLogger(LayerGenerator.class); |
48 | 26843 | vsanjaime | private File file = null; |
49 | private boolean apto = true; |
||
50 | |||
51 | /**
|
||
52 | * Constructor
|
||
53 | */
|
||
54 | public LayerGenerator() {
|
||
55 | super();
|
||
56 | } |
||
57 | |||
58 | /**
|
||
59 | * Constructor with file
|
||
60 | *
|
||
61 | * @param file
|
||
62 | */
|
||
63 | public LayerGenerator(File file) { |
||
64 | this();
|
||
65 | this.file = file;
|
||
66 | } |
||
67 | |||
68 | /**
|
||
69 | * Run
|
||
70 | */
|
||
71 | public void run() { |
||
72 | 26851 | vsanjaime | // //name
|
73 | // String name = this.file.getName();
|
||
74 | // //layerdefinition
|
||
75 | // LayerDefinition def = new LayerDefinition();
|
||
76 | // def.setShapeType(FShape.POINT);
|
||
77 | // def.setProjection(GeocoUtils.getCurrentView().getProjection());
|
||
78 | // //Features
|
||
79 | // List<IFeature> features = createFeatures();
|
||
80 | // ////Driver
|
||
81 | // VectorialDriver driver = new FeatureCollectionMemoryDriver(name,
|
||
82 | // features, def);
|
||
83 | // FLyrVect lyr = new FLyrVect();
|
||
84 | 26843 | vsanjaime | |
85 | 27564 | vsanjaime | |
86 | |||
87 | 26843 | vsanjaime | } |
88 | |||
89 | /**
|
||
90 | * @return the apto
|
||
91 | */
|
||
92 | public boolean isApto() { |
||
93 | return apto;
|
||
94 | } |
||
95 | |||
96 | /**
|
||
97 | * @return the file
|
||
98 | */
|
||
99 | public File getFile() { |
||
100 | return file;
|
||
101 | } |
||
102 | |||
103 | /**
|
||
104 | *
|
||
105 | * @return
|
||
106 | */
|
||
107 | 26851 | vsanjaime | private List<Feature> createFeatures() { |
108 | 26843 | vsanjaime | |
109 | return null; |
||
110 | } |
||
111 | |||
112 | } |