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

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

    private static final long serialVersionUID = 1L;

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

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

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

    public sceneType(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(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "instance_physics_scene"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "instance_physics_scene", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new InstanceWithExtra(tmpNode).adjustPrefix();
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema",
                "instance_visual_scene"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema",
                "instance_visual_scene", tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
            new InstanceWithExtra(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 getinstance_physics_sceneMinCount() {
        return 0;
    }

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

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

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

    public InstanceWithExtra newinstance_physics_scene() {
        return new InstanceWithExtra(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "instance_physics_scene"));
    }

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

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

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

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

    public InstanceWithExtra getinstance_physics_scene() throws Exception {
        return getinstance_physics_sceneAt(0);
    }

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

    public void removeinstance_physics_scene() {
        while (hasinstance_physics_scene())
            removeinstance_physics_sceneAt(0);
    }

    public void addinstance_physics_scene(InstanceWithExtra value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "instance_physics_scene", value);
    }

    public void insertinstance_physics_sceneAt(InstanceWithExtra value,
            int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "instance_physics_scene", index, value);
    }

    public void replaceinstance_physics_sceneAt(InstanceWithExtra value,
            int index) {
        replaceDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "instance_physics_scene", index, value);
    }

    public static int getinstance_visual_sceneMinCount() {
        return 0;
    }

    public static int getinstance_visual_sceneMaxCount() {
        return 1;
    }

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

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

    public InstanceWithExtra newinstance_visual_scene() {
        return new InstanceWithExtra(domNode.getOwnerDocument()
                .createElementNS(
                        "http://www.collada.org/2005/11/COLLADASchema",
                        "instance_visual_scene"));
    }

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

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

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

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

    public InstanceWithExtra getinstance_visual_scene() throws Exception {
        return getinstance_visual_sceneAt(0);
    }

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

    public void removeinstance_visual_scene() {
        while (hasinstance_visual_scene())
            removeinstance_visual_sceneAt(0);
    }

    public void addinstance_visual_scene(InstanceWithExtra value) {
        appendDomElement("http://www.collada.org/2005/11/COLLADASchema",
                "instance_visual_scene", value);
    }

    public void insertinstance_visual_sceneAt(InstanceWithExtra value, int index) {
        insertDomElementAt("http://www.collada.org/2005/11/COLLADASchema",
                "instance_visual_scene", index, value);
    }

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