01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.filter.v1_0;
17:
18: import javax.xml.namespace.QName;
19: import org.opengis.filter.FilterFactory;
20: import org.opengis.filter.PropertyIsLessThanOrEqualTo;
21: import org.opengis.filter.expression.Expression;
22: import org.geotools.xml.AbstractComplexBinding;
23: import org.geotools.xml.ElementInstance;
24: import org.geotools.xml.Node;
25:
26: /**
27: * Binding object for the element http://www.opengis.net/ogc:PropertyIsLessThanOrEqualTo.
28: *
29: * <p>
30: * <pre>
31: * <code>
32: * <xsd:element name="PropertyIsLessThanOrEqualTo"
33: * substitutionGroup="ogc:comparisonOps" type="ogc:BinaryComparisonOpType"/>
34: *
35: * </code>
36: * </pre>
37: * </p>
38: *
39: * @generated
40: */
41: public class OGCPropertyIsLessThanOrEqualToBinding extends
42: AbstractComplexBinding {
43: FilterFactory filterfactory;
44:
45: public OGCPropertyIsLessThanOrEqualToBinding(
46: FilterFactory filterfactory) {
47: this .filterfactory = filterfactory;
48: }
49:
50: /**
51: * @generated
52: */
53: public QName getTarget() {
54: return OGC.PropertyIsLessThanOrEqualTo;
55: }
56:
57: /**
58: * <!-- begin-user-doc -->
59: * <!-- end-user-doc -->
60: *
61: * @generated modifiable
62: */
63: public Class getType() {
64: return PropertyIsLessThanOrEqualTo.class;
65: }
66:
67: public int getExecutionMode() {
68: return AFTER;
69: }
70:
71: /**
72: * <!-- begin-user-doc -->
73: * <!-- end-user-doc -->
74: *
75: * @generated modifiable
76: */
77: public Object parse(ElementInstance instance, Node node,
78: Object value) throws Exception {
79: Expression e1 = (Expression) node.getChildValue(0);
80: Expression e2 = (Expression) node.getChildValue(1);
81:
82: return filterfactory.lessOrEqual(e1, e2);
83: }
84: }
|