/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2002-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.gml3.bindings; import org.geotools.gml3.GML; import org.geotools.xml.*; import com.vividsolutions.jts.geom.Envelope; import javax.xml.namespace.QName; /** * Binding object for the type http://www.opengis.net/gml:NullType. * * <p> * * <pre> * <code> * <simpleType name="NullType"> * <annotation> * <documentation> * If a bounding shape is not provided for a feature collection, * explain why. Allowable values are: * innapplicable - the features do not have geometry * unknown - the boundingBox cannot be computed * unavailable - there may be a boundingBox but it is not divulged * missing - there are no features * </documentation> * </annotation> * <restriction base="string"> * <enumeration value="inapplicable"/> * <enumeration value="unknown"/> * <enumeration value="unavailable"/> * <enumeration value="missing"/> * </restriction> * </simpleType> * * </code> * </pre> * * </p> * * @generated * * @source $URL$ */ public class NullTypeBinding extends AbstractSimpleBinding { /** * @generated */ public QName getTarget() { return GML.NullType; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated modifiable */ public Class getType() { return Envelope.class; } @Override public int getExecutionMode() { return OVERRIDE; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated modifiable */ public Object parse(InstanceComponent instance, Object value) throws Exception { Envelope e = new Envelope(); e.setToNull(); return e; } @Override public String encode(Object object, String value) throws Exception { return "unknown"; } }