/**
 * InputGlobal.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.SchemaNMToken;
import com.jmex.model.collada.types.SchemaString;

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

    private static final long serialVersionUID = 1L;

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

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

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

    public InputGlobal(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,
                "semantic"); tmpNode != null; tmpNode = getDomNextChild(
                Attribute, null, "semantic", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Attribute, null,
                "source"); tmpNode != null; tmpNode = getDomNextChild(
                Attribute, null, "source", tmpNode)) {
            internalAdjustPrefix(tmpNode, false);
        }
    }

    public static int getsemanticMinCount() {
        return 1;
    }

    public static int getsemanticMaxCount() {
        return 1;
    }

    public int getsemanticCount() {
        return getDomChildCount(Attribute, null, "semantic");
    }

    public boolean hassemantic() {
        return hasDomChild(Attribute, null, "semantic");
    }

    public SchemaNMToken newsemantic() {
        return new SchemaNMToken();
    }

    public SchemaNMToken getsemanticAt(int index) throws Exception {
        return new SchemaNMToken(getDomNodeValue(dereference(getDomChildAt(
                Attribute, null, "semantic", index))));
    }

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

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

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

    public SchemaNMToken getsemantic() throws Exception {
        return getsemanticAt(0);
    }

    public void removesemanticAt(int index) {
        removeDomChildAt(Attribute, null, "semantic", index);
    }

    public void removesemantic() {
        while (hassemantic())
            removesemanticAt(0);
    }

    public void addsemantic(SchemaNMToken value) {
        if (value.isNull() == false) {
            appendDomChild(Attribute, null, "semantic", value.toString());
        }
    }

    public void addsemantic(String value) throws Exception {
        addsemantic(new SchemaNMToken(value));
    }

    public void insertsemanticAt(SchemaNMToken value, int index) {
        insertDomChildAt(Attribute, null, "semantic", index, value.toString());
    }

    public void insertsemanticAt(String value, int index) throws Exception {
        insertsemanticAt(new SchemaNMToken(value), index);
    }

    public void replacesemanticAt(SchemaNMToken value, int index) {
        replaceDomChildAt(Attribute, null, "semantic", index, value.toString());
    }

    public void replacesemanticAt(String value, int index) throws Exception {
        replacesemanticAt(new SchemaNMToken(value), index);
    }

    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);
    }

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