/**
 * blend_funcType.java This file was generated by XMLSpy 2006sp2 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;

public class blend_funcType extends com.jmex.model.collada.xml.Node {

    private static final long serialVersionUID = 1L;

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

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

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

    public blend_funcType(com.jmex.model.collada.xml.Document doc,
            String namespaceURI, String prefix, String name) {
        super(doc, namespaceURI, prefix, name);
    }

    public void adjustPrefix() {
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "src"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema", "src",
                tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new srcType(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "dest"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "dest", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new destType(tmpNode).adjustPrefix();
        }
    }

    public static int getsrcMinCount() {
        return 1;
    }

    public static int getsrcMaxCount() {
        return 1;
    }

    public int getsrcCount() {
        return getDomChildCount(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "src");
    }

    public boolean hassrc() {
        return hasDomChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "src");
    }

    public srcType newsrc() {
        return new srcType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "src"));
    }

    public srcType getsrcAt(int index) throws Exception {
        return new srcType(dereference(getDomChildAt(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "src", index)));
    }

    public org.w3c.dom.Node getStartingsrcCursor() throws Exception {
        return getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "src");
    }

    public org.w3c.dom.Node getAdvancedsrcCursor(org.w3c.dom.Node curNode)
            throws Exception {
        return getDomNextChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "src", curNode);
    }

    public srcType getsrcValueAtCursor(org.w3c.dom.Node curNode)
            throws Exception {
        if (curNode == null)
            throw new com.jmex.model.collada.xml.XmlException("Out of range");
        else
            return new srcType(dereference(curNode));
    }

    public srcType getsrc() throws Exception {
        return getsrcAt(0);
    }

    public void removesrcAt(int index) {
        removeDomChildAt(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "src", index);
    }

    public void removesrc() {
        while (hassrc())
            removesrcAt(0);
    }

    public void addsrc(srcType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema", "src",
                value);
    }

    public void insertsrcAt(srcType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "src", index, value);
    }

    public void replacesrcAt(srcType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "src", index, value);
    }

    public static int getdestMinCount() {
        return 1;
    }

    public static int getdestMaxCount() {
        return 1;
    }

    public int getdestCount() {
        return getDomChildCount(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "dest");
    }

    public boolean hasdest() {
        return hasDomChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "dest");
    }

    public destType newdest() {
        return new destType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "dest"));
    }

    public destType getdestAt(int index) throws Exception {
        return new destType(dereference(getDomChildAt(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "dest", index)));
    }

    public org.w3c.dom.Node getStartingdestCursor() throws Exception {
        return getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "dest");
    }

    public org.w3c.dom.Node getAdvanceddestCursor(org.w3c.dom.Node curNode)
            throws Exception {
        return getDomNextChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "dest", curNode);
    }

    public destType getdestValueAtCursor(org.w3c.dom.Node curNode)
            throws Exception {
        if (curNode == null)
            throw new com.jmex.model.collada.xml.XmlException("Out of range");
        else
            return new destType(dereference(curNode));
    }

    public destType getdest() throws Exception {
        return getdestAt(0);
    }

    public void removedestAt(int index) {
        removeDomChildAt(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "dest", index);
    }

    public void removedest() {
        while (hasdest())
            removedestAt(0);
    }

    public void adddest(destType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "dest", value);
    }

    public void insertdestAt(destType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "dest", index, value);
    }

    public void replacedestAt(destType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "dest", index, value);
    }

    private org.w3c.dom.Node dereference(org.w3c.dom.Node node) {
        return node;
    }
}
