/** * Constructor with literal. * * @param literal The literal to store inside this expression. * @throws IllegalFilterException This literal type is not in scope. */ public LiteralExpressionImpl(Object literal) throws IllegalFilterException { this.setValue(literal); }
/** * 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.setValue(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.setValue(Long.valueOf(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 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.setValue(Integer.valueOf(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.setValue(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"); } }
/** * Gets geometry. * * @param geometry The geometry from the filter. * @throws IllegalFilterException If there are problems creating expression. */ public void geometry(Geometry geometry) throws IllegalFilterException { // Sets the geometry for the expression, as appropriate LOGGER.finer("got geometry: " + geometry.toString()); // if(curExprssn.getType()==ExpressionDefault.LITERAL_GEOMETRY){ // LOGGER.finer("got geometry: "); curExprssn = new LiteralExpressionImpl(); ((LiteralExpressionImpl) curExprssn).setValue(geometry); LOGGER.finer("set expression: " + curExprssn.toString()); currentState = "complete"; LOGGER.finer("set current state: " + currentState); // } }
try { Object temp = Integer.valueOf(message); ((LiteralExpressionImpl) curExprssn).setValue(temp); currentState = "complete"; } catch (NumberFormatException nfe1) { try { Object temp = new Double(message); ((LiteralExpressionImpl) curExprssn).setValue(temp); currentState = "complete"; } catch (NumberFormatException nfe2) { Object temp = message; ((LiteralExpressionImpl) curExprssn).setValue(temp); currentState = "complete"; ((LiteralExpressionImpl) curExprssn).setValue(temp); currentState = "complete";
/** * This method calls {@link #setValue(Object)}. * * @deprecated use {@link #setValue(Object)}. * */ public final void setLiteral(Object literal) throws IllegalFilterException { setValue(literal); }
/** * This method calls {@link #setValue(Object)}. * * @deprecated use {@link #setValue(Object)}. * */ public final void setLiteral(Object literal) throws IllegalFilterException { setValue(literal); }
polygon.setUserData(refEnv.getCoordinateReferenceSystem()); super.setValue(polygon);