final String min = formatDateTime( (Date) iv.min ); final String max = formatDateTime( (Date) iv.max ); os[i++] = new PropertyIsBetween( property, new Literal<PrimitiveValue>( min ), new Literal<PrimitiveValue>( max ), true, null ); } else if ( o.toString().equalsIgnoreCase( "current" ) ) {
max = ( (Number) iv.max ).toString(); os[i++] = new PropertyIsBetween( property, new Literal<PrimitiveValue>( min ), new Literal<PrimitiveValue>( max ), true, null ); } else {
private static PropertyIsBetween parsePropertyIsBetweenOperator( XMLStreamReader xmlStream ) throws XMLStreamException { // this is a deegree extension over Filter 1.0.0 spec. boolean matchCase = getAttributeValueAsBoolean( xmlStream, null, "matchCase", true ); nextElement( xmlStream ); Expression expression = parseExpression( xmlStream ); nextElement( xmlStream ); xmlStream.require( START_ELEMENT, OGC_NS, "LowerBoundary" ); nextElement( xmlStream ); Expression lowerBoundary = parseExpression( xmlStream ); nextElement( xmlStream ); // </ expression > nextElement( xmlStream ); // </LowerBoundary> xmlStream.require( START_ELEMENT, OGC_NS, "UpperBoundary" ); nextElement( xmlStream ); Expression upperBoundary = parseExpression( xmlStream ); nextElement( xmlStream ); // </ expression > nextElement( xmlStream ); // </UowerBoundary> return new PropertyIsBetween( expression, lowerBoundary, upperBoundary, matchCase, null ); }
private static PropertyIsBetween parsePropertyIsBetweenOperator( XMLStreamReader xmlStream ) throws XMLStreamException { // this is a deegree extension over Filter 1.1.0 spec. boolean matchCase = getAttributeValueAsBoolean( xmlStream, null, "matchCase", true ); nextElement( xmlStream ); Expression expression = parseExpression( xmlStream ); nextElement( xmlStream ); xmlStream.require( START_ELEMENT, OGC_NS, "LowerBoundary" ); nextElement( xmlStream ); Expression lowerBoundary = parseExpression( xmlStream ); nextElement( xmlStream ); nextElement( xmlStream ); xmlStream.require( START_ELEMENT, OGC_NS, "UpperBoundary" ); nextElement( xmlStream ); Expression upperBoundary = parseExpression( xmlStream ); nextElement( xmlStream ); nextElement( xmlStream ); return new PropertyIsBetween( expression, lowerBoundary, upperBoundary, matchCase, null ); }
private static PropertyIsBetween parsePropertyIsBetweenOperator( XMLStreamReader xmlStream ) throws XMLStreamException { // this is a deegree extension over Filter 2.0.0 spec. (TODO should this be null, if not present?) Boolean matchCase = getAttributeValueAsBoolean( xmlStream, null, "matchCase", true ); // this is a deegree extension over Filter 2.0.0 spec. (TODO should this be null, if not present?) MatchAction matchAction = null; String s = XMLStreamUtils.getAttributeValue( xmlStream, "matchAction" ); if ( s != null ) { matchAction = parseMatchAction( xmlStream, s ); } nextElement( xmlStream ); Expression expression = parseExpression( xmlStream ); nextElement( xmlStream ); xmlStream.require( START_ELEMENT, FES_NS, "LowerBoundary" ); nextElement( xmlStream ); Expression lowerBoundary = parseExpression( xmlStream ); nextElement( xmlStream ); nextElement( xmlStream ); xmlStream.require( START_ELEMENT, FES_NS, "UpperBoundary" ); nextElement( xmlStream ); Expression upperBoundary = parseExpression( xmlStream ); nextElement( xmlStream ); nextElement( xmlStream ); return new PropertyIsBetween( expression, lowerBoundary, upperBoundary, matchCase, matchAction ); }
case PROPERTY_IS_BETWEEN: return new PropertyIsBetween( exs[1], exs[0], exs[2], o.isMatchCase(), o.getMatchAction() ); case PROPERTY_IS_EQUAL_TO: return new PropertyIsEqualTo( exs[0], exs[1], o.isMatchCase(), o.getMatchAction() );
case PROPERTY_IS_BETWEEN: PropertyIsBetween piw = (PropertyIsBetween) op; return new PropertyIsBetween( copyExpression( piw.getExpression(), values ), copyExpression( piw.getLowerBoundary(), values ), copyExpression( piw.getUpperBoundary(), values ), piw.isMatchCase(),