001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: */
016: package org.geotools.gml2.bindings;
017:
018: import javax.xml.namespace.QName;
019: import org.geotools.xml.InstanceComponent;
020: import org.geotools.xml.SimpleBinding;
021:
022: /**
023: * Binding object for the type http://www.opengis.net/gml:NullType.
024: *
025: * <p>
026: * <pre>
027: * <code>
028: * <simpleType name="NullType">
029: * <annotation>
030: * <documentation> If a bounding shape is not provided for
031: * a feature collection, explain why. Allowable values
032: * are: innapplicable - the features do not have
033: * geometry unknown - the boundingBox cannot be
034: * computed unavailable - there may be a boundingBox
035: * but it is not divulged missing - there are no
036: * features </documentation>
037: * </annotation>
038: * <restriction base="string">
039: * <enumeration value="inapplicable"/>
040: * <enumeration value="unknown"/>
041: * <enumeration value="unavailable"/>
042: * <enumeration value="missing"/>
043: * </restriction>
044: * </simpleType>
045: *
046: * </code>
047: * </pre>
048: * </p>
049: *
050: * @generated
051: */
052: public class GMLNullTypeBinding implements SimpleBinding {
053: /**
054: * @generated
055: */
056: public QName getTarget() {
057: return GML.NULLTYPE;
058: }
059:
060: /**
061: * <!-- begin-user-doc -->
062: * <!-- end-user-doc -->
063: *
064: * @generated modifiable
065: */
066: public int getExecutionMode() {
067: return AFTER;
068: }
069:
070: /**
071: * <!-- begin-user-doc -->
072: * <!-- end-user-doc -->
073: *
074: * @generated modifiable
075: */
076: public Class getType() {
077: return null;
078: }
079:
080: /**
081: * <!-- begin-user-doc -->
082: * Returns an object of type @link com.vividsolutions.jts.geom.Envelope. In
083: * the event that a <b>null</b> element is given, a null Envelope is
084: * returned by calling @link com.vividsolutions.jts.geom.Envelope#setToNull().
085: * <!-- end-user-doc -->
086: *
087: * @generated modifiable
088: */
089: public Object parse(InstanceComponent instance, Object value)
090: throws Exception {
091: //dont do anything special, here just return the string
092: return value;
093: }
094:
095: /**
096: * <!-- begin-user-doc -->
097: * <!-- end-user-doc -->
098: *
099: * @generated modifiable
100: */
101: public String encode(Object object, String value) {
102: //TODO: implement
103: return null;
104: }
105: }
|