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:
23: /**
24: * Binding object for the type http://www.w3.org/2001/XMLSchema:NMTOKEN.
25: *
26: * <p>
27: * <pre>
28: * <code>
29: * <xs:simpleType name="NMTOKEN" id="NMTOKEN">
30: * <xs:annotation>
31: * <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
32: * </xs:annotation>
33: * <xs:restriction base="xs:token">
34: * <xs:pattern value="\c+" id="NMTOKEN.pattern">
35: * <xs:annotation>
36: * <xs:documentation
37: * source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
38: * pattern matches production 7 from the XML spec </xs:documentation>
39: * </xs:annotation>
40: * </xs:pattern>
41: * </xs:restriction>
42: * </xs:simpleType>
43: *
44: * </code>
45: * </pre>
46: * </p>
47: *
48: * @generated
49: */
50: public class XSNMTOKENBinding extends AbstractSimpleBinding {
51: /**
52: * @generated
53: */
54: public QName getTarget() {
55: return XS.NMTOKEN;
56: }
57:
58: /**
59: * <!-- begin-user-doc -->
60: * <!-- end-user-doc -->
61: *
62: * @generated modifiable
63: */
64: public Class getType() {
65: return String.class;
66: }
67:
68: /**
69: * <!-- begin-user-doc -->
70: * <!-- end-user-doc -->
71: *
72: * @generated modifiable
73: */
74: public Object parse(InstanceComponent instance, Object value)
75: throws Exception {
76:
77: //just return the value passed in
78: return value;
79: }
80:
81: }
|