svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.swing / org.gvsig.fmap.dal.swing.impl / src / main / java / org / gvsig / fmap / dal / swing / impl / DefaultDataSwingManager.java @ 45739
History | View | Annotate | Download (20.1 KB)
1 |
/* gvSIG. Desktop Geographic Information System.
|
---|---|
2 |
*
|
3 |
* Copyright ? 2007-2014 gvSIG Association
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18 |
* MA 02110-1301, USA.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
package org.gvsig.fmap.dal.swing.impl; |
24 |
|
25 |
import java.util.Collection; |
26 |
import java.util.Collections; |
27 |
import java.util.HashMap; |
28 |
import java.util.LinkedHashMap; |
29 |
import java.util.List; |
30 |
import java.util.Map; |
31 |
import java.util.function.Predicate; |
32 |
import javax.swing.AbstractButton; |
33 |
import javax.swing.Action; |
34 |
import javax.swing.JButton; |
35 |
import javax.swing.JComboBox; |
36 |
import javax.swing.JList; |
37 |
import javax.swing.JTextField; |
38 |
import javax.swing.table.TableModel; |
39 |
import javax.swing.text.JTextComponent; |
40 |
import org.apache.commons.lang3.StringUtils; |
41 |
import org.gvsig.expressionevaluator.swing.Element; |
42 |
import org.gvsig.expressionevaluator.swing.ExpressionBuilderConfig; |
43 |
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingLocator; |
44 |
import org.gvsig.expressionevaluator.swing.ExpressionEvaluatorSwingManager; |
45 |
import org.gvsig.expressionevaluator.swing.ExpressionPickerController; |
46 |
import org.gvsig.expressionevaluator.swing.JExpressionBuilder; |
47 |
import org.gvsig.featureform.swing.CreateJFeatureFormException; |
48 |
import org.gvsig.featureform.swing.JFeatureForm; |
49 |
|
50 |
import org.gvsig.featureform.swing.JFeaturesForm; |
51 |
import org.gvsig.featureform.swing.impl.DefaultJFeatureForm; |
52 |
import org.gvsig.featureform.swing.impl.DefaultJFeaturesForm; |
53 |
import org.gvsig.fmap.dal.DALLocator; |
54 |
import org.gvsig.fmap.dal.DataManager; |
55 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
56 |
import org.gvsig.fmap.dal.exception.DataException; |
57 |
import org.gvsig.fmap.dal.expressionevaluator.FeatureSymbolTable; |
58 |
import org.gvsig.fmap.dal.feature.Feature; |
59 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
60 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
61 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
62 |
import org.gvsig.fmap.dal.feature.FeatureStoreProviderFactory; |
63 |
import org.gvsig.fmap.dal.feature.FeatureType; |
64 |
import org.gvsig.fmap.dal.feature.FeatureTypeDefinitionsManager; |
65 |
import org.gvsig.fmap.dal.feature.paging.FeaturePagingHelper; |
66 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
67 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
68 |
import org.gvsig.fmap.dal.swing.FeatureTableModel; |
69 |
import org.gvsig.fmap.dal.swing.JFeatureTable; |
70 |
import org.gvsig.fmap.dal.swing.expressionevaluator.FeatureStoreElement; |
71 |
import org.gvsig.fmap.dal.swing.featuretype.AttributeDescriptorPickerController; |
72 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypeAttributePanel; |
73 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureTypePanel; |
74 |
import org.gvsig.fmap.dal.swing.impl.expressionevaluator.DefaultFeatureStoreElement2; |
75 |
import org.gvsig.fmap.dal.swing.impl.featuretable.FeatureTablePanel; |
76 |
import org.gvsig.fmap.dal.swing.impl.featuretable.table.DefaultFeatureTableModel; |
77 |
import org.gvsig.fmap.dal.swing.impl.featuretable.table.EmptyFeatureTableModel; |
78 |
import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultAttributeDescriptorPickerController; |
79 |
import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureAttributePanel; |
80 |
import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureTypePanel; |
81 |
import org.gvsig.fmap.dal.swing.impl.jdbc.DefaultJDBCConnectionPanel; |
82 |
import org.gvsig.fmap.dal.swing.impl.searchpanel.DefaultSearchPanel; |
83 |
import org.gvsig.fmap.dal.swing.impl.actions.SelectionAddAction.SelectionAddActionFactory; |
84 |
import org.gvsig.fmap.dal.swing.impl.actions.SelectionFilterAction.SelectionFilterActionFactory; |
85 |
import org.gvsig.fmap.dal.swing.impl.actions.SelectionSetAction.SelectionSetActionFactory; |
86 |
import org.gvsig.fmap.dal.swing.impl.actions.ShowFormAction.ShowFormActionFactory; |
87 |
import org.gvsig.fmap.dal.swing.jdbc.JDBCConnectionPanel; |
88 |
import org.gvsig.fmap.dal.swing.searchpanel.FeatureStoreSearchPanel; |
89 |
import org.gvsig.tools.dynform.DynFormLocator; |
90 |
import org.gvsig.tools.dynobject.DynClass; |
91 |
import org.gvsig.tools.dynobject.DynStruct; |
92 |
import org.gvsig.tools.exception.BaseException; |
93 |
import org.gvsig.fmap.dal.swing.DALActionFactory; |
94 |
import org.gvsig.fmap.dal.swing.DALActionFactory.DALActionContext; |
95 |
import org.gvsig.fmap.dal.swing.ProjectionPickerController; |
96 |
import org.gvsig.fmap.dal.swing.impl.featuretable.SimpleFeaturesTableModelImpl; |
97 |
import org.gvsig.fmap.dal.swing.impl.featuretype.FeatureAttributeListCellRendererImpl; |
98 |
import org.gvsig.fmap.dal.swing.impl.featuretype.DefaultFeatureAttributesSelectionPanel; |
99 |
import org.gvsig.fmap.dal.swing.impl.jdbc.DefaultJDBCConnectionDialog; |
100 |
import org.gvsig.fmap.dal.swing.impl.jdbc.JDBCConnectionPickerController; |
101 |
import org.gvsig.fmap.dal.swing.impl.featurequery.DefaultFeatureQueryOrderPanel; |
102 |
import org.gvsig.fmap.dal.swing.jdbc.JDBCConnectionDialog; |
103 |
import org.gvsig.fmap.dal.swing.searchpanel.SearchConditionPanel.SearchConditionPanelFactory; |
104 |
import org.gvsig.tools.swing.api.pickercontroller.PickerController; |
105 |
import org.gvsig.fmap.dal.swing.featurequery.FeatureQueryOrderPanel; |
106 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureAttributeListCellRenderer; |
107 |
import org.gvsig.fmap.dal.swing.featuretype.FeatureAttributesSelectionPanel; |
108 |
import org.gvsig.fmap.dal.swing.impl.expressionevaluator.suggestions.CheckTableFieldsSuggestionProviderFactory; |
109 |
import org.gvsig.fmap.dal.swing.impl.expressionevaluator.suggestions.QuotesForFieldNameSuggestionProviderFactory; |
110 |
import org.gvsig.fmap.dal.swing.impl.expressionevaluator.suggestions.StorePointFieldSuggestionProviderFactory; |
111 |
import org.gvsig.fmap.dal.swing.impl.expressionevaluator.suggestions.WrongNameFieldSuggestionProviderFactory; |
112 |
import org.gvsig.fmap.dal.swing.searchPostProcess.SearchPostProcessFactory; |
113 |
import org.gvsig.tools.dynform.DynFormDefinition; |
114 |
|
115 |
|
116 |
/**
|
117 |
* @author fdiaz
|
118 |
*
|
119 |
*/
|
120 |
@SuppressWarnings("UseSpecificCatch") |
121 |
public class DefaultDataSwingManager implements DataSwingManager { |
122 |
|
123 |
private final Map<String,DALActionFactory> featureStoreSearchActions; |
124 |
private final Map<String,SearchPostProcessFactory> searchPostProcess; |
125 |
private Map<String,SearchConditionPanelFactory> searchConditionPanelFactories; |
126 |
|
127 |
public DefaultDataSwingManager() {
|
128 |
this.featureStoreSearchActions = new LinkedHashMap<>(); |
129 |
this.registerStoreAction(new SelectionAddActionFactory()); |
130 |
this.registerStoreAction(new SelectionFilterActionFactory()); |
131 |
this.registerStoreAction(new SelectionSetActionFactory()); |
132 |
this.registerStoreAction(new ShowFormActionFactory()); |
133 |
|
134 |
this.searchPostProcess = new HashMap<>(); |
135 |
} |
136 |
|
137 |
@Override
|
138 |
public JFeaturesForm createJFeaturesForm(FeatureStore store) throws CreateJFeatureFormException { |
139 |
try {
|
140 |
FeatureType featureType = store.getDefaultFeatureType(); |
141 |
|
142 |
DefaultJFeaturesForm form = new DefaultJFeaturesForm();
|
143 |
form.bind(store, featureType2DynClass(store, featureType), null);
|
144 |
return form;
|
145 |
|
146 |
} catch (Exception ex) { |
147 |
throw new CreateJFeatureFormException(ex); |
148 |
} |
149 |
} |
150 |
|
151 |
@Override
|
152 |
public JFeaturesForm createJFeaturesForm(FeatureStore store, FeatureQuery query) throws CreateJFeatureFormException { |
153 |
try {
|
154 |
FeatureType featureType = store.getDefaultFeatureType(); |
155 |
|
156 |
DefaultJFeaturesForm form = new DefaultJFeaturesForm();
|
157 |
form.bind(store, featureType2DynClass(store, featureType), query); |
158 |
return form;
|
159 |
|
160 |
} catch (Exception ex) { |
161 |
throw new CreateJFeatureFormException(ex); |
162 |
} |
163 |
} |
164 |
|
165 |
public DynClass featureType2DynClass(FeatureStore store, FeatureType type) {
|
166 |
FeatureTypeDefinitionsManager featureTypeDefinitionsManager = DALLocator.getFeatureTypeDefinitionsManager(); |
167 |
if( featureTypeDefinitionsManager.contains(store,type) ) {
|
168 |
// Force reload next call to get.
|
169 |
featureTypeDefinitionsManager.remove(store,type); |
170 |
} |
171 |
DynClass dynClass = featureTypeDefinitionsManager.get(store,type); |
172 |
// Force reload next call to get.
|
173 |
DynFormLocator.getDynFormManager().removeDefinition(dynClass.getName()); |
174 |
return dynClass;
|
175 |
} |
176 |
|
177 |
@Override
|
178 |
public JDBCConnectionPanel createJDBCConnectionPanel() {
|
179 |
JDBCConnectionPanel x = new DefaultJDBCConnectionPanel();
|
180 |
return x;
|
181 |
} |
182 |
|
183 |
@Override
|
184 |
public JDBCConnectionDialog createJDBCConectionDialog() {
|
185 |
JDBCConnectionDialog x = new DefaultJDBCConnectionDialog();
|
186 |
return x;
|
187 |
} |
188 |
|
189 |
@Override
|
190 |
public void configureExpressionBuilder(ExpressionBuilderConfig builder, FeatureStore store) { |
191 |
DataManager dataManager = DALLocator.getDataManager(); |
192 |
ExpressionEvaluatorSwingManager swingManager = ExpressionEvaluatorSwingLocator.getManager(); |
193 |
FeatureSymbolTable featureSymbolTable = dataManager.createFeatureSymbolTable(); |
194 |
|
195 |
FeatureStoreProviderFactory storeFactory = (FeatureStoreProviderFactory) store.getProviderFactory(); |
196 |
Feature sampleFeature = store.getSampleFeature(); |
197 |
builder.setAllowedFunctions(storeFactory.allowFunction()); |
198 |
if( sampleFeature!=null ) { |
199 |
featureSymbolTable.setFeature(sampleFeature); |
200 |
builder.setPreviewSymbolTable(featureSymbolTable.createParent()); |
201 |
} |
202 |
builder.addSymbolTable(featureSymbolTable); |
203 |
FeatureStoreElement storeElement = new DefaultFeatureStoreElement2(store);
|
204 |
builder.addElement(storeElement); |
205 |
if( store.getProviderFactory().hasSQLSupport()==DataStoreProviderFactory.YES ) {
|
206 |
builder.getPreferences().setSQLCompatible(true);
|
207 |
} |
208 |
builder.addSuggestionFactory(new StorePointFieldSuggestionProviderFactory(store));
|
209 |
builder.addSuggestionFactory(new QuotesForFieldNameSuggestionProviderFactory(store));
|
210 |
builder.addSuggestionFactory(new WrongNameFieldSuggestionProviderFactory(store));
|
211 |
builder.addSuggestionFactory(new CheckTableFieldsSuggestionProviderFactory(store));
|
212 |
} |
213 |
|
214 |
@Override
|
215 |
public JExpressionBuilder createQueryFilterExpresion(FeatureStore store) {
|
216 |
return this.createJExpressionBuilder(store); |
217 |
} |
218 |
|
219 |
@Override
|
220 |
public JExpressionBuilder createJExpressionBuilder(final FeatureStore store) { |
221 |
ExpressionEvaluatorSwingManager expressionSwingManager = ExpressionEvaluatorSwingLocator.getManager(); |
222 |
final JExpressionBuilder builder = expressionSwingManager.createJExpressionBuilder();
|
223 |
this.configureExpressionBuilder(builder, store);
|
224 |
builder.expandElement( |
225 |
(Element t) -> t!=null && StringUtils.equals(t.getName(),store.getName()) |
226 |
); |
227 |
return builder;
|
228 |
} |
229 |
|
230 |
@Override
|
231 |
public ExpressionPickerController createExpressionPickerController(FeatureStore store, JTextComponent text, JButton button, JButton bookmarks, JButton history) { |
232 |
ExpressionEvaluatorSwingManager expressionSwingManager = ExpressionEvaluatorSwingLocator.getManager(); |
233 |
ExpressionPickerController builder = expressionSwingManager.createExpressionPickerController(text, button, bookmarks, history); |
234 |
this.configureExpressionBuilder(builder, store);
|
235 |
return builder;
|
236 |
} |
237 |
|
238 |
@Override
|
239 |
public JFeatureForm createJFeatureForm(FeatureStore store) throws CreateJFeatureFormException { |
240 |
JFeatureForm form = new DefaultJFeatureForm();
|
241 |
form.setStore(store); |
242 |
return form;
|
243 |
} |
244 |
|
245 |
@Override
|
246 |
public JFeatureForm createJFeatureForm(Feature feature) throws CreateJFeatureFormException { |
247 |
JFeatureForm form = new DefaultJFeatureForm();
|
248 |
form.setFeature(feature); |
249 |
return form;
|
250 |
} |
251 |
|
252 |
@Override
|
253 |
public JFeatureForm createJFeatureForm(DynFormDefinition definicion) throws CreateJFeatureFormException { |
254 |
JFeatureForm form = new DefaultJFeatureForm();
|
255 |
form.setDefinition(definicion); |
256 |
return form;
|
257 |
} |
258 |
|
259 |
@Override
|
260 |
public JFeatureTable createJFeatureTable(FeatureTableModel model) {
|
261 |
return this.createJFeatureTable(model, true); |
262 |
} |
263 |
|
264 |
@Override
|
265 |
public JFeatureTable createJFeatureTable(FeatureTableModel model, boolean isDoubleBuffered) { |
266 |
return new FeatureTablePanel(model, isDoubleBuffered); |
267 |
} |
268 |
|
269 |
@Override
|
270 |
public FeatureTableModel createEmptyFeatureTableModel(DynStruct struct) {
|
271 |
return new EmptyFeatureTableModel(struct); |
272 |
} |
273 |
|
274 |
@Override
|
275 |
public FeatureTableModel createFeatureTableModel(FeatureStore featureStore,
|
276 |
FeatureQuery featureQuery) { |
277 |
try {
|
278 |
FeaturePagingHelper pager = DALLocator.getDataManager().createFeaturePagingHelper( |
279 |
featureStore, featureQuery, |
280 |
FeaturePagingHelper.DEFAULT_PAGE_SIZE |
281 |
); |
282 |
return this.createFeatureTableModel(pager); |
283 |
} catch (BaseException ex) {
|
284 |
throw new RuntimeException("Can't create a FeatureTableModel.", ex); |
285 |
} |
286 |
} |
287 |
|
288 |
@Override
|
289 |
public FeatureTableModel createFeatureTableModel(FeaturePagingHelper featurePager) {
|
290 |
return new DefaultFeatureTableModel(featurePager); |
291 |
} |
292 |
|
293 |
@Override
|
294 |
public ProjectionPickerController createProjectionPickerController(
|
295 |
JTextField txtProjection,
|
296 |
JButton btnSelectProjection
|
297 |
) { |
298 |
ProjectionPickerControllerImpl picker = new ProjectionPickerControllerImpl(txtProjection, btnSelectProjection);
|
299 |
return picker;
|
300 |
} |
301 |
|
302 |
@Override
|
303 |
public AttributeDescriptorPickerController createAttributeDescriptorPickerController(JComboBox combo) { |
304 |
AttributeDescriptorPickerController controller = new DefaultAttributeDescriptorPickerController(combo, null); |
305 |
return controller;
|
306 |
} |
307 |
|
308 |
@Override
|
309 |
public AttributeDescriptorPickerController createAttributeDescriptorPickerController(JList list) { |
310 |
AttributeDescriptorPickerController controller = new DefaultAttributeDescriptorPickerController(list, null); |
311 |
return controller;
|
312 |
} |
313 |
|
314 |
@Override
|
315 |
public AttributeDescriptorPickerController createAttributeDescriptorPickerController(JComboBox combo, Predicate<FeatureAttributeDescriptor> filter) { |
316 |
AttributeDescriptorPickerController controller = new DefaultAttributeDescriptorPickerController(combo, filter);
|
317 |
return controller;
|
318 |
} |
319 |
|
320 |
@Override
|
321 |
public AttributeDescriptorPickerController createAttributeDescriptorPickerController(JList list, Predicate<FeatureAttributeDescriptor> filter) { |
322 |
AttributeDescriptorPickerController controller = new DefaultAttributeDescriptorPickerController(list, filter);
|
323 |
return controller;
|
324 |
} |
325 |
|
326 |
@Override
|
327 |
public FeatureTypePanel createFeatureTypePanel() {
|
328 |
FeatureTypePanel panel = new DefaultFeatureTypePanel();
|
329 |
return panel;
|
330 |
} |
331 |
|
332 |
@Override
|
333 |
public FeatureTypeAttributePanel createFeatureTypeAttributePanel() {
|
334 |
FeatureTypeAttributePanel panel = new DefaultFeatureAttributePanel();
|
335 |
return panel;
|
336 |
} |
337 |
|
338 |
@Override
|
339 |
public FeatureStoreElement createFeatureStoreElement() {
|
340 |
FeatureStoreElement e = new DefaultFeatureStoreElement2(null); |
341 |
return e;
|
342 |
} |
343 |
|
344 |
@Override
|
345 |
public FeatureStoreElement createFeatureStoreElement(FeatureStore store) {
|
346 |
FeatureStoreElement e = new DefaultFeatureStoreElement2(store);
|
347 |
return e;
|
348 |
} |
349 |
|
350 |
@Override
|
351 |
public ExpressionPickerController createExpressionPickerController(FeatureStore store, JTextComponent text, JButton button) { |
352 |
FeatureSymbolTable previewSymbolTable = DALLocator.getManager().createFeatureSymbolTable(); |
353 |
previewSymbolTable.setFeature(store.getSampleFeature()); |
354 |
|
355 |
ExpressionPickerController controller = ExpressionEvaluatorSwingLocator.getManager().createExpressionPickerController(text, button); |
356 |
controller.addElement(this.createFeatureStoreElement(store));
|
357 |
controller.setPreviewSymbolTable(previewSymbolTable); |
358 |
|
359 |
return controller;
|
360 |
} |
361 |
|
362 |
|
363 |
@Override
|
364 |
public FeatureStoreSearchPanel createFeatureStoreSearchPanel(FeatureStore store) {
|
365 |
DefaultSearchPanel e = new DefaultSearchPanel(store);
|
366 |
return e;
|
367 |
} |
368 |
|
369 |
@Override
|
370 |
public final void registerStoreAction(DALActionFactory action) { |
371 |
this.featureStoreSearchActions.put(action.getName().toLowerCase(), action);
|
372 |
} |
373 |
|
374 |
@Override
|
375 |
public Collection<DALActionFactory> getStoreActions() { |
376 |
return Collections.unmodifiableCollection(this.featureStoreSearchActions.values()); |
377 |
} |
378 |
|
379 |
@Override
|
380 |
public DALActionFactory getStoreAction(String name) { |
381 |
DALActionFactory action = this.featureStoreSearchActions.get(name.toLowerCase());
|
382 |
return action;
|
383 |
} |
384 |
|
385 |
@Override
|
386 |
public void setStoreAction(AbstractButton component, String name, boolean preserveLabel, DALActionContext context) { |
387 |
DALActionFactory factory = this.getStoreAction(name);
|
388 |
Action action = factory.createAction(context);
|
389 |
if( preserveLabel ) {
|
390 |
String s = component.getText();
|
391 |
component.setAction(action); |
392 |
component.setText(s); |
393 |
} else {
|
394 |
component.setAction(action); |
395 |
} |
396 |
} |
397 |
|
398 |
|
399 |
@Override
|
400 |
public PickerController<JDBCServerExplorerParameters> createJDBCConnectionPickerController(
|
401 |
JComboBox cboConnection, JButton btnConnection |
402 |
) { |
403 |
JDBCConnectionPickerController x = new JDBCConnectionPickerController(cboConnection, btnConnection);
|
404 |
return x;
|
405 |
} |
406 |
|
407 |
@Override
|
408 |
public TableModel createSimpleFeaturesTableModel(FeatureStore store) { |
409 |
try {
|
410 |
SimpleFeaturesTableModelImpl m = new SimpleFeaturesTableModelImpl(store);
|
411 |
return m;
|
412 |
} catch (DataException ex) {
|
413 |
throw new RuntimeException("Can't creatre SimpleFeaturesTableModel.", ex); |
414 |
} |
415 |
} |
416 |
|
417 |
@Override
|
418 |
public TableModel createSimpleFeaturesTableModel(FeatureType featureType, List<String> columnNames, List<Feature> features) { |
419 |
SimpleFeaturesTableModelImpl m = new SimpleFeaturesTableModelImpl(featureType, columnNames, features);
|
420 |
return m;
|
421 |
} |
422 |
|
423 |
@Override
|
424 |
public FeatureAttributeListCellRenderer createDefaultFeatureAttributeListCellRenderer() {
|
425 |
FeatureAttributeListCellRenderer r = new FeatureAttributeListCellRendererImpl();
|
426 |
return r;
|
427 |
} |
428 |
|
429 |
@Override
|
430 |
public FeatureQueryOrderPanel createFeatureStoreOrderPanel() {
|
431 |
DefaultFeatureQueryOrderPanel p = new DefaultFeatureQueryOrderPanel();
|
432 |
return p;
|
433 |
} |
434 |
|
435 |
@Override
|
436 |
public Iterable<SearchConditionPanelFactory> getSearchConditionPanels() { |
437 |
if( this.searchConditionPanelFactories==null ) { |
438 |
return Collections.EMPTY_LIST; |
439 |
} |
440 |
return this.searchConditionPanelFactories.values(); |
441 |
} |
442 |
|
443 |
@Override
|
444 |
public void registerSearchConditionPanel(SearchConditionPanelFactory factory) { |
445 |
if( this.searchConditionPanelFactories==null ) { |
446 |
this.searchConditionPanelFactories = new HashMap<>(); |
447 |
} |
448 |
this.searchConditionPanelFactories.put(factory.getName(), factory);
|
449 |
} |
450 |
|
451 |
@Override
|
452 |
public FeatureAttributesSelectionPanel createFeatureAttributeSelectionPanel() {
|
453 |
FeatureAttributesSelectionPanel p = new DefaultFeatureAttributesSelectionPanel();
|
454 |
return p;
|
455 |
} |
456 |
|
457 |
@Override
|
458 |
public void registerSearchPostProcess(SearchPostProcessFactory process) { |
459 |
this.searchPostProcess.put(process.getName(), process);
|
460 |
} |
461 |
|
462 |
@Override
|
463 |
public Map<String,SearchPostProcessFactory> getSearchPostProcess() { |
464 |
return this.searchPostProcess; |
465 |
} |
466 |
|
467 |
@Override
|
468 |
public SearchPostProcessFactory getSearchPostProcess(String name) { |
469 |
SearchPostProcessFactory process = this.searchPostProcess.get(name);
|
470 |
return process;
|
471 |
} |
472 |
|
473 |
} |
474 |
|
475 |
|