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.xs.bindings;
17:
18: import javax.xml.namespace.QName;
19:
20: import org.geotools.xml.InstanceComponent;
21: import org.geotools.xml.SimpleBinding;
22:
23: /**
24: * Binding object for the type http://www.w3.org/2001/XMLSchema:anySimpleType.
25: *
26: * <p>
27: * <pre>
28: * <code>
29: * <xs:simpleType name="anySimpleType" id="anySimpleType">
30: * <xs:restriction base="xs:anyType"/>
31: * </xs:simpleType>
32: *
33: * </code>
34: * </pre>
35: * </p>
36: *
37: * @generated
38: */
39: public class XSAnySimpleTypeBinding implements SimpleBinding {
40: /**
41: * <!-- begin-user-doc -->
42: * <!-- end-user-doc -->
43: *
44: * @generated
45: */
46: public QName getTarget() {
47: return XS.ANYSIMPLETYPE;
48: }
49:
50: /**
51: * <!-- begin-user-doc -->
52: * <!-- end-user-doc -->
53: *
54: * @generated modifiable
55: */
56: public int getExecutionMode() {
57: return OVERRIDE;
58: }
59:
60: /**
61: * <!-- begin-user-doc -->
62: * This binding returns object of type String.
63: * <!-- end-user-doc -->
64: *
65: * @generated modifiable
66: */
67: public Class getType() {
68: return String.class;
69: }
70:
71: /**
72: * <!-- begin-user-doc -->
73: * This method returns the value paramter, which is the facet parsed
74: * string passed in from the framework.
75: * <!-- end-user-doc -->
76: *
77: * @generated modifiable
78: */
79: public Object parse(InstanceComponent instance, Object value)
80: throws Exception {
81: return value;
82: }
83:
84: /**
85: * <!-- begin-user-doc -->
86: * <!-- end-user-doc -->
87: *
88: * @generated modifiable
89: */
90: public String encode(Object object, String value) {
91: return object == null ? null : String.valueOf(object);
92: }
93: }
|