Strabon
changeset 1395:85a06bbfd1b8
some cleaning up
author | Babis Nikolaou <charnik@di.uoa.gr> |
---|---|
date | Thu Sep 18 19:50:53 2014 +0300 (2014-09-18) |
parents | d77b3f6f67df |
children | 63037c4974c5 |
files | generaldb/src/main/java/org/openrdf/sail/generaldb/schema/GeoValueTable.java |
line diff
1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/GeoValueTable.java Thu Sep 18 18:08:00 2014 +0300 1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/GeoValueTable.java Thu Sep 18 19:50:53 2014 +0300 1.3 @@ -33,13 +33,6 @@ 1.4 1.5 private static final String[] PKEY = { "id" }; 1.6 1.7 - //used to be named "value" 1.8 - //private static final String[] VALUE_INDEX = { "original" }; 1.9 - 1.10 - //private static final String[] MINIMUM_BOUNDING_BOX = { "value" }; 1.11 - 1.12 - //private static final String[] CONSTRAINT = { "constr" }; 1.13 - 1.14 private int length = -1; 1.15 1.16 private int sqlType; 1.17 @@ -182,83 +175,6 @@ 1.18 table.close(); 1.19 } 1.20 1.21 - 1.22 - /** 1.23 - * FIXME careful here !!!!!!!!!!!! 1.24 - * this is the one I am using 1.25 - */ 1.26 - 1.27 - /** 1.28 - * 1.29 - * @param constraint the field contained in "value" --> currently string 1.30 - * @param geom the field contained in "strdfgeo" 1.31 - */ 1.32 - // public synchronized void insert(Number id, /*String constraint,*/ Timestamp interval_start, Timestamp interval_end, byte[] geom) 1.33 - // throws SQLException, InterruptedException 1.34 - // { 1.35 - // /*ValueBatch batch = getValueBatch(); 1.36 - // if (isExpired(batch)) { 1.37 - // batch = newValueBatch(); 1.38 - // initBatch(batch); 1.39 - // } 1.40 - // batch.setObject(1, id); 1.41 - // batch.setObject(2, value); 1.42 - // batch.setObject(3, constraint); 1.43 - // batch.setString(4, mbb); 1.44 - // 1.45 - // batch.addBatch(); 1.46 - // queue(batch); 1.47 - // */ 1.48 - // //tests 1.49 - // 1.50 - //// if (geom.equals("")) { 1.51 - //// throw new SQLException("The formula does not describe a finite point set."); 1.52 - //// } 1.53 - // 1.54 - //// if (geom.equals(ConvexPolyhedron.INCONSISTENT)) { 1.55 - // if (geom.length==0) { 1.56 - // String psqlInsertLine = "INSERT INTO geo_values (id, interval_start, interval_end,strdfgeo) VALUES (?, ? , ?, NULL)"; 1.57 - // Connection conn = table.getConnection(); 1.58 - // PreparedStatement insertStmt = conn.prepareStatement(psqlInsertLine); 1.59 - // 1.60 - // System.out.println("//////////////////////// INCONSISTENT" + geom); 1.61 - // 1.62 - // [B@62f4739 1.63 - // insertStmt.setLong(1, id.longValue()); 1.64 - // //insertStmt.setString(2, constraint); 1.65 - // //insertStmt.setBytes(2, constraint); 1.66 - // insertStmt.setTimestamp(2,interval_start); 1.67 - // insertStmt.setTimestamp(3,interval_end); 1.68 - // //insertStmt.setString(4, geom); 1.69 - // 1.70 - // insertStmt.executeUpdate(); 1.71 - // } else { 1.72 - // //String psqlInsertLine = "INSERT INTO geo_values (id, value,interval_start, interval_end, strdfgeo) VALUES (?, ?, ?, ?, ST_GeometryFromText(?,-1))"; 1.73 - // String psqlInsertLine = "INSERT INTO geo_values (id, interval_start, interval_end, strdfgeo) VALUES (?, ?, ?, ST_GeomFromWKB(?,-1))"; 1.74 - // 1.75 - // Connection conn = table.getConnection(); 1.76 - // PreparedStatement insertStmt = conn.prepareStatement(psqlInsertLine); 1.77 - // 1.78 - // //System.out.println("//////////////////////// STR " + value); 1.79 - // //System.out.println("//////////////////////// GEOM " + geom); 1.80 - // 1.81 - // insertStmt.setLong(1, id.longValue()); 1.82 - // //insertStmt.setString(2, value); 1.83 - // //insertStmt.setString(2, constraint); 1.84 - // //insertStmt.setBytes(2, constraint); 1.85 - // 1.86 - // insertStmt.setTimestamp(2,interval_start); 1.87 - // insertStmt.setTimestamp(3,interval_end); 1.88 - // 1.89 - // 1.90 - // //insertStmt.setString(5, geom);//not using wkt any more -switched to WKB 1.91 - // insertStmt.setBytes(4, geom); 1.92 - // 1.93 - // insertStmt.executeUpdate(); 1.94 - // } 1.95 - // } 1.96 - 1.97 - 1.98 /** 1.99 * Stores the given tuple into the geo_values table. 1.100 * 1.101 @@ -304,30 +220,6 @@ 1.102 1.103 } 1.104 1.105 - /** 1.106 - * FIXME careful here 1.107 - * Haven't used it yet 1.108 - */ 1.109 - /*public synchronized void insert(Number id, Number value, String strdfgeo, byte[] constraint) 1.110 - throws SQLException, InterruptedException 1.111 - { 1.112 - ValueBatch batch = getValueBatch(); 1.113 - if (isExpired(batch)) { 1.114 - batch = newValueBatch(); 1.115 - initBatch(batch); 1.116 - } 1.117 - batch.setObject(1, id); 1.118 - //batch.setObject(2, value); 1.119 - batch.setObject(2, constraint); 1.120 - batch.setString(3, strdfgeo); 1.121 - //batch.setString(4, constraint); 1.122 - 1.123 - batch.addBatch(); 1.124 - queue(batch); 1.125 - 1.126 - 1.127 - }*/ 1.128 - 1.129 public ValueBatch getValueBatch() { 1.130 return this.batch; 1.131 }