/**
 * gles_texcombiner_commandRGB_type.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;

import com.jmex.model.collada.types.SchemaFloat;

public class gles_texcombiner_commandRGB_type extends
        com.jmex.model.collada.xml.Node {

    private static final long serialVersionUID = 1L;

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

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

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

    public gles_texcombiner_commandRGB_type(
            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(Attribute, null,
                "operator"); tmpNode != null; tmpNode = getDomNextChild(
                Attribute, null, "operator", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Attribute, null,
                "scale"); tmpNode != null; tmpNode = getDomNextChild(Attribute,
                null, "scale", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "argument"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "argument", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new gles_texcombiner_argumentRGB_type(tmpNode).adjustPrefix();
        }
    }

    public static int getoperatorMinCount() {
        return 0;
    }

    public static int getoperatorMaxCount() {
        return 1;
    }

    public int getoperatorCount() {
        return getDomChildCount(Attribute, null, "operator");
    }

    public boolean hasoperator() {
        return hasDomChild(Attribute, null, "operator");
    }

    public gles_texcombiner_operatorRGB_enums newoperator() {
        return new gles_texcombiner_operatorRGB_enums();
    }

    public gles_texcombiner_operatorRGB_enums getoperatorAt(int index)
            throws Exception {
        return new gles_texcombiner_operatorRGB_enums(
                getDomNodeValue(dereference(getDomChildAt(Attribute, null,
                        "operator", index))));
    }

    public org.w3c.dom.Node getStartingoperatorCursor() throws Exception {
        return getDomFirstChild(Attribute, null, "operator");
    }

    public org.w3c.dom.Node getAdvancedoperatorCursor(org.w3c.dom.Node curNode)
            throws Exception {
        return getDomNextChild(Attribute, null, "operator", curNode);
    }

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

    public gles_texcombiner_operatorRGB_enums getoperator() throws Exception {
        return getoperatorAt(0);
    }

    public void removeoperatorAt(int index) {
        removeDomChildAt(Attribute, null, "operator", index);
    }

    public void removeoperator() {
        while (hasoperator())
            removeoperatorAt(0);
    }

    public void addoperator(gles_texcombiner_operatorRGB_enums value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "operator", value.toString());
        }
    }

    public void addoperator(String value) throws Exception {
        addoperator(new gles_texcombiner_operatorRGB_enums(value));
    }

    public void insertoperatorAt(gles_texcombiner_operatorRGB_enums value,
            int index) {
        insertDomChildAt(Attribute, null, "operator", index, value.toString());
    }

    public void insertoperatorAt(String value, int index) throws Exception {
        insertoperatorAt(new gles_texcombiner_operatorRGB_enums(value), index);
    }

    public void replaceoperatorAt(gles_texcombiner_operatorRGB_enums value,
            int index) {
        replaceDomChildAt(Attribute, null, "operator", index, value.toString());
    }

    public void replaceoperatorAt(String value, int index) throws Exception {
        replaceoperatorAt(new gles_texcombiner_operatorRGB_enums(value), index);
    }

    public static int getscaleMinCount() {
        return 0;
    }

    public static int getscaleMaxCount() {
        return 1;
    }

    public int getscaleCount() {
        return getDomChildCount(Attribute, null, "scale");
    }

    public boolean hasscale() {
        return hasDomChild(Attribute, null, "scale");
    }

    public SchemaFloat newscale() {
        return new SchemaFloat();
    }

    public SchemaFloat getscaleAt(int index) throws Exception {
        return new SchemaFloat(getDomNodeValue(dereference(getDomChildAt(
                Attribute, null, "scale", index))));
    }

    public org.w3c.dom.Node getStartingscaleCursor() throws Exception {
        return getDomFirstChild(Attribute, null, "scale");
    }

    public org.w3c.dom.Node getAdvancedscaleCursor(org.w3c.dom.Node curNode)
            throws Exception {
        return getDomNextChild(Attribute, null, "scale", curNode);
    }

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

    public SchemaFloat getscale() throws Exception {
        return getscaleAt(0);
    }

    public void removescaleAt(int index) {
        removeDomChildAt(Attribute, null, "scale", index);
    }

    public void removescale() {
        while (hasscale())
            removescaleAt(0);
    }

    public void addscale(SchemaFloat value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "scale", value.toString());
        }
    }

    public void addscale(String value) throws Exception {
        addscale(new SchemaFloat(value));
    }

    public void insertscaleAt(SchemaFloat value, int index) {
        insertDomChildAt(Attribute, null, "scale", index, value.toString());
    }

    public void insertscaleAt(String value, int index) throws Exception {
        insertscaleAt(new SchemaFloat(value), index);
    }

    public void replacescaleAt(SchemaFloat value, int index) {
        replaceDomChildAt(Attribute, null, "scale", index, value.toString());
    }

    public void replacescaleAt(String value, int index) throws Exception {
        replacescaleAt(new SchemaFloat(value), index);
    }

    public static int getargumentMinCount() {
        return 1;
    }

    public static int getargumentMaxCount() {
        return 3;
    }

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

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

    public gles_texcombiner_argumentRGB_type newargument() {
        return new gles_texcombiner_argumentRGB_type(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "argument"));
    }

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

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

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

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

    public gles_texcombiner_argumentRGB_type getargument() throws Exception {
        return getargumentAt(0);
    }

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

    public void removeargument() {
        removeargumentAt(0);
    }

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

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

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

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