01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library 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 GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data.postgis.fidmapper;
17:
18: import java.io.IOException;
19:
20: import org.geotools.data.jdbc.fidmapper.FIDMapper;
21:
22: /**
23: * Fid mappers used in versioned data store. <br>
24: * They do present the usual face to the internal, wrapped data store, but know how to remove
25: * revisions from the fid and how to handle cases where the key does not need to be generated
26: * because the feature is not really new, just a new version of the old one.
27: *
28: * @author aaime
29: * @since 2.4
30: */
31: public interface VersionedFIDMapper extends FIDMapper {
32: /**
33: * Given the FID exposed by the internal data store, build a representation that does not have
34: * the
35: *
36: * @param versionedFID
37: * @return
38: */
39: public String getUnversionedFid(String versionedFID);
40:
41: /**
42: * Given the external FID, returns the primary key column values (besides revision, of course)
43: *
44: * @param FID
45: * @return
46: * @throws IOException
47: */
48: public Object[] getUnversionedPKAttributes(String FID)
49: throws IOException;
50:
51: public String createVersionedFid(String extenalFID, long revision);
52: }
|