Revision 47607
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/PersonalDatabaseServerExplorerFactory.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.fmap.dal; |
|
7 |
|
|
8 |
import java.io.File; |
|
9 |
|
|
10 |
/** |
|
11 |
* |
|
12 |
* @author jjdelcerro |
|
13 |
*/ |
|
14 |
public interface PersonalDatabaseServerExplorerFactory extends DataServerExplorerFactory { |
|
15 |
|
|
16 |
public String[] getPossibleExtensions(String extension); |
|
17 |
|
|
18 |
public File[] getPossibleFiles(File dbfile); |
|
19 |
|
|
20 |
public boolean existsdb(File dbfile); |
|
21 |
|
|
22 |
public boolean removedb(File dbfile); |
|
23 |
|
|
24 |
public File normalizeFile(File dbfile); |
|
25 |
|
|
26 |
public File removeExtension(File dbfile); |
|
27 |
|
|
28 |
public boolean isServerModeSupported(); |
|
29 |
|
|
30 |
public void serverStop(); |
|
31 |
|
|
32 |
public void serverStart(Object... args); |
|
33 |
|
|
34 |
public void serverSetEnabled(boolean enabled); |
|
35 |
|
|
36 |
public boolean serverIsEnabled(); |
|
37 |
|
|
38 |
public boolean serverIsStarted(); |
|
39 |
|
|
40 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial/org.gvsig.h2spatial.h2gis132/org.gvsig.h2spatial.h2gis132.provider/src/main/java/org/gvsig/fmap/dal/store/h2/H2SpatialExplorerFactory.java | ||
---|---|---|
1 | 1 |
|
2 | 2 |
package org.gvsig.fmap.dal.store.h2; |
3 | 3 |
|
4 |
import java.io.File; |
|
4 | 5 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
6 |
import org.gvsig.fmap.dal.PersonalDatabaseServerExplorerFactory; |
|
5 | 7 |
import org.gvsig.fmap.dal.exception.InitializeException; |
6 | 8 |
import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices; |
7 | 9 |
import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters; |
... | ... | |
11 | 13 |
import org.gvsig.fmap.dal.store.jdbc2.impl.JDBCServerExplorerFactory; |
12 | 14 |
|
13 | 15 |
|
14 |
public class H2SpatialExplorerFactory extends JDBCServerExplorerFactory { |
|
16 |
public class H2SpatialExplorerFactory |
|
17 |
extends JDBCServerExplorerFactory |
|
18 |
implements PersonalDatabaseServerExplorerFactory |
|
19 |
{ |
|
15 | 20 |
|
16 | 21 |
public H2SpatialExplorerFactory() { |
17 | 22 |
super( |
... | ... | |
39 | 44 |
JDBCServerExplorerParameters params = new H2SpatialExplorerParameters(); |
40 | 45 |
return params; |
41 | 46 |
} |
42 |
|
|
47 |
|
|
48 |
@Override |
|
49 |
public String[] getPossibleExtensions(String extension) { |
|
50 |
String[] extensions = new String[12]; |
|
51 |
extensions[0] = "mv.db"; |
|
52 |
extensions[1] = "trace.db"; |
|
53 |
for (int i = 2; i < extensions.length; i++) { |
|
54 |
extensions[i] = "mv.db."+(i-1)+".part"; |
|
55 |
} |
|
56 |
return extensions; |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public File[] getPossibleFiles(File dbfile) { |
|
61 |
return H2SpatialUtils.getH2Files(dbfile); |
|
62 |
} |
|
63 |
|
|
64 |
@Override |
|
65 |
public boolean existsdb(File dbfile) { |
|
66 |
return H2SpatialUtils.existsH2db(dbfile); |
|
67 |
} |
|
68 |
|
|
69 |
@Override |
|
70 |
public boolean removedb(File dbfile) { |
|
71 |
return H2SpatialUtils.removeH2db(dbfile); |
|
72 |
} |
|
73 |
|
|
74 |
@Override |
|
75 |
public File normalizeFile(File dbfile) { |
|
76 |
return H2SpatialUtils.normalizeH2File(dbfile); |
|
77 |
} |
|
78 |
|
|
79 |
@Override |
|
80 |
public File removeExtension(File dbfile) { |
|
81 |
return new File(H2SpatialUtils.removeH2FileNameExtension(dbfile.getPath())); |
|
82 |
} |
|
83 |
|
|
84 |
@Override |
|
85 |
public boolean isServerModeSupported() { |
|
86 |
return true; |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
public void serverStop() { |
|
91 |
H2SpatialUtils.server_stop(); |
|
92 |
} |
|
93 |
|
|
94 |
@Override |
|
95 |
public void serverStart(Object... args) { |
|
96 |
H2SpatialUtils.server_start(); |
|
97 |
} |
|
98 |
|
|
99 |
@Override |
|
100 |
public void serverSetEnabled(boolean enabled) { |
|
101 |
H2SpatialUtils.set_enable_server(enabled); |
|
102 |
} |
|
103 |
|
|
104 |
@Override |
|
105 |
public boolean serverIsEnabled() { |
|
106 |
return H2SpatialUtils.is_enable_server(); |
|
107 |
} |
|
108 |
|
|
109 |
@Override |
|
110 |
public boolean serverIsStarted() { |
|
111 |
return H2SpatialUtils.is_server_started(); |
|
112 |
} |
|
113 |
|
|
43 | 114 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/SQLiteExplorerFactory.java | ||
---|---|---|
1 | 1 |
|
2 | 2 |
package org.gvsig.sqlite.dal; |
3 | 3 |
|
4 |
import java.io.File; |
|
4 | 5 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
6 |
import org.gvsig.fmap.dal.PersonalDatabaseServerExplorerFactory; |
|
5 | 7 |
import org.gvsig.fmap.dal.exception.InitializeException; |
6 | 8 |
import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices; |
7 | 9 |
import org.gvsig.fmap.dal.store.jdbc.JDBCConnectionParameters; |
... | ... | |
9 | 11 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
10 | 12 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCServerExplorer; |
11 | 13 |
import org.gvsig.fmap.dal.store.jdbc2.impl.JDBCServerExplorerFactory; |
14 |
import org.gvsig.sqlite.dal.geopackage.GeopackageUtils; |
|
12 | 15 |
|
13 | 16 |
|
14 |
public class SQLiteExplorerFactory extends JDBCServerExplorerFactory { |
|
17 |
public class SQLiteExplorerFactory |
|
18 |
extends JDBCServerExplorerFactory |
|
19 |
implements PersonalDatabaseServerExplorerFactory |
|
20 |
{ |
|
15 | 21 |
|
16 | 22 |
private static final String NAME = SQLiteLibrary.NAME; |
17 | 23 |
|
... | ... | |
41 | 47 |
JDBCServerExplorerParameters params = new SQLiteExplorerParameters(); |
42 | 48 |
return params; |
43 | 49 |
} |
50 |
|
|
51 |
@Override |
|
52 |
public String[] getPossibleExtensions(String extension) { |
|
53 |
return new String[] { |
|
54 |
GeopackageUtils.EXTENSION, |
|
55 |
GeopackageUtils.EXTENDED_EXTENSION, |
|
56 |
SQLiteUtils.EXTENSION_SQLITE, |
|
57 |
SQLiteUtils.EXTENSION_SQLITE3, |
|
58 |
SQLiteUtils.EXTENSION_DB, |
|
59 |
SQLiteUtils.EXTENSION_DB3, |
|
60 |
SQLiteUtils.EXTENSION_S3DB, |
|
61 |
SQLiteUtils.EXTENSION_SL3 |
|
62 |
}; |
|
63 |
} |
|
64 |
|
|
65 |
@Override |
|
66 |
public File[] getPossibleFiles(File dbfile) { |
|
67 |
return SQLiteUtils.getFiles(dbfile); |
|
68 |
} |
|
69 |
|
|
70 |
@Override |
|
71 |
public boolean existsdb(File dbfile) { |
|
72 |
return SQLiteUtils.existsdb(dbfile); |
|
73 |
} |
|
74 |
|
|
75 |
@Override |
|
76 |
public boolean removedb(File dbfile) { |
|
77 |
return SQLiteUtils.removedb(dbfile); |
|
78 |
} |
|
79 |
|
|
80 |
@Override |
|
81 |
public File normalizeFile(File dbfile) { |
|
82 |
String s = SQLiteUtils.removeFileNameExtension(dbfile.getPath()); |
|
83 |
if( s == null ) { |
|
84 |
return null; |
|
85 |
} |
|
86 |
return new File(s+"."+GeopackageUtils.EXTENSION); |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
public File removeExtension(File dbfile) { |
|
91 |
return new File(SQLiteUtils.removeFileNameExtension(dbfile.getPath())); |
|
92 |
} |
|
93 |
|
|
94 |
@Override |
|
95 |
public boolean isServerModeSupported() { |
|
96 |
return false; |
|
97 |
} |
|
98 |
|
|
99 |
@Override |
|
100 |
public void serverStop() { |
|
101 |
// Do nothing |
|
102 |
} |
|
103 |
|
|
104 |
@Override |
|
105 |
public void serverStart(Object... args) { |
|
106 |
// Do nothing |
|
107 |
} |
|
108 |
|
|
109 |
@Override |
|
110 |
public void serverSetEnabled(boolean enabled) { |
|
111 |
// Do nothing |
|
112 |
} |
|
113 |
|
|
114 |
@Override |
|
115 |
public boolean serverIsEnabled() { |
|
116 |
return false; |
|
117 |
} |
|
118 |
|
|
119 |
@Override |
|
120 |
public boolean serverIsStarted() { |
|
121 |
return false; |
|
122 |
} |
|
44 | 123 |
|
45 | 124 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.sqlite/org.gvsig.sqlite.provider/src/main/java/org/gvsig/sqlite/dal/SQLiteUtils.java | ||
---|---|---|
35 | 35 |
new File(f.getParentFile(), s+EXTENSION_SQLITE), |
36 | 36 |
new File(f.getParentFile(), s+EXTENSION_SQLITE3), |
37 | 37 |
new File(f.getParentFile(), s+EXTENSION_S3DB), |
38 |
new File(f.getParentFile(), s+EXTENSION_SL3) |
|
38 |
new File(f.getParentFile(), s+EXTENSION_SL3), |
|
39 |
new File(f.getParentFile(), s+"gpkg-shm"), |
|
40 |
new File(f.getParentFile(), s+"gpkg-wal") |
|
39 | 41 |
}; |
40 | 42 |
return files; |
41 | 43 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.app/org.gvsig.xml2db.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
53 | 53 |
_New_database=New database |
54 | 54 |
_Detecting_projection=Detecting projection |
55 | 55 |
|
56 |
_Database_type=Database type |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.app/org.gvsig.xml2db.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
54 | 54 |
_New_database=Nueva base de datos |
55 | 55 |
_Detecting_projection=Detectando la proyecci\u00f3n |
56 | 56 |
|
57 |
_Database_type=Tipo de base de datos |
|
57 | 58 |
|
58 | 59 |
|
59 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.lib/org.gvsig.xml2db.lib.impl/src/test/java/org/gvsig/xml2db/lib/impl/TestCopyXml2db.java | ||
---|---|---|
6 | 6 |
import org.apache.commons.io.FilenameUtils; |
7 | 7 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
8 | 8 |
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase; |
9 |
import org.gvsig.tools.task.SimpleTaskStatus; |
|
10 | 9 |
import org.gvsig.xml2db.lib.api.Xml2dbManager; |
11 | 10 |
import org.gvsig.xml2db.lib.api.xmlinfo.XMLInfo; |
12 | 11 |
import org.slf4j.Logger; |
... | ... | |
44 | 43 |
XMLInfo xmlinfo = manager.extractStructure(xml, null, null, Locale.getDefault(), null, null); |
45 | 44 |
|
46 | 45 |
File dbfile = utils().getFile(new File("databases/declaracion4")); |
47 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(dbfile, xmlinfo, null); |
|
46 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(null, dbfile, xmlinfo, null);
|
|
48 | 47 |
|
49 | 48 |
xml = this.getClass().getResourceAsStream("Declaracion4.xml"); |
50 | 49 |
manager.copyXml2Db(xml, null, dbparams, null, null); |
... | ... | |
63 | 62 |
XMLInfo xmlinfo = manager.extractStructure(xml, null, null, Locale.getDefault(), "dec_", null); |
64 | 63 |
|
65 | 64 |
File dbfile = utils().getFile(new File("databases/declaracion_r10")); |
66 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(dbfile, xmlinfo, null); |
|
65 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(null, dbfile, xmlinfo, null);
|
|
67 | 66 |
|
68 | 67 |
xml = this.getClass().getResourceAsStream(xmlfname); |
69 | 68 |
manager.copyXml2Db(xml, null, dbparams, "dec_", null); |
... | ... | |
73 | 72 |
xml = this.getClass().getResourceAsStream(xmlfname); |
74 | 73 |
xmlinfo = manager.extractStructure(xml, null, null, Locale.getDefault(), "r10g_", null); |
75 | 74 |
|
76 |
dbparams = manager.addToDatabase(dbfile, xmlinfo, null); |
|
75 |
dbparams = manager.addToDatabase(null, dbfile, xmlinfo, null);
|
|
77 | 76 |
|
78 | 77 |
xml = this.getClass().getResourceAsStream(xmlfname); |
79 | 78 |
manager.copyXml2Db(xml, null, dbparams, "r10g_", null); |
80 |
|
|
81 |
//Si esto no peta se habr? creado en |
|
82 |
// /home/fdiaz/projects/gvSIG/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.lib/org.gvsig.xml2db.lib.impl/target/databases/ |
|
83 |
// una BBDD databases/declaracion_r10 |
|
84 |
// Cargarla en gvSIG y ver que las relaciones funcionan |
|
85 |
// Si ha fallado algo revisar StructureExtractorImpl el metodo createFeatureTypes |
|
86 |
|
|
87 |
|
|
79 |
|
|
88 | 80 |
} catch (Throwable t) { |
89 | 81 |
t.printStackTrace(); |
90 | 82 |
throw t; |
... | ... | |
109 | 101 |
XMLInfo xmlinfo = manager.extractStructure(xml, null, null, Locale.getDefault(), tablesPrefix, null); |
110 | 102 |
|
111 | 103 |
File dbfile = utils().getFile(new File("databases/"+FilenameUtils.removeExtension(xmlfname))); |
112 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(dbfile, xmlinfo, null); |
|
104 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(null, dbfile, xmlinfo, null);
|
|
113 | 105 |
|
114 | 106 |
xml = this.getClass().getResourceAsStream(xmlfname); |
115 | 107 |
manager.copyXml2Db(xml, null, dbparams, tablesPrefix, null); |
... | ... | |
130 | 122 |
XMLInfo xmlinfo = manager.extractStructure(xml, null, null, Locale.getDefault(), null, null); |
131 | 123 |
|
132 | 124 |
File dbfile = utils().getFile(new File("databases/victimas")); |
133 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(dbfile, xmlinfo, null); |
|
125 |
JDBCServerExplorerParameters dbparams = manager.createDatabase(null, dbfile, xmlinfo, null);
|
|
134 | 126 |
|
135 | 127 |
xml = this.getClass().getResourceAsStream("victimas.xml"); |
136 | 128 |
// manager.copyXml2Db(xml, null, dbparams); |
... | ... | |
153 | 145 |
InputStream xml1 = this.getClass().getResourceAsStream(xmlfname1); |
154 | 146 |
XMLInfo xmlinfo1 = manager.extractStructure(xml1, null, null, Locale.getDefault(), "R10G_", null); |
155 | 147 |
|
156 |
JDBCServerExplorerParameters dbparams1 = manager.createDatabase(dbfile, xmlinfo1, null); |
|
148 |
JDBCServerExplorerParameters dbparams1 = manager.createDatabase(null, dbfile, xmlinfo1, null);
|
|
157 | 149 |
|
158 | 150 |
xml1 = this.getClass().getResourceAsStream(xmlfname1); |
159 | 151 |
manager.copyXml2Db(xml1, null, dbparams1, "R10G_", null); |
... | ... | |
162 | 154 |
InputStream xml2 = this.getClass().getResourceAsStream(xmlfname2); |
163 | 155 |
XMLInfo xmlinfo2 = manager.extractStructure(xml2, null, null, Locale.getDefault(), "EXP_", null); |
164 | 156 |
|
165 |
JDBCServerExplorerParameters dbparams2 = manager.createDatabase(dbfile, xmlinfo2, null); |
|
157 |
JDBCServerExplorerParameters dbparams2 = manager.createDatabase(null, dbfile, xmlinfo2, null);
|
|
166 | 158 |
|
167 | 159 |
xml2 = this.getClass().getResourceAsStream(xmlfname2); |
168 | 160 |
manager.copyXml2Db(xml2, null, dbparams2, "EXP_", null); |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.lib/org.gvsig.xml2db.lib.impl/src/test/java/org/gvsig/xml2db/lib/impl/TestCreateDatabase.java | ||
---|---|---|
35 | 35 |
XMLInfo xmlinfo = manager.extractStructure(xml, null, null, Locale.getDefault(), null, null); |
36 | 36 |
|
37 | 37 |
File dbfile = utils().getFile(new File("databases/declaracion4")); |
38 |
manager.createDatabase(dbfile, xmlinfo, null); |
|
38 |
manager.createDatabase(null, dbfile, xmlinfo, null);
|
|
39 | 39 |
} |
40 | 40 |
|
41 | 41 |
public void testExtractorR10graf() throws Exception { |
... | ... | |
53 | 53 |
XMLInfo xmlinfo = manager.extractStructure(xml, null, null, Locale.getDefault(), tablesPrefix, null); |
54 | 54 |
|
55 | 55 |
File dbfile = utils().getFile(new File("databases/r10graf")); |
56 |
manager.createDatabase(dbfile, xmlinfo, null); |
|
56 |
manager.createDatabase(null, dbfile, xmlinfo, null);
|
|
57 | 57 |
} |
58 | 58 |
|
59 | 59 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.lib/org.gvsig.xml2db.lib.impl/src/main/java/org/gvsig/xml2db/lib/impl/DefaultXml2dbManager.java | ||
---|---|---|
39 | 39 |
import org.gvsig.fmap.dal.DataManager; |
40 | 40 |
import org.gvsig.fmap.dal.DataStoreParameters; |
41 | 41 |
import org.gvsig.fmap.dal.DatabaseWorkspaceManager; |
42 |
import org.gvsig.fmap.dal.PersonalDatabaseServerExplorerFactory; |
|
42 | 43 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
43 | 44 |
import org.gvsig.fmap.dal.feature.FeatureType; |
44 |
import org.gvsig.fmap.dal.store.h2.H2SpatialUtils; |
|
45 | 45 |
import org.gvsig.fmap.dal.store.jdbc.JDBCNewStoreParameters; |
46 | 46 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
47 | 47 |
import org.gvsig.fmap.dal.store.jdbc.JDBCStoreParameters; |
... | ... | |
101 | 101 |
} |
102 | 102 |
|
103 | 103 |
@Override |
104 |
public JDBCServerExplorerParameters createDatabase(File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus) { |
|
105 |
return addToDatabase(dbfile, xmlinfo, taskStatus, true); |
|
104 |
public JDBCServerExplorerParameters createDatabase(String dbprovider, File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus) {
|
|
105 |
return addToDatabase(dbprovider, dbfile, xmlinfo, taskStatus, true);
|
|
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
@Override |
109 |
public JDBCServerExplorerParameters addToDatabase(File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus) { |
|
110 |
return addToDatabase(dbfile, xmlinfo, taskStatus, false); |
|
109 |
public JDBCServerExplorerParameters addToDatabase(String dbprovider, File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus) {
|
|
110 |
return addToDatabase(dbprovider, dbfile, xmlinfo, taskStatus, false);
|
|
111 | 111 |
} |
112 | 112 |
|
113 |
private JDBCServerExplorerParameters addToDatabase(File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus, boolean createDB) { |
|
113 |
private JDBCServerExplorerParameters addToDatabase(String dbprovider, File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus, boolean createDB) {
|
|
114 | 114 |
try { |
115 | 115 |
taskStatus = SimpleTaskStatus.get(taskStatus); |
116 | 116 |
|
... | ... | |
124 | 124 |
|
125 | 125 |
taskStatus.message(i18n.getTranslation("_Creating_database")); |
126 | 126 |
taskStatus.setIndeterminate(); |
127 |
|
|
128 |
JDBCServerExplorerParameters serverParams = (JDBCServerExplorerParameters) dataManager.createServerExplorerParameters(FeatureStore.H2SPATIAL_PROVIDER_NAME); |
|
127 |
if( StringUtils.isBlank(dbprovider) ) { |
|
128 |
dbprovider = FeatureStore.H2SPATIAL_PROVIDER_NAME; |
|
129 |
} |
|
130 |
PersonalDatabaseServerExplorerFactory factory = (PersonalDatabaseServerExplorerFactory) dataManager.getServerExplorerRegister().getFactory(dbprovider); |
|
131 |
JDBCServerExplorerParameters serverParams = (JDBCServerExplorerParameters) dataManager.createServerExplorerParameters(dbprovider); |
|
129 | 132 |
((HasAFile)serverParams).setFile(dbfile); |
130 | 133 |
|
131 | 134 |
DatabaseWorkspaceManager dbworkspace = dataManager.createDatabaseWorkspaceManager(serverParams); |
132 | 135 |
JDBCServerExplorer server = (JDBCServerExplorer) dbworkspace.getServerExplorer(); |
133 |
if( !H2SpatialUtils.existsH2db(dbfile) ) {
|
|
136 |
if( !factory.existsdb(dbfile) ) {
|
|
134 | 137 |
server.dropCaches(); |
135 | 138 |
} |
136 | 139 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.lib/org.gvsig.xml2db.lib.impl/pom.xml | ||
---|---|---|
72 | 72 |
</dependency> |
73 | 73 |
<dependency> |
74 | 74 |
<groupId>org.gvsig</groupId> |
75 |
<artifactId>org.gvsig.h2spatial.h2gis132.provider</artifactId> |
|
75 |
<artifactId>${org.gvsig.h2spatial.provider}</artifactId> |
|
76 |
<scope>test</scope> |
|
76 | 77 |
</dependency> |
77 | 78 |
<dependency> |
78 | 79 |
<groupId>org.gvsig</groupId> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.lib/org.gvsig.xml2db.lib.api/src/main/java/org/gvsig/xml2db/lib/api/Xml2dbManager.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
public XMLInfo extractStructure(Reader reader, IProjection projection, Locale locale, String tablePrefix, SimpleTaskStatus status) throws IOException; |
50 | 50 |
|
51 |
public JDBCServerExplorerParameters createDatabase(File dbfile, XMLInfo tables, SimpleTaskStatus taskStatus); |
|
51 |
public JDBCServerExplorerParameters createDatabase(String dbprovider, File dbfile, XMLInfo tables, SimpleTaskStatus taskStatus);
|
|
52 | 52 |
|
53 |
public JDBCServerExplorerParameters addToDatabase(File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus); |
|
53 |
public JDBCServerExplorerParameters addToDatabase(String dbprovider, File dbfile, XMLInfo xmlinfo, SimpleTaskStatus taskStatus);
|
|
54 | 54 |
|
55 | 55 |
public void copyXml2Db(File xml, Charset encoding, JDBCServerExplorerParameters dbparams, String tablePrefix, SimpleTaskStatus taskStatus); |
56 | 56 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/copyxml2db/CopyXml2dbPanelView.xml | ||
---|---|---|
24 | 24 |
</at> |
25 | 25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
26 | 26 |
</super> |
27 |
<at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/copyxml2db/CopyXml2dbPanelView.xml</at>
|
|
28 |
<at name="path">projects/gvSIG/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/copyxml2db/CopyXml2dbPanelView.xml</at>
|
|
29 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/copyxml2db/CopyXml2dbPanelView.xml</at>
|
|
28 |
<at name="path">datos/devel/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/copyxml2db/CopyXml2dbPanelView.xml</at>
|
|
29 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at>
|
|
30 | 30 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
31 | 31 |
<at name="components"> |
32 | 32 |
<object classname="java.util.LinkedList"> |
... | ... | |
75 | 75 |
</object> |
76 | 76 |
</at> |
77 | 77 |
<at name="name">lblFileXML</at> |
78 |
<at name="width">149</at>
|
|
78 |
<at name="width">138</at>
|
|
79 | 79 |
<at name="text">_XML_File</at> |
80 | 80 |
<at name="fill"> |
81 | 81 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
82 | 82 |
<at name="name">fill</at> |
83 | 83 |
</object> |
84 | 84 |
</at> |
85 |
<at name="height">14</at>
|
|
85 |
<at name="height">16</at>
|
|
86 | 86 |
</object> |
87 | 87 |
</at> |
88 | 88 |
</object> |
... | ... | |
97 | 97 |
<at name="cellconstraints"> |
98 | 98 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
99 | 99 |
<at name="column">2</at> |
100 |
<at name="row">12</at>
|
|
100 |
<at name="row">14</at>
|
|
101 | 101 |
<at name="colspan">1</at> |
102 | 102 |
<at name="rowspan">1</at> |
103 | 103 |
<at name="halign">default</at> |
... | ... | |
135 | 135 |
</object> |
136 | 136 |
</at> |
137 | 137 |
<at name="name">lblDatabaseFile</at> |
138 |
<at name="width">149</at>
|
|
138 |
<at name="width">138</at>
|
|
139 | 139 |
<at name="text">_File_for_the_database</at> |
140 | 140 |
<at name="fill"> |
141 | 141 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
142 | 142 |
<at name="name">fill</at> |
143 | 143 |
</object> |
144 | 144 |
</at> |
145 |
<at name="height">14</at>
|
|
145 |
<at name="height">16</at>
|
|
146 | 146 |
</object> |
147 | 147 |
</at> |
148 | 148 |
</object> |
... | ... | |
157 | 157 |
<at name="cellconstraints"> |
158 | 158 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
159 | 159 |
<at name="column">2</at> |
160 |
<at name="row">14</at>
|
|
160 |
<at name="row">16</at>
|
|
161 | 161 |
<at name="colspan">1</at> |
162 | 162 |
<at name="rowspan">1</at> |
163 | 163 |
<at name="halign">default</at> |
... | ... | |
195 | 195 |
</object> |
196 | 196 |
</at> |
197 | 197 |
<at name="name">lblRepositoryName</at> |
198 |
<at name="width">149</at>
|
|
198 |
<at name="width">138</at>
|
|
199 | 199 |
<at name="text">_Name_for_the_repository</at> |
200 | 200 |
<at name="fill"> |
201 | 201 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
202 | 202 |
<at name="name">fill</at> |
203 | 203 |
</object> |
204 | 204 |
</at> |
205 |
<at name="height">14</at>
|
|
205 |
<at name="height">16</at>
|
|
206 | 206 |
</object> |
207 | 207 |
</at> |
208 | 208 |
</object> |
... | ... | |
217 | 217 |
<at name="cellconstraints"> |
218 | 218 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
219 | 219 |
<at name="column">4</at> |
220 |
<at name="row">14</at>
|
|
220 |
<at name="row">16</at>
|
|
221 | 221 |
<at name="colspan">1</at> |
222 | 222 |
<at name="rowspan">1</at> |
223 | 223 |
<at name="halign">default</at> |
... | ... | |
255 | 255 |
</object> |
256 | 256 |
</at> |
257 | 257 |
<at name="name">txtRepositoryName</at> |
258 |
<at name="width">1044</at>
|
|
259 |
<at name="height">20</at>
|
|
258 |
<at name="width">1443</at>
|
|
259 |
<at name="height">22</at>
|
|
260 | 260 |
</object> |
261 | 261 |
</at> |
262 | 262 |
</object> |
... | ... | |
309 | 309 |
</object> |
310 | 310 |
</at> |
311 | 311 |
<at name="name">lblProjection</at> |
312 |
<at name="width">149</at>
|
|
312 |
<at name="width">138</at>
|
|
313 | 313 |
<at name="text">_Projection</at> |
314 | 314 |
<at name="fill"> |
315 | 315 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
316 | 316 |
<at name="name">fill</at> |
317 | 317 |
</object> |
318 | 318 |
</at> |
319 |
<at name="height">14</at>
|
|
319 |
<at name="height">16</at>
|
|
320 | 320 |
</object> |
321 | 321 |
</at> |
322 | 322 |
</object> |
... | ... | |
369 | 369 |
</object> |
370 | 370 |
</at> |
371 | 371 |
<at name="name">lblCharset</at> |
372 |
<at name="width">149</at>
|
|
372 |
<at name="width">138</at>
|
|
373 | 373 |
<at name="text">_Charset</at> |
374 | 374 |
<at name="fill"> |
375 | 375 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
376 | 376 |
<at name="name">fill</at> |
377 | 377 |
</object> |
378 | 378 |
</at> |
379 |
<at name="height">14</at>
|
|
379 |
<at name="height">16</at>
|
|
380 | 380 |
</object> |
381 | 381 |
</at> |
382 | 382 |
</object> |
... | ... | |
391 | 391 |
<at name="cellconstraints"> |
392 | 392 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
393 | 393 |
<at name="column">2</at> |
394 |
<at name="row">16</at>
|
|
394 |
<at name="row">18</at>
|
|
395 | 395 |
<at name="colspan">1</at> |
396 | 396 |
<at name="rowspan">1</at> |
397 | 397 |
<at name="halign">default</at> |
... | ... | |
429 | 429 |
</object> |
430 | 430 |
</at> |
431 | 431 |
<at name="name">lblRegisterConnection</at> |
432 |
<at name="width">149</at>
|
|
432 |
<at name="width">138</at>
|
|
433 | 433 |
<at name="text">_Register_connection</at> |
434 | 434 |
<at name="fill"> |
435 | 435 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
436 | 436 |
<at name="name">fill</at> |
437 | 437 |
</object> |
438 | 438 |
</at> |
439 |
<at name="height">14</at>
|
|
439 |
<at name="height">16</at>
|
|
440 | 440 |
</object> |
441 | 441 |
</at> |
442 | 442 |
</object> |
... | ... | |
451 | 451 |
<at name="cellconstraints"> |
452 | 452 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
453 | 453 |
<at name="column">4</at> |
454 |
<at name="row">16</at>
|
|
454 |
<at name="row">18</at>
|
|
455 | 455 |
<at name="colspan">1</at> |
456 | 456 |
<at name="rowspan">1</at> |
457 | 457 |
<at name="halign">default</at> |
... | ... | |
489 | 489 |
</object> |
490 | 490 |
</at> |
491 | 491 |
<at name="name">chkRegisterConnection</at> |
492 |
<at name="width">1044</at>
|
|
492 |
<at name="width">1443</at>
|
|
493 | 493 |
<at name="height">15</at> |
494 | 494 |
</object> |
495 | 495 |
</at> |
... | ... | |
505 | 505 |
<at name="cellconstraints"> |
506 | 506 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
507 | 507 |
<at name="column">2</at> |
508 |
<at name="row">18</at>
|
|
508 |
<at name="row">20</at>
|
|
509 | 509 |
<at name="colspan">1</at> |
510 | 510 |
<at name="rowspan">1</at> |
511 | 511 |
<at name="halign">default</at> |
... | ... | |
543 | 543 |
</object> |
544 | 544 |
</at> |
545 | 545 |
<at name="name">lblConnectToRepository</at> |
546 |
<at name="width">149</at>
|
|
546 |
<at name="width">138</at>
|
|
547 | 547 |
<at name="text">_Connect_to_repository</at> |
548 | 548 |
<at name="fill"> |
549 | 549 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
550 | 550 |
<at name="name">fill</at> |
551 | 551 |
</object> |
552 | 552 |
</at> |
553 |
<at name="height">14</at>
|
|
553 |
<at name="height">16</at>
|
|
554 | 554 |
</object> |
555 | 555 |
</at> |
556 | 556 |
</object> |
... | ... | |
565 | 565 |
<at name="cellconstraints"> |
566 | 566 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
567 | 567 |
<at name="column">4</at> |
568 |
<at name="row">18</at>
|
|
568 |
<at name="row">20</at>
|
|
569 | 569 |
<at name="colspan">1</at> |
570 | 570 |
<at name="rowspan">1</at> |
571 | 571 |
<at name="halign">default</at> |
... | ... | |
603 | 603 |
</object> |
604 | 604 |
</at> |
605 | 605 |
<at name="name">chkConnectToRepository</at> |
606 |
<at name="width">1044</at>
|
|
606 |
<at name="width">1443</at>
|
|
607 | 607 |
<at name="height">15</at> |
608 | 608 |
</object> |
609 | 609 |
</at> |
... | ... | |
619 | 619 |
<at name="cellconstraints"> |
620 | 620 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
621 | 621 |
<at name="column">2</at> |
622 |
<at name="row">20</at>
|
|
622 |
<at name="row">22</at>
|
|
623 | 623 |
<at name="colspan">1</at> |
624 | 624 |
<at name="rowspan">1</at> |
625 | 625 |
<at name="halign">default</at> |
... | ... | |
657 | 657 |
</object> |
658 | 658 |
</at> |
659 | 659 |
<at name="name">lblOverwriteDatabase</at> |
660 |
<at name="width">149</at>
|
|
660 |
<at name="width">138</at>
|
|
661 | 661 |
<at name="text">_Overwrite_database</at> |
662 | 662 |
<at name="fill"> |
663 | 663 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
664 | 664 |
<at name="name">fill</at> |
665 | 665 |
</object> |
666 | 666 |
</at> |
667 |
<at name="height">14</at>
|
|
667 |
<at name="height">16</at>
|
|
668 | 668 |
</object> |
669 | 669 |
</at> |
670 | 670 |
</object> |
... | ... | |
679 | 679 |
<at name="cellconstraints"> |
680 | 680 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
681 | 681 |
<at name="column">4</at> |
682 |
<at name="row">20</at>
|
|
682 |
<at name="row">22</at>
|
|
683 | 683 |
<at name="colspan">1</at> |
684 | 684 |
<at name="rowspan">1</at> |
685 | 685 |
<at name="halign">default</at> |
... | ... | |
717 | 717 |
</object> |
718 | 718 |
</at> |
719 | 719 |
<at name="name">chkOverwriteDatabase</at> |
720 |
<at name="width">1044</at>
|
|
720 |
<at name="width">1443</at>
|
|
721 | 721 |
<at name="height">15</at> |
722 | 722 |
</object> |
723 | 723 |
</at> |
... | ... | |
771 | 771 |
</object> |
772 | 772 |
</at> |
773 | 773 |
<at name="name">lblLocale</at> |
774 |
<at name="width">149</at>
|
|
774 |
<at name="width">138</at>
|
|
775 | 775 |
<at name="text">_Language</at> |
776 | 776 |
<at name="fill"> |
777 | 777 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
778 | 778 |
<at name="name">fill</at> |
779 | 779 |
</object> |
780 | 780 |
</at> |
781 |
<at name="height">14</at>
|
|
781 |
<at name="height">16</at>
|
|
782 | 782 |
</object> |
783 | 783 |
</at> |
784 | 784 |
</object> |
... | ... | |
831 | 831 |
</object> |
832 | 832 |
</at> |
833 | 833 |
<at name="name">cboLocale</at> |
834 |
<at name="width">1044</at>
|
|
834 |
<at name="width">1443</at>
|
|
835 | 835 |
<at name="items"> |
836 | 836 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
837 | 837 |
<at name="name">items</at> |
838 | 838 |
</object> |
839 | 839 |
</at> |
840 |
<at name="height">20</at>
|
|
840 |
<at name="height">22</at>
|
|
841 | 841 |
</object> |
842 | 842 |
</at> |
843 | 843 |
</object> |
... | ... | |
847 | 847 |
</item> |
848 | 848 |
<item > |
849 | 849 |
<at name="value"> |
850 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
851 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
852 |
<at name="cellconstraints"> |
|
853 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
854 |
<at name="column">2</at> |
|
855 |
<at name="row">10</at> |
|
856 |
<at name="colspan">1</at> |
|
857 |
<at name="rowspan">1</at> |
|
858 |
<at name="halign">default</at> |
|
859 |
<at name="valign">default</at> |
|
860 |
<at name="insets" object="insets">0,0,0,0</at> |
|
861 |
</object> |
|
862 |
</at> |
|
863 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
864 |
</super> |
|
865 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
866 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
867 |
<at name="beanproperties"> |
|
868 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
869 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
870 |
<at name="properties"> |
|
871 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
872 |
<at name="border"> |
|
873 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
874 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
875 |
<at name="name">border</at> |
|
876 |
</super> |
|
877 |
<at name="borders"> |
|
878 |
<object classname="java.util.LinkedList"> |
|
879 |
<item > |
|
880 |
<at name="value"> |
|
881 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
882 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
883 |
<at name="name">border</at> |
|
884 |
</super> |
|
885 |
</object> |
|
886 |
</at> |
|
887 |
</item> |
|
888 |
</object> |
|
889 |
</at> |
|
890 |
</object> |
|
891 |
</at> |
|
892 |
<at name="name">lblPrefixesForTables</at> |
|
893 |
<at name="width">138</at> |
|
894 |
<at name="text">_Prefixes_for_tables</at> |
|
895 |
<at name="fill"> |
|
896 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
897 |
<at name="name">fill</at> |
|
898 |
</object> |
|
899 |
</at> |
|
900 |
<at name="height">16</at> |
|
901 |
</object> |
|
902 |
</at> |
|
903 |
</object> |
|
904 |
</at> |
|
905 |
</object> |
|
906 |
</at> |
|
907 |
</item> |
|
908 |
<item > |
|
909 |
<at name="value"> |
|
910 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
911 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
912 |
<at name="cellconstraints"> |
|
913 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
914 |
<at name="column">4</at> |
|
915 |
<at name="row">10</at> |
|
916 |
<at name="colspan">1</at> |
|
917 |
<at name="rowspan">1</at> |
|
918 |
<at name="halign">default</at> |
|
919 |
<at name="valign">default</at> |
|
920 |
<at name="insets" object="insets">0,0,0,0</at> |
|
921 |
</object> |
|
922 |
</at> |
|
923 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
924 |
</super> |
|
925 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
926 |
<at name="beanclass">javax.swing.JTextField</at> |
|
927 |
<at name="beanproperties"> |
|
928 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
929 |
<at name="classname">javax.swing.JTextField</at> |
|
930 |
<at name="properties"> |
|
931 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
932 |
<at name="border"> |
|
933 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
934 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
935 |
<at name="name">border</at> |
|
936 |
</super> |
|
937 |
<at name="borders"> |
|
938 |
<object classname="java.util.LinkedList"> |
|
939 |
<item > |
|
940 |
<at name="value"> |
|
941 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
942 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
943 |
<at name="name">border</at> |
|
944 |
</super> |
|
945 |
</object> |
|
946 |
</at> |
|
947 |
</item> |
|
948 |
</object> |
|
949 |
</at> |
|
950 |
</object> |
|
951 |
</at> |
|
952 |
<at name="name">txtPrefixesForTables</at> |
|
953 |
<at name="width">1443</at> |
|
954 |
<at name="height">22</at> |
|
955 |
</object> |
|
956 |
</at> |
|
957 |
</object> |
|
958 |
</at> |
|
959 |
</object> |
|
960 |
</at> |
|
961 |
</item> |
|
962 |
<item > |
|
963 |
<at name="value"> |
|
964 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
965 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
966 |
<at name="cellconstraints"> |
|
967 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
968 |
<at name="column">2</at> |
|
969 |
<at name="row">12</at> |
|
970 |
<at name="colspan">1</at> |
|
971 |
<at name="rowspan">1</at> |
|
972 |
<at name="halign">default</at> |
|
973 |
<at name="valign">default</at> |
|
974 |
<at name="insets" object="insets">0,0,0,0</at> |
|
975 |
</object> |
|
976 |
</at> |
|
977 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
978 |
</super> |
|
979 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
980 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
981 |
<at name="beanproperties"> |
|
982 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
983 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
984 |
<at name="properties"> |
|
985 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
986 |
<at name="border"> |
|
987 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
988 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
989 |
<at name="name">border</at> |
|
990 |
</super> |
|
991 |
<at name="borders"> |
|
992 |
<object classname="java.util.LinkedList"> |
|
993 |
<item > |
|
994 |
<at name="value"> |
|
995 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
996 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
997 |
<at name="name">border</at> |
|
998 |
</super> |
|
999 |
</object> |
|
1000 |
</at> |
|
1001 |
</item> |
|
1002 |
</object> |
|
1003 |
</at> |
|
1004 |
</object> |
|
1005 |
</at> |
|
1006 |
<at name="name">lblDatabaseType</at> |
|
1007 |
<at name="width">138</at> |
|
1008 |
<at name="text">_Database_type</at> |
|
1009 |
<at name="fill"> |
|
1010 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
1011 |
<at name="name">fill</at> |
|
1012 |
</object> |
|
1013 |
</at> |
|
1014 |
<at name="height">16</at> |
|
1015 |
</object> |
|
1016 |
</at> |
|
1017 |
</object> |
|
1018 |
</at> |
|
1019 |
</object> |
|
1020 |
</at> |
|
1021 |
</item> |
|
1022 |
<item > |
|
1023 |
<at name="value"> |
|
850 | 1024 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
851 | 1025 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
852 | 1026 |
<at name="cellconstraints"> |
... | ... | |
862 | 1036 |
</at> |
863 | 1037 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
864 | 1038 |
</super> |
865 |
<at name="id">embedded.137227687</at>
|
|
1039 |
<at name="id">embedded.692524210</at>
|
|
866 | 1040 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
867 | 1041 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
868 | 1042 |
<at name="components"> |
... | ... | |
912 | 1086 |
</object> |
913 | 1087 |
</at> |
914 | 1088 |
<at name="name">txtXMLFile</at> |
915 |
<at name="width">1011</at>
|
|
916 |
<at name="height">20</at>
|
|
1089 |
<at name="width">1415</at>
|
|
1090 |
<at name="height">22</at>
|
|
917 | 1091 |
</object> |
918 | 1092 |
</at> |
919 | 1093 |
</object> |
... | ... | |
971 | 1145 |
</at> |
972 | 1146 |
<at name="actionCommand">...</at> |
973 | 1147 |
<at name="name">btnXMLFile</at> |
974 |
<at name="width">16</at>
|
|
1148 |
<at name="width">13</at>
|
|
975 | 1149 |
<at name="text">...</at> |
976 |
<at name="height">18</at>
|
|
1150 |
<at name="height">20</at>
|
|
977 | 1151 |
</object> |
978 | 1152 |
</at> |
979 | 1153 |
</object> |
... | ... | |
1070 | 1244 |
<at name="cellconstraints"> |
1071 | 1245 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
1072 | 1246 |
<at name="column">4</at> |
1073 |
<at name="row">12</at>
|
|
1247 |
<at name="row">14</at>
|
|
1074 | 1248 |
<at name="colspan">1</at> |
1075 | 1249 |
<at name="rowspan">1</at> |
1076 | 1250 |
<at name="halign">default</at> |
... | ... | |
1080 | 1254 |
</at> |
1081 | 1255 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1082 | 1256 |
</super> |
1083 |
<at name="id">embedded.1118998551</at>
|
|
1257 |
<at name="id">embedded.984492469</at>
|
|
1084 | 1258 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
1085 | 1259 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
1086 | 1260 |
<at name="components"> |
... | ... | |
1135 | 1309 |
</at> |
1136 | 1310 |
<at name="actionCommand">...</at> |
1137 | 1311 |
<at name="name">btnDataBaseFile</at> |
1138 |
<at name="width">16</at>
|
|
1312 |
<at name="width">13</at>
|
|
1139 | 1313 |
<at name="text">...</at> |
1140 |
<at name="height">18</at>
|
|
1314 |
<at name="height">20</at>
|
|
1141 | 1315 |
</object> |
1142 | 1316 |
</at> |
1143 | 1317 |
</object> |
... | ... | |
1190 | 1364 |
</object> |
1191 | 1365 |
</at> |
1192 | 1366 |
<at name="name">txtDatabaseFile</at> |
1193 |
<at name="width">1011</at>
|
|
1194 |
<at name="height">20</at>
|
|
1367 |
<at name="width">1415</at>
|
|
1368 |
<at name="height">22</at>
|
|
1195 | 1369 |
</object> |
1196 | 1370 |
</at> |
1197 | 1371 |
</object> |
... | ... | |
1298 | 1472 |
</at> |
1299 | 1473 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1300 | 1474 |
</super> |
1301 |
<at name="id">embedded.423406884</at>
|
|
1475 |
<at name="id">embedded.1674698869</at>
|
|
1302 | 1476 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
1303 | 1477 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
1304 | 1478 |
<at name="components"> |
... | ... | |
1348 | 1522 |
</object> |
1349 | 1523 |
</at> |
1350 | 1524 |
<at name="name">txtProjection</at> |
1351 |
<at name="width">979</at>
|
|
1352 |
<at name="height">20</at>
|
|
1525 |
<at name="width">1385</at>
|
|
1526 |
<at name="height">22</at>
|
|
1353 | 1527 |
</object> |
1354 | 1528 |
</at> |
1355 | 1529 |
</object> |
... | ... | |
1407 | 1581 |
</at> |
1408 | 1582 |
<at name="actionCommand">...</at> |
1409 | 1583 |
<at name="name">btnProjection</at> |
1410 |
<at name="width">16</at>
|
|
1584 |
<at name="width">13</at>
|
|
1411 | 1585 |
<at name="text">...</at> |
1412 |
<at name="height">18</at>
|
|
1586 |
<at name="height">20</at>
|
|
1413 | 1587 |
</object> |
1414 | 1588 |
</at> |
1415 | 1589 |
</object> |
... | ... | |
1575 | 1749 |
<at name="cellconstraints"> |
1576 | 1750 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
1577 | 1751 |
<at name="column">2</at> |
1578 |
<at name="row">22</at>
|
|
1752 |
<at name="row">24</at>
|
|
1579 | 1753 |
<at name="colspan">3</at> |
1580 | 1754 |
<at name="rowspan">1</at> |
1581 | 1755 |
<at name="halign">default</at> |
... | ... | |
1585 | 1759 |
</at> |
1586 | 1760 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1587 | 1761 |
</super> |
1588 |
<at name="id">embedded.40073711</at>
|
|
1762 |
<at name="id">embedded.1715314987</at>
|
|
1589 | 1763 |
<at name="rowspecs">CENTER:MAX(12DLU;DEFAULT):NONE,CENTER:MAX(12DLU;DEFAULT):NONE,CENTER:MAX(12DLU;DEFAULT):NONE</at> |
1590 | 1764 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE</at> |
1591 | 1765 |
<at name="components"> |
... | ... | |
1635 | 1809 |
</object> |
1636 | 1810 |
</at> |
1637 | 1811 |
<at name="name">lblStatusCaption</at> |
1638 |
<at name="width">1184</at>
|
|
1812 |
<at name="width">1570</at>
|
|
1639 | 1813 |
<at name="fill"> |
1640 | 1814 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
1641 | 1815 |
<at name="name">fill</at> |
... | ... | |
1694 | 1868 |
</object> |
1695 | 1869 |
</at> |
1696 | 1870 |
<at name="name">lblStatusMsg</at> |
1697 |
<at name="width">1184</at>
|
|
1871 |
<at name="width">1570</at>
|
|
1698 | 1872 |
<at name="fill"> |
1699 | 1873 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
1700 | 1874 |
<at name="name">fill</at> |
... | ... | |
1753 | 1927 |
</object> |
1754 | 1928 |
</at> |
1755 | 1929 |
<at name="name">pbStatus</at> |
1756 |
<at name="width">1184</at>
|
|
1930 |
<at name="width">1570</at>
|
|
1757 | 1931 |
<at name="percentComplete">0.25</at> |
1758 | 1932 |
<at name="value">25</at> |
1759 | 1933 |
<at name="height">14</at> |
... | ... | |
1869 | 2043 |
</at> |
1870 | 2044 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1871 | 2045 |
</super> |
1872 |
<at name="id">embedded.375613019</at>
|
|
2046 |
<at name="id">embedded.237262277</at>
|
|
1873 | 2047 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
1874 | 2048 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
1875 | 2049 |
<at name="components"> |
... | ... | |
1988 | 2162 |
</object> |
1989 | 2163 |
</at> |
1990 | 2164 |
<at name="name">cboCharset</at> |
1991 |
<at name="width">1007</at>
|
|
2165 |
<at name="width">1408</at>
|
|
1992 | 2166 |
<at name="items"> |
1993 | 2167 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
1994 | 2168 |
<at name="name">items</at> |
1995 | 2169 |
</object> |
1996 | 2170 |
</at> |
1997 |
<at name="height">20</at>
|
|
2171 |
<at name="height">22</at>
|
|
1998 | 2172 |
</object> |
1999 | 2173 |
</at> |
2000 | 2174 |
</object> |
... | ... | |
2090 | 2264 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
2091 | 2265 |
<at name="cellconstraints"> |
2092 | 2266 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
2093 |
<at name="column">2</at>
|
|
2094 |
<at name="row">10</at>
|
|
2267 |
<at name="column">4</at>
|
|
2268 |
<at name="row">12</at>
|
|
2095 | 2269 |
<at name="colspan">1</at> |
2096 | 2270 |
<at name="rowspan">1</at> |
2097 | 2271 |
<at name="halign">default</at> |
... | ... | |
2102 | 2276 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
2103 | 2277 |
</super> |
2104 | 2278 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
2105 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
|
|
2279 |
<at name="beanclass">javax.swing.JComboBox</at>
|
|
2106 | 2280 |
<at name="beanproperties"> |
2107 | 2281 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
2108 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at>
|
|
2282 |
<at name="classname">javax.swing.JComboBox</at>
|
|
2109 | 2283 |
<at name="properties"> |
2110 | 2284 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
2111 | 2285 |
<at name="border"> |
... | ... | |
2128 | 2302 |
</at> |
2129 | 2303 |
</object> |
2130 | 2304 |
</at> |
2131 |
<at name="name">lblPrefixesForTables</at> |
|
2132 |
<at name="width">149</at> |
|
2133 |
<at name="text">_Prefixes_for_tables</at> |
|
2134 |
<at name="fill"> |
|
2135 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
2136 |
<at name="name">fill</at> |
|
2305 |
<at name="name">cboDatabaseType</at> |
|
2306 |
<at name="width">1443</at> |
|
2307 |
<at name="items"> |
|
2308 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
2309 |
<at name="name">items</at> |
|
2137 | 2310 |
</object> |
2138 | 2311 |
</at> |
2139 |
<at name="height">14</at>
|
|
2312 |
<at name="height">22</at>
|
|
2140 | 2313 |
</object> |
2141 | 2314 |
</at> |
2142 | 2315 |
</object> |
... | ... | |
2144 | 2317 |
</object> |
2145 | 2318 |
</at> |
2146 | 2319 |
</item> |
2147 |
<item > |
|
2148 |
<at name="value"> |
|
2149 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
2150 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
2151 |
<at name="cellconstraints"> |
|
2152 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
2153 |
<at name="column">4</at> |
|
2154 |
<at name="row">10</at> |
|
2155 |
<at name="colspan">1</at> |
|
2156 |
<at name="rowspan">1</at> |
|
2157 |
<at name="halign">default</at> |
|
2158 |
<at name="valign">default</at> |
|
2159 |
<at name="insets" object="insets">0,0,0,0</at> |
|
2160 |
</object> |
|
2161 |
</at> |
|
2162 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
2163 |
</super> |
|
2164 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
2165 |
<at name="beanclass">javax.swing.JTextField</at> |
|
2166 |
<at name="beanproperties"> |
|
2167 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
2168 |
<at name="classname">javax.swing.JTextField</at> |
|
2169 |
<at name="properties"> |
|
2170 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
2171 |
<at name="border"> |
|
2172 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
2173 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
2174 |
<at name="name">border</at> |
|
2175 |
</super> |
|
2176 |
<at name="borders"> |
|
2177 |
<object classname="java.util.LinkedList"> |
|
2178 |
<item > |
|
2179 |
<at name="value"> |
|
2180 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
2181 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
2182 |
<at name="name">border</at> |
|
2183 |
</super> |
|
2184 |
</object> |
|
2185 |
</at> |
|
2186 |
</item> |
|
2187 |
</object> |
|
2188 |
</at> |
|
2189 |
</object> |
|
2190 |
</at> |
|
2191 |
<at name="name">txtPrefixesForTables</at> |
|
2192 |
<at name="width">1044</at> |
|
2193 |
<at name="height">20</at> |
|
2194 |
</object> |
|
2195 |
</at> |
|
2196 |
</object> |
|
2197 |
</at> |
|
2198 |
</object> |
|
2199 |
</at> |
|
2200 |
</item> |
|
2201 | 2320 |
</object> |
2202 | 2321 |
</at> |
2203 | 2322 |
<at name="properties"> |
... | ... | |
2255 | 2374 |
<at name="cellpainters"> |
2256 | 2375 |
<object classname="com.jeta.forms.store.support.Matrix"> |
2257 | 2376 |
<at name="rows"> |
2258 |
<object classname="[Ljava.lang.Object;" size="23">
|
|
2377 |
<object classname="[Ljava.lang.Object;" size="25">
|
|
2259 | 2378 |
<at name="item" index="0"> |
2260 | 2379 |
<object classname="[Ljava.lang.Object;" size="5"/> |
2261 | 2380 |
</at> |
... | ... | |
2325 | 2444 |
<at name="item" index="22"> |
2326 | 2445 |
<object classname="[Ljava.lang.Object;" size="5"/> |
2327 | 2446 |
</at> |
2447 |
<at name="item" index="23"> |
|
2448 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
2449 |
</at> |
|
2450 |
<at name="item" index="24"> |
|
2451 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
2452 |
</at> |
|
2328 | 2453 |
</object> |
2329 | 2454 |
</at> |
2330 | 2455 |
</object> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/copyxml2db/CopyXml2dbPanelView.java | ||
---|---|---|
36 | 36 |
JCheckBox chkOverwriteDatabase = new JCheckBox(); |
37 | 37 |
JLabel lblLocale = new JLabel(); |
38 | 38 |
JComboBox cboLocale = new JComboBox(); |
39 |
JLabel lblPrefixesForTables = new JLabel(); |
|
40 |
JTextField txtPrefixesForTables = new JTextField(); |
|
41 |
JLabel lblDatabaseType = new JLabel(); |
|
39 | 42 |
JTextField txtXMLFile = new JTextField(); |
40 | 43 |
JButton btnXMLFile = new JButton(); |
41 | 44 |
JButton btnDataBaseFile = new JButton(); |
... | ... | |
48 | 51 |
JProgressBar pbStatus = new JProgressBar(); |
49 | 52 |
JButton btnDetectCharset = new JButton(); |
50 | 53 |
JComboBox cboCharset = new JComboBox(); |
51 |
JLabel lblPrefixesForTables = new JLabel(); |
|
52 |
JTextField txtPrefixesForTables = new JTextField(); |
|
54 |
JComboBox cboDatabaseType = new JComboBox(); |
|
53 | 55 |
|
54 | 56 |
/** |
55 | 57 |
* Default constructor |
... | ... | |
141 | 143 |
public JPanel createPanel() |
142 | 144 |
{ |
143 | 145 |
JPanel jpanel1 = new JPanel(); |
144 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
|
146 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
|
|
145 | 147 |
CellConstraints cc = new CellConstraints(); |
146 | 148 |
jpanel1.setLayout(formlayout1); |
147 | 149 |
|
... | ... | |
151 | 153 |
|
152 | 154 |
lblDatabaseFile.setName("lblDatabaseFile"); |
153 | 155 |
lblDatabaseFile.setText("_File_for_the_database"); |
154 |
jpanel1.add(lblDatabaseFile,cc.xy(2,12));
|
|
156 |
jpanel1.add(lblDatabaseFile,cc.xy(2,14));
|
|
155 | 157 |
|
156 | 158 |
lblRepositoryName.setName("lblRepositoryName"); |
157 | 159 |
lblRepositoryName.setText("_Name_for_the_repository"); |
158 |
jpanel1.add(lblRepositoryName,cc.xy(2,14));
|
|
160 |
jpanel1.add(lblRepositoryName,cc.xy(2,16));
|
|
159 | 161 |
|
160 | 162 |
txtRepositoryName.setName("txtRepositoryName"); |
161 |
jpanel1.add(txtRepositoryName,cc.xy(4,14));
|
|
163 |
jpanel1.add(txtRepositoryName,cc.xy(4,16));
|
|
162 | 164 |
|
163 | 165 |
lblProjection.setName("lblProjection"); |
164 | 166 |
lblProjection.setText("_Projection"); |
... | ... | |
170 | 172 |
|
171 | 173 |
lblRegisterConnection.setName("lblRegisterConnection"); |
172 | 174 |
lblRegisterConnection.setText("_Register_connection"); |
173 |
jpanel1.add(lblRegisterConnection,cc.xy(2,16));
|
|
175 |
jpanel1.add(lblRegisterConnection,cc.xy(2,18));
|
|
174 | 176 |
|
175 | 177 |
chkRegisterConnection.setName("chkRegisterConnection"); |
176 |
jpanel1.add(chkRegisterConnection,cc.xy(4,16));
|
|
178 |
jpanel1.add(chkRegisterConnection,cc.xy(4,18));
|
|
177 | 179 |
|
178 | 180 |
lblConnectToRepository.setName("lblConnectToRepository"); |
179 | 181 |
lblConnectToRepository.setText("_Connect_to_repository"); |
180 |
jpanel1.add(lblConnectToRepository,cc.xy(2,18));
|
|
182 |
jpanel1.add(lblConnectToRepository,cc.xy(2,20));
|
|
181 | 183 |
|
182 | 184 |
chkConnectToRepository.setName("chkConnectToRepository"); |
183 |
jpanel1.add(chkConnectToRepository,cc.xy(4,18));
|
|
185 |
jpanel1.add(chkConnectToRepository,cc.xy(4,20));
|
|
184 | 186 |
|
185 | 187 |
lblOverwriteDatabase.setName("lblOverwriteDatabase"); |
186 | 188 |
lblOverwriteDatabase.setText("_Overwrite_database"); |
187 |
jpanel1.add(lblOverwriteDatabase,cc.xy(2,20));
|
|
189 |
jpanel1.add(lblOverwriteDatabase,cc.xy(2,22));
|
|
188 | 190 |
|
189 | 191 |
chkOverwriteDatabase.setName("chkOverwriteDatabase"); |
190 |
jpanel1.add(chkOverwriteDatabase,cc.xy(4,20));
|
|
192 |
jpanel1.add(chkOverwriteDatabase,cc.xy(4,22));
|
|
191 | 193 |
|
192 | 194 |
lblLocale.setName("lblLocale"); |
193 | 195 |
lblLocale.setText("_Language"); |
... | ... | |
196 | 198 |
cboLocale.setName("cboLocale"); |
197 | 199 |
jpanel1.add(cboLocale,cc.xy(4,6)); |
198 | 200 |
|
199 |
jpanel1.add(createPanel1(),cc.xy(4,2)); |
|
200 |
jpanel1.add(createPanel2(),cc.xy(4,12)); |
|
201 |
jpanel1.add(createPanel3(),cc.xy(4,8)); |
|
202 |
jpanel1.add(createPanel4(),cc.xywh(2,22,3,1)); |
|
203 |
jpanel1.add(createPanel5(),cc.xy(4,4)); |
|
204 | 201 |
lblPrefixesForTables.setName("lblPrefixesForTables"); |
205 | 202 |
lblPrefixesForTables.setText("_Prefixes_for_tables"); |
206 | 203 |
jpanel1.add(lblPrefixesForTables,cc.xy(2,10)); |
... | ... | |
208 | 205 |
txtPrefixesForTables.setName("txtPrefixesForTables"); |
209 | 206 |
jpanel1.add(txtPrefixesForTables,cc.xy(4,10)); |
210 | 207 |
|
211 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 }); |
|
208 |
lblDatabaseType.setName("lblDatabaseType"); |
|
209 |
lblDatabaseType.setText("_Database_type"); |
|
210 |
jpanel1.add(lblDatabaseType,cc.xy(2,12)); |
|
211 |
|
|
212 |
jpanel1.add(createPanel1(),cc.xy(4,2)); |
|
213 |
jpanel1.add(createPanel2(),cc.xy(4,14)); |
|
214 |
jpanel1.add(createPanel3(),cc.xy(4,8)); |
|
215 |
jpanel1.add(createPanel4(),cc.xywh(2,24,3,1)); |
|
216 |
jpanel1.add(createPanel5(),cc.xy(4,4)); |
|
217 |
cboDatabaseType.setName("cboDatabaseType"); |
|
218 |
jpanel1.add(cboDatabaseType,cc.xy(4,12)); |
|
219 |
|
|
220 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25 }); |
|
212 | 221 |
return jpanel1; |
213 | 222 |
} |
214 | 223 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/copyxml2db/CopyXml2dbPanel.java | ||
---|---|---|
40 | 40 |
import org.cresques.cts.IProjection; |
41 | 41 |
import org.gvsig.fmap.dal.DALLocator; |
42 | 42 |
import org.gvsig.fmap.dal.DataManager; |
43 |
import org.gvsig.fmap.dal.store.h2.H2SpatialUtils;
|
|
43 |
import org.gvsig.fmap.dal.PersonalDatabaseServerExplorerFactory;
|
|
44 | 44 |
import org.gvsig.fmap.dal.store.jdbc.JDBCServerExplorerParameters; |
45 | 45 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
46 | 46 |
import org.gvsig.fmap.dal.swing.DataSwingManager; |
... | ... | |
66 | 66 |
import org.gvsig.xml2db.swing.Xml2dbPanel; |
67 | 67 |
import org.gvsig.xml2db.swing.impl.Task; |
68 | 68 |
import org.gvsig.xml2db.swing.impl.Xml2dbSwingCommons; |
69 |
import static org.gvsig.xml2db.swing.impl.Xml2dbSwingCommons.getPersonalDatabaseServerExplorersComboModel; |
|
69 | 70 |
import org.slf4j.Logger; |
70 | 71 |
import org.slf4j.LoggerFactory; |
71 | 72 |
|
... | ... | |
187 | 188 |
doDetectProjection(); |
188 | 189 |
}); |
189 | 190 |
|
191 |
this.cboDatabaseType.setModel(getPersonalDatabaseServerExplorersComboModel()); |
|
192 |
|
|
190 | 193 |
this.pickerDbfile = toolsSwingManager.createFilePickerController( |
191 | 194 |
this.txtDatabaseFile, |
192 | 195 |
this.btnDataBaseFile |
... | ... | |
254 | 257 |
} |
255 | 258 |
return; |
256 | 259 |
} |
260 |
PersonalDatabaseServerExplorerFactory explorerFactory = this.getExplorerFactory(); |
|
261 |
|
|
257 | 262 |
this.pickerXMLFile.setEnabled(true); |
258 | 263 |
this.pickerCharset.setEnabled(true); |
259 | 264 |
this.pickerProjection.setEnabled(true); |
... | ... | |
284 | 289 |
} |
285 | 290 |
return; |
286 | 291 |
} |
287 |
if( H2SpatialUtils.existsH2db(dbfile) && !this.chkOverwriteDatabase.isSelected() ) {
|
|
292 |
if( explorerFactory.existsdb(dbfile) && !this.chkOverwriteDatabase.isSelected() ) {
|
|
288 | 293 |
this.message(i18n.getTranslation("_Database_file_already_exists"), JOptionPane.WARNING_MESSAGE); |
289 | 294 |
if( this.dialog!=null ) { |
290 | 295 |
this.dialog.setButtonEnabled(WindowManager_v2.BUTTON_OK, false); |
... | ... | |
345 | 350 |
boolean registerConnection = this.chkRegisterConnection.isSelected(); |
346 | 351 |
boolean connectToRepository = this.chkConnectToRepository.isSelected(); |
347 | 352 |
|
353 |
PersonalDatabaseServerExplorerFactory explorerFactory = this.getExplorerFactory(); |
|
354 |
|
|
348 | 355 |
Xml2dbManager manager = Xml2dbLocator.getXml2dbManager(); |
349 | 356 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
350 | 357 |
|
351 |
if( H2SpatialUtils.existsH2db(dbfile) ) {
|
|
358 |
if( explorerFactory.existsdb(dbfile) ) {
|
|
352 | 359 |
if( !this.chkOverwriteDatabase.isSelected() ) { |
353 | 360 |
message(i18n.getTranslation("_Database_file_already_exists"), JOptionPane.WARNING_MESSAGE); |
354 | 361 |
return; |
... | ... | |
368 | 375 |
@Override |
369 | 376 |
protected void task(SimpleTaskStatus taskStatus) throws Throwable{ |
370 | 377 |
try { |
371 |
if( H2SpatialUtils.existsH2db(dbfile) ) {
|
|
378 |
if( explorerFactory.existsdb(dbfile) ) {
|
|
372 | 379 |
taskStatus.message(i18n.getTranslation("_Removing_existing_database")); |
373 |
H2SpatialUtils.server_stop();
|
|
374 |
H2SpatialUtils.removeH2db(dbfile);
|
|
375 |
H2SpatialUtils.server_start();
|
|
380 |
explorerFactory.serverStop();
|
|
381 |
explorerFactory.removedb(dbfile);
|
|
382 |
explorerFactory.serverStart();
|
|
376 | 383 |
} |
377 | 384 |
XMLInfo xmlinfo = manager.extractStructure(xmlfile, charset, userproj, locale, tablesPrefix, taskStatus); |
378 | 385 |
if( xmlinfo==null ) { |
... | ... | |
390 | 397 |
if( xmlinfo.getCharset()!=null && charset==null ) { |
391 | 398 |
pickerCharset.set(xmlinfo.getCharset()); |
392 | 399 |
} |
393 |
JDBCServerExplorerParameters params = manager.createDatabase(dbfile, xmlinfo, taskStatus); |
|
400 |
JDBCServerExplorerParameters params = manager.createDatabase(explorerFactory.getName(), dbfile, xmlinfo, taskStatus);
|
|
394 | 401 |
if( params == null ) { |
395 | 402 |
throw new RuntimeException("Can't copy xml to database"); |
396 | 403 |
} |
... | ... | |
503 | 510 |
public ImageIcon loadImage(String imageName) { |
504 | 511 |
return ToolsSwingUtils.loadImage(this, imageName); |
505 | 512 |
} |
506 |
|
|
507 |
|
|
508 |
|
|
513 |
|
|
514 |
private PersonalDatabaseServerExplorerFactory getExplorerFactory() { |
|
515 |
return (PersonalDatabaseServerExplorerFactory) this.cboDatabaseType.getSelectedItem(); |
|
516 |
} |
|
509 | 517 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.xml2db/org.gvsig.xml2db.swing/org.gvsig.xml2db.swing.impl/src/main/java/org/gvsig/xml2db/swing/impl/Xml2dbSwingCommons.java | ||
---|---|---|
27 | 27 |
import java.awt.Font; |
28 | 28 |
import java.awt.font.TextAttribute; |
29 | 29 |
import java.util.Map; |
30 |
import javax.swing.ComboBoxModel; |
|
31 |
import javax.swing.DefaultComboBoxModel; |
|
32 |
import org.apache.commons.lang3.StringUtils; |
|
33 |
import org.gvsig.fmap.dal.DALLocator; |
|
34 |
import org.gvsig.fmap.dal.DataFactory; |
Also available in: Unified diff