Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vollt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sonia Zorba
vollt
Commits
1d3b311c
Commit
1d3b311c
authored
7 years ago
by
gmantele
Browse files
Options
Downloads
Patches
Plain Diff
[ADQL] Remove useless hidden file
This commit fixes the Github issue #58
parent
3d96c9d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/adql/query/operand/function/geometry/.#ContainsFunction.java.1.1
+0
-68
0 additions, 68 deletions
...ery/operand/function/geometry/.#ContainsFunction.java.1.1
with
0 additions
and
68 deletions
src/adql/query/operand/function/geometry/.#ContainsFunction.java.1.1
deleted
100644 → 0
+
0
−
68
View file @
3d96c9d9
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";
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment