From 1d3b311ca945337a82c2d8a01c54a2a12ae1ae0a Mon Sep 17 00:00:00 2001 From: gmantele <gmantele@ari.uni-heidelberg.de> Date: Mon, 8 Jan 2018 15:54:01 +0100 Subject: [PATCH] [ADQL] Remove useless hidden file This commit fixes the Github issue #58 --- .../geometry/.#ContainsFunction.java.1.1 | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 src/adql/query/operand/function/geometry/.#ContainsFunction.java.1.1 diff --git a/src/adql/query/operand/function/geometry/.#ContainsFunction.java.1.1 b/src/adql/query/operand/function/geometry/.#ContainsFunction.java.1.1 deleted file mode 100644 index 1f71756..0000000 --- a/src/adql/query/operand/function/geometry/.#ContainsFunction.java.1.1 +++ /dev/null @@ -1,68 +0,0 @@ -package adqlParser.geometryFunctions; - -import saadadb.database.DbmsWrapper; - -import adqlParser.ParseException; - -public class ContainsFunction implements GeometryFunction { - - public final GeometryFunction leftParam; // POINT - public final GeometryFunction rightParam; // BOX, CIRCLE - - public final String[] sqlColumns; - - public ContainsFunction(GeometryFunction left, GeometryFunction right) throws ParseException { - if (left == null || right == null) - throw new ParseException("At least one parameter of the CONTAINS function is null: both must be non-null !"); - - leftParam = left; - rightParam = right; - - String[] leftColumns = leftParam.getSQLColumns(); - String[] rightColumns= rightParam.getSQLColumns(); - int ln = ((leftColumns==null)?0:leftColumns.length)+((rightColumns==null)?0:rightColumns.length); - sqlColumns = new String[ln]; - int c = 0; - if (leftColumns != null) - for(int i=0; i < leftColumns.length; i++, c++) - sqlColumns[c] = leftColumns[i]; - if (rightColumns != null) - for(int i=0; i < rightColumns.length; i++, c++) - sqlColumns[c] = rightColumns[i]; - } - - public String[] getSQLColumns() { - return sqlColumns; - } - - public String toSQL() { - String sql = getFunctionName()+"("+leftParam.toSQL()+", "+rightParam.toSQL()+")"; - // POINT, ... - if (leftParam.getFunctionName().equalsIgnoreCase("POINT")){ - PointFunction p = (PointFunction)leftParam; - // BOX - if (rightParam.getFunctionName().equalsIgnoreCase("BOX")){ - BoxFunction b = (BoxFunction)rightParam; - sql = DbmsWrapper.getIsInBoxConstraint(p.coord1, p.coord2, b.coord1, b.coord2, b.width, b.height); - - // CIRCLE - }else if (rightParam.getFunctionName().equalsIgnoreCase("CIRCLE")){ - CircleFunction c = (CircleFunction)rightParam; - sql = DbmsWrapper.getADQLIsInCircleConstraint(p.coord1, p.coord2, c.coord1, c.coord2, c.radius); - } - } - return sql; - } - - public String toText() { - return "'"+getFunctionName()+"("+leftParam.toSQL().replaceAll("'", "''")+", "+rightParam.toSQL().replaceAll("'", "''")+")'"; - } - - public String toString(){ - return toText(); - } - - public String getFunctionName() { - return "CONTAINS"; - } -} -- GitLab