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

    private static final long serialVersionUID = 1L;

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

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

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

    public gles_texcombiner_argumentAlpha_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,
                "source"); tmpNode != null; tmpNode = getDomNextChild(
                Attribute, null, "source", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Attribute, null,
                "operand"); tmpNode != null; tmpNode = getDomNextChild(
                Attribute, null, "operand", 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);
        }
    }

    public static int getsourceMinCount() {
        return 0;
    }

    public static int getsourceMaxCount() {
        return 1;
    }

    public int getsourceCount() {
        return getDomChildCount(Attribute, null, "source");
    }

    public boolean hassource() {
        return hasDomChild(Attribute, null, "source");
    }

    public gles_texcombiner_source_enums newsource() {
        return new gles_texcombiner_source_enums();
    }

    public gles_texcombiner_source_enums getsourceAt(int index)
            throws Exception {
        return new gles_texcombiner_source_enums(
                getDomNodeValue(dereference(getDomChildAt(Attribute, null,
                        "source", index))));
    }

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

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

    public gles_texcombiner_source_enums getsourceValueAtCursor(
            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_source_enums(
                    getDomNodeValue(dereference(curNode)));
    }

    public gles_texcombiner_source_enums getsource() throws Exception {
        return getsourceAt(0);
    }

    public void removesourceAt(int index) {
        removeDomChildAt(Attribute, null, "source", index);
    }

    public void removesource() {
        while (hassource())
            removesourceAt(0);
    }

    public void addsource(gles_texcombiner_source_enums value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "source", value.toString());
        }
    }

    public void addsource(String value) throws Exception {
        addsource(new gles_texcombiner_source_enums(value));
    }

    public void insertsourceAt(gles_texcombiner_source_enums value, int index) {
        insertDomChildAt(Attribute, null, "source", index, value.toString());
    }

    public void insertsourceAt(String value, int index) throws Exception {
        insertsourceAt(new gles_texcombiner_source_enums(value), index);
    }

    public void replacesourceAt(gles_texcombiner_source_enums value, int index) {
        replaceDomChildAt(Attribute, null, "source", index, value.toString());
    }

    public void replacesourceAt(String value, int index) throws Exception {
        replacesourceAt(new gles_texcombiner_source_enums(value), index);
    }

    public static int getoperandMinCount() {
        return 0;
    }

    public static int getoperandMaxCount() {
        return 1;
    }

    public int getoperandCount() {
        return getDomChildCount(Attribute, null, "operand");
    }

    public boolean hasoperand() {
        return hasDomChild(Attribute, null, "operand");
    }

    public gles_texcombiner_operandAlpha_enums newoperand() {
        return new gles_texcombiner_operandAlpha_enums();
    }

    public gles_texcombiner_operandAlpha_enums getoperandAt(int index)
            throws Exception {
        return new gles_texcombiner_operandAlpha_enums(
                getDomNodeValue(dereference(getDomChildAt(Attribute, null,
                        "operand", index))));
    }

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

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

    public gles_texcombiner_operandAlpha_enums getoperandValueAtCursor(
            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_operandAlpha_enums(
                    getDomNodeValue(dereference(curNode)));
    }

    public gles_texcombiner_operandAlpha_enums getoperand() throws Exception {
        return getoperandAt(0);
    }

    public void removeoperandAt(int index) {
        removeDomChildAt(Attribute, null, "operand", index);
    }

    public void removeoperand() {
        while (hasoperand())
            removeoperandAt(0);
    }

    public void addoperand(gles_texcombiner_operandAlpha_enums value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "operand", value.toString());
        }
    }

    public void addoperand(String value) throws Exception {
        addoperand(new gles_texcombiner_operandAlpha_enums(value));
    }

    public void insertoperandAt(gles_texcombiner_operandAlpha_enums value,
            int index) {
        insertDomChildAt(Attribute, null, "operand", index, value.toString());
    }

    public void insertoperandAt(String value, int index) throws Exception {
        insertoperandAt(new gles_texcombiner_operandAlpha_enums(value), index);
    }

    public void replaceoperandAt(gles_texcombiner_operandAlpha_enums value,
            int index) {
        replaceDomChildAt(Attribute, null, "operand", index, value.toString());
    }

    public void replaceoperandAt(String value, int index) throws Exception {
        replaceoperandAt(new gles_texcombiner_operandAlpha_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);
    }

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