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

    private static final long serialVersionUID = 1L;

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

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

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

    public skinType(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(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "bind_shape_matrix"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "bind_shape_matrix", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "source"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "source", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new sourceType(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "joints"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "joints", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new jointsType(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "vertex_weights"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "vertex_weights", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new vertex_weightsType(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "extra"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "extra", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new extraType(tmpNode).adjustPrefix();
        }
    }

    public static int getsourceMinCount() {
        return 1;
    }

    public static int getsourceMaxCount() {
        return 1;
    }

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

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

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

    public SchemaString getsourceAt(int index) throws Exception {
        return new SchemaString(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 SchemaString 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 SchemaString(getDomNodeValue(dereference(curNode)));
    }

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

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

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

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

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

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

    public static int getbind_shape_matrixMinCount() {
        return 0;
    }

    public static int getbind_shape_matrixMaxCount() {
        return 1;
    }

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

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

    public float4x4 newbind_shape_matrix() {
        return new float4x4();
    }

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

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

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

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

    public float4x4 getbind_shape_matrix() throws Exception {
        return getbind_shape_matrixAt(0);
    }

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

    public void removebind_shape_matrix() {
        while (hasbind_shape_matrix())
            removebind_shape_matrixAt(0);
    }

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

    public void addbind_shape_matrix(String value) throws Exception {
        addbind_shape_matrix(new float4x4(value));
    }

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

    public void insertbind_shape_matrixAt(String value, int index)
            throws Exception {
        insertbind_shape_matrixAt(new float4x4(value), index);
    }

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

    public void replacebind_shape_matrixAt(String value, int index)
            throws Exception {
        replacebind_shape_matrixAt(new float4x4(value), index);
    }

    public static int getsource2MinCount() {
        return 3;
    }

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

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

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

    public sourceType newsource2() {
        return new sourceType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "source"));
    }

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

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

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

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

    public sourceType getsource2() throws Exception {
        return getsource2At(0);
    }

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

    public void removesource2() {
        while (hassource2())
            removesource2At(0);
    }

    public void addsource2(sourceType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "source", value);
    }

    public void insertsource2At(sourceType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "source", index, value);
    }

    public void replacesource2At(sourceType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "source", index, value);
    }

    public static int getjointsMinCount() {
        return 1;
    }

    public static int getjointsMaxCount() {
        return 1;
    }

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

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

    public jointsType newjoints() {
        return new jointsType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "joints"));
    }

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

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

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

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

    public jointsType getjoints() throws Exception {
        return getjointsAt(0);
    }

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

    public void removejoints() {
        while (hasjoints())
            removejointsAt(0);
    }

    public void addjoints(jointsType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "joints", value);
    }

    public void insertjointsAt(jointsType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "joints", index, value);
    }

    public void replacejointsAt(jointsType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "joints", index, value);
    }

    public static int getvertex_weightsMinCount() {
        return 1;
    }

    public static int getvertex_weightsMaxCount() {
        return 1;
    }

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

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

    public vertex_weightsType newvertex_weights() {
        return new vertex_weightsType(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "vertex_weights"));
    }

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

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

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

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

    public vertex_weightsType getvertex_weights() throws Exception {
        return getvertex_weightsAt(0);
    }

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

    public void removevertex_weights() {
        while (hasvertex_weights())
            removevertex_weightsAt(0);
    }

    public void addvertex_weights(vertex_weightsType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "vertex_weights", value);
    }

    public void insertvertex_weightsAt(vertex_weightsType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "vertex_weights", index, value);
    }

    public void replacevertex_weightsAt(vertex_weightsType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "vertex_weights", index, value);
    }

    public static int getextraMinCount() {
        return 0;
    }

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

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

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

    public extraType newextra() {
        return new extraType(domNode.getOwnerDocument().createElementNS(
                "http://www.collada.org/2005/11/COLLADASchema", "extra"));
    }

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

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

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

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

    public extraType getextra() throws Exception {
        return getextraAt(0);
    }

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

    public void removeextra() {
        while (hasextra())
            removeextraAt(0);
    }

    public void addextra(extraType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "extra", value);
    }

    public void insertextraAt(extraType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "extra", index, value);
    }

    public void replaceextraAt(extraType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "extra", index, value);
    }

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