Strabon
changeset 1017:093aeabd52a7
renamed silly variables
author | Babis Nikolaou <charnik@di.uoa.gr> |
---|---|
date | Tue Apr 09 00:36:27 2013 +0300 (2013-04-09) |
parents | 25935f0ef8d7 |
children | 88e2bc9da9cd |
files | runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java |
line diff
1.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java Tue Apr 09 00:23:16 2013 +0300 1.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java Tue Apr 09 00:36:27 2013 +0300 1.3 @@ -59,7 +59,7 @@ 1.4 public static final String FORMAT_KMZ = "KMZ"; 1.5 public static final String FORMAT_GEOJSON = "GeoJSON"; 1.6 public static final String FORMAT_EXP = "EXP"; 1.7 - public static final String FORMAT_HTML = "HTML"; 1.8 + public static final String FORMAT_HTML = "HTML"; 1.9 1.10 public static final String NEWLINE = "\n"; 1.11 1.12 @@ -73,8 +73,8 @@ 1.13 protected String serverName; 1.14 1.15 protected SailBase db_store; 1.16 - private SailRepository repo1; 1.17 - private SailRepositoryConnection con1 = null; 1.18 + private SailRepository repo; 1.19 + private SailRepositoryConnection con = null; 1.20 1.21 public Strabon(String databaseName, String user, String password, int port, String serverName, boolean checkForLockTable) throws Exception { 1.22 this.databaseName = databaseName; 1.23 @@ -129,17 +129,17 @@ 1.24 1.25 //our repository 1.26 //repo1 = new SailRepository(db_store); 1.27 - repo1 = new GeneralDBSailRepository(db_store); 1.28 + repo = new GeneralDBSailRepository(db_store); 1.29 1.30 try { 1.31 - repo1.initialize(); 1.32 + repo.initialize(); 1.33 1.34 } catch (RepositoryException e) { 1.35 logger.error("[Strabon.init] initialize", e); 1.36 } 1.37 1.38 try { 1.39 - con1 = repo1.getConnection(); 1.40 + con = repo.getConnection(); 1.41 1.42 } catch (RepositoryException e) { 1.43 logger.error("[Strabon.init] getConnection", e); 1.44 @@ -157,11 +157,11 @@ 1.45 throws SQLException, ClassNotFoundException; 1.46 1.47 public SailRepositoryConnection getSailRepoConnection() { 1.48 - return con1; 1.49 + return con; 1.50 } 1.51 1.52 public void setCon1(SailRepositoryConnection con1) { 1.53 - this.con1 = con1; 1.54 + this.con = con1; 1.55 } 1.56 1.57 /** 1.58 @@ -171,15 +171,15 @@ 1.59 logger.info("[Strabon.close] Closing connection..."); 1.60 1.61 try { 1.62 - con1.commit(); 1.63 + con.commit(); 1.64 1.65 } catch (RepositoryException e) { 1.66 logger.error("[Strabon.close]", e); 1.67 1.68 } finally { 1.69 try { 1.70 - con1.close(); 1.71 - repo1.shutDown(); 1.72 + con.close(); 1.73 + repo.shutDown(); 1.74 1.75 // delete the lock as well 1.76 checkAndDeleteLock(databaseName, user, password, port, serverName); 1.77 @@ -331,7 +331,7 @@ 1.78 uriContext = null; 1.79 1.80 } else { 1.81 - ValueFactory f = repo1.getValueFactory(); 1.82 + ValueFactory f = repo.getValueFactory(); 1.83 uriContext = f.createURI(context); 1.84 } 1.85 1.86 @@ -401,12 +401,12 @@ 1.87 handler.endRDF(); 1.88 1.89 if (context == null) { 1.90 - con1.add(url, baseURI, format); 1.91 - con1.add(georeader, "", RDFFormat.NTRIPLES); 1.92 + con.add(url, baseURI, format); 1.93 + con.add(georeader, "", RDFFormat.NTRIPLES); 1.94 1.95 } else { 1.96 - con1.add(url, baseURI, format, context); 1.97 - con1.add(georeader, "", RDFFormat.NTRIPLES, context); 1.98 + con.add(url, baseURI, format, context); 1.99 + con.add(georeader, "", RDFFormat.NTRIPLES, context); 1.100 } 1.101 1.102 georeader.close(); 1.103 @@ -442,16 +442,16 @@ 1.104 handler.endRDF(); 1.105 1.106 if (context == null) { 1.107 - con1.add(reader, baseURI, format); 1.108 + con.add(reader, baseURI, format); 1.109 reader.close(); 1.110 1.111 } else { 1.112 - con1.add(reader, baseURI, format, context); 1.113 + con.add(reader, baseURI, format, context); 1.114 reader.close(); 1.115 1.116 } 1.117 1.118 - con1.add(georeader, "", RDFFormat.NTRIPLES); 1.119 + con.add(georeader, "", RDFFormat.NTRIPLES); 1.120 georeader.close(); 1.121 logger.info("[Strabon.storeString] Storing was successful."); 1.122 }