//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.5-20051113-fcs 
// 	See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// 	Any modifications to this file will be lost upon recompilation of the source schema. 
// 	Generated on: 2006.03.16 um 02:41:50 CET 
//


package phex.xml.impl;

public class XJBPhexImpl implements phex.xml.XJBPhex, com.sun.xml.bind.JAXBObject, phex.xml.impl.runtime.UnmarshallableObject, phex.xml.impl.runtime.XMLSerializable
{

    protected phex.xml.XJBSWDownloadList _SWDownloadList;
    protected phex.xml.XJBSecurity _Security;
    protected java.lang.String _PhexVersion;
    protected phex.xml.XJBUpdateResponse _UpdateResponse;
    public final static java.lang.Class version = (phex.xml.impl.JAXBVersion.class);

    private final static java.lang.Class PRIMARY_INTERFACE_CLASS() {
        return (phex.xml.XJBPhex.class);
    }

    public phex.xml.XJBSWDownloadList getSWDownloadList() {
        return _SWDownloadList;
    }

    public void setSWDownloadList(phex.xml.XJBSWDownloadList value) {
        _SWDownloadList = value;
    }

    public phex.xml.XJBSecurity getSecurity() {
        return _Security;
    }

    public void setSecurity(phex.xml.XJBSecurity value) {
        _Security = value;
    }

    public java.lang.String getPhexVersion() {
        return _PhexVersion;
    }

    public void setPhexVersion(java.lang.String value) {
        _PhexVersion = value;
    }

    public phex.xml.XJBUpdateResponse getUpdateResponse() {
        return _UpdateResponse;
    }

    public void setUpdateResponse(phex.xml.XJBUpdateResponse value) {
        _UpdateResponse = value;
    }

    public phex.xml.impl.runtime.UnmarshallingEventHandler createUnmarshaller(phex.xml.impl.runtime.UnmarshallingContext context) {
        return new phex.xml.impl.XJBPhexImpl.Unmarshaller(context);
    }

    public void serializeBody(phex.xml.impl.runtime.XMLSerializer context)
        throws org.xml.sax.SAXException
    {
        if (_UpdateResponse!= null) {
            context.startElement("", "update-response");
            context.childAsURIs(((com.sun.xml.bind.JAXBObject) _UpdateResponse), "UpdateResponse");
            context.endNamespaceDecls();
            context.childAsAttributes(((com.sun.xml.bind.JAXBObject) _UpdateResponse), "UpdateResponse");
            context.endAttributes();
            context.childAsBody(((com.sun.xml.bind.JAXBObject) _UpdateResponse), "UpdateResponse");
            context.endElement();
        }
        if (_SWDownloadList!= null) {
            context.startElement("", "swDownloadList");
            context.childAsURIs(((com.sun.xml.bind.JAXBObject) _SWDownloadList), "SWDownloadList");
            context.endNamespaceDecls();
            context.childAsAttributes(((com.sun.xml.bind.JAXBObject) _SWDownloadList), "SWDownloadList");
            context.endAttributes();
            context.childAsBody(((com.sun.xml.bind.JAXBObject) _SWDownloadList), "SWDownloadList");
            context.endElement();
        }
        if (_Security!= null) {
            context.startElement("", "security");
            context.childAsURIs(((com.sun.xml.bind.JAXBObject) _Security), "Security");
            context.endNamespaceDecls();
            context.childAsAttributes(((com.sun.xml.bind.JAXBObject) _Security), "Security");
            context.endAttributes();
            context.childAsBody(((com.sun.xml.bind.JAXBObject) _Security), "Security");
            context.endElement();
        }
    }

    public void serializeAttributes(phex.xml.impl.runtime.XMLSerializer context)
        throws org.xml.sax.SAXException
    {
        if (_PhexVersion!= null) {
            context.startAttribute("", "phex-version");
            try {
                context.text(((java.lang.String) _PhexVersion), "PhexVersion");
            } catch (java.lang.Exception e) {
                phex.xml.impl.runtime.Util.handlePrintConversionException(this, e, context);
            }
            context.endAttribute();
        }
    }

