@Override public Filter readFilter( XMLStreamReader xmlStream ) throws XMLParsingException, XMLStreamException { return Filter110XMLDecoder.parse( xmlStream ); }
@Override public Filter readFilter( XMLStreamReader xmlStream ) throws XMLParsingException, XMLStreamException { return Filter100XMLDecoder.parse( xmlStream ); }
@Override public Filter readFilter( XMLStreamReader xmlStream ) throws XMLParsingException, XMLStreamException { return Filter200XMLDecoder.parse( xmlStream ); }
private static void export( XMLStreamWriter writer, Not not ) throws XMLStreamException, UnknownCRSException, TransformationException { writer.writeStartElement( FES_20_NS, "Not" ); export( not.getParameter(), writer ); writer.writeEndElement(); }
private static void writeFilterFilter( GetRecords getRecords, XMLStreamWriter writer ) throws XMLStreamException, UnknownCRSException, TransformationException { if ( getRecords.getConstraint() != null ) { writer.writeStartElement( CSW_202_PREFIX, "Constraint", CSW_202_NS ); writer.writeAttribute( "version", "1.1.0" ); Filter110XMLEncoder.export( getRecords.getConstraint(), writer ); writer.writeEndElement(); } }
/** * Exports an <code>ogc:Filter_Capabilities</code> element (1.1.0) that describes the capabilities of deegree's * filter implementation. * * @param writer * used to write the XML * @throws XMLStreamException * if the exporting fails */ public static void export110( XMLStreamWriter writer ) throws XMLStreamException { writer.setPrefix( OGC_PREFIX, OGCNS ); writer.writeStartElement( OGCNS, "Filter_Capabilities" ); if ( writer.getPrefix( OGCNS ) == null ) { writer.writeNamespace( OGC_PREFIX, OGCNS ); } exportSpatialCapabilities110( writer ); exportScalarCapabilities110( writer ); exportIdCapabilities110( writer ); writer.writeEndElement(); }
private static PropertyIsNull parsePropertyIsNullOperator( 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 ); } nextElement( xmlStream ); Expression value = parseExpression( xmlStream ); nextElement( xmlStream ); return new PropertyIsNull( value, matchAction ); }
/** * Exports an <code>ogc:Filter_Capabilities</code> element (1.0.0) that describes the capabilities of deegree's * filter implementation. * * @param writer * used to write the XML * @throws XMLStreamException * if the exporting fails */ public static void export100( XMLStreamWriter writer ) throws XMLStreamException { writer.setPrefix( OGC_PREFIX, OGCNS ); writer.writeStartElement( OGCNS, "Filter_Capabilities" ); if ( writer.getPrefix( OGCNS ) == null ) { writer.writeNamespace( OGC_PREFIX, OGCNS ); } exportSpatialCapabilities100( writer ); exportScalarCapabilities100( writer ); writer.writeEndElement(); }
private static PropertyIsLike parsePropertyIsLikeOperator( XMLStreamReader xmlStream ) throws XMLStreamException { // this is a deegree extension over Filter 1.0.0 boolean matchCase = getAttributeValueAsBoolean( xmlStream, null, "matchCase", true ); String wildCard = getRequiredAttributeValue( xmlStream, "wildCard" ); String singleChar = getRequiredAttributeValue( xmlStream, "singleChar" ); String escapeChar = getRequiredAttributeValue( xmlStream, "escape" ); nextElement( xmlStream ); ValueReference propName = parsePropertyName( xmlStream ); nextElement( xmlStream ); Literal<?> literal = parseLiteral( xmlStream ); nextElement( xmlStream ); return new PropertyIsLike( propName, literal, wildCard, singleChar, escapeChar, matchCase, null ); }
private static void exportScalarCapabilities200( XMLStreamWriter writer ) throws XMLStreamException { writer.writeStartElement( FES_20_NS, "Scalar_Capabilities" ); writer.writeEmptyElement( FES_20_NS, "LogicalOperators" ); writer.writeStartElement( FES_20_NS, "ComparisonOperators" ); exportComparisonOperator( writer, "PropertyIsEqualTo" ); exportComparisonOperator( writer, "PropertyIsNotEqualTo" ); exportComparisonOperator( writer, "PropertyIsLessThan" ); exportComparisonOperator( writer, "PropertyIsGreaterThan" ); exportComparisonOperator( writer, "PropertyIsLessThanOrEqualTo" ); exportComparisonOperator( writer, "PropertyIsGreaterThanOrEqualTo" ); exportComparisonOperator( writer, "PropertyIsLike" ); exportComparisonOperator( writer, "PropertyIsNull" ); exportComparisonOperator( writer, "PropertyIsNil" ); exportComparisonOperator( writer, "PropertyIsBetween" ); writer.writeEndElement(); writer.writeEndElement(); }
private static PropertyIsNull parsePropertyIsNullOperator( XMLStreamReader xmlStream ) throws XMLStreamException { nextElement( xmlStream ); ValueReference propName = parsePropertyName( xmlStream ); nextElement( xmlStream ); return new PropertyIsNull( propName, null ); }
private static PropertyIsNull parsePropertyIsNullOperator( XMLStreamReader xmlStream ) throws XMLStreamException { nextElement( xmlStream ); ValueReference propName = parsePropertyName( xmlStream, false ); nextElement( xmlStream ); return new PropertyIsNull( propName, null ); }
private static void export( PropertyIsNull operator, XMLStreamWriter writer ) throws XMLStreamException { writer.writeStartElement( FES_20_NS, "PropertyIsNull" ); export( operator.getPropertyName(), writer ); writer.writeEndElement(); }
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 ); }
private static void export( PropertyIsBetween operator, XMLStreamWriter writer ) throws XMLStreamException, UnknownCRSException, TransformationException { writer.writeStartElement( FES_20_NS, "PropertyIsBetween" ); export( operator.getExpression(), writer ); writer.writeStartElement( FES_20_NS, "LowerBoundary" ); export( operator.getLowerBoundary(), writer ); writer.writeEndElement(); writer.writeStartElement( FES_20_NS, "UpperBoundary" ); export( operator.getUpperBoundary(), writer ); writer.writeEndElement(); writer.writeEndElement(); }
private static void export( PropertyIsNil operator, XMLStreamWriter writer ) throws XMLStreamException { writer.writeStartElement( FES_20_NS, "PropertyIsNil" ); export( operator.getPropertyName(), writer ); writer.writeEndElement(); }
private static void export( Function function, XMLStreamWriter writer ) throws XMLStreamException { writer.writeStartElement( FES_20_NS, "Function" ); writer.writeAttribute( "name", function.getName() ); for ( Expression param : function.getParameters() ) { export( param, writer ); } writer.writeEndElement(); }
private static void export( XMLStreamWriter writer, And andOp ) throws XMLStreamException, UnknownCRSException, TransformationException { writer.writeStartElement( FES_20_NS, "And" ); for ( int i = 0; i < andOp.getSize(); i++ ) { export( andOp.getParameter( i ), writer ); } writer.writeEndElement(); }
private static void export( XMLStreamWriter writer, Or orOp ) throws XMLStreamException, UnknownCRSException, TransformationException { writer.writeStartElement( FES_20_NS, "Or" ); for ( int i = 0; i < orOp.getSize(); i++ ) { export( orOp.getParameter( i ), writer ); } writer.writeEndElement(); }
private static void export( PropertyIsLike operator, XMLStreamWriter writer ) throws XMLStreamException { writer.writeStartElement( FES_20_NS, "PropertyIsLike" ); writer.writeAttribute( "wildCard", operator.getWildCard() ); writer.writeAttribute( "singleChar", operator.getSingleChar() ); writer.writeAttribute( "escapeChar", operator.getEscapeChar() ); export( operator.getExpression(), writer ); export( operator.getPattern(), writer ); writer.writeEndElement(); }