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 / FeatureIndexes.java @ 47082
History | View | Annotate | Download (2.4 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 |
/*
|
25 |
* AUTHORS (In addition to CIT):
|
26 |
* 2008 {{Company}} {{Task}}
|
27 |
*/
|
28 |
|
29 |
package org.gvsig.fmap.dal.feature; |
30 |
|
31 |
import java.util.Iterator; |
32 |
|
33 |
import org.gvsig.fmap.dal.feature.exception.FeatureIndexException; |
34 |
import org.gvsig.tools.evaluator.Evaluator; |
35 |
|
36 |
/**
|
37 |
* This interface gives access to a store's local indexes
|
38 |
* and also provides a delegated method for obtaining a
|
39 |
* resulting {@link FeatureSet} using the appropriate
|
40 |
* index given an {@link Evaluator}.
|
41 |
*
|
42 |
*
|
43 |
* @author jyarza
|
44 |
*
|
45 |
*/
|
46 |
public interface FeatureIndexes { |
47 |
|
48 |
|
49 |
/**
|
50 |
* Returns a FeatureIndex given the name with which it was created.
|
51 |
*
|
52 |
* @param name FeatureIndex name
|
53 |
*
|
54 |
* @return FeatureIndex or null if it is not found.
|
55 |
*/
|
56 |
public FeatureIndex getFeatureIndex(String name); |
57 |
|
58 |
/**
|
59 |
* Using the given evaluator attributes, choose and use an appropriate index
|
60 |
* to obtain a FeatureSet. If no index can be applied, then this method
|
61 |
* returns null
|
62 |
*
|
63 |
* @param evaluator
|
64 |
* @return FeatureSet or null if could not find any appropriate index.
|
65 |
* @throws FeatureIndexException
|
66 |
*
|
67 |
*/
|
68 |
public FeatureSet getFeatureSet(Evaluator evaluator)
|
69 |
throws FeatureIndexException;
|
70 |
|
71 |
/**
|
72 |
* Returns an iterator over the indexes. Elements are of type FeatureIndex.
|
73 |
*
|
74 |
* @return Iterator over the FeatureIndex(es).
|
75 |
*/
|
76 |
public Iterator iterator(); |
77 |
|
78 |
/**
|
79 |
* Returns if all the indexes are valid and might be used to get Features.
|
80 |
*
|
81 |
* @return if the indexes are valid
|
82 |
*/
|
83 |
public boolean areValid(); |
84 |
|
85 |
} |