private static void addGeometries( Operator operator, List<Geometry> geometries ) { Operator.Type type = operator.getType(); switch ( type ) { case LOGICAL: LogicalOperator logicalOper = (LogicalOperator) operator; for ( Operator param : logicalOper.getParams() ) { addGeometries( param, geometries ); } break; case SPATIAL: SpatialOperator spatialOper = (SpatialOperator) operator; for ( Object param : spatialOper.getParams() ) { if ( param instanceof Geometry ) { geometries.add( (Geometry) param ); } } break; case COMPARISON: // nothing to do break; } }
private static void addPropertyNames( Operator operator, List<ValueReference> propNames ) { Operator.Type type = operator.getType(); switch ( type ) { case COMPARISON: ComparisonOperator compOper = (ComparisonOperator) operator; for ( Expression expr : compOper.getParams() ) { addPropertyNames( expr, propNames ); } break; case LOGICAL: LogicalOperator logicalOper = (LogicalOperator) operator; for ( Operator param : logicalOper.getParams() ) { addPropertyNames( param, propNames ); } break; case SPATIAL: SpatialOperator spatialOper = (SpatialOperator) operator; for ( Object param : spatialOper.getParams() ) { if ( param instanceof Expression ) { addPropertyNames( (Expression) param, propNames ); } } break; } }
private static SpatialOperator repair( SpatialOperator o, Map<String, QName> bindings, Set<QName> validNames ) { Object[] os = o.getParams(); for ( int i = 0; i < os.length; ++i ) { if ( os[i] instanceof Expression ) {