/** * Constructor with literal. * * @param literal The literal to store inside this expression. * * @throws IllegalFilterException This literal type is not in scope. */ protected LiteralExpressionImpl(Object literal) throws IllegalFilterException { this.setLiteral(literal); }
/** * Constructor with literal. * * @param literal The literal to store inside this expression. * * @throws IllegalFilterException This literal type is not in scope. */ protected LiteralExpressionImpl(Object literal) throws IllegalFilterException { this.setLiteral(literal); }
protected LiteralExpressionImpl(long value) { try { this.setLiteral(new Long(value)); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and Double is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Longs"); } }
/** * Constructor with literal. This alternative constructor is a convinience * one for doubles an Double object will be constructed, and no * IllegalFilterException can ever be thrown. * * @param value The double to store inside this expression. */ protected LiteralExpressionImpl(String value) { try { this.setLiteral(value); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and String is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Strings"); } }
protected LiteralExpressionImpl(long value) { try { this.setLiteral(new Long(value)); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and Double is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Longs"); } }
/** * Constructor with literal. This alternative constructor is a convinience * one for doubles an Double object will be constructed, and no * IllegalFilterException can ever be thrown. * * @param value The double to store inside this expression. */ protected LiteralExpressionImpl(String value) { try { this.setLiteral(value); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and String is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Strings"); } }
/** * Constructor with literal. This alternative constructor is a convinience * one for integers an Integer object will be constructed, and no * IllegalFilterException can ever be thrown. * * @param value The integer to store inside this expression. */ protected LiteralExpressionImpl(int value) { try { this.setLiteral(new Integer(value)); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and Integer is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Integers"); } }
/** * Constructor with literal. This alternative constructor is a convinience * one for doubles an Double object will be constructed, and no * IllegalFilterException can ever be thrown. * * @param value The double to store inside this expression. */ protected LiteralExpressionImpl(double value) { try { this.setLiteral(new Double(value)); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and Double is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Doubles"); } }
/** * Constructor with literal. This alternative constructor is a convinience * one for integers an Integer object will be constructed, and no * IllegalFilterException can ever be thrown. * * @param value The integer to store inside this expression. */ protected LiteralExpressionImpl(int value) { try { this.setLiteral(new Integer(value)); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and Integer is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Integers"); } }
/** * Constructor with literal. This alternative constructor is a convinience * one for doubles an Double object will be constructed, and no * IllegalFilterException can ever be thrown. * * @param value The double to store inside this expression. */ protected LiteralExpressionImpl(double value) { try { this.setLiteral(new Double(value)); } catch (IllegalFilterException ile) { //this is imposible as this is only thrown for //invalid types, and Double is a valid type throw new AssertionError( "LiteralExpressionImpl is broken, it should accept Doubles"); } }
/** * Set the bbox for this expression * * @param env The envelope to set as the bounds. * * @throws IllegalFilterException If the box can not be created. * * @task HACK: currently sets the SRID to null, which can cause problems * with JTS when it comes to doing spatial tests */ public final void setBounds(Envelope env) throws IllegalFilterException { Coordinate[] coords = new Coordinate[5]; coords[0] = new Coordinate(env.getMinX(), env.getMinY()); coords[1] = new Coordinate(env.getMinX(), env.getMaxY()); coords[2] = new Coordinate(env.getMaxX(), env.getMaxY()); coords[3] = new Coordinate(env.getMaxX(), env.getMinY()); coords[4] = new Coordinate(env.getMinX(), env.getMinY()); LinearRing ring = null; try { ring = gfac.createLinearRing(coords); } catch (TopologyException tex) { throw new IllegalFilterException(tex.toString()); } super.setLiteral(gfac.createPolygon(ring, null)); } }