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

    private static final long serialVersionUID = 1L;

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

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

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

    public profile_CGType(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,
                "platform"); tmpNode != null; tmpNode = getDomNextChild(
                Attribute, null, "platform", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "code"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "code", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new fx_code_profile(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "include"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "include", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new fx_include_common(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "image"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "image", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new imageType(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "newparam"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "newparam", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new cg_newparam(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "technique"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "technique", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new techniqueType(tmpNode).adjustPrefix();
        }
    }

    public static int getplatformMinCount() {
        return 0;
    }

    public static int getplatformMaxCount() {
        return 1;
    }

    public int getplatformCount() {
        return getDomChildCount(Attribute, null, "platform");
    }

    public boolean hasplatform() {
        return hasDomChild(Attribute, null, "platform");
    }

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

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

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

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

    public SchemaNCName getplatformValueAtCursor(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 getplatform() throws Exception {
        return getplatformAt(0);
    }

    public void removeplatformAt(int index) {
        removeDomChildAt(Attribute, null, "platform", index);
    }

    public void removeplatform() {
        while (hasplatform())
            removeplatformAt(0);
    }

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

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

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

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

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

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

    public static int getcodeMinCount() {
        return 1;
    }

    public static int getcodeMaxCount() {
        return 1;
    }

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

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

    public fx_code_profile newcode() {
        return new fx_code_profile(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "code"));
    }

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

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

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

    public fx_code_profile getcodeValueAtCursor(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_code_profile(dereference(curNode));
    }

    public fx_code_profile getcode() throws Exception {
        return getcodeAt(0);
    }

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

    public void removecode() {
        while (hascode())
            removecodeAt(0);
    }

    public void addcode(fx_code_profile value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "code", value);
    }

    public void insertcodeAt(fx_code_profile value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "code", index, value);
    }

    public void replacecodeAt(fx_code_profile value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "code", index, value);
    }

    public static int getincludeMinCount() {
        return 1;
    }

    public static int getincludeMaxCount() {
        return 1;
    }

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

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

    public fx_include_common newinclude() {
        return new fx_include_common(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "include"));
    }

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

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

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

    public fx_include_common getincludeValueAtCursor(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_include_common(dereference(curNode));
    }

    public fx_include_common getinclude() throws Exception {
        return getincludeAt(0);
    }

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

    public void removeinclude() {
        while (hasinclude())
            removeincludeAt(0);
    }

    public void addinclude(fx_include_common value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "include", value);
    }

    public void insertincludeAt(fx_include_common value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "include", index, value);
    }

    public void replaceincludeAt(fx_include_common value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "include", index, value);
    }

    public static int getimageMinCount() {
        return 1;
    }

    public static int getimageMaxCount() {
        return 1;
    }

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

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

    public imageType newimage() {
        return new imageType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "image"));
    }

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

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

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

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

    public imageType getimage() throws Exception {
        return getimageAt(0);
    }

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

    public void removeimage() {
        while (hasimage())
            removeimageAt(0);
    }

    public void addimage(imageType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "image", value);
    }

    public void insertimageAt(imageType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "image", index, value);
    }

    public void replaceimageAt(imageType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "image", index, value);
    }

    public static int getnewparamMinCount() {
        return 1;
    }

    public static int getnewparamMaxCount() {
        return 1;
    }

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

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

    public cg_newparam newnewparam() {
        return new cg_newparam(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "newparam"));
    }

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

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

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

    public cg_newparam getnewparamValueAtCursor(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_newparam(dereference(curNode));
    }

    public cg_newparam getnewparam() throws Exception {
        return getnewparamAt(0);
    }

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

    public void removenewparam() {
        while (hasnewparam())
            removenewparamAt(0);
    }

    public void addnewparam(cg_newparam value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "newparam", value);
    }

    public void insertnewparamAt(cg_newparam value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "newparam", index, value);
    }

    public void replacenewparamAt(cg_newparam value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "newparam", index, value);
    }

    public static int gettechniqueMinCount() {
        return 1;
    }

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

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

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

    public techniqueType newtechnique() {
        return new techniqueType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "technique"));
    }

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

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

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

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

    public techniqueType gettechnique() throws Exception {
        return gettechniqueAt(0);
    }

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

    public void removetechnique() {
        while (hastechnique())
            removetechniqueAt(0);
    }

    public void addtechnique(techniqueType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "technique", value);
    }

    public void inserttechniqueAt(techniqueType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "technique", index, value);
    }

    public void replacetechniqueAt(techniqueType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "technique", index, value);
    }

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