/* (c) 2014 Open Source Geospatial Foundation - all rights reserved * (c) 2001 - 2013 OpenPlans * This code is licensed under the GPL 2.0 license, available at the root * application directory. */ package org.geoserver.wfs.xml.v1_1_0; import javax.xml.namespace.QName; import net.opengis.wfs.AllSomeType; import net.opengis.wfs.WfsFactory; import org.geotools.xml.AbstractSimpleBinding; import org.geotools.xml.InstanceComponent; /** * Binding object for the type http://www.opengis.net/wfs:AllSomeType. * * <p> * <pre> * <code> * <xsd:simpleType name="AllSomeType"> * <xsd:restriction base="xsd:string"> * <xsd:enumeration value="ALL"/> * <xsd:enumeration value="SOME"/> * </xsd:restriction> * </xsd:simpleType> * * </code> * </pre> * @generated */ public class AllSomeTypeBinding extends AbstractSimpleBinding { WfsFactory wfsfactory; public AllSomeTypeBinding(WfsFactory wfsfactory) { this.wfsfactory = wfsfactory; } /** * @generated */ public QName getTarget() { return WFS.ALLSOMETYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Class getType() { return AllSomeType.class; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(InstanceComponent instance, Object value) throws Exception { if ("ALL".equals(value)) { return AllSomeType.ALL_LITERAL; } if ("SOME".equals(value)) { return AllSomeType.SOME_LITERAL; } return null; } }