Revision 335
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/java/org/gvsig/oracle/HostPortPanelView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.oracle/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/java/org/gvsig/oracle/HostPortPanelView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE</at> |
|
29 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">2</at> |
|
39 |
<at name="row">2</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">default</at> |
|
43 |
<at name="valign">default</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="border"> |
|
57 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
58 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
59 |
<at name="name">border</at> |
|
60 |
</super> |
|
61 |
<at name="borders"> |
|
62 |
<object classname="java.util.LinkedList"> |
|
63 |
<item > |
|
64 |
<at name="value"> |
|
65 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
66 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
67 |
<at name="name">border</at> |
|
68 |
</super> |
|
69 |
</object> |
|
70 |
</at> |
|
71 |
</item> |
|
72 |
</object> |
|
73 |
</at> |
|
74 |
</object> |
|
75 |
</at> |
|
76 |
<at name="name"></at> |
|
77 |
<at name="width">38</at> |
|
78 |
<at name="text">Server</at> |
|
79 |
<at name="fill"> |
|
80 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
81 |
<at name="name">fill</at> |
|
82 |
</object> |
|
83 |
</at> |
|
84 |
<at name="height">14</at> |
|
85 |
</object> |
|
86 |
</at> |
|
87 |
</object> |
|
88 |
</at> |
|
89 |
</object> |
|
90 |
</at> |
|
91 |
</item> |
|
92 |
<item > |
|
93 |
<at name="value"> |
|
94 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
95 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
96 |
<at name="cellconstraints"> |
|
97 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
98 |
<at name="column">2</at> |
|
99 |
<at name="row">4</at> |
|
100 |
<at name="colspan">1</at> |
|
101 |
<at name="rowspan">1</at> |
|
102 |
<at name="halign">default</at> |
|
103 |
<at name="valign">default</at> |
|
104 |
<at name="insets" object="insets">0,0,0,0</at> |
|
105 |
</object> |
|
106 |
</at> |
|
107 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
108 |
</super> |
|
109 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
110 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
111 |
<at name="beanproperties"> |
|
112 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
113 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
114 |
<at name="properties"> |
|
115 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
116 |
<at name="border"> |
|
117 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
118 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
119 |
<at name="name">border</at> |
|
120 |
</super> |
|
121 |
<at name="borders"> |
|
122 |
<object classname="java.util.LinkedList"> |
|
123 |
<item > |
|
124 |
<at name="value"> |
|
125 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
126 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
127 |
<at name="name">border</at> |
|
128 |
</super> |
|
129 |
</object> |
|
130 |
</at> |
|
131 |
</item> |
|
132 |
</object> |
|
133 |
</at> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
<at name="name"></at> |
|
137 |
<at name="width">38</at> |
|
138 |
<at name="text">Port</at> |
|
139 |
<at name="fill"> |
|
140 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
141 |
<at name="name">fill</at> |
|
142 |
</object> |
|
143 |
</at> |
|
144 |
<at name="height">14</at> |
|
145 |
</object> |
|
146 |
</at> |
|
147 |
</object> |
|
148 |
</at> |
|
149 |
</object> |
|
150 |
</at> |
|
151 |
</item> |
|
152 |
<item > |
|
153 |
<at name="value"> |
|
154 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
155 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
156 |
<at name="cellconstraints"> |
|
157 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
158 |
<at name="column">4</at> |
|
159 |
<at name="row">2</at> |
|
160 |
<at name="colspan">1</at> |
|
161 |
<at name="rowspan">1</at> |
|
162 |
<at name="halign">default</at> |
|
163 |
<at name="valign">default</at> |
|
164 |
<at name="insets" object="insets">0,0,0,0</at> |
|
165 |
</object> |
|
166 |
</at> |
|
167 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
168 |
</super> |
|
169 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
170 |
<at name="beanclass">javax.swing.JTextField</at> |
|
171 |
<at name="beanproperties"> |
|
172 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
173 |
<at name="classname">javax.swing.JTextField</at> |
|
174 |
<at name="properties"> |
|
175 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
176 |
<at name="border"> |
|
177 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
178 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
179 |
<at name="name">border</at> |
|
180 |
</super> |
|
181 |
<at name="borders"> |
|
182 |
<object classname="java.util.LinkedList"> |
|
183 |
<item > |
|
184 |
<at name="value"> |
|
185 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
186 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
187 |
<at name="name">border</at> |
|
188 |
</super> |
|
189 |
</object> |
|
190 |
</at> |
|
191 |
</item> |
|
192 |
</object> |
|
193 |
</at> |
|
194 |
</object> |
|
195 |
</at> |
|
196 |
<at name="name">txtServer</at> |
|
197 |
<at name="width">475</at> |
|
198 |
<at name="height">20</at> |
|
199 |
</object> |
|
200 |
</at> |
|
201 |
</object> |
|
202 |
</at> |
|
203 |
</object> |
|
204 |
</at> |
|
205 |
</item> |
|
206 |
<item > |
|
207 |
<at name="value"> |
|
208 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
209 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
210 |
<at name="cellconstraints"> |
|
211 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
212 |
<at name="column">4</at> |
|
213 |
<at name="row">4</at> |
|
214 |
<at name="colspan">1</at> |
|
215 |
<at name="rowspan">1</at> |
|
216 |
<at name="halign">default</at> |
|
217 |
<at name="valign">default</at> |
|
218 |
<at name="insets" object="insets">0,0,0,0</at> |
|
219 |
</object> |
|
220 |
</at> |
|
221 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
222 |
</super> |
|
223 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
224 |
<at name="beanclass">javax.swing.JTextField</at> |
|
225 |
<at name="beanproperties"> |
|
226 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
227 |
<at name="classname">javax.swing.JTextField</at> |
|
228 |
<at name="properties"> |
|
229 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
230 |
<at name="border"> |
|
231 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
232 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
233 |
<at name="name">border</at> |
|
234 |
</super> |
|
235 |
<at name="borders"> |
|
236 |
<object classname="java.util.LinkedList"> |
|
237 |
<item > |
|
238 |
<at name="value"> |
|
239 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
240 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
241 |
<at name="name">border</at> |
|
242 |
</super> |
|
243 |
</object> |
|
244 |
</at> |
|
245 |
</item> |
|
246 |
</object> |
|
247 |
</at> |
|
248 |
</object> |
|
249 |
</at> |
|
250 |
<at name="selectionStart">4</at> |
|
251 |
<at name="name">txtPort</at> |
|
252 |
<at name="width">475</at> |
|
253 |
<at name="selectionEnd">4</at> |
|
254 |
<at name="text">5500</at> |
|
255 |
<at name="height">20</at> |
|
256 |
</object> |
|
257 |
</at> |
|
258 |
</object> |
|
259 |
</at> |
|
260 |
</object> |
|
261 |
</at> |
|
262 |
</item> |
|
263 |
</object> |
|
264 |
</at> |
|
265 |
<at name="properties"> |
|
266 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
267 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
268 |
<at name="properties"> |
|
269 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
270 |
<at name="border"> |
|
271 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
272 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
273 |
<at name="name">border</at> |
|
274 |
</super> |
|
275 |
<at name="borders"> |
|
276 |
<object classname="java.util.LinkedList"/> |
|
277 |
</at> |
|
278 |
</object> |
|
279 |
</at> |
|
280 |
<at name="name"></at> |
|
281 |
<at name="fill"> |
|
282 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
283 |
<at name="name">fill</at> |
|
284 |
</object> |
|
285 |
</at> |
|
286 |
<at name="scollBars"> |
|
287 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
288 |
<at name="name">scollBars</at> |
|
289 |
<at name="verticalpolicy">21</at> |
|
290 |
<at name="horizontalpolicy">31</at> |
|
291 |
<at name="border"> |
|
292 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
293 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
294 |
<at name="name">border</at> |
|
295 |
</super> |
|
296 |
<at name="borders"> |
|
297 |
<object classname="java.util.LinkedList"> |
|
298 |
<item > |
|
299 |
<at name="value"> |
|
300 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
301 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
302 |
<at name="name">border</at> |
|
303 |
</super> |
|
304 |
</object> |
|
305 |
</at> |
|
306 |
</item> |
|
307 |
</object> |
|
308 |
</at> |
|
309 |
</object> |
|
310 |
</at> |
|
311 |
</object> |
|
312 |
</at> |
|
313 |
</object> |
|
314 |
</at> |
|
315 |
</object> |
|
316 |
</at> |
|
317 |
<at name="cellpainters"> |
|
318 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
319 |
<at name="rows"> |
|
320 |
<object classname="[Ljava.lang.Object;" size="5"> |
|
321 |
<at name="item" index="0"> |
|
322 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
323 |
</at> |
|
324 |
<at name="item" index="1"> |
|
325 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
326 |
</at> |
|
327 |
<at name="item" index="2"> |
|
328 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
329 |
</at> |
|
330 |
<at name="item" index="3"> |
|
331 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
332 |
</at> |
|
333 |
<at name="item" index="4"> |
|
334 |
<object classname="[Ljava.lang.Object;" size="5"/> |
|
335 |
</at> |
|
336 |
</object> |
|
337 |
</at> |
|
338 |
</object> |
|
339 |
</at> |
|
340 |
<at name="rowgroups"> |
|
341 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
342 |
<at name="groups"> |
|
343 |
<object classname="java.util.HashMap"/> |
|
344 |
</at> |
|
345 |
</object> |
|
346 |
</at> |
|
347 |
<at name="colgroups"> |
|
348 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
349 |
<at name="groups"> |
|
350 |
<object classname="java.util.HashMap"/> |
|
351 |
</at> |
|
352 |
</object> |
|
353 |
</at> |
|
354 |
</object> |
|
355 |
</at> |
|
356 |
</object> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/java/org/gvsig/oracle/HostPortPanelView.java | ||
---|---|---|
1 |
package org.gvsig.oracle; |
|
2 |
|
|
3 |
import com.jeta.open.i18n.I18NUtils; |
|
4 |
import com.jgoodies.forms.layout.CellConstraints; |
|
5 |
import com.jgoodies.forms.layout.FormLayout; |
|
6 |
import java.awt.BorderLayout; |
|
7 |
import java.awt.ComponentOrientation; |
|
8 |
import java.awt.Container; |
|
9 |
import java.awt.Dimension; |
|
10 |
import javax.swing.Box; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JFrame; |
|
13 |
import javax.swing.JLabel; |
|
14 |
import javax.swing.JPanel; |
|
15 |
import javax.swing.JTextField; |
|
16 |
|
|
17 |
|
|
18 |
public class HostPortPanelView extends JPanel |
|
19 |
{ |
|
20 |
JTextField txtServer = new JTextField(); |
|
21 |
JTextField txtPort = new JTextField(); |
|
22 |
|
|
23 |
/** |
|
24 |
* Default constructor |
|
25 |
*/ |
|
26 |
public HostPortPanelView() |
|
27 |
{ |
|
28 |
initializePanel(); |
|
29 |
} |
|
30 |
|
|
31 |
/** |
|
32 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
33 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
34 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
35 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
36 |
*/ |
|
37 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
38 |
{ |
|
39 |
Dimension filler = new Dimension(10,10); |
|
40 |
|
|
41 |
boolean filled_cell_11 = false; |
|
42 |
CellConstraints cc = new CellConstraints(); |
|
43 |
if ( cols.length > 0 && rows.length > 0 ) |
|
44 |
{ |
|
45 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
46 |
{ |
|
47 |
/** add a rigid area */ |
|
48 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
49 |
filled_cell_11 = true; |
|
50 |
} |
|
51 |
} |
|
52 |
|
|
53 |
for( int index = 0; index < cols.length; index++ ) |
|
54 |
{ |
|
55 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
56 |
{ |
|
57 |
continue; |
|
58 |
} |
|
59 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
60 |
} |
|
61 |
|
|
62 |
for( int index = 0; index < rows.length; index++ ) |
|
63 |
{ |
|
64 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
65 |
{ |
|
66 |
continue; |
|
67 |
} |
|
68 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
69 |
} |
|
70 |
|
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* Helper method to load an image file from the CLASSPATH |
|
75 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
76 |
* @return an ImageIcon instance with the specified image file |
|
77 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
78 |
*/ |
|
79 |
public ImageIcon loadImage( String imageName ) |
|
80 |
{ |
|
81 |
try |
|
82 |
{ |
|
83 |
ClassLoader classloader = getClass().getClassLoader(); |
|
84 |
java.net.URL url = classloader.getResource( imageName ); |
|
85 |
if ( url != null ) |
|
86 |
{ |
|
87 |
ImageIcon icon = new ImageIcon( url ); |
|
88 |
return icon; |
|
89 |
} |
|
90 |
} |
|
91 |
catch( Exception e ) |
|
92 |
{ |
|
93 |
e.printStackTrace(); |
|
94 |
} |
|
95 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
96 |
} |
|
97 |
|
|
98 |
/** |
|
99 |
* Method for recalculating the component orientation for |
|
100 |
* right-to-left Locales. |
|
101 |
* @param orientation the component orientation to be applied |
|
102 |
*/ |
|
103 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
104 |
{ |
|
105 |
// Not yet implemented... |
|
106 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
107 |
super.applyComponentOrientation(orientation); |
|
108 |
} |
|
109 |
|
|
110 |
public JPanel createPanel() |
|
111 |
{ |
|
112 |
JPanel jpanel1 = new JPanel(); |
|
113 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE"); |
|
114 |
CellConstraints cc = new CellConstraints(); |
|
115 |
jpanel1.setLayout(formlayout1); |
|
116 |
|
|
117 |
JLabel jlabel1 = new JLabel(); |
|
118 |
jlabel1.setText("Server"); |
|
119 |
jpanel1.add(jlabel1,cc.xy(2,2)); |
|
120 |
|
|
121 |
JLabel jlabel2 = new JLabel(); |
|
122 |
jlabel2.setText("Port"); |
|
123 |
jpanel1.add(jlabel2,cc.xy(2,4)); |
|
124 |
|
|
125 |
txtServer.setName("txtServer"); |
|
126 |
jpanel1.add(txtServer,cc.xy(4,2)); |
|
127 |
|
|
128 |
txtPort.setName("txtPort"); |
|
129 |
txtPort.setSelectionEnd(4); |
|
130 |
txtPort.setSelectionStart(4); |
|
131 |
txtPort.setText("5500"); |
|
132 |
jpanel1.add(txtPort,cc.xy(4,4)); |
|
133 |
|
|
134 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5 }); |
|
135 |
return jpanel1; |
|
136 |
} |
|
137 |
|
|
138 |
/** |
|
139 |
* Initializer |
|
140 |
*/ |
|
141 |
protected void initializePanel() |
|
142 |
{ |
|
143 |
setLayout(new BorderLayout()); |
|
144 |
add(createPanel(), BorderLayout.CENTER); |
|
145 |
} |
|
146 |
|
|
147 |
|
|
148 |
} |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/java/org/gvsig/oracle/OracleExtension.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.oracle; |
|
3 |
|
|
4 |
import java.awt.event.ActionEvent; |
|
5 |
import java.awt.event.ActionListener; |
|
6 |
import org.gvsig.andami.IconThemeHelper; |
|
7 |
import org.gvsig.andami.plugins.Extension; |
|
8 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
9 |
import org.gvsig.fmap.mapcontext.MapContextManager; |
|
10 |
import org.gvsig.tools.ToolsLocator; |
|
11 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
12 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
|
13 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
|
14 |
import org.gvsig.webbrowser.WebBrowserPanel; |
|
15 |
import org.gvsig.webbrowser.WebBrowserFactory; |
|
16 |
|
|
17 |
public class OracleExtension extends Extension { |
|
18 |
|
|
19 |
@Override |
|
20 |
public void initialize() { |
|
21 |
} |
|
22 |
|
|
23 |
@Override |
|
24 |
public boolean canQueryByAction() { |
|
25 |
return true; |
|
26 |
} |
|
27 |
|
|
28 |
@Override |
|
29 |
public void postInitialize() { |
|
30 |
MapContextManager mapContextMgr = MapContextLocator.getMapContextManager(); |
|
31 |
|
|
32 |
IconThemeHelper.registerIcon("layer", "layer-icon-oracle", this); |
|
33 |
mapContextMgr.registerIconLayer("Oracle", "layer-icon-oracle"); |
|
34 |
} |
|
35 |
|
|
36 |
@Override |
|
37 |
public void execute(String actionCommand) { |
|
38 |
if( "tools-oracle-show-admintool".equalsIgnoreCase(actionCommand) ) { |
|
39 |
startbrowser(); |
|
40 |
return; |
|
41 |
} |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public boolean isEnabled() { |
|
46 |
return true; |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public boolean isVisible() { |
|
51 |
return true; |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public boolean isEnabled(String action) { |
|
56 |
if( "tools-oracle-show-admintool".equalsIgnoreCase(action) ) { |
|
57 |
return true; |
|
58 |
} |
|
59 |
return false; |
|
60 |
} |
|
61 |
|
|
62 |
@Override |
|
63 |
public boolean isVisible(String action) { |
|
64 |
return true; |
|
65 |
} |
|
66 |
|
|
67 |
private void startbrowser() { |
|
68 |
final WindowManager_v2 winmanager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
|
69 |
final HostPortPanelView panel = new HostPortPanelView(); |
|
70 |
final Dialog dlg = winmanager.createDialog( |
|
71 |
panel, |
|
72 |
"Oracle Server", |
|
73 |
null, |
|
74 |
WindowManager_v2.BUTTONS_OK_CANCEL |
|
75 |
); |
|
76 |
dlg.addActionListener(new ActionListener() { |
|
77 |
@Override |
|
78 |
public void actionPerformed(ActionEvent e) { |
|
79 |
if( dlg.getAction()==WindowManager_v2.BUTTON_OK ) { |
|
80 |
String url = "http://"+panel.txtServer.getText().trim() + ":" + panel.txtPort.getText().trim() + "/em"; |
|
81 |
WebBrowserPanel webbrowser = WebBrowserFactory.createWebBrowserPanel(); |
|
82 |
winmanager.showWindow( |
|
83 |
webbrowser.asJComponent(), |
|
84 |
ToolsLocator.getI18nManager().getTranslation("_Oracle_administration_tool"), |
|
85 |
WindowManager_v2.MODE.WINDOW |
|
86 |
); |
|
87 |
webbrowser.setPage(url); |
|
88 |
} |
|
89 |
} |
|
90 |
}); |
|
91 |
dlg.show(WindowManager_v2.MODE.WINDOW); |
|
92 |
|
|
93 |
} |
|
94 |
|
|
95 |
} |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/resources-plugin/readme_es.md | ||
---|---|---|
1 |
|
|
2 |
## Oracle en gvSIG |
|
3 |
|
|
4 |
### Limitaciones |
|
5 |
|
|
6 |
- gvSIG convierte a mayúsculas los nombres de las tablas creadas con él. |
|
7 |
|
|
8 |
- gvSIG convierte a mayúsculas los nombres de las columnas de tipo geometría de tablas creadas con él. |
|
9 |
|
|
10 |
- Cuando el índice espacial no está en estado "VALID", no se utilizará éste para el cálculo del "envelope" de la capa |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="lib/"/> |
|
4 |
<depends plugin-name="org.gvsig.app.mainplugin"/> |
|
5 |
<resourceBundle name="text"/> |
|
6 |
<extensions> |
|
7 |
<extension class-name="org.gvsig.oracle.OracleExtension" |
|
8 |
description="" |
|
9 |
active="true"> |
|
10 |
|
|
11 |
<action |
|
12 |
name="tools-oracle-show-admintool" |
|
13 |
label="_Oracle_administration_tool" |
|
14 |
position="902000200" |
|
15 |
icon="tools-oracle-show-admintool" |
|
16 |
tooltip="_Show_Oracle_administration_tool" |
|
17 |
action-command="tools-oracle-show-admintool" |
|
18 |
accelerator="" |
|
19 |
/> |
|
20 |
|
|
21 |
<menu |
|
22 |
name="tools-oracle-show-admintool" |
|
23 |
text="tools/Oracle/_Show_Oracle_administration_tool" |
|
24 |
/> |
|
25 |
|
|
26 |
</extension> |
|
27 |
</extensions> |
|
28 |
</plugin-config> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/resources-plugin/srids/oracle2epsg.properties | ||
---|---|---|
1 |
83030=25830 |
|
2 |
|
|
3 |
81920=4202 |
|
4 |
81921=4203 |
|
5 |
81922=20248 |
|
6 |
81923=20348 |
|
7 |
81924=20249 |
|
8 |
81925=20349 |
|
9 |
81926=20250 |
|
10 |
81927=20350 |
|
11 |
81928=20251 |
|
12 |
81929=20351 |
|
13 |
81930=20252 |
|
14 |
81931=20352 |
|
15 |
81932=20253 |
|
16 |
81933=20353 |
|
17 |
81934=20254 |
|
18 |
81935=20354 |
|
19 |
81936=20255 |
|
20 |
81937=20355 |
|
21 |
81938=20256 |
|
22 |
81939=20356 |
|
23 |
81940=20257 |
|
24 |
81941=20357 |
|
25 |
81942=20258 |
|
26 |
81943=20358 |
|
27 |
82323=23028 |
|
28 |
82328=23029 |
|
29 |
82337=23030 |
|
30 |
82340=23031 |
|
31 |
82343=23032 |
|
32 |
82346=23033 |
|
33 |
82349=23034 |
|
34 |
82352=23035 |
|
35 |
82355=23036 |
|
36 |
82358=23037 |
|
37 |
82361=23038 |
|
38 |
524288=4326 |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>gvsig-plugin-package</id> |
|
3 |
<formats> |
|
4 |
<format>zip</format> |
|
5 |
</formats> |
|
6 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
7 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
8 |
<files> |
|
9 |
<file> |
|
10 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
11 |
<outputDirectory>lib</outputDirectory> |
|
12 |
</file> |
|
13 |
<file> |
|
14 |
<source>target/package.info</source> |
|
15 |
</file> |
|
16 |
</files> |
|
17 |
<fileSets> |
|
18 |
<fileSet> |
|
19 |
<directory>src/main/resources-plugin</directory> |
|
20 |
<outputDirectory>.</outputDirectory> |
|
21 |
</fileSet> |
|
22 |
</fileSets> |
|
23 |
|
|
24 |
<dependencySets> |
|
25 |
|
|
26 |
<dependencySet> |
|
27 |
<useProjectArtifact>false</useProjectArtifact> |
|
28 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
29 |
<outputDirectory>lib</outputDirectory> |
|
30 |
<includes> |
|
31 |
<include>org.gvsig:org.gvsig.oracle.provider</include> |
|
32 |
<include>com.oracle:ojdbc</include> |
|
33 |
<include>commons-dbcp:commons-dbcp</include> |
|
34 |
<include>commons-pool:commons-pool</include> |
|
35 |
</includes> |
|
36 |
</dependencySet> |
|
37 |
|
|
38 |
</dependencySets> |
|
39 |
|
|
40 |
</assembly> |
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.oracle.app.mainplugin</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
<description> |
|
10 |
Oracle support for DAL and gvSIG. |
|
11 |
Provides viewing, editing and export/import capabilities for spatial data stored in an Oracle database. |
|
12 |
Works on Oracle Spatial and Oracle Locator. |
|
13 |
</description> |
|
14 |
|
|
15 |
<parent> |
|
16 |
<groupId>org.gvsig</groupId> |
|
17 |
<artifactId>org.gvsig.oracle.app</artifactId> |
|
18 |
<version>2.0.46</version> |
|
19 |
</parent> |
|
20 |
|
|
21 |
<dependencies> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
25 |
<scope>compile</scope> |
|
26 |
</dependency> |
|
27 |
<dependency> |
|
28 |
<groupId>org.gvsig</groupId> |
|
29 |
<artifactId>org.gvsig.andami</artifactId> |
|
30 |
<scope>compile</scope> |
|
31 |
</dependency> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
35 |
<scope>compile</scope> |
|
36 |
</dependency> |
|
37 |
<dependency> |
|
38 |
<groupId>org.gvsig</groupId> |
|
39 |
<artifactId>org.gvsig.ui</artifactId> |
|
40 |
<scope>compile</scope> |
|
41 |
</dependency> |
|
42 |
<dependency> |
|
43 |
<groupId>org.gvsig</groupId> |
|
44 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
45 |
<scope>compile</scope> |
|
46 |
</dependency> |
|
47 |
<dependency> |
|
48 |
<groupId>org.gvsig</groupId> |
|
49 |
<artifactId>org.gvsig.oracle.provider</artifactId> |
|
50 |
<scope>compile</scope> |
|
51 |
</dependency> |
|
52 |
|
|
53 |
<dependency> |
|
54 |
<groupId>com.oracle</groupId> |
|
55 |
<artifactId>ojdbc</artifactId> |
|
56 |
<scope>runtime</scope> |
|
57 |
</dependency> |
|
58 |
|
|
59 |
<dependency> |
|
60 |
<groupId>commons-dbcp</groupId> |
|
61 |
<artifactId>commons-dbcp</artifactId> |
|
62 |
<scope>runtime</scope> |
|
63 |
</dependency> |
|
64 |
<dependency> |
|
65 |
<groupId>commons-pool</groupId> |
|
66 |
<artifactId>commons-pool</artifactId> |
|
67 |
<scope>runtime</scope> |
|
68 |
</dependency> |
|
69 |
</dependencies> |
|
70 |
|
|
71 |
<properties> |
|
72 |
<!-- Package info property values --> |
|
73 |
<!-- Default values in org.gvsig.desktop --> |
|
74 |
<gvsig.package.info.name>Formats: Oracle support</gvsig.package.info.name> |
|
75 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
76 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
77 |
<gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.0.1</gvsig.package.info.dependencies> |
|
78 |
<gvsig.package.info.categories>Formats,Vector,Database</gvsig.package.info.categories> |
|
79 |
<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-oracle/pool/</gvsig.package.info.poolURL> |
|
80 |
</properties> |
|
81 |
|
|
82 |
|
|
83 |
</project> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/org.gvsig.oracle.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Tue Jul 20 01:38:05 CEST 2021 |
|
2 |
buildNumber=45 |
|
0 | 3 |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.app/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.oracle.app</artifactId> |
|
7 |
<packaging>pom</packaging> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.oracle</artifactId> |
|
12 |
<version>2.0.46</version> |
|
13 |
</parent> |
|
14 |
|
|
15 |
<modules> |
|
16 |
<module>org.gvsig.oracle.app.mainplugin</module> |
|
17 |
</modules> |
|
18 |
|
|
19 |
</project> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.oracle</artifactId> |
|
7 |
<version>2.0.46</version> |
|
8 |
<packaging>pom</packaging> |
|
9 |
<name>${project.artifactId}</name> |
|
10 |
<description> |
|
11 |
Oracle support fort DAL and gvSIG. |
|
12 |
Provides viewing and editing capabilities for spatial data stored in an Oracle database. |
|
13 |
Works on Oracle Spatial and Oracle Locator. |
|
14 |
</description> |
|
15 |
<parent> |
|
16 |
<groupId>org.gvsig</groupId> |
|
17 |
<artifactId>org.gvsig.desktop</artifactId> |
|
18 |
<version>2.0.328</version> |
|
19 |
</parent> |
|
20 |
|
|
21 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-oracle</url> |
|
22 |
<scm> |
|
23 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-oracle/org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46</connection> |
|
24 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-oracle/org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46</developerConnection> |
|
25 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-oracle/repository/show/org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46</url> |
|
26 |
</scm> |
|
27 |
|
|
28 |
<repositories> |
|
29 |
<repository> |
|
30 |
<id>gvsig-public-http-repository</id> |
|
31 |
<name>gvSIG maven public HTTP repository</name> |
|
32 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
33 |
<releases> |
|
34 |
<enabled>true</enabled> |
|
35 |
<updatePolicy>daily</updatePolicy> |
|
36 |
<checksumPolicy>warn</checksumPolicy> |
|
37 |
</releases> |
|
38 |
<snapshots> |
|
39 |
<enabled>true</enabled> |
|
40 |
<updatePolicy>daily</updatePolicy> |
|
41 |
<checksumPolicy>warn</checksumPolicy> |
|
42 |
</snapshots> |
|
43 |
</repository> |
|
44 |
</repositories> |
|
45 |
|
|
46 |
<build> |
|
47 |
<plugins> |
|
48 |
<plugin> |
|
49 |
<groupId>org.apache.maven.plugins</groupId> |
|
50 |
<artifactId>maven-release-plugin</artifactId> |
|
51 |
<configuration> |
|
52 |
<tagBase>https://devel.gvsig.org/svn/gvsig-oracle/org.gvsig.oracle/tags/</tagBase> |
|
53 |
<goals>deploy</goals> |
|
54 |
</configuration> |
|
55 |
</plugin> |
|
56 |
<!-- <plugin> |
|
57 |
<groupId>org.apache.maven.plugins</groupId> |
|
58 |
<artifactId>maven-surefire-plugin</artifactId> |
|
59 |
<version>3.0.0-M4</version> |
|
60 |
<configuration> |
|
61 |
<excludes> |
|
62 |
<exclude>**/TestCreate.java</exclude> |
|
63 |
</excludes> |
|
64 |
</configuration> |
|
65 |
</plugin>--> |
|
66 |
</plugins> |
|
67 |
</build> |
|
68 |
|
|
69 |
<dependencyManagement> |
|
70 |
<dependencies> |
|
71 |
<dependency> |
|
72 |
<groupId>org.gvsig</groupId> |
|
73 |
<artifactId>org.gvsig.oracle.provider</artifactId> |
|
74 |
<version>2.0.46</version> |
|
75 |
</dependency> |
|
76 |
<dependency> |
|
77 |
<groupId>org.gvsig</groupId> |
|
78 |
<artifactId>org.gvsig.oracle.app.mainplugin</artifactId> |
|
79 |
<version>2.0.46</version> |
|
80 |
</dependency> |
|
81 |
<dependency> |
|
82 |
<groupId>com.oracle</groupId> |
|
83 |
<artifactId>ojdbc</artifactId> |
|
84 |
<version>11.2.0.4.0</version> |
|
85 |
<!-- |
|
86 |
<version>12.2.0.1.0</version> |
|
87 |
--> |
|
88 |
</dependency> |
|
89 |
</dependencies> |
|
90 |
</dependencyManagement> |
|
91 |
|
|
92 |
<modules> |
|
93 |
<module>org.gvsig.oracle.app</module> |
|
94 |
<module>org.gvsig.oracle.provider</module> |
|
95 |
</modules> |
|
96 |
|
|
97 |
</project> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.provider/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
|
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<artifactId>org.gvsig.oracle.provider</artifactId> |
|
7 |
<packaging>jar</packaging> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
<description>DAL provider for PostgeSQL files</description> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.oracle</artifactId> |
|
13 |
<version>2.0.46</version> |
|
14 |
</parent> |
|
15 |
|
|
16 |
<dependencies> |
|
17 |
<dependency> |
|
18 |
<groupId>com.googlecode.log4jdbc</groupId> |
|
19 |
<artifactId>log4jdbc</artifactId> |
|
20 |
<scope>compile</scope> |
|
21 |
</dependency> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
25 |
<scope>compile</scope> |
|
26 |
</dependency> |
|
27 |
<dependency> |
|
28 |
<groupId>org.gvsig</groupId> |
|
29 |
<artifactId>org.gvsig.projection.api</artifactId> |
|
30 |
<scope>compile</scope> |
|
31 |
</dependency> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
35 |
<scope>compile</scope> |
|
36 |
</dependency> |
|
37 |
|
|
38 |
<dependency> |
|
39 |
<groupId>org.gvsig</groupId> |
|
40 |
<artifactId>org.gvsig.fmap.dal.db.jdbc</artifactId> |
|
41 |
<scope>compile</scope> |
|
42 |
</dependency> |
|
43 |
|
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.fmap.dal.db.lib</artifactId> |
|
47 |
<scope>compile</scope> |
|
48 |
</dependency> |
|
49 |
|
|
50 |
<dependency> |
|
51 |
<groupId>org.gvsig</groupId> |
|
52 |
<artifactId>org.gvsig.fmap.dal.spi</artifactId> |
|
53 |
<scope>compile</scope> |
|
54 |
</dependency> |
|
55 |
<dependency> |
|
56 |
<groupId>org.gvsig</groupId> |
|
57 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
58 |
<scope>compile</scope> |
|
59 |
</dependency> |
|
60 |
<dependency> |
|
61 |
<groupId>org.gvsig</groupId> |
|
62 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
63 |
<scope>compile</scope> |
|
64 |
</dependency> |
|
65 |
<dependency> |
|
66 |
<groupId>org.gvsig</groupId> |
|
67 |
<artifactId>org.gvsig.expressionevaluator.lib.api</artifactId> |
|
68 |
<scope>compile</scope> |
|
69 |
</dependency> |
|
70 |
<dependency> |
|
71 |
<groupId>org.gvsig</groupId> |
|
72 |
<artifactId>org.gvsig.expressionevaluator.geometry.lib.api</artifactId> |
|
73 |
<scope>compile</scope> |
|
74 |
</dependency> |
|
75 |
<dependency> |
|
76 |
<groupId>org.gvsig</groupId> |
|
77 |
<artifactId>org.gvsig.timesupport.lib.api</artifactId> |
|
78 |
<scope>compile</scope> |
|
79 |
</dependency> |
|
80 |
<dependency> |
|
81 |
<groupId>org.gvsig</groupId> |
|
82 |
<artifactId>org.gvsig.utils</artifactId> |
|
83 |
<scope>compile</scope> |
|
84 |
</dependency> |
|
85 |
|
|
86 |
<dependency> |
|
87 |
<groupId>com.oracle</groupId> |
|
88 |
<artifactId>ojdbc</artifactId> |
|
89 |
<scope>compile</scope> |
|
90 |
</dependency> |
|
91 |
|
|
92 |
<dependency> |
|
93 |
<groupId>commons-dbcp</groupId> |
|
94 |
<artifactId>commons-dbcp</artifactId> |
|
95 |
<scope>compile</scope> |
|
96 |
</dependency> |
|
97 |
<dependency> |
|
98 |
<groupId>commons-collections</groupId> |
|
99 |
<artifactId>commons-collections</artifactId> |
|
100 |
<scope>compile</scope> |
|
101 |
</dependency> |
|
102 |
|
|
103 |
|
|
104 |
<!-- TESTS --> |
|
105 |
<dependency> |
|
106 |
<groupId>org.gvsig</groupId> |
|
107 |
<artifactId>org.gvsig.fmap.dal.impl</artifactId> |
|
108 |
<scope>test</scope> |
|
109 |
</dependency> |
|
110 |
<dependency> |
|
111 |
<groupId>org.gvsig</groupId> |
|
112 |
<artifactId>${org.gvsig.fmap.geometry.impl}</artifactId> |
|
113 |
<scope>test</scope> |
|
114 |
</dependency> |
|
115 |
<dependency> |
|
116 |
<groupId>org.gvsig</groupId> |
|
117 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
118 |
<type>test-jar</type> |
|
119 |
<scope>test</scope> |
|
120 |
</dependency> |
|
121 |
<dependency> |
|
122 |
<groupId>org.gvsig</groupId> |
|
123 |
<artifactId>org.gvsig.compat.se</artifactId> |
|
124 |
<scope>test</scope> |
|
125 |
</dependency> |
|
126 |
<dependency> |
|
127 |
<groupId>org.gvsig</groupId> |
|
128 |
<artifactId>org.gvsig.expressionevaluator.lib.impl</artifactId> |
|
129 |
<scope>test</scope> |
|
130 |
</dependency> |
|
131 |
<dependency> |
|
132 |
<groupId>org.gvsig</groupId> |
|
133 |
<artifactId>org.gvsig.expressionevaluator.geometry.lib.impl</artifactId> |
|
134 |
<scope>test</scope> |
|
135 |
</dependency> |
|
136 |
<dependency> |
|
137 |
<groupId>org.gvsig</groupId> |
|
138 |
<artifactId>${org.gvsig.proj.lib.impl}</artifactId> |
|
139 |
<scope>test</scope> |
|
140 |
</dependency> |
|
141 |
|
|
142 |
<!-- <dependency> |
|
143 |
<groupId>org.gvsig</groupId> |
|
144 |
<artifactId>org.gvsig.projection.cresques.impl</artifactId> |
|
145 |
<scope>test</scope> |
|
146 |
</dependency>--> |
|
147 |
<dependency> |
|
148 |
<groupId>org.gvsig</groupId> |
|
149 |
<artifactId>org.gvsig.compat.se</artifactId> |
|
150 |
<scope>test</scope> |
|
151 |
</dependency> |
|
152 |
<dependency> |
|
153 |
<groupId>org.gvsig</groupId> |
|
154 |
<artifactId>org.gvsig.metadata.lib.basic.impl</artifactId> |
|
155 |
<scope>test</scope> |
|
156 |
</dependency> |
|
157 |
<dependency> |
|
158 |
<groupId>org.gvsig</groupId> |
|
159 |
<artifactId>org.gvsig.timesupport.lib.impl</artifactId> |
|
160 |
<scope>test</scope> |
|
161 |
</dependency> |
|
162 |
|
|
163 |
<dependency> |
|
164 |
<groupId>org.gvsig</groupId> |
|
165 |
<artifactId>org.gvsig.fmap.dal.file.csv</artifactId> |
|
166 |
<scope>test</scope> |
|
167 |
</dependency> |
|
168 |
<dependency> |
|
169 |
<groupId>org.gvsig</groupId> |
|
170 |
<artifactId>org.gvsig.fmap.dal.file.lib</artifactId> |
|
171 |
<scope>test</scope> |
|
172 |
</dependency> |
|
173 |
<dependency> |
|
174 |
<groupId>org.gvsig</groupId> |
|
175 |
<artifactId>org.gvsig.tools.util.impl</artifactId> |
|
176 |
<scope>test</scope> |
|
177 |
</dependency> |
|
178 |
|
|
179 |
</dependencies> |
|
180 |
|
|
181 |
<build> |
|
182 |
<plugins> |
|
183 |
|
|
184 |
<plugin> |
|
185 |
<groupId>org.apache.maven.plugins</groupId> |
|
186 |
<artifactId>maven-surefire-plugin</artifactId> |
|
187 |
<configuration> |
|
188 |
<!-- Skip test execution ? --> |
|
189 |
<skipTests>false</skipTests> |
|
190 |
<!-- Ignore test execution failure ? --> |
|
191 |
<testFailureIgnore>false</testFailureIgnore> |
|
192 |
<excludes> |
|
193 |
<exclude>**/TestCreate.java</exclude> |
|
194 |
</excludes> |
|
195 |
</configuration> |
|
196 |
</plugin> |
|
197 |
|
|
198 |
<!-- Skip test compilation ? --> |
|
199 |
<plugin> |
|
200 |
<groupId>org.apache.maven.plugins</groupId> |
|
201 |
<artifactId>maven-compiler-plugin</artifactId> |
|
202 |
<executions> |
|
203 |
<execution> |
|
204 |
<id>default-testCompile</id> |
|
205 |
<phase>process-test-sources</phase> |
|
206 |
<goals> |
|
207 |
<goal>testCompile</goal> |
|
208 |
</goals> |
|
209 |
<configuration> |
|
210 |
<skip>false</skip> |
|
211 |
</configuration> |
|
212 |
</execution> |
|
213 |
</executions> |
|
214 |
</plugin> |
|
215 |
|
|
216 |
</plugins> |
|
217 |
</build> |
|
218 |
|
|
219 |
</project> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.provider/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.oracle.dal.OracleLibrary |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.provider/src/main/resources/srids/oracle2epsg.properties | ||
---|---|---|
1 |
81920=4202 |
|
2 |
81921=4203 |
|
3 |
81922=20248 |
|
4 |
81923=20348 |
|
5 |
81924=20249 |
|
6 |
81925=20349 |
|
7 |
81926=20250 |
|
8 |
81927=20350 |
|
9 |
81928=20251 |
|
10 |
81929=20351 |
|
11 |
81930=20252 |
|
12 |
81931=20352 |
|
13 |
81932=20253 |
|
14 |
81933=20353 |
|
15 |
81934=20254 |
|
16 |
81935=20354 |
|
17 |
81936=20255 |
|
18 |
81937=20355 |
|
19 |
81938=20256 |
|
20 |
81939=20356 |
|
21 |
81940=20257 |
|
22 |
81941=20357 |
|
23 |
81942=20258 |
|
24 |
81943=20358 |
|
25 |
82323=23028 |
|
26 |
82328=23029 |
|
27 |
82337=23030 |
|
28 |
82340=23031 |
|
29 |
82343=23032 |
|
30 |
82346=23033 |
|
31 |
82349=23034 |
|
32 |
82352=23035 |
|
33 |
82355=23036 |
|
34 |
82358=23037 |
|
35 |
82361=23038 |
|
36 |
524288=4326 |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.provider/src/main/resources/org/gvsig/oracle/dal/OracleParameters.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="OracleResourceParameters"> |
|
6 |
<extends> |
|
7 |
<class>JDBC2ResourceParameters</class> |
|
8 |
</extends> |
|
9 |
<fields> |
|
10 |
<field name="JDBCDriverClass" type="string" mandatory="true" |
|
11 |
defaultValue="oracle.jdbc.driver.OracleDriver" group="Advanced"> |
|
12 |
<description>JDBC Driver class</description> |
|
13 |
</field> |
|
14 |
<field name="host" type="string" mandatory="false" |
|
15 |
defaultValue="127.0.0.1" group="Connection"> |
|
16 |
<description></description> |
|
17 |
</field> |
|
18 |
<field name="port" type="integer" mandatory="false" |
|
19 |
defaultValue="1521" group="Connection"> |
|
20 |
<description></description> |
|
21 |
</field> |
|
22 |
|
|
23 |
<field name="mode" type="string" mandatory="false" defaultValue="SID" group="Connection"> |
|
24 |
<description></description> |
|
25 |
<availableValues> |
|
26 |
<value label="Service">SERVICE</value> |
|
27 |
<value label="SID">SID</value> |
|
28 |
</availableValues> |
|
29 |
</field> |
|
30 |
|
|
31 |
</fields> |
|
32 |
</class> |
|
33 |
|
|
34 |
<class name="OracleStoreParameters"> |
|
35 |
<extends> |
|
36 |
<class>JDBC2StoreParameters</class> |
|
37 |
<class>OracleResourceParameters</class> |
|
38 |
</extends> |
|
39 |
<fields/> |
|
40 |
</class> |
|
41 |
|
|
42 |
<class name="OracleNewStoreParameters"> |
|
43 |
<extends> |
|
44 |
<class>JDBC2NewStoreParameters</class> |
|
45 |
<class>OracleResourceParameters</class> |
|
46 |
</extends> |
|
47 |
<fields/> |
|
48 |
</class> |
|
49 |
|
|
50 |
|
|
51 |
<class name="OracleServerExplorerParameters"> |
|
52 |
<extends> |
|
53 |
<class>OracleResourceParameters</class> |
|
54 |
<class>JDBC2ServerExplorerParameters</class> |
|
55 |
</extends> |
|
56 |
<fields/> |
|
57 |
</class> |
|
58 |
|
|
59 |
|
|
60 |
</classes> |
|
61 |
</definitions> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.provider/src/main/resources/org/gvsig/oracle/dal/OracleMetadata.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="Oracle" namespace="Metadata"> |
|
6 |
<extends> |
|
7 |
<class name="JDBC2" namespace="Metadata"/> |
|
8 |
</extends> |
|
9 |
<description>Metadata of a Oracle store</description> |
|
10 |
<fields> |
|
11 |
</fields> |
|
12 |
</class> |
|
13 |
|
|
14 |
</classes> |
|
15 |
</definitions> |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.provider/src/main/java/org/gvsig/oracle/dal/OracleSRSSolver.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.oracle.dal; |
|
7 |
|
|
8 |
import java.io.IOException; |
|
9 |
import java.io.InputStream; |
|
10 |
import java.sql.Connection; |
|
11 |
import java.util.Objects; |
|
12 |
import java.util.Properties; |
|
13 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCHelper; |
|
14 |
import org.gvsig.fmap.dal.store.jdbc2.spi.SRSSolverBase; |
|
15 |
|
|
16 |
/** |
|
17 |
* |
|
18 |
* @author fdiaz |
|
19 |
*/ |
|
20 |
public class OracleSRSSolver extends SRSSolverBase{ |
|
21 |
|
|
22 |
private static Properties translations; |
|
23 |
|
|
24 |
public OracleSRSSolver(JDBCHelper helper) { |
|
25 |
super(helper); |
|
26 |
} |
|
27 |
|
|
28 |
@Override |
|
29 |
protected Object searchDatabaseCode(Connection connection, String applicationAbbrev) { |
|
30 |
try { |
|
31 |
String[] s = applicationAbbrev.split(":"); |
|
32 |
String code_s = s[1].trim(); |
|
33 |
try { |
|
34 |
int code_i = Integer.parseInt(code_s); |
|
35 |
return code_i; |
|
36 |
} catch(NumberFormatException e) { |
|
37 |
|
|
38 |
} |
|
39 |
return 0; |
|
40 |
} catch (Throwable ex) { |
|
41 |
throw new RuntimeException("Problems searching database code from '"+applicationAbbrev+"'.",ex); |
|
42 |
} |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
protected String searchApplicationAbbrev(Connection connection, Integer databaseCode) { |
|
47 |
try { |
|
48 |
String s = Objects.toString(databaseCode,"0"); |
|
49 |
String trans = getTranslations().getProperty(s, null); |
|
50 |
if(trans == null){ |
|
51 |
return null; |
|
52 |
} |
|
53 |
return "EPSG:" + trans; |
|
54 |
} catch (Throwable ex) { |
|
55 |
throw new RuntimeException("Problems searching application abbrev from '"+databaseCode+"'.",ex); |
|
56 |
} |
|
57 |
} |
|
58 |
|
|
59 |
private Properties getTranslations() { |
|
60 |
if (translations == null) { |
|
61 |
InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("/srids/oracle2epsg.properties"); |
|
62 |
if (inStream != null) { |
|
63 |
translations = new Properties(); |
|
64 |
try { |
|
65 |
translations.load(inStream); |
|
66 |
} catch (IOException ex) { |
|
67 |
logger.warn("Can't load srid translations", ex); |
|
68 |
} |
|
69 |
|
|
70 |
} |
|
71 |
} |
|
72 |
return translations; |
|
73 |
} |
|
74 |
|
|
75 |
} |
org.gvsig.oracle/tags/org.gvsig.oracle-2.0.46/org.gvsig.oracle.provider/src/main/java/org/gvsig/oracle/dal/OracleLibrary.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.oracle.dal; |
|
3 |
|
|
4 |
import org.gvsig.fmap.dal.DALLibrary; |
|
5 |
import org.gvsig.fmap.dal.DALLocator; |
|
6 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
|
7 |
import org.gvsig.fmap.dal.store.db.DBHelper; |
|
8 |
import org.gvsig.fmap.dal.store.jdbc2.JDBCLibrary; |
|
9 |
import org.gvsig.fmap.dal.store.jdbc2.spi.JDBCStoreProviderBase; |
|
10 |
import org.gvsig.json.Json; |
|
11 |
import org.gvsig.metadata.exceptions.MetadataException; |
|
12 |
import org.gvsig.tools.library.AbstractLibrary; |
|
13 |
import org.gvsig.tools.library.LibraryException; |
|
14 |
|
|
15 |
|
|
16 |
public class OracleLibrary extends AbstractLibrary { |
|
17 |
|
|
18 |
public static final String NAME = "Oracle"; |
|
19 |
|
|
20 |
@Override |
|
21 |
public void doRegistration() { |
|
22 |
registerAsServiceOf(DALLibrary.class); |
|
23 |
require(JDBCLibrary.class); |
|
24 |
} |
|
25 |
|
|
26 |
@Override |
|
27 |
protected void doInitialize() throws LibraryException { |
|
28 |
} |
|
29 |
|
|
30 |
@Override |
|
31 |
protected void doPostInitialize() throws LibraryException { |
|
32 |
LibraryException ex = null; |
|
33 |
|
|
34 |
DataManagerProviderServices dataman = |
|
35 |
(DataManagerProviderServices) DALLocator.getDataManager(); |
|
36 |
|
|
37 |
try { |
|
38 |
Class.forName(OracleHelper.ORACLE_JDBC_DRIVER); |
|
39 |
} catch(Throwable th) { |
|
40 |
OracleHelper.LOGGER.warn("Can't load Oracle JDBC Driver.",th); |
|
41 |
} |
|
42 |
|
|
43 |
DBHelper.registerParametersDefinition( |
|
44 |
NAME + "StoreParameters", |
|
45 |
OracleStoreParameters.class, |
|
46 |
dataman.getResourceAsStream(this, NAME + "Parameters.xml") |
|
47 |
); |
|
48 |
DBHelper.registerParametersDefinition( |
|
49 |
NAME + "NewStoreParameters", |
|
50 |
OracleNewStoreParameters.class, |
|
51 |
dataman.getResourceAsStream(this, NAME + "Parameters.xml") |
|
52 |
); |
|
53 |
DBHelper.registerParametersDefinition( |
|
54 |
NAME + "ServerExplorerParameters", |
|
55 |
OracleExplorerParameters.class, |
|
56 |
dataman.getResourceAsStream(this, NAME + "Parameters.xml") |
|
57 |
); |
|
58 |
try { |
|
59 |
DBHelper.registerMetadataDefinition( |
|
60 |
NAME, |
|
61 |
JDBCStoreProviderBase.class, |
|
62 |
dataman.getResourceAsStream(this, NAME + "Metadata.xml") |
|
63 |
); |
|
64 |
} catch (MetadataException e) { |
|
65 |
ex = new LibraryException(this.getClass(), e); |
|
66 |
} |
Also available in: Unified diff