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.PropertyIsLessThan;
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:PropertyIsLessThan.
28: *
29: * <p>
30: * <pre>
31: * <code>
32: * <xsd:element name="PropertyIsLessThan"
33: * substitutionGroup="ogc:comparisonOps" type="ogc:BinaryComparisonOpType"/>
34: *
35: * </code>
36: * </pre>
37: * </p>
38: *
39: * @generated
40: */
41: public class OGCPropertyIsLessThanBinding extends
42: AbstractComplexBinding {
43: FilterFactory filterfactory;
44:
45: public OGCPropertyIsLessThanBinding(FilterFactory filterfactory) {
46: this .filterfactory = filterfactory;
47: }
48:
49: /**
50: * @generated
51: */
52: public QName getTarget() {
53: return OGC.PropertyIsLessThan;
54: }
55:
56: /**
57: * <!-- begin-user-doc -->
58: * <!-- end-user-doc -->
59: *
60: * @generated modifiable
61: */
62: public Class getType() {
63: return PropertyIsLessThan.class;
64: }
65:
66: public int getExecutionMode() {
67: return AFTER;
68: }
69:
70: /**
71: * <!-- begin-user-doc -->
72: * <!-- end-user-doc -->
73: *
74: * @generated modifiable
75: */
76: public Object parse(ElementInstance instance, Node node,
77: Object value) throws Exception {
78: Expression e1 = (Expression) node.getChildValue(0);
79: Expression e2 = (Expression) node.getChildValue(1);
80:
81: return filterfactory.less(e1, e2);
82: }
83: }
|