package org.geotools.wms.v1_1_1.bindings;


import java.net.URI;
import java.net.URL;

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 :_OnlineResource.
 *
 * <p>
 *	<pre>
 *	 <code>
 *  &lt;xs:complexType name="_OnlineResource"&gt;
 *      &lt;xs:attributeGroup ref="xlink:simpleLink"/&gt;
 *  &lt;/xs:complexType&gt; 
 *		
 *	  </code>
 *	 </pre>
 * </p>
 *
 * @generated
 */
public class _OnlineResourceBinding extends AbstractComplexBinding {

	/**
	 * @generated
	 */
	public QName getTarget() {
		return WMSV1_1_1._OnlineResource;
	}
	
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 *	
	 * @generated modifiable
	 */	
	public Class getType() {
		return URL.class;
	}
	
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 *	
	 * @generated modifiable
	 */	
	public Object parse(ElementInstance instance, Node node, Object value) 
		throws Exception {
		return new URL(((URI)node.getAttributeValue("href")).toString());
	}

}