//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vBeta 
// 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: 2004.05.26 at 03:38:22 CEST 
//


package phex.xml.impl;

public class XJBSearchFilterImpl implements phex.xml.XJBSearchFilter, com.sun.xml.bind.unmarshaller.UnmarshallableObject, com.sun.xml.bind.serializer.XMLSerializable, com.sun.xml.bind.validator.ValidatableObject
{

    private final static Class PRIMARY_INTERFACE_CLASS = phex.xml.XJBSearchFilter.class;
    protected boolean has_MinHostRating;
    protected short _MinHostRating;
    protected boolean has_MinHostSpeed;
    protected int _MinHostSpeed;
    protected boolean has_LastTimeUsed;
    protected long _LastTimeUsed;
    protected String _Name;
    protected phex.xml.XJBMediaType _MediaType;
    protected boolean has_MinFileSize;
    protected long _MinFileSize;
    protected String _RefineText;
    private final static com.sun.msv.grammar.Grammar schemaFragment = com.sun.xml.bind.validator.SchemaDeserializer.deserialize("\u00ac\u00ed\u0000\u0005sr\u0000\u001fcom.sun.msv.grammar.SequenceExp\u0091Ue\u00f1\u0017p\u00f3\u00ad\u0002\u0000\u0000xr\u0000\u001dcom.sun.msv.grammar.BinaryExp\u009f\u008d\u000fi<\u00c1_\u00b7\u0002\u0000\u0002L\u0000\u0004exp1t\u0000 Lcom/sun/msv/grammar/Expression;L\u0000\u0004exp2q\u0000~\u0000\u0002xr\u0000\u001ecom.sun.msv.grammar.Expression\u00f8\u0018\u0082\u00e8N5~O\u0002\u0000\u0003I\u0000\u000ecachedHashCodeL\u0000\u0013epsilonReducibilityt\u0000\u0013Ljava/lang/Boolean;L\u0000\u000bexpandedExpq\u0000~\u0000\u0002xp\u00066\u00c7\u0002ppsq\u0000~\u0000\u0000\u0003\u00fe\u00fb\u00a3ppsq\u0000~\u0000\u0000\u0003\u001c\u0005\u0082ppsq\u0000~\u0000\u0000\u0002H\u0002zppsq\u0000~\u0000\u0000\u0001\u00b8\u00c5(ppsq\u0000~\u0000\u0000\u0001%\b[ppsr\u0000\u001dcom.sun.msv.grammar.ChoiceExp\u00c6|\u00ec3\u0087\u00b8\u00f9\u00f4\u0002\u0000\u0000xq\u0000~\u0000\u0001\u0000Q\u0005Sppsr\u0000\'com.sun.msv.grammar.trex.ElementPattern\u008b\u0010\u001fsu\u008b\u0091\u00c2\u0002\u0000\u0001L\u0000\tnameClasst\u0000\u001fLcom/sun/msv/grammar/NameClass;xr\u0000\u001ecom.sun.msv.grammar.ElementExp\u00d3\u00c6b\u0095\u0015\rC\u0092\u0002\u0000\u0002Z\u0000\u001aignoreUndeclaredAttributesL\u0000\fcontentModelq\u0000~\u0000\u0002xq\u0000~\u0000\u0003\u0000Q\u0005Hsr\u0000\u0011java.lang.Boolean\u00cd r\u0080\u00d5\u009c\u00fa\u00ee\u0002\u0000\u0001Z\u0000\u0005valuexp\u0000p\u0000sr\u0000\u001bcom.sun.msv.grammar.DataExp8\u00f5\u00f5>{j!\u00cb\u0002\u0000\u0003L\u0000\u0002dtt\u0000\u001fLorg/relaxng/datatype/Datatype;L\u0000\u0006exceptq\u0000~\u0000\u0002L\u0000\u0004namet\u0000\u001dLcom/sun/msv/util/StringPair;xq\u0000~\u0000\u0003\u0000Q\u0005=ppsr\u0000#com.sun.msv.datatype.xsd.StringType\u00c0\t\u00a9y\u00f6\u0011\u009b\u00e6\u0002\u0000\u0000xr\u0000*com.sun.msv.datatype.xsd.BuiltinAtomicType\u0002\u00ff10\u00a8bR\u00ca\u0002\u0000\u0000xr\u0000%com.sun.msv.datatype.xsd.ConcreteType7\u00adsa|\u00d7Z\u001d\u0002\u0000\u0000xr\u0000\'com.sun.msv.datatype.xsd.XSDatatypeImpl4\u00e9\u0099H.\u00872z\u0002\u0000\u0003L\u0000\fnamespaceUrit\u0000\u0012Ljava/lang/String;L\u0000\btypeNameq\u0000~\u0000\u001bL\u0000\nwhiteSpacet\u0000.Lcom/sun/msv/datatype/xsd/WhiteSpaceProcessor;xpt\u0000 http://www.w3.org/2001/XMLSchemat\u0000\u0006stringsr\u0000.com.sun.msv.datatype.xsd.WhiteSpaceProcessor$1\u0013JMoI\u00db\u00a4G\u0002\u0000\u0000xr\u0000,com.sun.msv.datatype.xsd.WhiteSpaceProcessorip\u00ff0C\u00ce\u000eN\u0002\u0000\u0000xpsr\u00000com.sun.msv.grammar.Expression$NullSetExpression s\u0080\u0089\u0096\u00cf\u009a@\u0002\u0000\u0000xq\u0000~\u0000\u0003\u0000\u0000\u0000\nq\u0000~\u0000\u0012psr\u0000\u001bcom.sun.msv.util.StringPair\u00d0t\u001ejB\u008f\u008d\u00a0\u0002\u0000\u0002L\u0000\tlocalNameq\u0000~\u0000\u001bL\u0000\fnamespaceURIq\u0000~\u0000\u001bxpq\u0000~\u0000\u001fq\u0000~\u0000\u001esr\u0000#com.sun.msv.grammar.SimpleNameClass\u0091\u00e9\u00f7\u008d\u00ab\u0010\u00aa\u00f5\u0002\u0000\u0002L\u0000\tlocalNameq\u0000~\u0000\u001bL\u0000\fnamespaceURIq\u0000~\u0000\u001bxr\u0000\u001dcom.sun.msv.grammar.NameClass\u009c}\u00d4kB\u00c7\tk\u0002\u0000\u0000xpt\u0000\u000brefine-textt\u0000\u0000sr\u00000com.sun.msv.grammar.Expression$EpsilonExpression\u0098v\u00e3\u0003Z\u00fex\u00ee\u0002\u0000\u0000xq\u0000~\u0000\u0003\u0000\u0000\u0000\tsq\u0000~\u0000\u0011\u0001psq\u0000~\u0000\u000b\u0000\u00d4\u0003\u0003ppsq\u0000~\u0000\r\u0000\u00d4\u0002\u00f8q\u0000~\u0000\u0012p\u0000sq\u0000~\u0000\u0013\u0000\u00d4\u0002\u00edppsr\u0000!com.sun.msv.datatype.xsd.LongType\u00e8A\u00fc\u001d>J\u00a1\u00c1\u0002\u0000\u0000xr\u0000+com.sun.msv.datatype.xsd.IntegerDerivedType\u0099\u00f1]\u0090&6k\u00be\u0002\u0000\u0000xq\u0000~\u0000\u0018q\u0000~\u0000\u001et\u0000\u0004longsr\u0000.com.sun.msv.datatype.xsd.WhiteSpaceProcessor$2\u0087z9\u00ee\u00f8,N\u0005\u0002\u0000\u0000xq\u0000~\u0000!q\u0000~\u0000$sq\u0000~\u0000%q\u0000~\u00005q\u0000~\u0000\u001esq\u0000~\u0000\'t\u0000\rmin-file-sizeq\u0000~\u0000+q\u0000~\u0000-sq\u0000~\u0000\u000b\u0000\u0093\u00bc\u00c8ppsq\u0000~\u0000\r\u0000\u0093\u00bc\u00bdq\u0000~\u0000\u0012p\u0000sq\u0000~\u0000\u0013\u0000\u0093\u00bc\u00b2ppsr\u0000\"com.sun.msv.datatype.xsd.ShortTypeA\u00f4&`\u00e1\u00b78$\u0002\u0000\u0000xq\u0000~\u00003q\u0000~\u0000\u001et\u0000\u0005shortq\u0000~\u00007q\u0000~\u0000$sq\u0000~\u0000%q\u0000~\u0000@q\u0000~\u0000\u001esq\u0000~\u0000\'t\u0000\u000fmin-host-ratingq\u0000~\u0000+q\u0000~\u0000-sq\u0000~\u0000\u000b\u0000\u008f=Mppsq\u0000~\u0000\r\u0000\u008f=Bq\u0000~\u0000\u0012p\u0000sq\u0000~\u0000\u0013\u0000\u008f=7ppsr\u0000 com.sun.msv.datatype.xsd.IntType\u00bel\u00b6\u0018\u00b0\u0014\u00e4\u0014\u0002\u0000\u0000xq\u0000~\u00003q\u0000~\u0000\u001et\u0000\u0003intq\u0000~\u00007q\u0000~\u0000$sq\u0000~\u0000%q\u0000~\u0000Iq\u0000~\u0000\u001esq\u0000~\u0000\'t\u0000\u000emin-host-speedq\u0000~\u0000+q\u0000~\u0000-sq\u0000~\u0000\u000b\u0000\u00d4\u0003\u0003ppsq\u0000~\u0000\r\u0000\u00d4\u0002\u00f8q\u0000~\u0000\u0012p\u0000q\u0000~\u00001sq\u0000~\u0000\'t\u0000\u000elast-time-usedq\u0000~\u0000+q\u0000~\u0000-sr\u0000 com.sun.msv.grammar.AttributeExp0\rR\n\u00c7L\n\u0099\u0002\u0000\u0002L\u0000\u0003expq\u0000~\u0000\u0002L\u0000\tnameClassq\u0000~\u0000\u000exq\u0000~\u0000\u0003\u0000\u00e2\u00f6\u001cppq\u0000~\u0000\u0016sq\u0000~\u0000\'t\u0000\u0004nameq\u0000~\u0000+sq\u0000~\u0000\u000b\u00027\u00cbZppsq\u0000~\u0000Q\u00027\u00cbOq\u0000~\u0000\u0012psq\u0000~\u0000\u0013\u0000\u00db8\u00b4ppsr\u0000)com.sun.msv.datatype.xsd.EnumerationFacetp\u008f\u0089\u001d\u0098\u00c5.\u007f\u0002\u0000\u0001L\u0000\u0006valuest\u0000\u000fLjava/util/Set;xr\u00009com.sun.msv.datatype.xsd.DataTypeWithValueConstraintFacet\"\u00a7Ro\u00ca\u00c7\u008aT\u0002\u0000\u0000xr\u0000*com.sun.msv.datatype.xsd.DataTypeWithFacet\u00f4\u00cf\u00e6D\u00b4\u00a8k\u0000\u0002\u0000\u0005Z\u0000\fisFacetFixedZ\u0000\u0012needValueCheckFlagL\u0000\bbaseTypet\u0000)Lcom/sun/msv/datatype/xsd/XSDatatypeImpl;L\u0000\fconcreteTypet\u0000\'Lcom/sun/msv/datatype/xsd/ConcreteType;L\u0000\tfacetNameq\u0000~\u0000\u001bxq\u0000~\u0000\u001aq\u0000~\u0000+t\u0000\fXJBMediaTypeq\u0000~\u0000\"\u0000\u0000q\u0000~\u0000\u001dq\u0000~\u0000\u001dt\u0000\u000benumerationsr\u0000\u0011java.util.HashSet\u00baD\u0085\u0095\u0096\u00b8\u00b74\u0003\u0000\u0000xpw\f\u0000\u0000\u0000\u0010?@\u0000\u0000\u0000\u0000\u0000\u0004t\u0000\u0005audiot\u0000\u0005videot\u0000\u0007programt\u0000\u0003anyxq\u0000~\u0000$sq\u0000~\u0000%t\u0000\u000estring-derivedq\u0000~\u0000+sq\u0000~\u0000\'t\u0000\nmedia-typeq\u0000~\u0000+q\u0000~\u0000-sr\u0000\"com.sun.msv.grammar.ExpressionPool\u00e5\u00f3J;\u00cd]^\u00f8\u0002\u0000\u0001L\u0000\bexpTablet\u0000/Lcom/sun/msv/grammar/ExpressionPool$ClosedHash;xpsr\u0000-com.sun.msv.grammar.ExpressionPool$ClosedHash\u00d7j\u00d0N\u00ef\u00e8\u00ed\u001c\u0002\u0000\u0004I\u0000\u0005countI\u0000\tthresholdL\u0000\u0006parentq\u0000~\u0000l[\u0000\u0005tablet\u0000![Lcom/sun/msv/grammar/Expression;xp\u0000\u0000\u0000\f\u0000\u0000\u00009pur\u0000![Lcom.sun.msv.grammar.Expression;\u00d68D\u00c3]\u00ad\u00a7\n\u0002\u0000\u0000xp\u0000\u0000\u0000\u00bfppppppppppppppppppppppppppppppppppppppq\u0000~\u0000\u0005ppppppq\u0000~\u0000\tq\u0000~\u0000\u0007ppppppppppppppppppq\u0000~\u0000\u0006pppppppq\u0000~\u0000Dppppppppppppppppppq\u0000~\u0000\npppppppppppppppq\u0000~\u0000/q\u0000~\u0000Mpppppppppppppq\u0000~\u0000\bpppppppppppppppq\u0000~\u0000;pppppppppppppppppppq\u0000~\u0000Uppppppppppq\u0000~\u0000\fpppppppppppppppppppp");

