package org.geotools.wms.v1_1_1.bindings;


import java.util.ArrayList;
import java.util.List;

import javax.xml.namespace.QName;

import org.geotools.xml.AbstractComplexBinding;
import org.geotools.xml.ElementInstance;
import org.geotools.xml.Node;

/**
 * Binding object for the type :_HTTP.
 *
 * <p>
 *	<pre>
 *	 <code>
 *  &lt;xs:complexType name="_HTTP"&gt;
 *      &lt;xs:choice maxOccurs="unbounded"&gt;
 *          &lt;xs:element ref="Get"/&gt;
 *          &lt;xs:element ref="Post"/&gt;
 *      &lt;/xs:choice&gt;
 *  &lt;/xs:complexType&gt; 
 *		
 *	  </code>
 *	 </pre>
 * </p>
 *
 * @generated
 */
public class _HTTPBinding extends AbstractComplexBinding {

	/**
	 * @generated
	 */
	public QName getTarget() {
		return WMSV1_1_1._HTTP;
	}
	
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 *	
	 * @generated modifiable
	 */	
	public Class getType() {
		return List.class;
	}
	
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 *	
	 * @generated modifiable
	 */	
	public Object parse(ElementInstance instance, Node node, Object value) 
		throws Exception {
		ArrayList ret = new ArrayList();
		if (node.getChildValue("Get") != null) {
			ret.add(node.getChildValue("Get"));
		}
		if (node.getChildValue("Post") != null) {
			ret.add(node.getChildValue("Post"));
		}
		
		return ret;
	}

}