svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.file / org.gvsig.fmap.dal.file.lib / src / main / java / org / gvsig / fmap / dal / feature / spi / simpleprovider / SimpleSequentialReaderStoreProviderFactory.java @ 44242
History | View | Annotate | Download (2.94 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.fmap.dal.feature.spi.simpleprovider; |
25 |
|
26 |
import org.gvsig.fmap.dal.DataParameters; |
27 |
import org.gvsig.fmap.dal.DataStoreProvider; |
28 |
import org.gvsig.fmap.dal.exception.InitializeException; |
29 |
import org.gvsig.fmap.dal.feature.spi.AbstractFeatureStoreProviderFactory; |
30 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
31 |
import org.gvsig.tools.dynobject.DynObject; |
32 |
|
33 |
public class SimpleSequentialReaderStoreProviderFactory |
34 |
extends AbstractFeatureStoreProviderFactory
|
35 |
{ |
36 |
|
37 |
private final SimpleSequentialReaderFactory readerFactory; |
38 |
|
39 |
protected SimpleSequentialReaderStoreProviderFactory(SimpleSequentialReaderFactory readerFactory) {
|
40 |
super(readerFactory.getName(), readerFactory.getDescription());
|
41 |
this.readerFactory = readerFactory;
|
42 |
} |
43 |
|
44 |
public SimpleSequentialReaderFactory getReaderFactory() {
|
45 |
return this.readerFactory; |
46 |
} |
47 |
|
48 |
@Override
|
49 |
public DynObject createParameters() {
|
50 |
return new SimpleSequentialReaderStoreParameters(this.readerFactory); |
51 |
} |
52 |
|
53 |
@Override
|
54 |
public DataStoreProvider createProvider(
|
55 |
DataParameters parameters, |
56 |
DataStoreProviderServices providerServices) throws InitializeException {
|
57 |
return new SimpleSequentialReaderStoreProvider( |
58 |
this.readerFactory,
|
59 |
(SimpleSequentialReaderStoreParameters) parameters, |
60 |
providerServices |
61 |
); |
62 |
} |
63 |
|
64 |
@Override
|
65 |
public int allowCreate() { |
66 |
return NO;
|
67 |
} |
68 |
|
69 |
@Override
|
70 |
public int allowWrite() { |
71 |
return NO;
|
72 |
} |
73 |
|
74 |
@Override
|
75 |
public int allowRead() { |
76 |
return YES;
|
77 |
} |
78 |
|
79 |
@Override
|
80 |
public int hasRasterSupport() { |
81 |
return NO;
|
82 |
} |
83 |
|
84 |
@Override
|
85 |
public int hasTabularSupport() { |
86 |
return YES;
|
87 |
} |
88 |
|
89 |
@Override
|
90 |
public int hasVectorialSupport() { |
91 |
return YES;
|
92 |
} |
93 |
|
94 |
@Override
|
95 |
public int allowMultipleGeometryTypes() { |
96 |
return YES;
|
97 |
} |
98 |
|
99 |
@Override
|
100 |
public int allowEditableFeatureType() { |
101 |
return NO;
|
102 |
} |
103 |
|
104 |
} |