package org.geotools.wms.v1_1_1.bindings;


import java.net.URL;
import java.util.List;

import javax.xml.namespace.QName;

import org.geotools.data.ows.Service;
import org.geotools.xml.AbstractComplexBinding;
import org.geotools.xml.ElementInstance;
import org.geotools.xml.Node;
import org.opengis.metadata.citation.ResponsibleParty;

/**
 * Binding object for the type :_Service.
 *
 * <p>
 *	<pre>
 *	 <code>
 *  &lt;xs:complexType name="_Service"&gt;
 *      &lt;xs:sequence&gt;
 *          &lt;xs:element ref="Name"/&gt;
 *          &lt;xs:element ref="Title"/&gt;
 *          &lt;xs:element minOccurs="0" ref="Abstract"/&gt;
 *          &lt;xs:element minOccurs="0" ref="KeywordList"/&gt;
 *          &lt;xs:element ref="OnlineResource"/&gt;
 *          &lt;xs:element minOccurs="0" ref="ContactInformation"/&gt;
 *          &lt;xs:element minOccurs="0" ref="Fees"/&gt;
 *          &lt;xs:element minOccurs="0" ref="AccessConstraints"/&gt;
 *      &lt;/xs:sequence&gt;
 *  &lt;/xs:complexType&gt; 
 *		
 *	  </code>
 *	 </pre>
 * </p>
 *
 * @generated
 */
public class _ServiceBinding extends AbstractComplexBinding {

	/**
	 * @generated
	 */
	public QName getTarget() {
		return WMSV1_1_1._Service;
	}
	
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 *	
	 * @generated modifiable
	 */	
	public Class getType() {
		return Service.class;
	}
	
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 *	
	 * @generated modifiable
	 */	
	public Object parse(ElementInstance instance, Node node, Object value) 
		throws Exception {
		Service ret = new Service();
		
		ret.setContactInformation((ResponsibleParty)node.getChildValue("ContactInformation"));
		ret.setKeywordList((String[])node.getChildValue("KeywordList"));
		
		ret.set_abstract((String)node.getChildValue("Abstract"));
		ret.setName((String)node.getChildValue("Name"));
		ret.setTitle((String)node.getChildValue("Title"));
		ret.setOnlineResource((URL)node.getChildValue("OnlineResource"));
		
		return ret;
		
	}

}