Revision 24491
branches/v2_0_0_prep/libraries/libFMap_daldb/src-test/org/gvsig/fmap/data/feature/db/jdbc/h2/SHP2H2FeaturesVisitor.java | ||
---|---|---|
9 | 9 |
import java.util.Iterator; |
10 | 10 |
|
11 | 11 |
import org.gvsig.tools.exception.BaseException; |
12 |
import org.gvsig.fmap.data.feature.Feature; |
|
13 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
14 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
12 |
import org.gvsig.fmap.dal.feature.Feature; |
|
13 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
14 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
15 |
import org.gvsig.fmap.dal.feature.visitor.BaseFeaturesVisitor; |
|
15 | 16 |
import org.gvsig.fmap.data.feature.db.jdbc.h2.H2StoreParameters; |
16 |
import org.gvsig.fmap.data.feature.visitor.BaseFeaturesVisitor; |
|
17 | 17 |
import org.gvsig.fmap.geom.Geometry; |
18 | 18 |
import org.gvsig.fmap.geom.operation.towkb.ToWKB; |
19 | 19 |
|
... | ... | |
100 | 100 |
} |
101 | 101 |
|
102 | 102 |
/* (non-Javadoc) |
103 |
* @see org.gvsig.fmap.data.feature.visitor.DefaultFeaturesVisitor#visit(org.gvsig.fmap.data.feature.Feature)
|
|
103 |
* @see org.gvsig.fmap.dal.feature.visitor.DefaultFeaturesVisitor#visit(org.gvsig.fmap.dal.feature.Feature)
|
|
104 | 104 |
*/ |
105 | 105 |
public void visit(Feature feature) throws BaseException { |
106 | 106 |
StringBuffer sb=new StringBuffer(); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src-test/org/gvsig/fmap/data/feature/db/jdbc/h2/H2Test.java | ||
---|---|---|
7 | 7 |
import java.sql.Statement; |
8 | 8 |
import java.util.Iterator; |
9 | 9 |
|
10 |
import org.gvsig.fmap.data.DataManager; |
|
11 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
12 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
13 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
14 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
15 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
16 |
import org.gvsig.fmap.data.exceptions.WriteException; |
|
17 |
import org.gvsig.fmap.data.feature.AbstractFeature; |
|
18 |
import org.gvsig.fmap.data.feature.Feature; |
|
19 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
20 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
21 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
22 |
import org.gvsig.fmap.data.feature.FeatureExplorer; |
|
23 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
10 |
import org.gvsig.fmap.dal.DataManager; |
|
11 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
12 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
13 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
14 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
15 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
16 |
import org.gvsig.fmap.dal.exceptions.WriteException; |
|
17 |
import org.gvsig.fmap.dal.feature.AbstractFeature; |
|
18 |
import org.gvsig.fmap.dal.feature.Feature; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureExplorer; |
|
21 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
22 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
23 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
24 |
import org.gvsig.fmap.dal.feature.file.shp.SHPStore; |
|
25 |
import org.gvsig.fmap.dal.feature.file.shp.SHPStoreParameters; |
|
26 |
import org.gvsig.fmap.dal.impl.DefaultDataManager; |
|
24 | 27 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
25 | 28 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
26 | 29 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCTest; |
27 |
import org.gvsig.fmap.data.feature.file.shp.SHPStore; |
|
28 |
import org.gvsig.fmap.data.feature.file.shp.SHPStoreParameters; |
|
29 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
|
30 | 30 |
import org.gvsig.tools.exception.BaseException; |
31 | 31 |
import org.h2.tools.Server; |
32 | 32 |
|
... | ... | |
131 | 131 |
|
132 | 132 |
public void shp2H2(File shpfile,H2StoreParameters h2Param) { |
133 | 133 |
System.out.println("======= SHP2H2 =============="); |
134 |
org.gvsig.fmap.data.feature.file.shp.Register.selfRegister();
|
|
135 |
org.gvsig.fmap.data.feature.file.dbf.Register.selfRegister();
|
|
134 |
org.gvsig.fmap.dal.shp.Register.selfRegister();
|
|
135 |
org.gvsig.fmap.dal.dbf.Register.selfRegister();
|
|
136 | 136 |
|
137 | 137 |
DataManager dsm=DefaultDataManager.getManager(); |
138 | 138 |
// File shpfile= new File(DataStoreTest.class.getResource("data/prueba.dbf").getFile()); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src-test/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/postgresqlBinTest.java | ||
---|---|---|
3 | 3 |
import java.util.Iterator; |
4 | 4 |
import java.util.NoSuchElementException; |
5 | 5 |
|
6 |
import org.gvsig.fmap.data.DataManager; |
|
7 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
8 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
9 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
10 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
11 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
6 |
import org.gvsig.fmap.dal.DataManager; |
|
7 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
8 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
9 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
10 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
11 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
12 |
import org.gvsig.fmap.dal.impl.DefaultDataManager; |
|
12 | 13 |
import org.gvsig.fmap.data.feature.db.DBTest; |
13 | 14 |
import org.gvsig.fmap.data.feature.db.jdbc.postgresqlbin.PostgresqlBinStore; |
14 | 15 |
import org.gvsig.fmap.data.feature.db.jdbc.postgresqlbin.PostgresqlBinStoreParameters; |
15 | 16 |
import org.gvsig.fmap.data.feature.db.jdbc.postgresqlbin.Register; |
16 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
|
17 | 17 |
|
18 | 18 |
public class postgresqlBinTest extends DBTest { |
19 | 19 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src-test/org/gvsig/fmap/data/feature/db/jdbc/PrepareResourceObserverTest.java | ||
---|---|---|
30 | 30 |
*/ |
31 | 31 |
package org.gvsig.fmap.data.feature.db.jdbc; |
32 | 32 |
|
33 |
import org.gvsig.fmap.data.exceptions.InitializeException;
|
|
34 |
import org.gvsig.fmap.data.resource.ResourceNotification;
|
|
33 |
import org.gvsig.fmap.dal.exceptions.InitializeException;
|
|
34 |
import org.gvsig.fmap.dal.resource.ResourceNotification;
|
|
35 | 35 |
import org.gvsig.tools.observer.Observable; |
36 | 36 |
import org.gvsig.tools.observer.Observer; |
37 | 37 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src-test/org/gvsig/fmap/data/feature/db/jdbc/postgresql/postgresqlTest.java | ||
---|---|---|
6 | 6 |
import java.util.Iterator; |
7 | 7 |
import java.util.NoSuchElementException; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.DataManager; |
|
10 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
11 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
12 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
13 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
14 |
import org.gvsig.fmap.data.exceptions.WriteException; |
|
15 |
import org.gvsig.fmap.data.feature.AbstractFeature; |
|
16 |
import org.gvsig.fmap.data.feature.Feature; |
|
17 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
18 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
19 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
9 |
import org.gvsig.fmap.dal.DataManager; |
|
10 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
11 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
12 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
13 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
14 |
import org.gvsig.fmap.dal.exceptions.WriteException; |
|
15 |
import org.gvsig.fmap.dal.feature.AbstractFeature; |
|
16 |
import org.gvsig.fmap.dal.feature.Feature; |
|
17 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
18 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
20 |
import org.gvsig.fmap.dal.feature.exceptions.IsNotAttributeSettingException; |
|
21 |
import org.gvsig.fmap.dal.impl.DefaultDataManager; |
|
20 | 22 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
21 | 23 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorerParameter; |
22 | 24 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCTest; |
23 |
import org.gvsig.fmap.data.feature.exceptions.IsNotAttributeSettingException; |
|
24 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
|
25 | 25 |
|
26 | 26 |
public class postgresqlTest extends JDBCTest { |
27 | 27 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src-test/org/gvsig/fmap/data/feature/db/DBTest.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import junit.framework.TestCase; |
6 | 6 |
|
7 |
import org.gvsig.fmap.data.DataSet; |
|
8 |
import org.gvsig.fmap.data.DataExplorer; |
|
9 |
import org.gvsig.fmap.data.DataExplorerParameters; |
|
10 |
import org.gvsig.fmap.data.DataManager; |
|
11 |
import org.gvsig.fmap.data.DataParameters; |
|
12 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
13 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
14 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
15 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
16 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
17 |
import org.gvsig.fmap.data.exceptions.WriteException; |
|
18 |
import org.gvsig.fmap.data.feature.Feature; |
|
19 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
20 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
21 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
7 |
import org.gvsig.fmap.dal.DataExplorer; |
|
8 |
import org.gvsig.fmap.dal.DataExplorerParameters; |
|
9 |
import org.gvsig.fmap.dal.DataManager; |
|
10 |
import org.gvsig.fmap.dal.DataParameters; |
|
11 |
import org.gvsig.fmap.dal.DataSet; |
|
12 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
13 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
14 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
15 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
16 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
17 |
import org.gvsig.fmap.dal.exceptions.WriteException; |
|
18 |
import org.gvsig.fmap.dal.feature.Feature; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
21 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
22 |
import org.gvsig.fmap.dal.feature.file.FileResource; |
|
23 |
import org.gvsig.fmap.dal.feature.impl.AbstractFeatureStore; |
|
24 |
import org.gvsig.fmap.dal.feature.visitor.PrintlnFeaturesVisitor; |
|
25 |
import org.gvsig.fmap.dal.impl.DefaultDataManager; |
|
26 |
import org.gvsig.fmap.dal.resource.ResourceManager; |
|
27 |
import org.gvsig.fmap.dal.resource.impl.DefaultResourceManager; |
|
28 |
import org.gvsig.fmap.dal.resource.spi.AbstractResource; |
|
22 | 29 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorer; |
23 | 30 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCResource; |
24 | 31 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStoreParameters; |
25 | 32 |
import org.gvsig.fmap.data.feature.db.jdbc.PrepareResourceObserverTest; |
26 |
import org.gvsig.fmap.data.feature.file.FileResource; |
|
27 |
import org.gvsig.fmap.data.feature.impl.AbstractFeatureStore; |
|
28 |
import org.gvsig.fmap.data.feature.visitor.PrintlnFeaturesVisitor; |
|
29 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
|
30 |
import org.gvsig.fmap.data.resource.ResourceManager; |
|
31 |
import org.gvsig.fmap.data.resource.impl.DefaultResourceManager; |
|
32 |
import org.gvsig.fmap.data.resource.spi.AbstractResource; |
|
33 | 33 |
import org.gvsig.fmap.geom.Geometry; |
34 | 34 |
import org.gvsig.fmap.geom.handler.Handler; |
35 | 35 |
import org.gvsig.tools.exception.BaseException; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/DBFeature.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.exceptions.ReadException;
|
|
4 |
import org.gvsig.fmap.data.feature.AbstractFeature;
|
|
5 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
3 |
import org.gvsig.fmap.dal.exceptions.ReadException;
|
|
4 |
import org.gvsig.fmap.dal.feature.AbstractFeature;
|
|
5 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
6 | 6 |
|
7 | 7 |
public abstract class DBFeature extends AbstractFeature{ |
8 | 8 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/DBStore.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db; |
2 | 2 |
|
3 | 3 |
|
4 |
import org.gvsig.fmap.data.exceptions.ReadException;
|
|
5 |
import org.gvsig.fmap.data.feature.Feature;
|
|
6 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor;
|
|
7 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
8 |
import org.gvsig.fmap.data.feature.impl.AbstractFeatureStore;
|
|
9 |
import org.gvsig.fmap.data.index.IndexException;
|
|
4 |
import org.gvsig.fmap.dal.exceptions.ReadException;
|
|
5 |
import org.gvsig.fmap.dal.feature.Feature;
|
|
6 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
|
|
7 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
8 |
import org.gvsig.fmap.dal.feature.impl.AbstractFeatureStore;
|
|
9 |
import org.gvsig.fmap.dal.index.IndexException;
|
|
10 | 10 |
|
11 | 11 |
public abstract class DBStore extends AbstractFeatureStore{ |
12 | 12 |
public abstract Feature getFeatureByID(FeatureType featureType2, Object[] featureKey) throws ReadException; |
13 | 13 |
/* (non-Javadoc) |
14 |
* @see org.gvsig.fmap.data.DataStore#isEditable()
|
|
14 |
* @see org.gvsig.fmap.dal.DataStore#isEditable()
|
|
15 | 15 |
*/ |
16 | 16 |
public boolean allowWrite() { |
17 | 17 |
return !((DBFeatureType)this.getDefaultFeatureType()).isReadOnly(); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/JDBCDriverNotFoundException.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.exceptions.InitializeException;
|
|
3 |
import org.gvsig.fmap.dal.exceptions.InitializeException;
|
|
4 | 4 |
|
5 | 5 |
|
6 | 6 |
public class JDBCDriverNotFoundException extends InitializeException { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/JDBCResource.java | ||
---|---|---|
33 | 33 |
import java.sql.Connection; |
34 | 34 |
import java.sql.SQLException; |
35 | 35 |
|
36 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
37 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
38 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
39 |
import org.gvsig.fmap.data.exceptions.OpenException; |
|
40 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
36 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
37 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
38 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
39 |
import org.gvsig.fmap.dal.exceptions.OpenException; |
|
40 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
41 |
import org.gvsig.fmap.dal.resource.exception.ResourceChangedException; |
|
41 | 42 |
import org.gvsig.fmap.data.feature.db.DBResource; |
42 |
import org.gvsig.fmap.data.resource.exception.ResourceChangedException; |
|
43 | 43 |
|
44 | 44 |
/** |
45 | 45 |
* @author jmvivo |
... | ... | |
50 | 50 |
protected String url; |
51 | 51 |
|
52 | 52 |
/* (non-Javadoc) |
53 |
* @see org.gvsig.fmap.data.Resource#doDispose()
|
|
53 |
* @see org.gvsig.fmap.dal.Resource#doDispose()
|
|
54 | 54 |
*/ |
55 | 55 |
protected void doDispose() throws DataException { |
56 | 56 |
Connection con =this.connection; |
... | ... | |
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
/* (non-Javadoc) |
68 |
* @see org.gvsig.fmap.data.Resource#doOpen()
|
|
68 |
* @see org.gvsig.fmap.dal.Resource#doOpen()
|
|
69 | 69 |
*/ |
70 | 70 |
protected boolean doOpen() throws OpenException { |
71 | 71 |
try { |
... | ... | |
88 | 88 |
} |
89 | 89 |
|
90 | 90 |
/* (non-Javadoc) |
91 |
* @see org.gvsig.fmap.data.Resource#doClose()
|
|
91 |
* @see org.gvsig.fmap.dal.Resource#doClose()
|
|
92 | 92 |
*/ |
93 | 93 |
protected boolean doClose() throws CloseException { |
94 | 94 |
try { |
... | ... | |
104 | 104 |
|
105 | 105 |
|
106 | 106 |
/* (non-Javadoc) |
107 |
* @see org.gvsig.fmap.data.Resource#description()
|
|
107 |
* @see org.gvsig.fmap.dal.Resource#description()
|
|
108 | 108 |
*/ |
109 | 109 |
public String getDescription() { |
110 | 110 |
return this.getName()+" JDBC Connection Resource: url='"+this.getUrl()+"' user='"+this.getUser()+"'"; |
111 | 111 |
} |
112 | 112 |
|
113 | 113 |
/* (non-Javadoc) |
114 |
* @see org.gvsig.fmap.data.Resource#doChanged()
|
|
114 |
* @see org.gvsig.fmap.dal.Resource#doChanged()
|
|
115 | 115 |
*/ |
116 | 116 |
protected void doChanged() { |
117 | 117 |
// No Operation |
... | ... | |
131 | 131 |
} |
132 | 132 |
|
133 | 133 |
/* (non-Javadoc) |
134 |
* @see org.gvsig.fmap.data.Resource#checkChanged()
|
|
134 |
* @see org.gvsig.fmap.dal.Resource#checkChanged()
|
|
135 | 135 |
*/ |
136 | 136 |
protected void checkChanged() throws ResourceChangedException { |
137 | 137 |
// NO Operation |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/PostgresqlBinFeature.java | ||
---|---|---|
8 | 8 |
import java.sql.Timestamp; |
9 | 9 |
import java.sql.Types; |
10 | 10 |
|
11 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
12 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
13 |
import org.gvsig.fmap.data.feature.Feature; |
|
14 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.data.feature.FeatureReference; |
|
16 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
11 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
12 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
13 |
import org.gvsig.fmap.dal.feature.Feature; |
|
14 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
16 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
17 |
import org.gvsig.fmap.dal.feature.exceptions.IsNotFeatureSettingException; |
|
17 | 18 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
18 | 19 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
19 | 20 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeature; |
20 | 21 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStore; |
21 |
import org.gvsig.fmap.data.feature.exceptions.IsNotFeatureSettingException; |
|
22 | 22 |
|
23 | 23 |
|
24 | 24 |
public class PostgresqlBinFeature extends JDBCFeature{ |
... | ... | |
50 | 50 |
|
51 | 51 |
|
52 | 52 |
/* (non-Javadoc) |
53 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCFeature#loadValueFromResulset(java.sql.ResultSet, org.gvsig.fmap.data.feature.FeatureAttributeDescriptor)
|
|
53 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCFeature#loadValueFromResulset(java.sql.ResultSet, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor)
|
|
54 | 54 |
*/ |
55 | 55 |
protected void loadValueFromResulset(ResultSet rs, FeatureAttributeDescriptor attr) throws ReadException { |
56 | 56 |
String name = attr.getName(); |
... | ... | |
179 | 179 |
|
180 | 180 |
|
181 | 181 |
/* (non-Javadoc) |
182 |
* @see org.gvsig.fmap.data.feature.AbstractFeature#cloneFeature()
|
|
182 |
* @see org.gvsig.fmap.dal.feature.AbstractFeature#cloneFeature()
|
|
183 | 183 |
*/ |
184 | 184 |
protected Feature cloneFeature() throws DataException { |
185 | 185 |
// TODO Auto-generated method stub |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/PostgresqlBinStore.java | ||
---|---|---|
6 | 6 |
import java.sql.Statement; |
7 | 7 |
import java.util.Locale; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.DataSet;
|
|
10 |
import org.gvsig.fmap.data.DataExplorer;
|
|
11 |
import org.gvsig.fmap.data.exceptions.DataException;
|
|
12 |
import org.gvsig.fmap.data.exceptions.ReadException;
|
|
13 |
import org.gvsig.fmap.data.feature.Feature;
|
|
14 |
import org.gvsig.fmap.data.feature.FeatureSet;
|
|
15 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
9 |
import org.gvsig.fmap.dal.DataExplorer;
|
|
10 |
import org.gvsig.fmap.dal.DataSet;
|
|
11 |
import org.gvsig.fmap.dal.exceptions.DataException;
|
|
12 |
import org.gvsig.fmap.dal.exceptions.ReadException;
|
|
13 |
import org.gvsig.fmap.dal.feature.Feature;
|
|
14 |
import org.gvsig.fmap.dal.feature.FeatureSet;
|
|
15 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
16 | 16 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
17 | 17 |
import org.gvsig.fmap.data.feature.db.DBResource; |
18 | 18 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeaturesWriter; |
... | ... | |
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
/* (non-Javadoc) |
33 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCStore#createResource(org.gvsig.fmap.data.feature.file.dbf.DBFStoreParameters)
|
|
33 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCStore#createResource(org.gvsig.fmap.dal.feature.file.dbf.DBFStoreParameters)
|
|
34 | 34 |
*/ |
35 | 35 |
protected DBResource createResource(JDBCStoreParameters params) { |
36 | 36 |
return new PostgresqlBinResource(params); |
... | ... | |
130 | 130 |
|
131 | 131 |
|
132 | 132 |
/* (non-Javadoc) |
133 |
* @see org.gvsig.fmap.data.feature.db.jdbc.postgresql.PostgresqlStore#getConnection()
|
|
133 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.postgresql.PostgresqlStore#getConnection()
|
|
134 | 134 |
*/ |
135 | 135 |
protected Connection getConnection() throws ReadException { |
136 | 136 |
return super.getConnection(); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/PostgresqlBinStoreUtils.java | ||
---|---|---|
6 | 6 |
import java.sql.ResultSetMetaData; |
7 | 7 |
import java.sql.Statement; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
10 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
11 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
12 |
import org.gvsig.fmap.data.feature.AttributeDescriptor; |
|
13 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
9 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
10 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
11 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
12 |
import org.gvsig.fmap.dal.feature.AttributeDescriptor; |
|
13 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
14 |
import org.gvsig.fmap.dal.feature.exceptions.IsNotAttributeSettingException; |
|
15 |
import org.gvsig.fmap.dal.feature.impl.DefaultFeatureType; |
|
14 | 16 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
15 | 17 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
16 | 18 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCDriverNotFoundException; |
17 | 19 |
import org.gvsig.fmap.data.feature.db.jdbc.SQLException; |
18 | 20 |
import org.gvsig.fmap.data.feature.db.jdbc.postgresql.PostgresqlStore; |
19 | 21 |
import org.gvsig.fmap.data.feature.db.jdbc.postgresql.PostgresqlStoreParameters; |
20 |
import org.gvsig.fmap.data.feature.exceptions.IsNotAttributeSettingException; |
|
21 |
import org.gvsig.fmap.data.feature.impl.DefaultFeatureType; |
|
22 | 22 |
|
23 | 23 |
public class PostgresqlBinStoreUtils { |
24 | 24 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/PostgresqlBinFeatureCollection.java | ||
---|---|---|
6 | 6 |
import java.util.ConcurrentModificationException; |
7 | 7 |
import java.util.Iterator; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.DataStore;
|
|
10 |
import org.gvsig.fmap.data.exceptions.ReadException;
|
|
11 |
import org.gvsig.fmap.data.feature.Feature;
|
|
12 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
9 |
import org.gvsig.fmap.dal.DataStore;
|
|
10 |
import org.gvsig.fmap.dal.exceptions.ReadException;
|
|
11 |
import org.gvsig.fmap.dal.feature.Feature;
|
|
12 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
13 | 13 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection; |
14 | 14 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
15 | 15 |
import org.gvsig.fmap.data.feature.db.jdbc.AbstractJDBCIterator; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/PostgresqlBinResource.java | ||
---|---|---|
33 | 33 |
import java.sql.Connection; |
34 | 34 |
import java.sql.DriverManager; |
35 | 35 |
|
36 |
import org.gvsig.fmap.data.exceptions.InitializeException;
|
|
37 |
import org.gvsig.fmap.data.exceptions.ReadException;
|
|
36 |
import org.gvsig.fmap.dal.exceptions.InitializeException;
|
|
37 |
import org.gvsig.fmap.dal.exceptions.ReadException;
|
|
38 | 38 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCDriverNotFoundException; |
39 | 39 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorerParameter; |
40 | 40 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCResource; |
... | ... | |
47 | 47 |
public class PostgresqlBinResource extends JDBCResource { |
48 | 48 |
|
49 | 49 |
/* (non-Javadoc) |
50 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCResource#getConnection()
|
|
50 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCResource#getConnection()
|
|
51 | 51 |
*/ |
52 | 52 |
protected Connection getConnection() throws ReadException { |
53 | 53 |
return super.getConnection(); |
... | ... | |
68 | 68 |
} |
69 | 69 |
|
70 | 70 |
/* (non-Javadoc) |
71 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCResource#createConnection()
|
|
71 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCResource#createConnection()
|
|
72 | 72 |
*/ |
73 | 73 |
protected Connection createConnection() throws ReadException { |
74 | 74 |
Connection conn = null; |
... | ... | |
88 | 88 |
} |
89 | 89 |
|
90 | 90 |
/* (non-Javadoc) |
91 |
* @see org.gvsig.fmap.data.Resource#generateKey()
|
|
91 |
* @see org.gvsig.fmap.dal.Resource#generateKey()
|
|
92 | 92 |
*/ |
93 | 93 |
protected String generateKey() { |
94 | 94 |
return this.getName()+";"+this.getUrl()+";"+this.getUser(); |
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
/* (non-Javadoc) |
98 |
* @see org.gvsig.fmap.data.Resource#getName()
|
|
98 |
* @see org.gvsig.fmap.dal.Resource#getName()
|
|
99 | 99 |
*/ |
100 | 100 |
public String getName() { |
101 | 101 |
return "PostgresqlBin"; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresqlbin/Register.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc.postgresqlbin; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.DataManager;
|
|
4 |
import org.gvsig.fmap.data.impl.DefaultDataManager;
|
|
3 |
import org.gvsig.fmap.dal.DataManager;
|
|
4 |
import org.gvsig.fmap.dal.impl.DefaultDataManager;
|
|
5 | 5 |
|
6 | 6 |
public class Register { |
7 | 7 |
public static void selfRegister() { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/JDBCFeature.java | ||
---|---|---|
6 | 6 |
import java.util.Iterator; |
7 | 7 |
import java.util.List; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
10 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
11 |
import org.gvsig.fmap.data.feature.AbstractFeature; |
|
12 |
import org.gvsig.fmap.data.feature.AttributeDescriptor; |
|
13 |
import org.gvsig.fmap.data.feature.Feature; |
|
14 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.data.feature.FeatureReference; |
|
16 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
9 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
10 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
11 |
import org.gvsig.fmap.dal.feature.AbstractFeature; |
|
12 |
import org.gvsig.fmap.dal.feature.AttributeDescriptor; |
|
13 |
import org.gvsig.fmap.dal.feature.Feature; |
|
14 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
16 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
17 |
import org.gvsig.fmap.dal.feature.exceptions.IsNotFeatureSettingException; |
|
17 | 18 |
import org.gvsig.fmap.data.feature.db.DBFeature; |
18 | 19 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
19 |
import org.gvsig.fmap.data.feature.exceptions.IsNotFeatureSettingException; |
|
20 | 20 |
import org.gvsig.fmap.geom.primitive.Envelope; |
21 | 21 |
|
22 | 22 |
public abstract class JDBCFeature extends DBFeature { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/SQLException.java | ||
---|---|---|
5 | 5 |
import java.util.Map; |
6 | 6 |
|
7 | 7 |
import org.gvsig.tools.exception.IExceptionTranslator; |
8 |
import org.gvsig.fmap.data.exceptions.OpenException;
|
|
8 |
import org.gvsig.fmap.dal.exceptions.OpenException;
|
|
9 | 9 |
|
10 | 10 |
public class SQLException extends OpenException { |
11 | 11 |
protected String sql=""; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/JDBCStore.java | ||
---|---|---|
78 | 78 |
|
79 | 79 |
|
80 | 80 |
/* (non-Javadoc) |
81 |
* @see org.gvsig.fmap.data.feature.FeatureStore#doClose()
|
|
81 |
* @see org.gvsig.fmap.dal.feature.FeatureStore#doClose()
|
|
82 | 82 |
*/ |
83 | 83 |
protected void doClose() throws CloseException { |
84 | 84 |
this.resource.close(); |
... | ... | |
86 | 86 |
} |
87 | 87 |
|
88 | 88 |
/* (non-Javadoc) |
89 |
* @see org.gvsig.fmap.data.feature.FeatureStore#doDispose()
|
|
89 |
* @see org.gvsig.fmap.dal.feature.FeatureStore#doDispose()
|
|
90 | 90 |
*/ |
91 | 91 |
protected void doDispose() throws CloseException { |
92 | 92 |
ResourceManager resMan = DefaultResourceManager.getResourceManager(); |
... | ... | |
104 | 104 |
} |
105 | 105 |
|
106 | 106 |
/* (non-Javadoc) |
107 |
* @see org.gvsig.fmap.data.feature.FeatureStore#doOpen()
|
|
107 |
* @see org.gvsig.fmap.dal.feature.FeatureStore#doOpen()
|
|
108 | 108 |
*/ |
109 | 109 |
protected void doOpen() throws OpenException { |
110 | 110 |
//No Operation |
... | ... | |
113 | 113 |
|
114 | 114 |
|
115 | 115 |
/* (non-Javadoc) |
116 |
* @see org.gvsig.fmap.data.feature.FeatureStore#canAlterFeatureType()
|
|
116 |
* @see org.gvsig.fmap.dal.feature.FeatureStore#canAlterFeatureType()
|
|
117 | 117 |
*/ |
118 | 118 |
public boolean canAlterFeatureType() { |
119 | 119 |
return false; |
120 | 120 |
} |
121 | 121 |
|
122 | 122 |
/* (non-Javadoc) |
123 |
* @see org.gvsig.fmap.data.DataStore#getExplorer()
|
|
123 |
* @see org.gvsig.fmap.dal.DataStore#getExplorer()
|
|
124 | 124 |
*/ |
125 | 125 |
public DataExplorer getExplorer() throws ReadException { |
126 | 126 |
return null; |
... | ... | |
128 | 128 |
|
129 | 129 |
|
130 | 130 |
/* (non-Javadoc) |
131 |
* @see org.gvsig.fmap.data.feature.FeatureStore#init(org.gvsig.fmap.data.DataStoreParameters, org.gvsig.fmap.data.Resource)
|
|
131 |
* @see org.gvsig.fmap.dal.feature.FeatureStore#init(org.gvsig.fmap.dal.DataStoreParameters, org.gvsig.fmap.dal.Resource)
|
|
132 | 132 |
*/ |
133 | 133 |
public void init(DataStoreParameters parameters, AbstractResource resource) throws InitializeException { |
134 | 134 |
super.init(parameters, resource); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/JDBCExplorer.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.sql.Connection; |
4 | 4 |
|
5 |
import org.gvsig.fmap.data.DataExplorerParameters; |
|
6 |
import org.gvsig.fmap.data.DataManager; |
|
7 |
import org.gvsig.fmap.data.DataStore; |
|
8 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
9 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
10 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
5 |
import org.gvsig.fmap.dal.DataExplorerParameters; |
|
6 |
import org.gvsig.fmap.dal.DataManager; |
|
7 |
import org.gvsig.fmap.dal.DataStore; |
|
8 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
9 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
10 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
11 |
import org.gvsig.fmap.dal.feature.exceptions.InitializeWriterException; |
|
12 |
import org.gvsig.fmap.dal.impl.DefaultDataManager; |
|
11 | 13 |
import org.gvsig.fmap.data.feature.db.DBExplorer; |
12 |
import org.gvsig.fmap.data.feature.exceptions.InitializeWriterException; |
|
13 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
|
14 | 14 |
|
15 | 15 |
public abstract class JDBCExplorer extends DBExplorer { |
16 | 16 |
|
... | ... | |
18 | 18 |
|
19 | 19 |
|
20 | 20 |
/* (non-Javadoc) |
21 |
* @see org.gvsig.fmap.data.DataExplorer#init(org.gvsig.fmap.data.DataExplorerParameters)
|
|
21 |
* @see org.gvsig.fmap.dal.DataExplorer#init(org.gvsig.fmap.dal.DataExplorerParameters)
|
|
22 | 22 |
*/ |
23 | 23 |
public void init(DataExplorerParameters parameters,JDBCResource resource) throws InitializeException { |
24 | 24 |
super.init(parameters); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/Register.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc.postgresql; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.DataManager;
|
|
4 |
import org.gvsig.fmap.data.impl.DefaultDataManager;
|
|
3 |
import org.gvsig.fmap.dal.DataManager;
|
|
4 |
import org.gvsig.fmap.dal.impl.DefaultDataManager;
|
|
5 | 5 |
|
6 | 6 |
public class Register { |
7 | 7 |
public static void selfRegister() { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlExplorer.java | ||
---|---|---|
7 | 7 |
import java.sql.Statement; |
8 | 8 |
import java.util.ArrayList; |
9 | 9 |
|
10 |
import org.gvsig.fmap.data.DataExplorerParameters; |
|
11 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
12 |
import org.gvsig.fmap.data.NewDataStoreParameters; |
|
13 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
14 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
15 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
16 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
17 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
18 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
19 |
import org.gvsig.fmap.data.feature.NewFeatureStoreParameters; |
|
10 |
import org.gvsig.fmap.dal.DataExplorerParameters; |
|
11 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
12 |
import org.gvsig.fmap.dal.NewDataStoreParameters; |
|
13 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
14 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
15 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
16 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
17 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
18 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
19 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
20 |
import org.gvsig.fmap.dal.feature.exceptions.InitializeWriterException; |
|
21 |
import org.gvsig.fmap.dal.resource.ResourceManager; |
|
22 |
import org.gvsig.fmap.dal.resource.impl.DefaultResourceManager; |
|
20 | 23 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
21 | 24 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
22 | 25 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorer; |
23 | 26 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorerParameter; |
24 |
import org.gvsig.fmap.data.feature.exceptions.InitializeWriterException; |
|
25 |
import org.gvsig.fmap.data.resource.ResourceManager; |
|
26 |
import org.gvsig.fmap.data.resource.impl.DefaultResourceManager; |
|
27 | 27 |
|
28 | 28 |
public class PostgresqlExplorer extends JDBCExplorer { |
29 | 29 |
public static String DATAEXPLORER_NAME = "PostgresqlExplorer"; |
... | ... | |
370 | 370 |
} |
371 | 371 |
|
372 | 372 |
/* (non-Javadoc) |
373 |
* @see org.gvsig.fmap.data.DataExplorer#dispose()
|
|
373 |
* @see org.gvsig.fmap.dal.DataExplorer#dispose()
|
|
374 | 374 |
*/ |
375 | 375 |
public void dispose() throws DataException { |
376 | 376 |
ResourceManager resMan = DefaultResourceManager.getResourceManager(); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlFeatureCollection.java | ||
---|---|---|
6 | 6 |
import java.util.ConcurrentModificationException; |
7 | 7 |
import java.util.Iterator; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.DataStore;
|
|
10 |
import org.gvsig.fmap.data.ReadException;
|
|
11 |
import org.gvsig.fmap.data.feature.Feature;
|
|
12 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
13 |
import org.gvsig.fmap.data.feature.IsNotFeatureSettingException;
|
|
9 |
import org.gvsig.fmap.dal.DataStore;
|
|
10 |
import org.gvsig.fmap.dal.ReadException;
|
|
11 |
import org.gvsig.fmap.dal.feature.Feature;
|
|
12 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
13 |
import org.gvsig.fmap.dal.feature.IsNotFeatureSettingException;
|
|
14 | 14 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection; |
15 | 15 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
16 | 16 |
import org.gvsig.fmap.data.feature.db.DBStore; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlNewStoreParameter.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc.postgresql; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.DataStoreParameters;
|
|
3 |
import org.gvsig.fmap.dal.DataStoreParameters;
|
|
4 | 4 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
5 | 5 |
import org.gvsig.fmap.data.feature.db.DBNewStoreParameter; |
6 | 6 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlFeatureCollectionEditing.java | ||
---|---|---|
6 | 6 |
import java.util.ConcurrentModificationException; |
7 | 7 |
import java.util.Iterator; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.DataStore;
|
|
10 |
import org.gvsig.fmap.data.ReadException;
|
|
11 |
import org.gvsig.fmap.data.feature.FeatureManager;
|
|
12 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
9 |
import org.gvsig.fmap.dal.DataStore;
|
|
10 |
import org.gvsig.fmap.dal.ReadException;
|
|
11 |
import org.gvsig.fmap.dal.feature.FeatureManager;
|
|
12 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
13 | 13 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection; |
14 | 14 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
15 | 15 |
import org.gvsig.fmap.data.feature.db.jdbc.SQLException; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlFeaturesWriter.java | ||
---|---|---|
11 | 11 |
import java.sql.Statement; |
12 | 12 |
import java.util.Iterator; |
13 | 13 |
|
14 |
import org.gvsig.fmap.data.DataExplorer; |
|
15 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
16 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
17 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
18 |
import org.gvsig.fmap.data.exceptions.WriteException; |
|
19 |
import org.gvsig.fmap.data.feature.Feature; |
|
20 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
21 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
22 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
23 |
import org.gvsig.fmap.data.feature.NewFeatureStoreParameters; |
|
14 |
import org.gvsig.fmap.dal.DataExplorer; |
|
15 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
16 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
17 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
18 |
import org.gvsig.fmap.dal.exceptions.WriteException; |
|
19 |
import org.gvsig.fmap.dal.feature.Feature; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
21 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
22 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
23 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
24 |
import org.gvsig.fmap.dal.feature.exceptions.InitializeWriterException; |
|
24 | 25 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
25 | 26 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
26 | 27 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeature; |
27 | 28 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeaturesWriter; |
28 | 29 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCTypes; |
29 |
import org.gvsig.fmap.data.feature.exceptions.InitializeWriterException; |
|
30 | 30 |
import org.gvsig.fmap.geom.Geometry; |
31 | 31 |
|
32 | 32 |
public class PostgresqlFeaturesWriter extends JDBCFeaturesWriter { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlStoreUtils.java | ||
---|---|---|
8 | 8 |
import java.util.ArrayList; |
9 | 9 |
import java.util.Iterator; |
10 | 10 |
|
11 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
12 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
13 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
14 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
11 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
12 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
13 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
14 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
16 |
import org.gvsig.fmap.dal.feature.exceptions.IsNotAttributeSettingException; |
|
17 |
import org.gvsig.fmap.dal.feature.impl.DefaultFeatureType; |
|
16 | 18 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
17 | 19 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
18 | 20 |
import org.gvsig.fmap.data.feature.db.DBStoreParameters; |
19 | 21 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCDriverNotFoundException; |
20 | 22 |
import org.gvsig.fmap.data.feature.db.jdbc.SQLException; |
21 |
import org.gvsig.fmap.data.feature.exceptions.IsNotAttributeSettingException; |
|
22 |
import org.gvsig.fmap.data.feature.impl.DefaultFeatureType; |
|
23 | 23 |
import org.gvsig.fmap.geom.Geometry; |
24 | 24 |
|
25 | 25 |
public class PostgresqlStoreUtils { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/AbstractPostgresqlDBIterator.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import java.sql.Connection; |
31 | 31 |
|
32 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
33 |
import org.gvsig.fmap.data.feature.Feature; |
|
32 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
33 |
import org.gvsig.fmap.dal.feature.Feature; |
|
34 |
import org.gvsig.fmap.dal.feature.expressionevaluator.Filter; |
|
35 |
import org.gvsig.fmap.dal.feature.impl.FeatureManager; |
|
34 | 36 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
35 | 37 |
import org.gvsig.fmap.data.feature.db.jdbc.AbstractJDBCIterator; |
36 |
import org.gvsig.fmap.data.feature.expressionevaluator.Filter; |
|
37 |
import org.gvsig.fmap.data.feature.impl.FeatureManager; |
|
38 | 38 |
|
39 | 39 |
public abstract class AbstractPostgresqlDBIterator extends AbstractJDBCIterator { |
40 | 40 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlResource.java | ||
---|---|---|
33 | 33 |
import java.sql.Connection; |
34 | 34 |
import java.sql.DriverManager; |
35 | 35 |
|
36 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
37 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
38 |
import org.gvsig.fmap.data.exceptions.OpenException; |
|
39 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
36 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
37 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
38 |
import org.gvsig.fmap.dal.exceptions.OpenException; |
|
39 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
40 |
import org.gvsig.fmap.dal.resource.exception.ResourceChangedException; |
|
40 | 41 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCDriverNotFoundException; |
41 | 42 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorerParameter; |
42 | 43 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCResource; |
43 | 44 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStoreParameters; |
44 |
import org.gvsig.fmap.data.resource.exception.ResourceChangedException; |
|
45 | 45 |
|
46 | 46 |
/** |
47 | 47 |
* @author jmvivo |
... | ... | |
50 | 50 |
public class PostgresqlResource extends JDBCResource { |
51 | 51 |
|
52 | 52 |
/* (non-Javadoc) |
53 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCResource#getConnection()
|
|
53 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCResource#getConnection()
|
|
54 | 54 |
*/ |
55 | 55 |
protected Connection getConnection() throws ReadException { |
56 | 56 |
return super.getConnection(); |
... | ... | |
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/* (non-Javadoc) |
74 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCResource#createConnection()
|
|
74 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCResource#createConnection()
|
|
75 | 75 |
*/ |
76 | 76 |
protected Connection createConnection() throws ReadException { |
77 | 77 |
Connection conn = null; |
... | ... | |
91 | 91 |
} |
92 | 92 |
|
93 | 93 |
/* (non-Javadoc) |
94 |
* @see org.gvsig.fmap.data.Resource#generateKey()
|
|
94 |
* @see org.gvsig.fmap.dal.Resource#generateKey()
|
|
95 | 95 |
*/ |
96 | 96 |
protected String generateKey() { |
97 | 97 |
return this.getName()+";"+this.getUrl()+";"+this.getUser(); |
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
/* (non-Javadoc) |
101 |
* @see org.gvsig.fmap.data.Resource#getName()
|
|
101 |
* @see org.gvsig.fmap.dal.Resource#getName()
|
|
102 | 102 |
*/ |
103 | 103 |
public String getName() { |
104 | 104 |
return "Postgresql"; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlFeatureCollectionEditingFiltered.java | ||
---|---|---|
5 | 5 |
import java.util.Iterator; |
6 | 6 |
import java.util.NoSuchElementException; |
7 | 7 |
|
8 |
import org.gvsig.fmap.data.DataManager; |
|
9 |
import org.gvsig.fmap.data.DataStore; |
|
10 |
import org.gvsig.fmap.data.ReadException; |
|
11 |
import org.gvsig.fmap.data.feature.FeatureManager; |
|
12 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
8 |
import org.gvsig.fmap.dal.DataManager; |
|
9 |
import org.gvsig.fmap.dal.DataStore; |
|
10 |
import org.gvsig.fmap.dal.ReadException; |
|
11 |
import org.gvsig.fmap.dal.feature.FeatureManager; |
|
12 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
13 |
import org.gvsig.fmap.dal.feature.expressionevaluator.Filter; |
|
13 | 14 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection; |
14 | 15 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
15 |
import org.gvsig.fmap.data.feature.expressionevaluator.Filter; |
|
16 | 16 |
import org.gvsig.tools.exception.BaseException; |
17 | 17 |
|
18 | 18 |
public class PostgresqlFeatureCollectionEditingFiltered extends DBDataFeatureCollection { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlFeature.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.sql.ResultSet; |
4 | 4 |
|
5 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
6 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
7 |
import org.gvsig.fmap.data.feature.Feature; |
|
8 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
9 |
import org.gvsig.fmap.data.feature.FeatureReference; |
|
10 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
5 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
6 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
7 |
import org.gvsig.fmap.dal.feature.Feature; |
|
8 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
9 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
10 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
11 |
import org.gvsig.fmap.dal.feature.exceptions.IsNotFeatureSettingException; |
|
11 | 12 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeature; |
12 | 13 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStore; |
13 |
import org.gvsig.fmap.data.feature.exceptions.IsNotFeatureSettingException; |
|
14 | 14 |
import org.gvsig.fmap.geom.Geometry; |
15 | 15 |
import org.postgis.PGgeometry; |
16 | 16 |
|
... | ... | |
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
/* (non-Javadoc) |
36 |
* @see org.gvsig.fmap.data.feature.AbstractFeature#cloneFeature()
|
|
36 |
* @see org.gvsig.fmap.dal.feature.AbstractFeature#cloneFeature()
|
|
37 | 37 |
*/ |
38 | 38 |
protected Feature cloneFeature() throws DataException { |
39 | 39 |
return new PostgresqlFeature(this); |
... | ... | |
45 | 45 |
} |
46 | 46 |
|
47 | 47 |
/* (non-Javadoc) |
48 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCFeature#loadValueFromResulset(java.sql.ResultSet, org.gvsig.fmap.data.feature.FeatureAttributeDescriptor)
|
|
48 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCFeature#loadValueFromResulset(java.sql.ResultSet, org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor)
|
|
49 | 49 |
*/ |
50 | 50 |
protected void loadValueFromResulset(ResultSet rs, FeatureAttributeDescriptor attr) throws ReadException { |
51 | 51 |
Geometry geom = null; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlFeatureCollectionWithFeatureID.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc.postgresql; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
4 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
5 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
3 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
4 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
5 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
6 |
import org.gvsig.fmap.dal.feature.impl.FeatureManager; |
|
6 | 7 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollectionWithFeatureID; |
7 | 8 |
import org.gvsig.fmap.data.feature.db.DBStore; |
8 | 9 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStore; |
9 |
import org.gvsig.fmap.data.feature.impl.FeatureManager; |
|
10 | 10 |
|
11 | 11 |
|
12 | 12 |
public class PostgresqlFeatureCollectionWithFeatureID extends DBDataFeatureCollectionWithFeatureID { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/postgresql/PostgresqlStore.java | ||
---|---|---|
8 | 8 |
import java.util.ArrayList; |
9 | 9 |
import java.util.Iterator; |
10 | 10 |
|
11 |
import org.gvsig.fmap.data.DataSet; |
|
12 |
import org.gvsig.fmap.data.DataExplorer; |
|
13 |
import org.gvsig.fmap.data.DataManager; |
|
14 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
15 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
16 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
17 |
import org.gvsig.fmap.data.exceptions.OpenException; |
|
18 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
19 |
import org.gvsig.fmap.data.feature.Feature; |
|
20 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
21 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
11 |
import org.gvsig.fmap.dal.DataExplorer; |
|
12 |
import org.gvsig.fmap.dal.DataManager; |
|
13 |
import org.gvsig.fmap.dal.DataSet; |
|
14 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
15 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
16 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
17 |
import org.gvsig.fmap.dal.exceptions.OpenException; |
|
18 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
19 |
import org.gvsig.fmap.dal.feature.Feature; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
21 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
22 |
import org.gvsig.fmap.dal.feature.exceptions.InitializeWriterException; |
|
23 |
import org.gvsig.fmap.dal.impl.DefaultDataManager; |
|
22 | 24 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
23 | 25 |
import org.gvsig.fmap.data.feature.db.DBResource; |
24 | 26 |
import org.gvsig.fmap.data.feature.db.DBStoreParameters; |
25 | 27 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeaturesWriter; |
26 | 28 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStore; |
27 | 29 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStoreParameters; |
28 |
import org.gvsig.fmap.data.feature.exceptions.InitializeWriterException; |
|
29 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
|
30 | 30 |
import org.gvsig.fmap.geom.primitive.DefaultEnvelope; |
31 | 31 |
import org.gvsig.fmap.geom.primitive.Envelope; |
32 | 32 |
import org.gvsig.metadata.Metadata; |
... | ... | |
45 | 45 |
} |
46 | 46 |
|
47 | 47 |
/* (non-Javadoc) |
48 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCStore#createResource(org.gvsig.fmap.data.feature.file.dbf.DBFStoreParameters)
|
|
48 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCStore#createResource(org.gvsig.fmap.dal.feature.file.dbf.DBFStoreParameters)
|
|
49 | 49 |
*/ |
50 | 50 |
protected DBResource createResource(JDBCStoreParameters params) { |
51 | 51 |
return new PostgresqlResource(params); |
... | ... | |
315 | 315 |
|
316 | 316 |
|
317 | 317 |
/* (non-Javadoc) |
318 |
* @see org.gvsig.fmap.data.feature.FeatureStore#doRefresh()
|
|
318 |
* @see org.gvsig.fmap.dal.feature.FeatureStore#doRefresh()
|
|
319 | 319 |
*/ |
320 | 320 |
protected void doRefresh() throws OpenException, InitializeException { |
321 | 321 |
this.initFeatureType(); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/JDBCExplorerParameter.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.Map; |
4 | 4 |
|
5 |
import org.gvsig.fmap.data.exceptions.InitializeException;
|
|
5 |
import org.gvsig.fmap.dal.exceptions.InitializeException;
|
|
6 | 6 |
import org.gvsig.fmap.data.feature.db.DBExplorerParameters; |
7 | 7 |
|
8 | 8 |
import com.iver.utiles.NotExistInXMLEntity; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/JDBCTypes.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor;
|
|
3 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
|
|
4 | 4 |
|
5 | 5 |
public class JDBCTypes { |
6 | 6 |
public static final String POINT2D = "POINT2D"; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2FeatureCollectionWithFeatureID.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc.h2; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
4 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
5 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
3 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
4 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
5 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
6 |
import org.gvsig.fmap.dal.feature.impl.FeatureManager; |
|
6 | 7 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollectionWithFeatureID; |
7 | 8 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
8 | 9 |
import org.gvsig.fmap.data.feature.db.DBStore; |
9 |
import org.gvsig.fmap.data.feature.impl.FeatureManager; |
|
10 | 10 |
|
11 | 11 |
|
12 | 12 |
public class H2FeatureCollectionWithFeatureID extends DBDataFeatureCollectionWithFeatureID { |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2Store.java | ||
---|---|---|
7 | 7 |
import java.util.Iterator; |
8 | 8 |
import java.util.Locale; |
9 | 9 |
|
10 |
import org.gvsig.fmap.data.DataSet; |
|
11 |
import org.gvsig.fmap.data.DataExplorer; |
|
12 |
import org.gvsig.fmap.data.DataManager; |
|
13 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
14 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
15 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
16 |
import org.gvsig.fmap.data.exceptions.OpenException; |
|
17 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
18 |
import org.gvsig.fmap.data.feature.Feature; |
|
19 |
import org.gvsig.fmap.data.feature.FeatureSet; |
|
20 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
10 |
import org.gvsig.fmap.dal.DataExplorer; |
|
11 |
import org.gvsig.fmap.dal.DataManager; |
|
12 |
import org.gvsig.fmap.dal.DataSet; |
|
13 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
14 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
15 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
16 |
import org.gvsig.fmap.dal.exceptions.OpenException; |
|
17 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
18 |
import org.gvsig.fmap.dal.feature.Feature; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
21 |
import org.gvsig.fmap.dal.feature.exceptions.InitializeWriterException; |
|
22 |
import org.gvsig.fmap.dal.impl.DefaultDataManager; |
|
21 | 23 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
22 | 24 |
import org.gvsig.fmap.data.feature.db.DBResource; |
23 | 25 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeaturesWriter; |
24 | 26 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStore; |
25 | 27 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStoreParameters; |
26 |
import org.gvsig.fmap.data.feature.exceptions.InitializeWriterException; |
|
27 |
import org.gvsig.fmap.data.impl.DefaultDataManager; |
|
28 | 28 |
import org.gvsig.fmap.geom.Geometry; |
29 | 29 |
import org.gvsig.fmap.geom.primitive.DefaultEnvelope; |
30 | 30 |
import org.gvsig.fmap.geom.primitive.Envelope; |
... | ... | |
45 | 45 |
|
46 | 46 |
|
47 | 47 |
/* (non-Javadoc) |
48 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCStore#createResource(org.gvsig.fmap.data.feature.file.dbf.DBFStoreParameters)
|
|
48 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCStore#createResource(org.gvsig.fmap.dal.feature.file.dbf.DBFStoreParameters)
|
|
49 | 49 |
*/ |
50 | 50 |
protected DBResource createResource(JDBCStoreParameters params) { |
51 | 51 |
return new H2Resource(params); |
... | ... | |
258 | 258 |
|
259 | 259 |
|
260 | 260 |
/* (non-Javadoc) |
261 |
* @see org.gvsig.fmap.data.feature.FeatureStore#doRefresh()
|
|
261 |
* @see org.gvsig.fmap.dal.feature.FeatureStore#doRefresh()
|
|
262 | 262 |
*/ |
263 | 263 |
protected void doRefresh() throws OpenException, InitializeException { |
264 | 264 |
this.initFeatureType(); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2Explorer.java | ||
---|---|---|
8 | 8 |
import java.util.ArrayList; |
9 | 9 |
import java.util.List; |
10 | 10 |
|
11 |
import org.gvsig.fmap.data.DataExplorerParameters; |
|
12 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
13 |
import org.gvsig.fmap.data.NewDataStoreParameters; |
|
14 |
import org.gvsig.fmap.data.exceptions.CloseException; |
|
15 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
16 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
17 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
18 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
19 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
20 |
import org.gvsig.fmap.data.feature.NewFeatureStoreParameters; |
|
11 |
import org.gvsig.fmap.dal.DataExplorerParameters; |
|
12 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
13 |
import org.gvsig.fmap.dal.NewDataStoreParameters; |
|
14 |
import org.gvsig.fmap.dal.exceptions.CloseException; |
|
15 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
16 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
17 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
18 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
20 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
21 |
import org.gvsig.fmap.dal.feature.exceptions.InitializeWriterException; |
|
22 |
import org.gvsig.fmap.dal.resource.ResourceManager; |
|
23 |
import org.gvsig.fmap.dal.resource.impl.DefaultResourceManager; |
|
21 | 24 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
22 | 25 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
23 | 26 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorer; |
24 | 27 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorerParameter; |
25 |
import org.gvsig.fmap.data.feature.exceptions.InitializeWriterException; |
|
26 |
import org.gvsig.fmap.data.resource.ResourceManager; |
|
27 |
import org.gvsig.fmap.data.resource.impl.DefaultResourceManager; |
|
28 | 28 |
|
29 | 29 |
public class H2Explorer extends JDBCExplorer { |
30 | 30 |
public static String DATAEXPLORER_NAME = "H2Explorer"; |
... | ... | |
391 | 391 |
} |
392 | 392 |
|
393 | 393 |
/* (non-Javadoc) |
394 |
* @see org.gvsig.fmap.data.DataExplorer#dispose()
|
|
394 |
* @see org.gvsig.fmap.dal.DataExplorer#dispose()
|
|
395 | 395 |
*/ |
396 | 396 |
public void dispose() throws DataException { |
397 | 397 |
ResourceManager resMan = DefaultResourceManager.getResourceManager(); |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2Utils.java | ||
---|---|---|
7 | 7 |
import java.util.ArrayList; |
8 | 8 |
import java.util.Iterator; |
9 | 9 |
|
10 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
11 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
12 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
13 |
import org.gvsig.fmap.data.feature.AttributeDescriptor; |
|
14 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
10 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
11 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
12 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
13 |
import org.gvsig.fmap.dal.feature.AttributeDescriptor; |
|
14 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.dal.feature.exceptions.IsNotAttributeSettingException; |
|
16 |
import org.gvsig.fmap.dal.feature.impl.DefaultFeatureType; |
|
15 | 17 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
16 | 18 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
17 | 19 |
import org.gvsig.fmap.data.feature.db.jdbc.SQLException; |
18 |
import org.gvsig.fmap.data.feature.exceptions.IsNotAttributeSettingException; |
|
19 |
import org.gvsig.fmap.data.feature.impl.DefaultFeatureType; |
|
20 | 20 |
import org.gvsig.fmap.geom.Geometry; |
21 | 21 |
|
22 | 22 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2FeatureCollection.java | ||
---|---|---|
6 | 6 |
import java.util.ConcurrentModificationException; |
7 | 7 |
import java.util.Iterator; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.DataStore;
|
|
10 |
import org.gvsig.fmap.data.ReadException;
|
|
11 |
import org.gvsig.fmap.data.feature.Feature;
|
|
12 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
9 |
import org.gvsig.fmap.dal.DataStore;
|
|
10 |
import org.gvsig.fmap.dal.ReadException;
|
|
11 |
import org.gvsig.fmap.dal.feature.Feature;
|
|
12 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
13 | 13 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection; |
14 | 14 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
15 | 15 |
import org.gvsig.fmap.data.feature.db.jdbc.AbstractJDBCIterator; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2NewStoreParameter.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.data.feature.db.jdbc.h2; |
2 | 2 |
|
3 |
import org.gvsig.fmap.data.DataStoreParameters;
|
|
3 |
import org.gvsig.fmap.dal.DataStoreParameters;
|
|
4 | 4 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
5 | 5 |
import org.gvsig.fmap.data.feature.db.DBNewStoreParameter; |
6 | 6 |
import org.h2.server.web.DbTableOrView; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2FeatureCollectionEditing.java | ||
---|---|---|
6 | 6 |
import java.util.ConcurrentModificationException; |
7 | 7 |
import java.util.Iterator; |
8 | 8 |
|
9 |
import org.gvsig.fmap.data.DataStore;
|
|
10 |
import org.gvsig.fmap.data.ReadException;
|
|
11 |
import org.gvsig.fmap.data.feature.Feature;
|
|
12 |
import org.gvsig.fmap.data.feature.FeatureManager;
|
|
13 |
import org.gvsig.fmap.data.feature.FeatureType;
|
|
9 |
import org.gvsig.fmap.dal.DataStore;
|
|
10 |
import org.gvsig.fmap.dal.ReadException;
|
|
11 |
import org.gvsig.fmap.dal.feature.Feature;
|
|
12 |
import org.gvsig.fmap.dal.feature.FeatureManager;
|
|
13 |
import org.gvsig.fmap.dal.feature.FeatureType;
|
|
14 | 14 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection; |
15 | 15 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
16 | 16 |
import org.gvsig.fmap.data.feature.db.jdbc.SQLException; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2FeaturesWriter.java | ||
---|---|---|
7 | 7 |
import java.sql.Statement; |
8 | 8 |
import java.util.Iterator; |
9 | 9 |
|
10 |
import org.gvsig.fmap.data.DataStoreParameters; |
|
11 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
12 |
import org.gvsig.fmap.data.exceptions.WriteException; |
|
13 |
import org.gvsig.fmap.data.feature.Feature; |
|
14 |
import org.gvsig.fmap.data.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.data.feature.FeatureStore; |
|
16 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
17 |
import org.gvsig.fmap.data.feature.NewFeatureStoreParameters; |
|
10 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
11 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
12 |
import org.gvsig.fmap.dal.exceptions.WriteException; |
|
13 |
import org.gvsig.fmap.dal.feature.Feature; |
|
14 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
15 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
16 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
17 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
18 |
import org.gvsig.fmap.dal.feature.exceptions.InitializeWriterException; |
|
18 | 19 |
import org.gvsig.fmap.data.feature.db.DBAttributeDescriptor; |
19 | 20 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
20 | 21 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeature; |
21 | 22 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCFeaturesWriter; |
22 | 23 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCTypes; |
23 |
import org.gvsig.fmap.data.feature.exceptions.InitializeWriterException; |
|
24 | 24 |
import org.gvsig.fmap.geom.Geometry; |
25 | 25 |
|
26 | 26 |
class H2FeaturesWriter extends JDBCFeaturesWriter{ |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/AbstractH2DBIterator.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import java.sql.Connection; |
31 | 31 |
|
32 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
33 |
import org.gvsig.fmap.data.feature.Feature; |
|
32 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
33 |
import org.gvsig.fmap.dal.feature.Feature; |
|
34 |
import org.gvsig.fmap.dal.feature.expressionevaluator.Filter; |
|
35 |
import org.gvsig.fmap.dal.feature.impl.FeatureManager; |
|
34 | 36 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
35 | 37 |
import org.gvsig.fmap.data.feature.db.jdbc.AbstractJDBCIterator; |
36 |
import org.gvsig.fmap.data.feature.expressionevaluator.Filter; |
|
37 |
import org.gvsig.fmap.data.feature.impl.FeatureManager; |
|
38 | 38 |
|
39 | 39 |
public abstract class AbstractH2DBIterator extends AbstractJDBCIterator { |
40 | 40 |
|
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2Resource.java | ||
---|---|---|
33 | 33 |
import java.sql.Connection; |
34 | 34 |
import java.sql.DriverManager; |
35 | 35 |
|
36 |
import org.gvsig.fmap.data.exceptions.DataException; |
|
37 |
import org.gvsig.fmap.data.exceptions.InitializeException; |
|
38 |
import org.gvsig.fmap.data.exceptions.OpenException; |
|
39 |
import org.gvsig.fmap.data.exceptions.ReadException; |
|
36 |
import org.gvsig.fmap.dal.exceptions.DataException; |
|
37 |
import org.gvsig.fmap.dal.exceptions.InitializeException; |
|
38 |
import org.gvsig.fmap.dal.exceptions.OpenException; |
|
39 |
import org.gvsig.fmap.dal.exceptions.ReadException; |
|
40 |
import org.gvsig.fmap.dal.resource.exception.ResourceChangedException; |
|
40 | 41 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCDriverNotFoundException; |
41 | 42 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCExplorerParameter; |
42 | 43 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCResource; |
43 | 44 |
import org.gvsig.fmap.data.feature.db.jdbc.JDBCStoreParameters; |
44 |
import org.gvsig.fmap.data.resource.exception.ResourceChangedException; |
|
45 | 45 |
|
46 | 46 |
/** |
47 | 47 |
* @author jmvivo |
... | ... | |
50 | 50 |
public class H2Resource extends JDBCResource { |
51 | 51 |
|
52 | 52 |
/* (non-Javadoc) |
53 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCResource#getConnection()
|
|
53 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCResource#getConnection()
|
|
54 | 54 |
*/ |
55 | 55 |
protected Connection getConnection() throws ReadException { |
56 | 56 |
return super.getConnection(); |
... | ... | |
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/* (non-Javadoc) |
74 |
* @see org.gvsig.fmap.data.feature.db.jdbc.JDBCResource#createConnection()
|
|
74 |
* @see org.gvsig.fmap.dal.feature.db.jdbc.JDBCResource#createConnection()
|
|
75 | 75 |
*/ |
76 | 76 |
protected Connection createConnection() throws ReadException { |
77 | 77 |
Connection conn = null; |
... | ... | |
91 | 91 |
} |
92 | 92 |
|
93 | 93 |
/* (non-Javadoc) |
94 |
* @see org.gvsig.fmap.data.Resource#generateKey()
|
|
94 |
* @see org.gvsig.fmap.dal.Resource#generateKey()
|
|
95 | 95 |
*/ |
96 | 96 |
protected String generateKey() { |
97 | 97 |
return this.getName()+";"+this.getUrl()+";"+this.getUser(); |
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
/* (non-Javadoc) |
101 |
* @see org.gvsig.fmap.data.Resource#getName()
|
|
101 |
* @see org.gvsig.fmap.dal.Resource#getName()
|
|
102 | 102 |
*/ |
103 | 103 |
public String getName() { |
104 | 104 |
return "h2"; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/data/feature/db/jdbc/h2/H2FeatureCollectionEditingFiltered.java | ||
---|---|---|
5 | 5 |
import java.util.Iterator; |
6 | 6 |
import java.util.NoSuchElementException; |
7 | 7 |
|
8 |
import org.gvsig.fmap.data.DataManager; |
|
9 |
import org.gvsig.fmap.data.DataStore; |
|
10 |
import org.gvsig.fmap.data.ReadException; |
|
11 |
import org.gvsig.fmap.data.feature.Feature; |
|
12 |
import org.gvsig.fmap.data.feature.FeatureManager; |
|
13 |
import org.gvsig.fmap.data.feature.FeatureType; |
|
8 |
import org.gvsig.fmap.dal.DataManager; |
|
9 |
import org.gvsig.fmap.dal.DataStore; |
|
10 |
import org.gvsig.fmap.dal.ReadException; |
|
11 |
import org.gvsig.fmap.dal.feature.Feature; |
|
12 |
import org.gvsig.fmap.dal.feature.FeatureManager; |
|
13 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
14 |
import org.gvsig.fmap.dal.feature.expressionevaluator.Filter; |
|
14 | 15 |
import org.gvsig.fmap.data.feature.db.DBDataFeatureCollection; |
15 | 16 |
import org.gvsig.fmap.data.feature.db.DBFeatureType; |
16 |
import org.gvsig.fmap.data.feature.expressionevaluator.Filter; |
|
17 | 17 |
import org.gvsig.tools.exception.BaseException; |
18 | 18 |
|
Also available in: Unified diff