// }
}
public Object getProperty(Object object, QName qName)
throws Exception {
BinaryLogicOperator operator = (BinaryLogicOperator) object;
// this method is acutally used by later version of the filter spec, so it handles
// everything
//use the local part to handle both OGC and FES namespaces
String name = qName.getLocalPart();
if ("comparisonOps".equals(name)) {
List comparison = new ArrayList();
for (Iterator f = operator.getChildren().iterator(); f.hasNext();) {
Filter filter = (Filter) f.next();
if (!(filter instanceof BinarySpatialOperator || filter instanceof BinaryTemporalOperator) &&
(filter instanceof BinaryComparisonOperator ||
filter instanceof PropertyIsLike ||
filter instanceof PropertyIsNull ||
filter instanceof PropertyIsNil ||
filter instanceof PropertyIsBetween) ) {
comparison.add(filter);
}
}
if (!comparison.isEmpty()) {
return comparison;
}
}
if ("spatialOps".equals(name)) {
List spatial = new ArrayList();
for (Iterator f = operator.getChildren().iterator(); f.hasNext();) {
Filter filter = (Filter) f.next();
if (filter instanceof BinarySpatialOperator) {
spatial.add(filter);
}
}
if (!spatial.isEmpty()) {
return spatial;
}
}
if ("temporalOps".equals(name)) {
List temporal = new ArrayList();
for (Iterator f = operator.getChildren().iterator(); f.hasNext();) {
Filter filter = (Filter) f.next();
if (filter instanceof BinaryTemporalOperator) {
temporal.add(filter);
}
}
if (!temporal.isEmpty()) {
return temporal;
}
}
if ("logicOps".equals(name)) {
List logic = new ArrayList();
for (Iterator f = operator.getChildren().iterator(); f.hasNext();) {
Filter filter = (Filter) f.next();
if (filter instanceof BinaryLogicOperator || filter instanceof Not) {
logic.add(filter);
}
}
if (!logic.isEmpty()) {
return logic;
}
}
if ("_Id".equals(name)) {
List ids = new ArrayList();
for (Filter filter : operator.getChildren()) {
if (filter instanceof Id) {
ids.add(filter);
}
}
if (!ids.isEmpty()) {
return ids;
}
}
if ("Function".equals(name)) {
List functions = new ArrayList();
for (Filter filter : operator.getChildren()) {
if (filter instanceof Function) {
functions.add(filter);
}
}
if (!functions.isEmpty()) {