/**
 * alpha_funcType3.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 alpha_funcType3 extends com.jmex.model.collada.xml.Node {

    private static final long serialVersionUID = 1L;

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

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

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

    public alpha_funcType3(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", "func"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "func", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new funcType5(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "value"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "value", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new valueType3(tmpNode).adjustPrefix();
        }
    }

    public static int getfuncMinCount() {
        return 1;
    }

    public static int getfuncMaxCount() {
        return 1;
    }

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

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

    public funcType5 newfunc() {
        return new funcType5(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "func"));
    }

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

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

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

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

    public funcType5 getfunc() throws Exception {
        return getfuncAt(0);
    }

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

    public void removefunc() {
        while (hasfunc())
            removefuncAt(0);
    }

    public void addfunc(funcType5 value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "func", value);
    }

    public void insertfuncAt(funcType5 value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "func", index, value);
    }

    public void replacefuncAt(funcType5 value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "func", index, value);
    }

    public static int getvalue2MinCount() {
        return 1;
    }

    public static int getvalue2MaxCount() {
        return 1;
    }

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

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

    public valueType3 newvalue2() {
        return new valueType3(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "value"));
    }

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

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

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

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

    public valueType3 getvalue2() throws Exception {
        return getvalue2At(0);
    }

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

    public void removevalue2() {
        while (hasvalue2())
            removevalue2At(0);
    }

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

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

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

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