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

    private static final long serialVersionUID = 1L;

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

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

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

    public phType(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", "p"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema", "p",
                tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
        for (org.w3c.dom.Node tmpNode = getDomFirstChild(Element,
                "http://www.collada.org/2005/11/COLLADASchema", "h"); tmpNode != null; tmpNode = getDomNextChild(
                Element, "http://www.collada.org/2005/11/COLLADASchema", "h",
                tmpNode)) {
            internalAdjustPrefix(tmpNode, true);
        }
    }

    public static int getpMinCount() {
        return 1;
    }

    public static int getpMaxCount() {
        return 1;
    }

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

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

    public ListOfUInts newp() {
        return new ListOfUInts();
    }

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

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

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

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

    public ListOfUInts getp() throws Exception {
        return getpAt(0);
    }

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

    public void removep() {
        while (hasp())
            removepAt(0);
    }

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

    public void addp(String value) throws Exception {
        addp(new ListOfUInts(value));
    }

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

    public void insertpAt(String value, int index) throws Exception {
        insertpAt(new ListOfUInts(value), index);
    }

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

    public void replacepAt(String value, int index) throws Exception {
        replacepAt(new ListOfUInts(value), index);
    }

    public static int gethMinCount() {
        return 1;
    }

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

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

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

    public ListOfUInts newh() {
        return new ListOfUInts();
    }

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

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

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

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

    public ListOfUInts geth() throws Exception {
        return gethAt(0);
    }

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

    public void removeh() {
        while (hash())
            removehAt(0);
    }

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

    public void addh(String value) throws Exception {
        addh(new ListOfUInts(value));
    }

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

    public void inserthAt(String value, int index) throws Exception {
        inserthAt(new ListOfUInts(value), index);
    }

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

    public void replacehAt(String value, int index) throws Exception {
        replacehAt(new ListOfUInts(value), index);
    }

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