    public short getMinHostRating() {
        return _MinHostRating;
    }

    public void setMinHostRating(short value) {
        _MinHostRating = value;
        has_MinHostRating = true;
    }

    public int getMinHostSpeed() {
        return _MinHostSpeed;
    }

    public void setMinHostSpeed(int value) {
        _MinHostSpeed = value;
        has_MinHostSpeed = true;
    }

    public long getLastTimeUsed() {
        return _LastTimeUsed;
    }

    public void setLastTimeUsed(long value) {
        _LastTimeUsed = value;
        has_LastTimeUsed = true;
    }

    public String getName() {
        return _Name;
    }

    public void setName(String value) {
        _Name = value;
    }

    public phex.xml.XJBMediaType getMediaType() {
        if (_MediaType == null) {
            return phex.xml.XJBMediaType.ANY;
        } else {
            return _MediaType;
        }
    }

    public void setMediaType(phex.xml.XJBMediaType value) {
        _MediaType = value;
    }

    public long getMinFileSize() {
        return _MinFileSize;
    }

    public void setMinFileSize(long value) {
        _MinFileSize = value;
        has_MinFileSize = true;
    }

    public String getRefineText() {
        return _RefineText;
    }

    public void setRefineText(String value) {
        _RefineText = value;
    }

    public com.sun.xml.bind.unmarshaller.ContentHandlerEx getUnmarshaller(com.sun.xml.bind.unmarshaller.UnmarshallingContext context) {
        return new phex.xml.impl.XJBSearchFilterImpl.Unmarshaller(context);
    }

