Mercurial > dive4elements > river
comparison flys-aft/src/main/java/de/intevation/aft/Sync.java @ 4073:2c70fae83d0c
start syncing at river level.
flys-aft/trunk@3406 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 13 Dec 2011 13:41:43 +0000 |
parents | 88f801888d85 |
children | dbd0b3b1b8b8 |
comparison
equal
deleted
inserted
replaced
4072:88f801888d85 | 4073:2c70fae83d0c |
---|---|
1 package de.intevation.aft; | 1 package de.intevation.aft; |
2 | 2 |
3 import java.io.File; | 3 import java.io.File; |
4 | |
5 import java.sql.SQLException; | |
4 | 6 |
5 import org.w3c.dom.Document; | 7 import org.w3c.dom.Document; |
6 | 8 |
7 import de.intevation.utils.XML; | 9 import de.intevation.utils.XML; |
8 | 10 |
30 if (config == null) { | 32 if (config == null) { |
31 System.err.println("cannot load config"); | 33 System.err.println("cannot load config"); |
32 System.exit(1); | 34 System.exit(1); |
33 } | 35 } |
34 | 36 |
37 ConnectionBuilder aftConnectionBuilder = | |
38 new ConnectionBuilder(AFT, config); | |
39 | |
35 ConnectionBuilder flysConnectionBuilder = | 40 ConnectionBuilder flysConnectionBuilder = |
36 new ConnectionBuilder(FLYS, config); | 41 new ConnectionBuilder(FLYS, config); |
37 | 42 |
38 ConnectionBuilder aftConnectionBuilder = | 43 Rivers rivers = new Rivers( |
39 new ConnectionBuilder(AFT, config); | 44 aftConnectionBuilder, |
45 flysConnectionBuilder); | |
40 | 46 |
47 try { | |
48 rivers.sync(); | |
49 } | |
50 catch (SQLException sqle) { | |
51 System.err.println("syncing failed: " + sqle.getMessage()); | |
52 } | |
53 finally { | |
54 rivers.close(); | |
55 } | |
41 } | 56 } |
42 } | 57 } |
43 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 58 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |