/**
 * bindType.java
 *
 * This file was generated by XMLSpy 2007sp2 Enterprise Edition.
 *
 * YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
 * OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
 *
 * Refer to the XMLSpy Documentation for further details.
 * http://www.altova.com/xmlspy
 */


package com.jmex.model.collada.schema;

import com.jmex.xml.types.SchemaNCName;
import com.jmex.xml.types.SchemaToken;

public class bindType extends com.jmex.xml.xml.Node {

	public bindType(bindType node) {
		super(node);
	}

	public bindType(org.w3c.dom.Node node) {
		super(node);
	}

	public bindType(org.w3c.dom.Document doc) {
		super(doc);
	}

	public bindType(com.jmex.xml.xml.Document doc, String namespaceURI, String prefix, String name) {
		super(doc, namespaceURI, prefix, name);
	}
	
	public void adjustPrefix() {
		for (	org.w3c.dom.Node tmpNode = getDomFirstChild( Attribute, null, "semantic" );
				tmpNode != null;
				tmpNode = getDomNextChild( Attribute, null, "semantic", tmpNode )
			) {
			internalAdjustPrefix(tmpNode, false);
		}
		for (	org.w3c.dom.Node tmpNode = getDomFirstChild( Attribute, null, "target" );
				tmpNode != null;
				tmpNode = getDomNextChild( Attribute, null, "target", tmpNode )
			) {
			internalAdjustPrefix(tmpNode, false);
		}
	}
	public void setXsiType() {
 		org.w3c.dom.Element el = (org.w3c.dom.Element) domNode;
		el.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:type", "bind");
	}

	public static int getsemanticMinCount() {
		return 1;
	}

	public static int getsemanticMaxCount() {
		return 1;
	}

	public int getsemanticCount() {
		return getDomChildCount(Attribute, null, "semantic");
	}

	public boolean hassemantic() {
		return hasDomChild(Attribute, null, "semantic");
	}

	public SchemaNCName newsemantic() {
		return new SchemaNCName();
	}

	public SchemaNCName getsemanticAt(int index) throws Exception {
		return new SchemaNCName(getDomNodeValue(getDomChildAt(Attribute, null, "semantic", index)));
	}

	public org.w3c.dom.Node getStartingsemanticCursor() throws Exception {
		return getDomFirstChild(Attribute, null, "semantic" );
	}

	public org.w3c.dom.Node getAdvancedsemanticCursor( org.w3c.dom.Node curNode ) throws Exception {
		return getDomNextChild( Attribute, null, "semantic", curNode );
	}

	public SchemaNCName getsemanticValueAtCursor( org.w3c.dom.Node curNode ) throws Exception {
		if( curNode == null )
			throw new com.jmex.xml.xml.XmlException("Out of range");
		else
			return new SchemaNCName(getDomNodeValue(curNode));
	}

	public SchemaNCName getsemantic() throws Exception 
 {
		return getsemanticAt(0);
	}

	public void removesemanticAt(int index) {
		removeDomChildAt(Attribute, null, "semantic", index);
	}

	public void removesemantic() {
		removesemanticAt(0);
	}

	public org.w3c.dom.Node addsemantic(SchemaNCName value) {
		if( value.isNull() )
			return null;

		return  appendDomChild(Attribute, null, "semantic", value.toString());
	}

	public org.w3c.dom.Node addsemantic(String value) throws Exception {
		return addsemantic(new SchemaNCName(value));
	}

	public void insertsemanticAt(SchemaNCName value, int index) {
		insertDomChildAt(Attribute, null, "semantic", index, value.toString());
	}

	public void insertsemanticAt(String value, int index) throws Exception {
		insertsemanticAt(new SchemaNCName(value), index);
	}

	public void replacesemanticAt(SchemaNCName value, int index) {
		replaceDomChildAt(Attribute, null, "semantic", index, value.toString());
	}

	public void replacesemanticAt(String value, int index) throws Exception {
		replacesemanticAt(new SchemaNCName(value), index);
	}

	public static int gettargetMinCount() {
		return 1;
	}

	public static int gettargetMaxCount() {
		return 1;
	}

	public int gettargetCount() {
		return getDomChildCount(Attribute, null, "target");
	}

	public boolean hastarget() {
		return hasDomChild(Attribute, null, "target");
	}

	public SchemaToken newtarget() {
		return new SchemaToken();
	}

	public SchemaToken gettargetAt(int index) throws Exception {
		return new SchemaToken(getDomNodeValue(getDomChildAt(Attribute, null, "target", index)));
	}

	public org.w3c.dom.Node getStartingtargetCursor() throws Exception {
		return getDomFirstChild(Attribute, null, "target" );
	}

	public org.w3c.dom.Node getAdvancedtargetCursor( org.w3c.dom.Node curNode ) throws Exception {
		return getDomNextChild( Attribute, null, "target", curNode );
	}

	public SchemaToken gettargetValueAtCursor( org.w3c.dom.Node curNode ) throws Exception {
		if( curNode == null )
			throw new com.jmex.xml.xml.XmlException("Out of range");
		else
			return new SchemaToken(getDomNodeValue(curNode));
	}

	public SchemaToken gettarget() throws Exception 
 {
		return gettargetAt(0);
	}

	public void removetargetAt(int index) {
		removeDomChildAt(Attribute, null, "target", index);
	}

	public void removetarget() {
		removetargetAt(0);
	}

	public org.w3c.dom.Node addtarget(SchemaToken value) {
		if( value.isNull() )
			return null;

		return  appendDomChild(Attribute, null, "target", value.toString());
	}

	public org.w3c.dom.Node addtarget(String value) throws Exception {
		return addtarget(new SchemaToken(value));
	}

	public void inserttargetAt(SchemaToken value, int index) {
		insertDomChildAt(Attribute, null, "target", index, value.toString());
	}

	public void inserttargetAt(String value, int index) throws Exception {
		inserttargetAt(new SchemaToken(value), index);
	}

	public void replacetargetAt(SchemaToken value, int index) {
		replaceDomChildAt(Attribute, null, "target", index, value.toString());
	}

	public void replacetargetAt(String value, int index) throws Exception {
		replacetargetAt(new SchemaToken(value), index);
	}

}
