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

    private static final long serialVersionUID = 1L;

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

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

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

    public stencil_func_separateType(
            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 frontType(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 backType(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 refType2(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 maskType2(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 frontType newfront() {
        return new frontType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "front"));
    }

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

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

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

    public void replacefrontAt(frontType 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 backType newback() {
        return new backType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "back"));
    }

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

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

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

    public void replacebackAt(backType 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 refType2 newref() {
        return new refType2(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "ref"));
    }

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

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

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

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

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

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

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

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