/**
 * fx_surface_common.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.SchemaBoolean;
import com.jmex.model.collada.types.SchemaLong;

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

    private static final long serialVersionUID = 1L;

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

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

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

    public fx_surface_common(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,
                "type"); tmpNode != null; tmpNode = getDomNextChild(Attribute,
                null, "type", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "init_from"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "init_from", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new init_fromType(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "format"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "format", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "size"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "size", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "viewport_ratio"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "viewport_ratio", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "mip_levels"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "mip_levels", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "mipmap_generate"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "mipmap_generate", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
    }

    public static int gettypeMinCount() {
        return 1;
    }

    public static int gettypeMaxCount() {
        return 1;
    }

    public int gettypeCount() {
        return getDomChildCount(Attribute, null, "type");
    }

    public boolean hastype() {
        return hasDomChild(Attribute, null, "type");
    }

    public fx_surface_type_enum newtype() {
        return new fx_surface_type_enum();
    }

    public fx_surface_type_enum gettypeAt(int index) throws Exception {
        return new fx_surface_type_enum(
                getDomNodeValue(dereference(getDomChildAt(Attribute, null,
                        "type", index))));
    }

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

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

    public fx_surface_type_enum gettypeValueAtCursor(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_surface_type_enum(
                    getDomNodeValue(dereference(curNode)));
    }

    public fx_surface_type_enum gettype() throws Exception {
        return gettypeAt(0);
    }

    public void removetypeAt(int index) {
        removeDomChildAt(Attribute, null, "type", index);
    }

    public void removetype() {
        while (hastype())
            removetypeAt(0);
    }

    public void addtype(fx_surface_type_enum value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "type", value.toString());
        }
    }

    public void addtype(String value) throws Exception {
        addtype(new fx_surface_type_enum(value));
    }

    public void inserttypeAt(fx_surface_type_enum value, int index) {
        insertDomChildAt(Attribute, null, "type", index, value.toString());
    }

    public void inserttypeAt(String value, int index) throws Exception {
        inserttypeAt(new fx_surface_type_enum(value), index);
    }

    public void replacetypeAt(fx_surface_type_enum value, int index) {
        replaceDomChildAt(Attribute, null, "type", index, value.toString());
    }

    public void replacetypeAt(String value, int index) throws Exception {
        replacetypeAt(new fx_surface_type_enum(value), index);
    }

    public static int getinit_fromMinCount() {
        return 0;
    }

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

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

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

    public init_fromType newinit_from() {
        return new init_fromType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "init_from"));
    }

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

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

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

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

    public init_fromType getinit_from() throws Exception {
        return getinit_fromAt(0);
    }

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

    public void removeinit_from() {
        while (hasinit_from())
            removeinit_fromAt(0);
    }

    public void addinit_from(init_fromType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "init_from", value);
    }

    public void insertinit_fromAt(init_fromType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "init_from", index, value);
    }

    public void replaceinit_fromAt(init_fromType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "init_from", index, value);
    }

    public static int getformatMinCount() {
        return 1;
    }

    public static int getformatMaxCount() {
        return 1;
    }

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

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

    public formatType newformat() {
        return new formatType();
    }

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

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

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

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

    public formatType getformat() throws Exception {
        return getformatAt(0);
    }

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

    public void removeformat() {
        while (hasformat())
            removeformatAt(0);
    }

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

    public void addformat(String value) throws Exception {
        addformat(new formatType(value));
    }

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

    public void insertformatAt(String value, int index) throws Exception {
        insertformatAt(new formatType(value), index);
    }

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

    public void replaceformatAt(String value, int index) throws Exception {
        replaceformatAt(new formatType(value), index);
    }

    public static int getsizeMinCount() {
        return 1;
    }

    public static int getsizeMaxCount() {
        return 1;
    }

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

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

    public int3 newsize() {
        return new int3();
    }

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

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

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

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

    public int3 getsize() throws Exception {
        return getsizeAt(0);
    }

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

    public void removesize() {
        while (hassize())
            removesizeAt(0);
    }

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

    public void addsize(String value) throws Exception {
        addsize(new int3(value));
    }

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

    public void insertsizeAt(String value, int index) throws Exception {
        insertsizeAt(new int3(value), index);
    }

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

    public void replacesizeAt(String value, int index) throws Exception {
        replacesizeAt(new int3(value), index);
    }

    public static int getviewport_ratioMinCount() {
        return 1;
    }

    public static int getviewport_ratioMaxCount() {
        return 1;
    }

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

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

    public float22 newviewport_ratio() {
        return new float22();
    }

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

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

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

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

    public float22 getviewport_ratio() throws Exception {
        return getviewport_ratioAt(0);
    }

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

    public void removeviewport_ratio() {
        while (hasviewport_ratio())
            removeviewport_ratioAt(0);
    }

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

    public void addviewport_ratio(String value) throws Exception {
        addviewport_ratio(new float22(value));
    }

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

    public void insertviewport_ratioAt(String value, int index)
            throws Exception {
        insertviewport_ratioAt(new float22(value), index);
    }

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

    public void replaceviewport_ratioAt(String value, int index)
            throws Exception {
        replaceviewport_ratioAt(new float22(value), index);
    }

    public static int getmip_levelsMinCount() {
        return 0;
    }

    public static int getmip_levelsMaxCount() {
        return 1;
    }

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

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

    public SchemaLong newmip_levels() {
        return new SchemaLong();
    }

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

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

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

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

    public SchemaLong getmip_levels() throws Exception {
        return getmip_levelsAt(0);
    }

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

    public void removemip_levels() {
        while (hasmip_levels())
            removemip_levelsAt(0);
    }

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

    public void addmip_levels(String value) throws Exception {
        addmip_levels(new SchemaLong(value));
    }

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

    public void insertmip_levelsAt(String value, int index) throws Exception {
        insertmip_levelsAt(new SchemaLong(value), index);
    }

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

    public void replacemip_levelsAt(String value, int index) throws Exception {
        replacemip_levelsAt(new SchemaLong(value), index);
    }

    public static int getmipmap_generateMinCount() {
        return 0;
    }

    public static int getmipmap_generateMaxCount() {
        return 1;
    }

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

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

    public SchemaBoolean newmipmap_generate() {
        return new SchemaBoolean();
    }

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

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

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

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

    public SchemaBoolean getmipmap_generate() throws Exception {
        return getmipmap_generateAt(0);
    }

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

    public void removemipmap_generate() {
        while (hasmipmap_generate())
            removemipmap_generateAt(0);
    }

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

    public void addmipmap_generate(String value) throws Exception {
        addmipmap_generate(new SchemaBoolean(value));
    }

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

    public void insertmipmap_generateAt(String value, int index)
            throws Exception {
        insertmipmap_generateAt(new SchemaBoolean(value), index);
    }

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

    public void replacemipmap_generateAt(String value, int index)
            throws Exception {
        replacemipmap_generateAt(new SchemaBoolean(value), index);
    }

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