private static void export( PropertyIsNil operator, XMLStreamWriter writer ) throws XMLStreamException { writer.writeStartElement( FES_20_NS, "PropertyIsNil" ); export( operator.getPropertyName(), writer ); writer.writeEndElement(); }
case PROPERTY_IS_NIL: PropertyIsNil pin = (PropertyIsNil) o; return new PropertyIsNil( exs[0], pin.getNilReason(), o.getMatchAction() ); case PROPERTY_IS_NOT_EQUAL_TO: return new PropertyIsNotEqualTo( exs[0], exs[1], o.isMatchCase(), o.getMatchAction() );
private static PropertyIsNil parsePropertyIsNilOperator( XMLStreamReader xmlStream ) throws XMLStreamException { // 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 ); } String nilReason = XMLStreamUtils.getAttributeValue( xmlStream, "nilReason" ); nextElement( xmlStream ); Expression param = parseExpression( xmlStream ); nextElement( xmlStream ); return new PropertyIsNil( param, nilReason, matchAction ); }
PropertyIsNil propIsNil = (PropertyIsNil) op; SQLOperationBuilder builder = new SQLOperationBuilder( BOOLEAN ); Expression expr = propIsNil.getPropertyName(); if ( !( expr instanceof ValueReference ) ) { String msg = "Mapping of PropertyIsNil is only supported for ValueReference expressions.";