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 / BaseSimpleStoreProviderFactory.java @ 44057
History | View | Annotate | Download (2.76 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 BaseSimpleStoreProviderFactory |
34 |
extends AbstractFeatureStoreProviderFactory
|
35 |
{ |
36 |
|
37 |
private final SimpleReaderFactory readerFactory; |
38 |
|
39 |
protected BaseSimpleStoreProviderFactory(SimpleReaderFactory readerFactory) {
|
40 |
super(readerFactory.getName(), readerFactory.getDescription());
|
41 |
this.readerFactory = readerFactory;
|
42 |
} |
43 |
|
44 |
@Override
|
45 |
public DynObject createParameters() {
|
46 |
return new BaseSimpleStoreParameters(this.readerFactory); |
47 |
} |
48 |
|
49 |
@Override
|
50 |
public DataStoreProvider createProvider(
|
51 |
DataParameters parameters, |
52 |
DataStoreProviderServices providerServices) throws InitializeException {
|
53 |
return new BaseSimpleStoreProvider( |
54 |
this.readerFactory,
|
55 |
(BaseSimpleStoreParameters) parameters, |
56 |
providerServices |
57 |
); |
58 |
} |
59 |
|
60 |
@Override
|
61 |
public int allowCreate() { |
62 |
return NO;
|
63 |
} |
64 |
|
65 |
@Override
|
66 |
public int allowWrite() { |
67 |
return NO;
|
68 |
} |
69 |
|
70 |
@Override
|
71 |
public int allowRead() { |
72 |
return YES;
|
73 |
} |
74 |
|
75 |
@Override
|
76 |
public int hasRasterSupport() { |
77 |
return NO;
|
78 |
} |
79 |
|
80 |
@Override
|
81 |
public int hasTabularSupport() { |
82 |
return YES;
|
83 |
} |
84 |
|
85 |
@Override
|
86 |
public int hasVectorialSupport() { |
87 |
return YES;
|
88 |
} |
89 |
|
90 |
@Override
|
91 |
public int allowMultipleGeometryTypes() { |
92 |
return YES;
|
93 |
} |
94 |
|
95 |
@Override
|
96 |
public int allowEditableFeatureType() { |
97 |
return NO;
|
98 |
} |
99 |
|
100 |
} |