    public Class getPrimaryInterfaceClass() {
        return PRIMARY_INTERFACE_CLASS;
    }

    public void serializeElements(com.sun.xml.bind.serializer.XMLSerializer context)
        throws org.xml.sax.SAXException
    {
        if (_RefineText!= null) {
            context.startElement("", "refine-text");
            context.endAttributes();
            context.text(((String) _RefineText));
            context.endElement();
        }
        if (has_MinFileSize) {
            context.startElement("", "min-file-size");
            context.endAttributes();
            context.text(com.sun.msv.datatype.xsd.LongType.save(((Long) new java.lang.Long(_MinFileSize))));
            context.endElement();
        }
        if (has_MinHostRating) {
            context.startElement("", "min-host-rating");
            context.endAttributes();
            context.text(com.sun.msv.datatype.xsd.ShortType.save(((Short) new java.lang.Short(_MinHostRating))));
            context.endElement();
        }
        if (has_MinHostSpeed) {
            context.startElement("", "min-host-speed");
            context.endAttributes();
            context.text(com.sun.msv.datatype.xsd.IntType.save(((Integer) new java.lang.Integer(_MinHostSpeed))));
            context.endElement();
        }
        if (has_LastTimeUsed) {
            context.startElement("", "last-time-used");
            context.endAttributes();
            context.text(com.sun.msv.datatype.xsd.LongType.save(((Long) new java.lang.Long(_LastTimeUsed))));
            context.endElement();
        }
    }

