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

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

    private static final long serialVersionUID = 1L;

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

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

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

    public gles_texenv_command_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,
                "unit"); tmpNode != null; tmpNode = getDomNextChild(Attribute,
                null, "unit", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "constant"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "constant", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new gles_texture_constant_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_texenv_mode_enums newoperator() {
        return new gles_texenv_mode_enums();
    }

    public gles_texenv_mode_enums getoperatorAt(int index) throws Exception {
        return new gles_texenv_mode_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_texenv_mode_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_texenv_mode_enums(
                    getDomNodeValue(dereference(curNode)));
    }

    public gles_texenv_mode_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_texenv_mode_enums value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "operator", value.toString());
        }
    }

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

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

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

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

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

    public static int getunitMinCount() {
        return 0;
    }

    public static int getunitMaxCount() {
        return 1;
    }

    public int getunitCount() {
        return getDomChildCount(Attribute, null, "unit");
    }

    public boolean hasunit() {
        return hasDomChild(Attribute, null, "unit");
    }

    public SchemaNCName newunit() {
        return new SchemaNCName();
    }

    public SchemaNCName getunitAt(int index) throws Exception {
        return new SchemaNCName(getDomNodeValue(dereference(getDomChildAt(
                Attribute, null, "unit", index))));
    }

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

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

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

    public SchemaNCName getunit() throws Exception {
        return getunitAt(0);
    }

    public void removeunitAt(int index) {
        removeDomChildAt(Attribute, null, "unit", index);
    }

    public void removeunit() {
        while (hasunit())
            removeunitAt(0);
    }

    public void addunit(SchemaNCName value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "unit", value.toString());
        }
    }

    public void addunit(String value) throws Exception {
        addunit(new SchemaNCName(value));
    }

    public void insertunitAt(SchemaNCName value, int index) {
        insertDomChildAt(Attribute, null, "unit", index, value.toString());
    }

    public void insertunitAt(String value, int index) throws Exception {
        insertunitAt(new SchemaNCName(value), index);
    }

    public void replaceunitAt(SchemaNCName value, int index) {
        replaceDomChildAt(Attribute, null, "unit", index, value.toString());
    }

    public void replaceunitAt(String value, int index) throws Exception {
        replaceunitAt(new SchemaNCName(value), index);
    }

    public static int getconstantMinCount() {
        return 0;
    }

    public static int getconstantMaxCount() {
        return 1;
    }

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

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

    public gles_texture_constant_type newconstant() {
        return new gles_texture_constant_type(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "constant"));
    }

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

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

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

    public gles_texture_constant_type getconstantValueAtCursor(
            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_texture_constant_type(dereference(curNode));
    }

    public gles_texture_constant_type getconstant() throws Exception {
        return getconstantAt(0);
    }

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

    public void removeconstant() {
        while (hasconstant())
            removeconstantAt(0);
    }

    public void addconstant(gles_texture_constant_type value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "constant", value);
    }

    public void insertconstantAt(gles_texture_constant_type value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "constant", index, value);
    }

    public void replaceconstantAt(gles_texture_constant_type value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "constant", index, value);
    }

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