Revision 28853
trunk/libraries/libJCRS/.classpath | ||
---|---|---|
10 | 10 |
<classpathentry kind="lib" path="lib/db_iau2000.jar"/> |
11 | 11 |
<classpathentry kind="lib" path="lib/db_usr.jar"/> |
12 | 12 |
<classpathentry kind="lib" path="lib/db_esri.jar"/> |
13 |
<classpathentry kind="lib" path="lib/geotools-epsg-hsql-2.1.1_gvsig.jar"/> |
|
13 | 14 |
<classpathentry combineaccessrules="false" kind="src" path="/_fwAndami"/> |
14 |
<classpathentry kind="lib" path="lib/db_epsg.jar"/> |
|
15 | 15 |
<classpathentry kind="lib" path="/libFMap/lib/units-0.01.jar"/> |
16 | 16 |
<classpathentry kind="lib" path="/libFMap/lib/org.cresques.cts.jar"/> |
17 | 17 |
<classpathentry kind="output" path="bin"/> |
trunk/libraries/libJCRS/src/es/idr/teledeteccion/connection/EpsgConnection.java | ||
---|---|---|
40 | 40 |
|
41 | 41 |
package es.idr.teledeteccion.connection; |
42 | 42 |
|
43 |
import java.io.BufferedReader; |
|
44 |
import java.io.File; |
|
45 |
import java.io.IOException; |
|
46 |
import java.io.InputStreamReader; |
|
47 | 43 |
import java.sql.Connection; |
48 | 44 |
import java.sql.ResultSet; |
49 | 45 |
import java.sql.SQLException; |
50 | 46 |
import java.sql.Statement; |
51 |
import java.util.logging.Logger; |
|
52 | 47 |
|
53 | 48 |
import org.geotools.referencing.factory.epsg.HSQLDataSource; |
54 |
import org.geotools.referencing.factory.iau2000.FactoryUsingHSQL; |
|
55 | 49 |
import org.hsqldb.jdbc.jdbcDataSource; |
56 | 50 |
|
57 | 51 |
/** |
... | ... | |
66 | 60 |
public class EpsgConnection extends jdbcDataSource { |
67 | 61 |
|
68 | 62 |
Connection connect; |
63 |
private static String usrConnectionStr = "jdbc:hsqldb:file:gvSIG/extensiones/org.gvsig.crs/usr"; |
|
69 | 64 |
|
70 | 65 |
public EpsgConnection() { |
71 | 66 |
/* try { |
... | ... | |
121 | 116 |
* |
122 | 117 |
*/ |
123 | 118 |
public void setConnectionUsr() { |
124 |
setDatabase("jdbc:hsqldb:file:gvSIG/extensiones/org.gvsig.crs/usr");
|
|
119 |
setDatabase(usrConnectionStr);
|
|
125 | 120 |
setUser("sa"); |
126 | 121 |
try { |
127 | 122 |
connect = super.getConnection(); |
128 | 123 |
} catch (SQLException e) { |
129 |
// TODO Auto-generated catch block |
|
130 | 124 |
e.printStackTrace(); |
125 |
if (!usrConnectionStr.endsWith("-ro")) { |
|
126 |
// if the DB is already open, use a ro copy of it |
|
127 |
usrConnectionStr = usrConnectionStr+"-ro"; |
|
128 |
setConnectionUsr(); |
|
129 |
} |
|
131 | 130 |
} |
132 | 131 |
} |
133 | 132 |
|
trunk/extensions/extJCRS/build.xml | ||
---|---|---|
84 | 84 |
<fileset dir="config" includes="esri.*"/> |
85 | 85 |
<fileset dir="config" includes="iau2000.*"/> |
86 | 86 |
<fileset dir="config" includes="usr.*"/> |
87 |
</copy> |
|
87 |
<fileset dir="config" includes="usr-ro.*"/> |
|
88 |
</copy> |
|
89 |
<!-- user-ro script will be used to allow read-only concurrent access --> |
|
90 |
<copy tofile="${dist}/usr-ro.script" file="config/usr.script"/> |
|
91 |
|
|
88 | 92 |
<move todir="${extension-dir}/${plugin}/"> |
89 | 93 |
<fileset dir="${dist}" includes="**/**"/> |
90 | 94 |
</move> |
trunk/extensions/extJCRS/config/usr-ro.properties | ||
---|---|---|
1 |
#HSQL database |
|
2 |
#Mon May 21 10:22:10 CEST 2007 |
|
3 |
hsqldb.cache_file_scale=1 |
|
4 |
runtime.gc_interval=0 |
|
5 |
hsqldb.first_identity=0 |
|
6 |
version=1.7.3 |
|
7 |
modified=yes |
|
8 |
hsqldb.script_format=0 |
|
9 |
sql.enforce_size=false |
|
10 |
hsqldb.cache_size_scale=10 |
|
11 |
hsqldb.cache_scale=14 |
|
12 |
hsqldb.version=1.7.3 |
|
13 |
hsqldb.log_size=200 |
|
14 |
sql.enforce_strict_size=false |
|
15 |
readonly=true |
|
16 |
hsqldb.compatible_version=1.7.2 |
|
17 |
hsqldb.original_version=1.7.3 |
|
18 |
sql.compare_in_locale=false |
|
19 |
hsqldb.nio_data_file=true |
|
20 |
hsqldb.cache_version=1.7.0 |
|
0 | 21 |
trunk/extensions/extJCRS/config/text_en.properties | ||
---|---|---|
142 | 142 |
error_obtaining_projection_parameter_name=Error getting Error projection parameter name |
143 | 143 |
error_obtaining_unit_list_of_projection_parameter=Error getting the list of projection parameter units |
144 | 144 |
error_obtaining_unit_name=Error getting unit name |
145 |
error_prime_meridiam_parameters=Error in prime-meridian parameter. |
|
145 |
error_prime_meridiam_parameters=Error in prime-meridian parameter. |
|
146 |
Error_updating_user_DB_Probably_it_is_locked_by_other_process=Error updating user DB. Probably it is locked by another process |
|
146 | 147 |
ESRI=ESRI |
147 | 148 |
false_easting=False easting |
148 | 149 |
false_northing=False northing |
trunk/extensions/extJCRS/config/text.properties | ||
---|---|---|
144 | 144 |
error_obtaining_unit_list_of_projection_parameter=Error al obtener la lista de unidades de par\u00e1metros de proyecci\u00f3n |
145 | 145 |
error_obtaining_unit_name=Error al obtener el nombre de unidad |
146 | 146 |
error_prime_meridiam_parameters=Falla alg\u00fan parametro del prime meridian |
147 |
Error_updating_user_DB_Probably_it_is_locked_by_other_process=Error actualizando la BBDD de usuario. Probablemente est? bloqueada por otro proceso |
|
147 | 148 |
ESRI=ESRI |
148 | 149 |
false_easting=Falso este |
149 | 150 |
false_northing=Falso norte |
trunk/extensions/extJCRS/src/org/gvsig/crs/gui/panels/wizard/MainPanel.java | ||
---|---|---|
49 | 49 |
import java.text.ParseException; |
50 | 50 |
import java.util.ArrayList; |
51 | 51 |
|
52 |
import javax.management.Notification; |
|
52 | 53 |
import javax.swing.JButton; |
53 | 54 |
import javax.swing.JOptionPane; |
54 | 55 |
import javax.swing.JPanel; |
... | ... | |
64 | 65 |
import org.opengis.referencing.crs.CoordinateReferenceSystem; |
65 | 66 |
|
66 | 67 |
import com.iver.andami.PluginServices; |
68 |
import com.iver.andami.messages.NotificationManager; |
|
67 | 69 |
import com.iver.andami.ui.mdiManager.IWindow; |
68 | 70 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
69 | 71 |
|
... | ... | |
596 | 598 |
conn.update(sentence); |
597 | 599 |
conn.shutdown(); |
598 | 600 |
} catch (SQLException e) { |
599 |
e.printStackTrace(); |
|
601 |
NotificationManager.showMessageError( |
|
602 |
PluginServices.getText(this, "Error_updating_user_DB_Probably_it_is_locked_by_other_process"), e); |
|
603 |
return; |
|
600 | 604 |
} |
601 | 605 |
setNewCrsCode(Integer.parseInt(authority[1])); |
602 | 606 |
try { |
Also available in: Unified diff