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

    private static final long serialVersionUID = 1L;

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

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

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

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

    public static int getfaceMinCount() {
        return 1;
    }

    public static int getfaceMaxCount() {
        return 1;
    }

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

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

    public faceType5 newface() {
        return new faceType5(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "face"));
    }

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

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

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

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

    public faceType5 getface() throws Exception {
        return getfaceAt(0);
    }

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

    public void removeface() {
        while (hasface())
            removefaceAt(0);
    }

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

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

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

    public static int getmodeMinCount() {
        return 1;
    }

    public static int getmodeMaxCount() {
        return 1;
    }

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

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

    public modeType3 newmode() {
        return new modeType3(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "mode"));
    }

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

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

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

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

    public modeType3 getmode() throws Exception {
        return getmodeAt(0);
    }

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

    public void removemode() {
        while (hasmode())
            removemodeAt(0);
    }

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

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

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

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