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.AbstractSimpleBinding;
21: import org.geotools.xml.InstanceComponent;
22: import org.geotools.xml.SimpleBinding;
23:
24: /**
25: * Binding object for the type http://www.w3.org/2001/XMLSchema:normalizedString.
26: *
27: * <p>
28: * <pre>
29: * <code>
30: * <xs:simpleType name="normalizedString" id="normalizedString">
31: * <xs:annotation>
32: * <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
33: * </xs:annotation>
34: * <xs:restriction base="xs:string">
35: * <xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/>
36: * </xs:restriction>
37: * </xs:simpleType>
38: *
39: * </code>
40: * </pre>
41: * </p>
42: *
43: * @generated
44: */
45: public class XSNormalizedStringBinding extends AbstractSimpleBinding {
46: /**
47: * @generated
48: */
49: public QName getTarget() {
50: return XS.NORMALIZEDSTRING;
51: }
52:
53: /**
54: * <!-- begin-user-doc -->
55: * <!-- end-user-doc -->
56: *
57: * @generated modifiable
58: */
59: public int getExecutionMode() {
60: return AFTER;
61: }
62:
63: /**
64: * <!-- begin-user-doc -->
65: * This binding delegates to its parent binding which returns objecs of
66: * type {@link String}.
67: * <!-- end-user-doc -->
68: *
69: * @generated modifiable
70: */
71: public Class getType() {
72: return String.class;
73: }
74:
75: /**
76: * <!-- begin-user-doc -->
77: * <!-- end-user-doc -->
78: *
79: * @generated modifiable
80: */
81: public Object parse(InstanceComponent instance, Object value)
82: throws Exception {
83: //Simply return string value, Whitespace facet is already handled
84: return value;
85: }
86:
87: }
|