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

    private static final long serialVersionUID = 1L;

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

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

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

    public instance_geometryType(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, "url"); tmpNode != null; tmpNode = getDomNextChild(
                Attribute, null, "url", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "bind_material"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "bind_material", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new bind_materialType(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 geturlMinCount() {
        return 1;
    }

    public static int geturlMaxCount() {
        return 1;
    }

    public int geturlCount() {
        return getDomChildCount(Attribute, null, "url");
    }

    public boolean hasurl() {
        return hasDomChild(Attribute, null, "url");
    }

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

    public SchemaString geturlAt(int index) throws Exception {
        return new SchemaString(getDomNodeValue(dereference(getDomChildAt(
                Attribute, null, "url", index))));
    }

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

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

    public SchemaString geturlValueAtCursor(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 geturl() throws Exception {
        return geturlAt(0);
    }

    public void removeurlAt(int index) {
        removeDomChildAt(Attribute, null, "url", index);
    }

    public void removeurl() {
        while (hasurl())
            removeurlAt(0);
    }

    public void addurl(SchemaString value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "url", value.toString());
        }
    }

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

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

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

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

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

    public static int getbind_materialMinCount() {
        return 0;
    }

    public static int getbind_materialMaxCount() {
        return 1;
    }

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

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

    public bind_materialType newbind_material() {
        return new bind_materialType(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "bind_material"));
    }

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

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

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

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

    public bind_materialType getbind_material() throws Exception {
        return getbind_materialAt(0);
    }

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

    public void removebind_material() {
        while (hasbind_material())
            removebind_materialAt(0);
    }

    public void addbind_material(bind_materialType value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "bind_material", value);
    }

    public void insertbind_materialAt(bind_materialType value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "bind_material", index, value);
    }

    public void replacebind_materialAt(bind_materialType value, int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "bind_material", 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;
    }
}
