/*
* 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 javax.xml.namespace.QName;
import org.geotools.gml3.GML;
import org.geotools.xml.AbstractComplexBinding;
import org.geotools.xml.ElementInstance;
import org.geotools.xml.Node;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Polygon;
/**
* Binding object for the type http://www.opengis.net/gml:PolygonPatchType.
*
* <p>
*
* <pre>
* <code>
* <complexType name="PolygonPatchType">
* <annotation>
* <documentation>
* A PolygonPatch is a surface patch that is defined by
* a set of boundary curves and an underlying surface to
* which these curves adhere. The curves are coplanar and
* the polygon uses planar interpolation in its interior.
* Implements GM_Polygon of ISO 19107.
* </documentation>
* </annotation>
* <complexContent>
* <extension base="gml:AbstractSurfacePatchType">
* <sequence>
* <element minOccurs="0" ref="gml:exterior"/>
* <element maxOccurs="unbounded" minOccurs="0" ref="gml:interior"/>
* </sequence>
* <attribute fixed="planar" name="interpolation" type="gml:SurfaceInterpolationType">
* <annotation>
* <documentation>
* The attribute "interpolation" specifies the
* interpolation mechanism used for this surface
* patch. Currently only planar surface patches
* are defined in GML 3, the attribute is fixed
* to "planar", i.e. the interpolation method
* shall return points on a single plane. The
* boundary of the patch shall be contained within
* that plane.
* </documentation>
* </annotation>
* </attribute>
* </extension>
* </complexContent>
* </complexType>
*
* </code>
* </pre>
*
* </p>
*
* @generated
*
*
* @source $URL$
*/
public class PolygonPatchTypeBinding extends AbstractComplexBinding {
protected GeometryFactory gf;
public PolygonPatchTypeBinding(GeometryFactory gf) {
this.gf = gf;
}
/**
* @generated
*/
public QName getTarget() {
return GML.PolygonPatchType;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated modifiable
*/
public Class getType() {
return Polygon.class;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated modifiable
*/
public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
return new PolygonTypeBinding( gf ).parse( instance, node, value);
}
}