Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / spi / FeatureStoreProviderServices.java @ 38608

History | View | Annotate | Download (4.94 KB)

1 29391 jmvivo
/* 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
 * 2008 IVER T.I. S.A.   {{Task}}
26
 */
27
28 24496 jmvivo
package org.gvsig.fmap.dal.feature.spi;
29 23772 jjdelcerro
30
import java.util.List;
31
32 28671 jmvivo
import org.gvsig.fmap.dal.DataManager;
33 24505 jmvivo
import org.gvsig.fmap.dal.exception.DataException;
34 24496 jmvivo
import org.gvsig.fmap.dal.feature.EditableFeatureType;
35
import org.gvsig.fmap.dal.feature.Feature;
36
import org.gvsig.fmap.dal.feature.FeatureSelection;
37
import org.gvsig.fmap.dal.feature.FeatureStore;
38 34319 cordinyana
import org.gvsig.fmap.dal.feature.FeatureStoreNotification;
39 24496 jmvivo
import org.gvsig.fmap.dal.feature.FeatureType;
40 25785 jmvivo
import org.gvsig.fmap.dal.resource.Resource;
41 29326 jmvivo
import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
42 23772 jjdelcerro
43 29391 jmvivo
/**
44
 * Interface of Services for feature based data providers
45
 *
46
 * @author jmvivo
47
 *
48
 */
49 29326 jmvivo
public interface FeatureStoreProviderServices extends
50
                DataStoreProviderServices {
51 23772 jjdelcerro
52 29289 jmvivo
        /**
53
         * Call this to send a notification to observers of this store
54
         *
55
         * @param notification
56
         */
57 23772 jjdelcerro
        public void notifyChange(String notification);
58
59 29289 jmvivo
        /**
60 34319 cordinyana
         * Call this to send a notification to observers of this store
61
         *
62
         * @param notification
63
         */
64
        public void notifyChange(String notification, FeatureProvider data);
65
66
        /**
67
         * Call this to send a notification to observers of this store
68
         *
69
         * @param notification
70
         */
71 34320 cordinyana
        public void notifyChange(FeatureStoreNotification storeNotification);
72 34319 cordinyana
73
        /**
74 29289 jmvivo
         * Call this to send a notification to observers of this store relative to
75
         * Resources
76 34319 cordinyana
         *
77 29289 jmvivo
         * @param notification
78
         */
79 25785 jmvivo
        public void notifyChange(String notification, Resource resource);
80 23772 jjdelcerro
81 29289 jmvivo
        /**
82
         * Create a new instance of default implementation of a
83
         * {@link FeatureSelection}
84
         *
85
         * @return new {@link FeatureSelection}
86
         * @throws DataException
87
         */
88 23772 jjdelcerro
        public FeatureSelection createDefaultFeatureSelection()
89
                        throws DataException;
90
91 29289 jmvivo
        /**
92
         * Create a new instance of default implementation of a {@link FeatureProvider}
93
         *
94
         * @return new {@link FeatureProvider}
95
         * @throws DataException
96
         */
97 29292 jmvivo
        public FeatureProvider createDefaultFeatureProvider(FeatureType type)
98 23772 jjdelcerro
                        throws DataException;
99
100 29289 jmvivo
        /**
101
         * Sets {@link FeatureType} available from this store.<br>
102
         *
103
         * <strong>Note:</strong> <code>defaultType</code> must be in
104
         * <code>types</code>
105
         *
106
         * @param list
107
         *            of all {@link FeatureType} available
108
         * @param {@link FeatureType} used in
109
         *        {@link FeatureStore#getDefaultFeatureType()}
110
         */
111 23772 jjdelcerro
        public void setFeatureTypes(List types, FeatureType defaultType);
112
113 29289 jmvivo
        /**
114
         * Reaturn {@link DataManager} instance.
115
         *
116
         * @return
117
         */
118 27758 cordinyana
        public DataManager getManager();
119 23772 jjdelcerro
120 29289 jmvivo
        /**
121 29292 jmvivo
         * Create a {@link Feature} instance for {@link FeatureProvider}
122
         * <code>data</code>
123
         *
124
         * <br>
125
         * <br>
126
         * <strong>NOTE:</strong> Normaly <strong> Providers must use</strong>
127
         * {@link FeatureProvider} instances instead Feature
128
         *
129 29289 jmvivo
         * @param data
130 29292 jmvivo
         * @return a {@link Feature}
131 29289 jmvivo
         * @throws DataException
132
         */
133
        public Feature createFeature(FeatureProvider data)
134 23874 jjdelcerro
        throws DataException;
135
136 27262 jmvivo
        /**
137
         * Creates a new instance of EditableFeatureType. Uses 'default' as
138
         * identifier.
139
         *
140
         * @return
141
         */
142 23820 jjdelcerro
        public EditableFeatureType createFeatureType();
143
144 27262 jmvivo
        /**
145
         * Creates a new instance of EditableFeatureType. Uses 'id' as identifier.
146
         *
147
         * @return
148
         */
149
        public EditableFeatureType createFeatureType(String id);
150
151 29289 jmvivo
        /**
152
         * Return the instance of {@link FeatureStoreProvider} for this store.
153
         *
154
         * @return
155
         */
156 23820 jjdelcerro
        public FeatureStoreProvider getProvider();
157
158 23874 jjdelcerro
159 29289 jmvivo
        /**
160
         * Return original {@link FeatureType} of {@link FeatureStoreProvider}.
161
         *
162
         * @param id
163
         *            of the {@link FeatureType}
164
         * @return
165
         * @throws DataException
166
         */
167 28671 jmvivo
        public FeatureType getProviderFeatureType(String featureTypeId);
168
169 29289 jmvivo
        /**
170
         * Extract {@link FeatureProvider} from a {@link Feature} instance.
171
         *
172
         * @param feature
173
         * @return
174
         */
175 29292 jmvivo
        public FeatureProvider getFeatureProviderFromFeature(Feature feature);
176 29020 jmvivo
177 29326 jmvivo
        /**
178
         * Return current FeatureStore
179
         *
180
         * @return
181
         */
182
        public FeatureStore getFeatureStore();
183
184
        /**
185 33652 jjdelcerro
         * Return current FeatureStore name.
186 29326 jmvivo
         *
187
         * @return
188
         */
189
        public String getName();
190
191
        /**
192
         * Return default {@link FeatureType} of the store
193
         *
194
         * @return
195
         */
196
        public FeatureType getDefaultFeatureType() throws DataException;
197
198 23772 jjdelcerro
}