Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.spi / src / main / java / org / gvsig / fmap / dal / feature / spi / FeatureSetProvider.java @ 40559

History | View | Annotate | Download (4.41 KB)

1 40559 jjdelcerro
/**
2
 * gvSIG. Desktop Geographic Information System.
3 40435 jjdelcerro
 *
4 40559 jjdelcerro
 * Copyright (C) 2007-2013 gvSIG Association.
5 40435 jjdelcerro
 *
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 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
 *
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 40559 jjdelcerro
 * 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 {{Company}}   {{Task}}
27
 */
28
29
package org.gvsig.fmap.dal.feature.spi;
30
31
import org.gvsig.fmap.dal.exception.DataException;
32
import org.gvsig.tools.dispose.Disposable;
33
import org.gvsig.tools.dispose.DisposableIterator;
34
35
/**
36
 * Interface for set of feature based data providers
37
 *
38
 *
39
 * @author jmvivo
40
 *
41
 */
42
public interface FeatureSetProvider extends Disposable {
43
44
        boolean canFilter();
45
46
        boolean canOrder();
47
48
        boolean canIterateFromIndex();
49
50
        long getSize() throws DataException;
51
52
        boolean isEmpty() throws DataException;
53
54
    /**
55
     * Returns an iterator over the elements in this set, in the order
56
     * (if any) defined when the collection was obtained.
57
     *
58
     * <p>
59
     * Fast in this case means that each of the elements returned may be a
60
     * reused or pooled object instance, so don't use it to be stored in any
61
     * way.
62
     * </p>
63
     * <p>
64
     * If you need to store one of the {@link FeatureProvider} of the iterator,
65
     * use the {@link FeatureProvider#getCopy()} to create a clone of the
66
     * object.
67
     * </p>
68
     *
69
     * @return an iterator of the elements in this collection (in proper
70
     *         sequence).
71
     *
72
     * @throws DataException
73
     *             if there is an error getting the iterator
74
     *
75
     * @deprecated use {@link #fastIterator()} instead
76
     */
77
        DisposableIterator iterator() throws DataException;
78
79
    /**
80
     * Returns an iterator over the elements in this set, in the order
81
     * (if any) defined when the collection was obtained.
82
     *
83
     * <p>
84
     * Fast in this case means that each of the elements returned may be a
85
     * reused or pooled object instance, so don't use it to be stored in any
86
     * way.
87
     * </p>
88
     * <p>
89
     * If you need to store one of the {@link FeatureProvider} of the iterator,
90
     * use the {@link FeatureProvider#getCopy()} to create a clone of the
91
     * object.
92
     * </p>
93
     *
94
     * @param index
95
     *            index of first element to be returned from the iterator (by a
96
     *            call to the <tt>next</tt> method).
97
     * @return an iterator of the elements in this collection (in proper
98
     *         sequence).
99
     *
100
     * @throws DataException
101
     *             if there is an error getting the iterator
102
     *
103
     * @deprecated use {@link #fastIterator()} instead
104
     */
105
        DisposableIterator iterator(long index) throws DataException;
106
107
    /**
108
     * Returns an iterator over the elements in this set, in the order
109
     * (if any) defined when the collection was obtained.
110
     *
111
     * @see #fastIterator()
112
     * @see #fastIterator(long)
113
     *
114
     * @return an iterator of the elements in this collection (in proper
115
     *         sequence).
116
     *
117
     * @throws DataException
118
     *             if there is an error getting the iterator
119
     */
120
    DisposableIterator fastIterator() throws DataException;
121
122
    /**
123
     * Returns an iterator over the elements in this set, in the order
124
     * (if any) defined when the collection was obtained.
125
     *
126
     * @see #fastIterator()
127
     * @see #fastIterator(long)
128
     *
129
     * @param index
130
     *            index of first element to be returned from the iterator (by a
131
     *            call to the <tt>next</tt> method).
132
     * @return an iterator of the elements in this collection (in proper
133
     *         sequence).
134
     *
135
     * @throws DataException
136
     *             if there is an error getting the iterator
137
     */
138
        DisposableIterator fastIterator(long index) throws DataException;
139
140
}