    public void serializeAttributes(com.sun.xml.bind.serializer.XMLSerializer context)
        throws org.xml.sax.SAXException
    {
        context.startAttribute("", "name");
        context.text(((String) _Name));
        context.endAttribute();
        if (_MediaType!= null) {
            context.startAttribute("", "media-type");
            context.text(((phex.xml.XJBMediaType) _MediaType).toString());
            context.endAttribute();
        }
    }

    public void serializeAttributeBodies(com.sun.xml.bind.serializer.XMLSerializer context)
        throws org.xml.sax.SAXException
    {
    }

    public Class getPrimaryInterface() {
        return (phex.xml.XJBSearchFilter.class);
    }

    public com.sun.msv.verifier.DocumentDeclaration createRawValidator() {
        return new com.sun.msv.verifier.regexp.REDocumentDeclaration(schemaFragment);
    }

    public class Unmarshaller
        extends com.sun.xml.bind.unmarshaller.ContentHandlerEx
    {


        public Unmarshaller(com.sun.xml.bind.unmarshaller.UnmarshallingContext context) {
            super(context, "---------------");
        }

        protected com.sun.xml.bind.unmarshaller.UnmarshallableObject owner() {
            return phex.xml.impl.XJBSearchFilterImpl.this;
        }

        public void enterElement(String ___uri, String ___local, org.xml.sax.Attributes __atts)
            throws com.sun.xml.bind.unmarshaller.UnreportedException
        {
            switch (state) {
                case  0 :
                    if ("".equals(___uri)&&"min-file-size".equals(___local)) {
                        context.pushAttributes(__atts);
                        state = 11;
                        return ;
                    }
                    if ("".equals(___uri)&&"min-host-rating".equals(___local)) {
                        context.pushAttributes(__atts);
                        state = 5;
                        return ;
                    }
                    if ("".equals(___uri)&&"refine-text".equals(___local)) {
                        context.pushAttributes(__atts);
                        state = 1;
                        return ;
                    }
                    if ("".equals(___uri)&&"min-host-speed".equals(___local)) {
                        context.pushAttributes(__atts);
                        state = 13;
                        return ;
                    }
                    if ("".equals(___uri)&&"last-time-used".equals(___local)) {
                        context.pushAttributes(__atts);
                        state = 7;
                        return ;
                    }
                    revertToParentFromEnterElement(___uri, ___local, __atts);
                    return ;
            }
            super.enterElement(___uri, ___local, __atts);
        }

        public void leaveElement(String ___uri, String ___local)
            throws com.sun.xml.bind.unmarshaller.UnreportedException
        {
            switch (state) {
                case  0 :
                    revertToParentFromLeaveElement(___uri, ___local);
                    return ;
                case  2 :
                    if ("".equals(___uri)&&"refine-text".equals(___local)) {
                        context.popAttributes();
                        goto0();
                        return ;
                    }
                    break;
                case  12 :
                    if ("".equals(___uri)&&"min-file-size".equals(___local)) {
                        context.popAttributes();
                        goto0();
                        return ;
                    }
                    break;
                case  14 :
                    if ("".equals(___uri)&&"min-host-speed".equals(___local)) {
                        context.popAttributes();
                        goto0();
                        return ;
                    }
                    break;
                case  8 :
                    if ("".equals(___uri)&&"last-time-used".equals(___local)) {
                        context.popAttributes();
                        goto0();
                        return ;
                    }
                    break;
                case  6 :
                    if ("".equals(___uri)&&"min-host-rating".equals(___local)) {
                        context.popAttributes();
                        goto0();
                        return ;
                    }
                    break;
            }
            super.leaveElement(___uri, ___local);
        }

        public void enterAttribute(String ___uri, String ___local)
            throws com.sun.xml.bind.unmarshaller.UnreportedException
        {
            switch (state) {
                case  0 :
                    if ("".equals(___uri)&&"name".equals(___local)) {
                        state = 9;
                        return ;
                    }
                    if ("".equals(___uri)&&"media-type".equals(___local)) {
                        state = 3;
                        return ;
                    }
                    revertToParentFromEnterAttribute(___uri, ___local);
                    return ;
            }
            super.enterAttribute(___uri, ___local);
        }

        public void leaveAttribute(String ___uri, String ___local)
            throws com.sun.xml.bind.unmarshaller.UnreportedException
        {
            switch (state) {
                case  0 :
                    revertToParentFromLeaveAttribute(___uri, ___local);
                    return ;
                case  10 :
                    if ("".equals(___uri)&&"name".equals(___local)) {
                        goto0();
                        return ;
                    }
                    break;
                case  4 :
                    if ("".equals(___uri)&&"media-type".equals(___local)) {
                        goto0();
                        return ;
                    }
                    break;
            }
            super.leaveAttribute(___uri, ___local);
        }

        public void text(String value)
            throws com.sun.xml.bind.unmarshaller.UnreportedException
        {
            try {
                switch (state) {
                    case  0 :
                        revertToParentFromText(value);
                        return ;
                    case  5 :
                        _MinHostRating = com.sun.msv.datatype.xsd.ShortType.load(com.sun.xml.bind.WhiteSpaceProcessor.collapse(value)).shortValue();
                        has_MinHostRating = true;
                        state = 6;
                        return ;
                    case  9 :
                        _Name = value;
                        state = 10;
                        return ;
                    case  11 :
                        _MinFileSize = com.sun.msv.datatype.xsd.LongType.load(com.sun.xml.bind.WhiteSpaceProcessor.collapse(value)).longValue();
                        has_MinFileSize = true;
                        state = 12;
                        return ;
                    case  7 :
                        _LastTimeUsed = com.sun.msv.datatype.xsd.LongType.load(com.sun.xml.bind.WhiteSpaceProcessor.collapse(value)).longValue();
                        has_LastTimeUsed = true;
                        state = 8;
                        return ;
                    case  13 :
                        _MinHostSpeed = com.sun.msv.datatype.xsd.IntType.load(com.sun.xml.bind.WhiteSpaceProcessor.collapse(value)).intValue();
                        has_MinHostSpeed = true;
                        state = 14;
                        return ;
                    case  1 :
                        _RefineText = value;
                        state = 2;
                        return ;
                    case  3 :
                        _MediaType = phex.xml.XJBMediaType.parse(value);
                        state = 4;
                        return ;
                }
            } catch (RuntimeException e) {
                handleUnexpectedTextException(value, e);
            }
        }

        private void goto0()
            throws com.sun.xml.bind.unmarshaller.UnreportedException
        {
            int idx;
            state = 0;
            idx = context.getAttribute("", "name");
            if (idx >= 0) {
                context.consumeAttribute(idx);
                return ;
            }
            idx = context.getAttribute("", "media-type");
            if (idx >= 0) {
                context.consumeAttribute(idx);
                return ;
            }
        }

    }

}
