/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2002-2010, 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.geopkg.wps.xml; import java.net.URI; import org.geotools.geopkg.wps.GeoPackageProcessRequest; import org.geotools.xml.*; import com.vividsolutions.jts.geom.Envelope; import javax.xml.namespace.QName; /** * Binding object for the type http://www.opengis.net/gpkg:layertype. * * <p> * <pre> * <code> * <?xml version="1.0" encoding="UTF-8"?><xs:complexType name="layertype" xmlns:xs="http://www.w3.org/2001/XMLSchema"> * <xs:sequence> * <xs:element minOccurs="0" name="identifier" type="xs:string"/> * <xs:element minOccurs="0" name="description" type="xs:string"/> * <xs:element minOccurs="0" name="bbox"> * <xs:complexType name="layertype_bbox"> * <xs:sequence> * <xs:element name="minx" type="xs:decimal"/> * <xs:element name="miny" type="xs:decimal"/> * <xs:element name="maxx" type="xs:decimal"/> * <xs:element name="maxy" type="xs:decimal"/> * </xs:sequence> * </xs:complexType> * </xs:element> * <xs:element minOccurs="0" name="srs" type="xs:string"/> * </xs:sequence> * <xs:attribute name="name" use="required"/> * </xs:complexType> * * </code> * </pre> * </p> * * @generated */ public abstract class LayertypeBinding extends AbstractComplexBinding { /** * @generated */ public QName getTarget() { return GPKG.layertype; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Class getType() { return GeoPackageProcessRequest.Layer.class; } public abstract GeoPackageProcessRequest.Layer parseLayer(ElementInstance instance, Node node, Object value) throws Exception; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { GeoPackageProcessRequest.Layer layer = parseLayer(instance, node, value); layer.setName((String) node.getAttributeValue("name")); layer.setIdentifier((String) node.getAttributeValue("identifier")); layer.setBbox((Envelope) node.getChildValue("bbox")); layer.setDescription((String) node.getChildValue("description")); layer.setSrs((URI) node.getChildValue("srs")); return layer; } }