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

    private static final long serialVersionUID = 1L;

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

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

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

    public stencil_func_separateType2(
            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", "front"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "front", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new frontType2(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "back"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "back", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new backType2(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 refType5(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 maskType6(tmpNode).adjustPrefix();
        }
    }

    public static int getfrontMinCount() {
        return 1;
    }

    public static int getfrontMaxCount() {
        return 1;
    }

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

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

    public frontType2 newfront() {
        return new frontType2(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "front"));
    }

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

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

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

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

    public frontType2 getfront() throws Exception {
        return getfrontAt(0);
    }

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

    public void removefront() {
        while (hasfront())
            removefrontAt(0);
    }

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

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

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

    public static int getbackMinCount() {
        return 1;
    }

    public static int getbackMaxCount() {
        return 1;
    }

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

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

    public backType2 newback() {
        return new backType2(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "back"));
    }

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

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

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

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

    public backType2 getback() throws Exception {
        return getbackAt(0);
    }

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

    public void removeback() {
        while (hasback())
            removebackAt(0);
    }

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

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

    public void replacebackAt(backType2 value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "back", 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 refType5 newref() {
        return new refType5(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "ref"));
    }

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

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

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

    public void replacerefAt(refType5 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 maskType6 newmask() {
        return new maskType6(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "mask"));
    }

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

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

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

    public void replacemaskAt(maskType6 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;
    }
}
