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

    private static final long serialVersionUID = 1L;

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

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

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

    public stencil_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 funcType6(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "ref"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema", "ref",
                tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new refType4(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "mask"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "mask", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new maskType5(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 funcType6 newfunc() {
        return new funcType6(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "func"));
    }

    public funcType6 getfuncAt(int index) throws Exception {
        return new funcType6(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 funcType6 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 funcType6(dereference(curNode));
    }

    public funcType6 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(funcType6 value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "func", value);
    }

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

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

    public static int getrefMinCount() {
        return 1;
    }

    public static int getrefMaxCount() {
        return 1;
    }

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

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

    public refType4 newref() {
        return new refType4(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "ref"));
    }

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

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

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

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

    public refType4 getref() throws Exception {
        return getrefAt(0);
    }

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

    public void removeref() {
        while (hasref())
            removerefAt(0);
    }

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

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

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

    public static int getmaskMinCount() {
        return 1;
    }

    public static int getmaskMaxCount() {
        return 1;
    }

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

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

    public maskType5 newmask() {
        return new maskType5(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "mask"));
    }

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

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

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

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

    public maskType5 getmask() throws Exception {
        return getmaskAt(0);
    }

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

    public void removemask() {
        while (hasmask())
            removemaskAt(0);
    }

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

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

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

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