svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extDalTransformJoin / src / org / gvsig / app / join / daltransform / JoinTransformGui.java @ 28897
History | View | Annotate | Download (3.4 KB)
1 |
/* 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 {Iver T.I.} {Task}
|
26 |
*/
|
27 |
|
28 |
package org.gvsig.app.join.daltransform; |
29 |
|
30 |
import java.util.ArrayList; |
31 |
import java.util.List; |
32 |
|
33 |
import javax.swing.JPanel; |
34 |
|
35 |
import org.gvsig.app.daltransform.gui.DataTransformGui; |
36 |
import org.gvsig.app.daltransform.gui.DataTransformWizard; |
37 |
import org.gvsig.app.daltransform.gui.DataTransformWizardModel; |
38 |
import org.gvsig.app.join.dal.feature.JoinTransform; |
39 |
import org.gvsig.fmap.dal.exception.DataException; |
40 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
41 |
import org.gvsig.fmap.dal.feature.FeatureStoreTransform; |
42 |
|
43 |
import com.iver.andami.PluginServices; |
44 |
|
45 |
/**
|
46 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
47 |
*/
|
48 |
public class JoinTransformGui implements DataTransformGui { |
49 |
private SelectSecondDataStoreWizard secondDataStoreWizard = null; |
50 |
private SelectParametersWizard parametersWizard = null; |
51 |
private List<DataTransformWizard> panels = null; |
52 |
|
53 |
public JoinTransformGui() {
|
54 |
super();
|
55 |
} |
56 |
|
57 |
/* (non-Javadoc)
|
58 |
* @see org.gvsig.app.daltransform.gui.FeatureTransformGui#createFeatureStoreTransform(org.gvsig.fmap.dal.feature.FeatureStore)
|
59 |
*/
|
60 |
public FeatureStoreTransform createFeatureStoreTransform(
|
61 |
FeatureStore featureStore) throws DataException {
|
62 |
JoinTransform transform = new JoinTransform();
|
63 |
transform.initialize(featureStore, |
64 |
secondDataStoreWizard.getSelectedFeatureStore(), |
65 |
parametersWizard.getKeyAttr1(), |
66 |
parametersWizard.getkeyAtrr2(), |
67 |
parametersWizard.getPrefix1(), |
68 |
parametersWizard.getPrefix2(), |
69 |
parametersWizard.getAttributes() |
70 |
); |
71 |
return transform;
|
72 |
} |
73 |
|
74 |
/* (non-Javadoc)
|
75 |
* @see org.gvsig.app.daltransform.gui.FeatureTransformGui#getDescription()
|
76 |
*/
|
77 |
public String getDescription() { |
78 |
return PluginServices.getText(this, "join_description"); |
79 |
} |
80 |
|
81 |
/* (non-Javadoc)
|
82 |
* @see org.gvsig.app.daltransform.gui.FeatureTransformGui#createPanels(org.gvsig.app.daltransform.gui.FeatureTransformWizardModel)
|
83 |
*/
|
84 |
public List<DataTransformWizard> createPanels( |
85 |
DataTransformWizardModel featureTransformWizardModel) { |
86 |
if (panels == null){ |
87 |
parametersWizard = new SelectParametersWizard(featureTransformWizardModel);
|
88 |
secondDataStoreWizard = new SelectSecondDataStoreWizard(featureTransformWizardModel);
|
89 |
panels = new ArrayList<DataTransformWizard>(); |
90 |
panels.add(secondDataStoreWizard); |
91 |
panels.add(parametersWizard); |
92 |
} |
93 |
return panels;
|
94 |
} |
95 |
|
96 |
/* (non-Javadoc)
|
97 |
* @see org.gvsig.app.daltransform.gui.FeatureTransformGui#getName()
|
98 |
*/
|
99 |
public String getName() { |
100 |
return PluginServices.getText(this, "join_name"); |
101 |
} |
102 |
|
103 |
} |
104 |
|