root / trunk / libraries / libFMap_dataDB / src / org / gvsig / data / datastores / vectorial / db / sde / SDENewStoreParameter.java @ 20841
History | View | Annotate | Download (2.3 KB)
1 |
|
---|---|
2 |
/* gvSIG. Geographic Information System of the Valencian Government
|
3 |
*
|
4 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
5 |
* of the Valencian Government (CIT)
|
6 |
*
|
7 |
* This program is free software; you can redistribute it and/or
|
8 |
* modify it under the terms of the GNU General Public License
|
9 |
* as published by the Free Software Foundation; either version 2
|
10 |
* of the License, or (at your option) any later version.
|
11 |
*
|
12 |
* This program is distributed in the hope that it will be useful,
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
* GNU General Public License for more details.
|
16 |
*
|
17 |
* You should have received a copy of the GNU General Public License
|
18 |
* along with this program; if not, write to the Free Software
|
19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20 |
* MA 02110-1301, USA.
|
21 |
*
|
22 |
*/
|
23 |
|
24 |
/*
|
25 |
* AUTHORS (In addition to CIT):
|
26 |
* ${year} IVER T.I. S.A. {{Task}}
|
27 |
*/
|
28 |
|
29 |
package org.gvsig.data.datastores.vectorial.db.sde; |
30 |
|
31 |
import org.gvsig.data.IDataStoreParameters; |
32 |
import org.gvsig.data.datastores.vectorial.db.DBFeatureType; |
33 |
import org.gvsig.data.datastores.vectorial.db.DBNewStoreParameter; |
34 |
|
35 |
|
36 |
/**
|
37 |
* DOCUMENT ME!
|
38 |
*
|
39 |
* @author Vicente Caballero Navarro
|
40 |
*/
|
41 |
public class SDENewStoreParameter extends DBNewStoreParameter { |
42 |
SDENewStoreParameter(IDataStoreParameters dsp) { |
43 |
this.init(dsp);
|
44 |
} |
45 |
|
46 |
/**
|
47 |
* DOCUMENT ME!
|
48 |
*
|
49 |
* @return DOCUMENT ME!
|
50 |
*/
|
51 |
public SDEStoreParameters getSDEParameters() {
|
52 |
return (SDEStoreParameters) this.dsparameters; |
53 |
} |
54 |
|
55 |
/**
|
56 |
* DOCUMENT ME!
|
57 |
*
|
58 |
* @return DOCUMENT ME!
|
59 |
*/
|
60 |
public DBFeatureType getDBFeatureType() {
|
61 |
return (DBFeatureType) this.featureType; |
62 |
} |
63 |
|
64 |
/**
|
65 |
* DOCUMENT ME!
|
66 |
*
|
67 |
* @return DOCUMENT ME!
|
68 |
*/
|
69 |
public String getDataStoreName() { |
70 |
return SDEStore.DATASTORE_NAME;
|
71 |
} |
72 |
|
73 |
/*
|
74 |
* (non-Javadoc)
|
75 |
* @see org.gvsig.data.INewDataStoreParameters#isValid()
|
76 |
*/
|
77 |
public boolean isValid() { |
78 |
if (!super.isValid()) { |
79 |
return false; |
80 |
} |
81 |
|
82 |
if (!(this.dsparameters instanceof SDEStoreParameters)) { |
83 |
return false; |
84 |
} |
85 |
|
86 |
if (this.getDBFeatureType().getFieldsId().length != 1) { |
87 |
return false; |
88 |
} |
89 |
|
90 |
return true; |
91 |
} |
92 |
} |