    public void serializeURIs(phex.xml.impl.runtime.XMLSerializer context)
        throws org.xml.sax.SAXException
    {
    }

    public class Unmarshaller
        extends phex.xml.impl.runtime.AbstractUnmarshallingEventHandlerImpl
    {


        public Unmarshaller(phex.xml.impl.runtime.UnmarshallingContext context) {
            super(context, "-------------");
        }

        protected Unmarshaller(phex.xml.impl.runtime.UnmarshallingContext context, int startState) {
            this(context);
            state = startState;
        }

        public java.lang.Object owner() {
            return phex.xml.impl.XJBPhexImpl.this;
        }

        public void enterElement(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname, org.xml.sax.Attributes __atts)
            throws org.xml.sax.SAXException
        {
            int attIdx;
            outer:
            while (true) {
                switch (state) {
                    case  6 :
                        if (("swDownloadList" == ___local)&&("" == ___uri)) {
                            context.pushAttributes(__atts, false);
                            state = 7;
                            return ;
                        }
                        state = 9;
                        continue outer;
                    case  0 :
                        attIdx = context.getAttribute("", "phex-version");
                        if (attIdx >= 0) {
                            final java.lang.String v = context.eatAttribute(attIdx);
                            state = 3;
                            eatText1(v);
                            continue outer;
                        }
                        state = 3;
                        continue outer;
                    case  3 :
                        if (("update-response" == ___local)&&("" == ___uri)) {
                            context.pushAttributes(__atts, false);
                            state = 4;
                            return ;
                        }
                        state = 6;
                        continue outer;
                    case  7 :
                        if (("swDownloadFile" == ___local)&&("" == ___uri)) {
                            _SWDownloadList = ((phex.xml.impl.XJBSWDownloadListImpl) spawnChildFromEnterElement((phex.xml.impl.XJBSWDownloadListImpl.class), 8, ___uri, ___local, ___qname, __atts));
                            return ;
                        }
                        _SWDownloadList = ((phex.xml.impl.XJBSWDownloadListImpl) spawnChildFromEnterElement((phex.xml.impl.XJBSWDownloadListImpl.class), 8, ___uri, ___local, ___qname, __atts));
                        return ;
                    case  4 :
                        if (("version" == ___local)&&("" == ___uri)) {
                            _UpdateResponse = ((phex.xml.impl.XJBUpdateResponseImpl) spawnChildFromEnterElement((phex.xml.impl.XJBUpdateResponseImpl.class), 5, ___uri, ___local, ___qname, __atts));
                            return ;
                        }
                        if (("info" == ___local)&&("" == ___uri)) {
                            _UpdateResponse = ((phex.xml.impl.XJBUpdateResponseImpl) spawnChildFromEnterElement((phex.xml.impl.XJBUpdateResponseImpl.class), 5, ___uri, ___local, ___qname, __atts));
                            return ;
                        }
                        _UpdateResponse = ((phex.xml.impl.XJBUpdateResponseImpl) spawnChildFromEnterElement((phex.xml.impl.XJBUpdateResponseImpl.class), 5, ___uri, ___local, ___qname, __atts));
                        return ;
                    case  9 :
                        if (("security" == ___local)&&("" == ___uri)) {
                            context.pushAttributes(__atts, false);
                            state = 10;
                            return ;
                        }
                        state = 12;
                        continue outer;
                    case  10 :
                        if (("ip-access-rule" == ___local)&&("" == ___uri)) {
                            _Security = ((phex.xml.impl.XJBSecurityImpl) spawnChildFromEnterElement((phex.xml.impl.XJBSecurityImpl.class), 11, ___uri, ___local, ___qname, __atts));
                            return ;
                        }
                        _Security = ((phex.xml.impl.XJBSecurityImpl) spawnChildFromEnterElement((phex.xml.impl.XJBSecurityImpl.class), 11, ___uri, ___local, ___qname, __atts));
                        return ;
                    case  12 :
                        revertToParentFromEnterElement(___uri, ___local, ___qname, __atts);
                        return ;
                }
                super.enterElement(___uri, ___local, ___qname, __atts);
                break;
            }
        }

        private void eatText1(final java.lang.String value)
            throws org.xml.sax.SAXException
        {
            try {
                _PhexVersion = value;
            } catch (java.lang.Exception e) {
                handleParseConversionException(e);
            }
        }

        public void leaveElement(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname)
            throws org.xml.sax.SAXException
        {
            int attIdx;
            outer:
            while (true) {
                switch (state) {
                    case  11 :
                        if (("security" == ___local)&&("" == ___uri)) {
                            context.popAttributes();
                            state = 12;
                            return ;
                        }
                        break;
                    case  6 :
                        state = 9;
                        continue outer;
                    case  0 :
                        attIdx = context.getAttribute("", "phex-version");
                        if (attIdx >= 0) {
                            final java.lang.String v = context.eatAttribute(attIdx);
                            state = 3;
                            eatText1(v);
                            continue outer;
                        }
                        state = 3;
                        continue outer;
                    case  3 :
                        state = 6;
                        continue outer;
                    case  7 :
                        _SWDownloadList = ((phex.xml.impl.XJBSWDownloadListImpl) spawnChildFromLeaveElement((phex.xml.impl.XJBSWDownloadListImpl.class), 8, ___uri, ___local, ___qname));
                        return ;
                    case  4 :
                        _UpdateResponse = ((phex.xml.impl.XJBUpdateResponseImpl) spawnChildFromLeaveElement((phex.xml.impl.XJBUpdateResponseImpl.class), 5, ___uri, ___local, ___qname));
                        return ;
                    case  9 :
                        state = 12;
                        continue outer;
                    case  10 :
                        _Security = ((phex.xml.impl.XJBSecurityImpl) spawnChildFromLeaveElement((phex.xml.impl.XJBSecurityImpl.class), 11, ___uri, ___local, ___qname));
                        return ;
                    case  5 :
                        if (("update-response" == ___local)&&("" == ___uri)) {
                            context.popAttributes();
                            state = 6;
                            return ;
                        }
                        break;
                    case  12 :
                        revertToParentFromLeaveElement(___uri, ___local, ___qname);
                        return ;
                    case  8 :
                        if (("swDownloadList" == ___local)&&("" == ___uri)) {
                            context.popAttributes();
                            state = 9;
                            return ;
                        }
                        break;
                }
                super.leaveElement(___uri, ___local, ___qname);
                break;
            }
        }

        public void enterAttribute(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname)
            throws org.xml.sax.SAXException
        {
            int attIdx;
            outer:
            while (true) {
                switch (state) {
                    case  6 :
                        state = 9;
                        continue outer;
                    case  0 :
                        if (("phex-version" == ___local)&&("" == ___uri)) {
                            state = 1;
                            return ;
                        }
                        state = 3;
                        continue outer;
                    case  3 :
                        state = 6;
                        continue outer;
                    case  7 :
                        _SWDownloadList = ((phex.xml.impl.XJBSWDownloadListImpl) spawnChildFromEnterAttribute((phex.xml.impl.XJBSWDownloadListImpl.class), 8, ___uri, ___local, ___qname));
                        return ;
                    case  4 :
                        _UpdateResponse = ((phex.xml.impl.XJBUpdateResponseImpl) spawnChildFromEnterAttribute((phex.xml.impl.XJBUpdateResponseImpl.class), 5, ___uri, ___local, ___qname));
                        return ;
                    case  9 :
                        state = 12;
                        continue outer;
                    case  10 :
                        _Security = ((phex.xml.impl.XJBSecurityImpl) spawnChildFromEnterAttribute((phex.xml.impl.XJBSecurityImpl.class), 11, ___uri, ___local, ___qname));
                        return ;
                    case  12 :
                        revertToParentFromEnterAttribute(___uri, ___local, ___qname);
                        return ;
                }
                super.enterAttribute(___uri, ___local, ___qname);
                break;
            }
        }

        public void leaveAttribute(java.lang.String ___uri, java.lang.String ___local, java.lang.String ___qname)
            throws org.xml.sax.SAXException
        {
            int attIdx;
            outer:
            while (true) {
                switch (state) {
                    case  6 :
                        state = 9;
                        continue outer;
                    case  0 :
                        attIdx = context.getAttribute("", "phex-version");
                        if (attIdx >= 0) {
                            final java.lang.String v = context.eatAttribute(attIdx);
                            state = 3;
                            eatText1(v);
                            continue outer;
                        }
                        state = 3;
                        continue outer;
                    case  3 :
                        state = 6;
                        continue outer;
                    case  7 :
                        _SWDownloadList = ((phex.xml.impl.XJBSWDownloadListImpl) spawnChildFromLeaveAttribute((phex.xml.impl.XJBSWDownloadListImpl.class), 8, ___uri, ___local, ___qname));
                        return ;
                    case  4 :
                        _UpdateResponse = ((phex.xml.impl.XJBUpdateResponseImpl) spawnChildFromLeaveAttribute((phex.xml.impl.XJBUpdateResponseImpl.class), 5, ___uri, ___local, ___qname));
                        return ;
                    case  9 :
                        state = 12;
                        continue outer;
                    case  2 :
                        if (("phex-version" == ___local)&&("" == ___uri)) {
                            state = 3;
                            return ;
                        }
                        break;
                    case  10 :
                        _Security = ((phex.xml.impl.XJBSecurityImpl) spawnChildFromLeaveAttribute((phex.xml.impl.XJBSecurityImpl.class), 11, ___uri, ___local, ___qname));
                        return ;
                    case  12 :
                        revertToParentFromLeaveAttribute(___uri, ___local, ___qname);
                        return ;
                }
                super.leaveAttribute(___uri, ___local, ___qname);
                break;
            }
        }

        public void handleText(final java.lang.String value)
            throws org.xml.sax.SAXException
        {
            int attIdx;
            outer:
            while (true) {
                try {
                    switch (state) {
                        case  6 :
                            state = 9;
                            continue outer;
                        case  0 :
                            attIdx = context.getAttribute("", "phex-version");
                            if (attIdx >= 0) {
                                final java.lang.String v = context.eatAttribute(attIdx);
                                state = 3;
                                eatText1(v);
                                continue outer;
                            }
                            state = 3;
                            continue outer;
                        case  3 :
                            state = 6;
                            continue outer;
                        case  7 :
                            _SWDownloadList = ((phex.xml.impl.XJBSWDownloadListImpl) spawnChildFromText((phex.xml.impl.XJBSWDownloadListImpl.class), 8, value));
                            return ;
                        case  1 :
                            state = 2;
                            eatText1(value);
                            return ;
                        case  4 :
                            _UpdateResponse = ((phex.xml.impl.XJBUpdateResponseImpl) spawnChildFromText((phex.xml.impl.XJBUpdateResponseImpl.class), 5, value));
                            return ;
                        case  9 :
                            state = 12;
                            continue outer;
                        case  10 :
                            _Security = ((phex.xml.impl.XJBSecurityImpl) spawnChildFromText((phex.xml.impl.XJBSecurityImpl.class), 11, value));
                            return ;
                        case  12 :
                            revertToParentFromText(value);
                            return ;
                    }
                } catch (java.lang.RuntimeException e) {
                    handleUnexpectedTextException(value, e);
                }
                break;
            }
        }

    }

}
