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

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

    private static final long serialVersionUID = 1L;

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

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

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

    public shaderType(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,
                "stage"); tmpNode != null; tmpNode = getDomNextChild(Attribute,
                null, "stage", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "annotate"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "annotate", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new fx_annotate_common(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "compiler_target"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "compiler_target", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new compiler_targetType(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "compiler_options"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "compiler_options", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "name"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "name", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new nameType3(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "bind"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "bind", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new bindType2(tmpNode).adjustPrefix();
        }
    }

    public static int getstageMinCount() {
        return 0;
    }

    public static int getstageMaxCount() {
        return 1;
    }

    public int getstageCount() {
        return getDomChildCount(Attribute, null, "stage");
    }

    public boolean hasstage() {
        return hasDomChild(Attribute, null, "stage");
    }

    public cg_pipeline_stage newstage() {
        return new cg_pipeline_stage();
    }

    public cg_pipeline_stage getstageAt(int index) throws Exception {
        return new cg_pipeline_stage(getDomNodeValue(dereference(getDomChildAt(
                Attribute, null, "stage", index))));
    }

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

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

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

    public cg_pipeline_stage getstage() throws Exception {
        return getstageAt(0);
    }

    public void removestageAt(int index) {
        removeDomChildAt(Attribute, null, "stage", index);
    }

    public void removestage() {
        while (hasstage())
            removestageAt(0);
    }

    public void addstage(cg_pipeline_stage value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "stage", value.toString());
        }
    }

    public void addstage(String value) throws Exception {
        addstage(new cg_pipeline_stage(value));
    }

    public void insertstageAt(cg_pipeline_stage value, int index) {
        insertDomChildAt(Attribute, null, "stage", index, value.toString());
    }

    public void insertstageAt(String value, int index) throws Exception {
        insertstageAt(new cg_pipeline_stage(value), index);
    }

    public void replacestageAt(cg_pipeline_stage value, int index) {
        replaceDomChildAt(Attribute, null, "stage", index, value.toString());
    }

    public void replacestageAt(String value, int index) throws Exception {
        replacestageAt(new cg_pipeline_stage(value), index);
    }

    public static int getannotateMinCount() {
        return 0;
    }

    public static int getannotateMaxCount() {
        return Integer.MAX_VALUE;
    }

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

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

    public fx_annotate_common newannotate() {
        return new fx_annotate_common(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "annotate"));
    }

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

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

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

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

    public fx_annotate_common getannotate() throws Exception {
        return getannotateAt(0);
    }

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

    public void removeannotate() {
        while (hasannotate())
            removeannotateAt(0);
    }

    public void addannotate(fx_annotate_common value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "annotate", value);
    }

    public void insertannotateAt(fx_annotate_common value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "annotate", index, value);
    }

    public void replaceannotateAt(fx_annotate_common value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "annotate", index, value);
    }

    public static int getcompiler_targetMinCount() {
        return 1;
    }

    public static int getcompiler_targetMaxCount() {
        return 1;
    }

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

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

    public compiler_targetType newcompiler_target() {
        return new compiler_targetType(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "compiler_target"));
    }

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

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

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

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

    public compiler_targetType getcompiler_target() throws Exception {
        return getcompiler_targetAt(0);
    }

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

    public void removecompiler_target() {
        while (hascompiler_target())
            removecompiler_targetAt(0);
    }

    public void addcompiler_target(compiler_targetType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "compiler_target", value);
    }

    public void insertcompiler_targetAt(compiler_targetType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "compiler_target", index, value);
    }

    public void replacecompiler_targetAt(compiler_targetType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "compiler_target", index, value);
    }

    public static int getcompiler_optionsMinCount() {
        return 0;
    }

    public static int getcompiler_optionsMaxCount() {
        return 1;
    }

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

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

    public SchemaString newcompiler_options() {
        return new SchemaString();
    }

    public SchemaString getcompiler_optionsAt(int index) throws Exception {
        return new SchemaString(getDomNodeValue(dereference(getDomChildAt(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "compiler_options", index))));
    }

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

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

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

    public SchemaString getcompiler_options() throws Exception {
        return getcompiler_optionsAt(0);
    }

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

    public void removecompiler_options() {
        while (hascompiler_options())
            removecompiler_optionsAt(0);
    }

    public void addcompiler_options(SchemaString value) {
        if (value.isNull() == false) {
            appendDomChild(Element,
                    "http://www.collada.org/2005/11/COLLADASchema",
                    "compiler_options", value.toString());
        }
    }

    public void addcompiler_options(String value) throws Exception {
        addcompiler_options(new SchemaString(value));
    }

    public void insertcompiler_optionsAt(SchemaString value, int index) {
        insertDomChildAt(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "compiler_options", index, value.toString());
    }

    public void insertcompiler_optionsAt(String value, int index)
            throws Exception {
        insertcompiler_optionsAt(new SchemaString(value), index);
    }

    public void replacecompiler_optionsAt(SchemaString value, int index) {
        replaceDomChildAt(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "compiler_options", index, value.toString());
    }

    public void replacecompiler_optionsAt(String value, int index)
            throws Exception {
        replacecompiler_optionsAt(new SchemaString(value), index);
    }

    public static int getnameMinCount() {
        return 1;
    }

    public static int getnameMaxCount() {
        return 1;
    }

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

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

    public nameType3 newname() {
        return new nameType3(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "name"));
    }

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

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

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

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

    public nameType3 getname() throws Exception {
        return getnameAt(0);
    }

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

    public void removename() {
        while (hasname())
            removenameAt(0);
    }

    public void addname(nameType3 value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "name", value);
    }

    public void insertnameAt(nameType3 value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "name", index, value);
    }

    public void replacenameAt(nameType3 value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "name", index, value);
    }

    public static int getbindMinCount() {
        return 0;
    }

    public static int getbindMaxCount() {
        return Integer.MAX_VALUE;
    }

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

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

    public bindType2 newbind() {
        return new bindType2(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "bind"));
    }

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

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

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

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

    public bindType2 getbind() throws Exception {
        return getbindAt(0);
    }

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

    public void removebind() {
        while (hasbind())
            removebindAt(0);
    }

    public void addbind(bindType2 value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "bind", value);
    }

    public void insertbindAt(bindType2 value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "bind", index, value);
    }

    public void replacebindAt(bindType2 value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "bind", index, value);
    }

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