svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / feature / FeatureSelection.java @ 44923
History | View | Annotate | Download (2.81 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | 40435 | jjdelcerro | *
|
4 | 40559 | jjdelcerro | * Copyright (C) 2007-2013 gvSIG Association.
|
5 | *
|
||
6 | 40435 | jjdelcerro | * This program is free software; you can redistribute it and/or
|
7 | * modify it under the terms of the GNU General Public License
|
||
8 | 40559 | jjdelcerro | * as published by the Free Software Foundation; either version 3
|
9 | 40435 | jjdelcerro | * of the License, or (at your option) any later version.
|
10 | 40559 | jjdelcerro | *
|
11 | 40435 | jjdelcerro | * 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 | 40559 | jjdelcerro | *
|
16 | 40435 | jjdelcerro | * 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 | 40559 | jjdelcerro | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 | 40435 | jjdelcerro | * MA 02110-1301, USA.
|
20 | 40559 | jjdelcerro | *
|
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 | 40435 | jjdelcerro | */
|
24 | /*
|
||
25 | * AUTHORS (In addition to CIT):
|
||
26 | * 2008 {DiSiD Technologies} {Implement data selection}
|
||
27 | */
|
||
28 | package org.gvsig.fmap.dal.feature; |
||
29 | |||
30 | import org.gvsig.fmap.dal.exception.DataException; |
||
31 | import org.gvsig.tools.lang.Cloneable; |
||
32 | |||
33 | /**
|
||
34 | * Manages a selection of Features.
|
||
35 | *
|
||
36 | * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
|
||
37 | */
|
||
38 | public interface FeatureSelection extends FeatureReferenceSelection, |
||
39 | FeatureSet, Cloneable {
|
||
40 | |||
41 | /**
|
||
42 | * Adds a feature to the selection.
|
||
43 | *
|
||
44 | * @param feature
|
||
45 | * the selected feature
|
||
46 | * @return true if the feature was not selected before selecting it
|
||
47 | */
|
||
48 | boolean select(Feature feature);
|
||
49 | |||
50 | /**
|
||
51 | * Removes a feature from the selection.
|
||
52 | *
|
||
53 | * @param feature
|
||
54 | * the deselected feature
|
||
55 | * @return true if the feature was selected before deselecting it
|
||
56 | */
|
||
57 | boolean deselect(Feature feature);
|
||
58 | |||
59 | /**
|
||
60 | * Adds a DataSet of features to the selection.
|
||
61 | *
|
||
62 | * @param features
|
||
63 | * the selected features
|
||
64 | * @return true if any of the feature was not selected before selecting it
|
||
65 | * @throws DataException
|
||
66 | * if there is an error reading the FeatureSet values
|
||
67 | */
|
||
68 | boolean select(FeatureSet features) throws DataException; |
||
69 | |||
70 | /**
|
||
71 | * Removes a DataSet of features from the selection.
|
||
72 | *
|
||
73 | * @param features
|
||
74 | * the deselected features
|
||
75 | * @return true if any of the features was selected before deselecting it
|
||
76 | * @throws DataException
|
||
77 | * if there is an error reading the FeatureSet values
|
||
78 | */
|
||
79 | boolean deselect(FeatureSet features) throws DataException; |
||
80 | |||
81 | /**
|
||
82 | * Returns if a feature is selected.
|
||
83 | *
|
||
84 | * @param feature
|
||
85 | * to check
|
||
86 | * @return if it is selected
|
||
87 | */
|
||
88 | boolean isSelected(Feature feature);
|
||
89 | 44435 | jjdelcerro | |
90 | 44593 | omartinez | @Override
|
91 | 44435 | jjdelcerro | boolean isAvailable();
|
92 | 40435 | jjdelcerro | } |