mò Dã¸Ec@sûdZdkZdkZdfd„ƒYZeƒZdfd„ƒYZdfd„ƒYZdefd „ƒYZd efd „ƒYZd efd „ƒYZ defd„ƒYZ dfd„ƒYZ dfd„ƒYZ de fd„ƒYZ d„ZdS(s+Objects that can describe a ZConfig schema.NtUnboundedThingcBsStZeZfZd„Zd„Zd„Zd„Zd„Z d„Z d„Z RS(NcCstS(N(tFalse(tselftother((t+/data/zmath/zope/lib/python/ZConfig/info.pyt__lt__scCst||iƒS(N(t isinstanceRRt __class__(RR((Rt__le__scCstS(N(tTrue(RR((Rt__gt__scCstS(N(R (RR((Rt__ge__"scCst||iƒS(N(RRRR(RR((Rt__eq__%scCst||iƒ S(N(RRRR(RR((Rt__ne__(scCsdS(Ns ((R((Rt__repr__+s( t__name__t __module__ttypet __metaclass__t __slots__RRR R R R R(((RRs      t ValueInfocBs&tZeZdZd„Zd„ZRS(NtvaluetpositioncCs||_||_dS(N(RRR(RRR((Rt__init__5s cCsHy||iƒSWn0tj o$}ti||i|iƒ‚nXdS(N(tdatatypeRRt ValueErrortetZConfigtDataConversionErrorR(RRR((Rtconvert:s(svaluesposition(RRRRRRR(((RR1s tBaseInfocBsMtZdZeZeZeZd„Zd„Zd„Z d„Z d„Z RS(s-Information about a single configuration key.cCs¥|dj o^|djoQ|djotidƒ‚n|dj o ||jotidƒ‚qkn||_||_||_||_||_||_ dS(NismaxOccurs must be at least 1s$minOccurs must be at least maxOccurs( t maxOccurstNoneRt SchemaErrort minOccurstnameRRthandlert attribute(RR#RR"RR$R%((RRHs      cCs|ii}d||i fS(Ns <%s for %s>(RRRtclsnameR#(RR&((RRXs cCstS(N(R(R((Rt isabstract\scCs |idjS(Ni(RR(R((Rtismulti_scCstS(N(R(R((Rt issectionbs( RRt__doc__R t descriptiontexamplet metadefaultRRR'R(R)(((RRAs     t BaseKeyInfocBs>tZdZd„Zd„Zdd„Zd„Zd„ZRS(NcCs@|dj pt‚ti|||||||ƒt |_ dS(N( R"R tAssertionErrorRRRR#RRR$R%Rt _finished(RR#RR"RR$R%((RRjs cCs*|iotidƒ‚nt|_dS(Ns$cannot finish KeyInfo more than once(RR0RR!R (R((Rtfinishqs cCsš|iotidƒ‚n|idjo |djotidƒ‚n1|idjo |dj otidƒ‚n|it||ƒ|ƒdS(Ns-cannot add default values to finished KeyInfot+s)default values must be keyed for name='+'s unexpected key for default value( RR0RR!R#tkeyR t add_valueinfoRRR(RRRR3((Rt adddefaultws cCstdƒ‚dS(sHActually add a ValueInfo to this key-info object. The appropriate value of None-ness of key has already been checked with regard to the name of the key, and has been found permissible to add. This method is a requirement for subclasses, and should not be called by client code. s@add_valueinfo() must be implemented by subclasses of BaseKeyInfoN(tNotImplementedError(RtviR3((RR4„s cCsD|idjpt‚|idjo|i|_nh|_dS(NR2(RR#R/t _rawdefaultsR t_default(R((Rtprepare_raw_defaults‘s( RRR R8RR1R5R4R:(((RR.fs    tKeyInfocBs2tZdZd„Zd„Zd„Zd„ZRS(NcCs@ti||||d||ƒ|idjo h|_ndS(NiR2( R.RRR#RR"R$R%R9(RR#RR"R$R%((RRœs cCs||idjo<|ii|ƒotid| ƒ‚n||i|R3((Rtcomputedefault°s   cCsti|iƒS(N(tcopyRR9(R((Rt getdefault¶s(RRR R9RR4R@RB(((RR;˜s    t MultiKeyInfocBs,tZd„Zd„Zd„Zd„ZRS(NcCsIti|||||||ƒ|idjo h|_ n g|_ dS(NR2( R.RRR#RR"RR$R%R9(RR#RR"RR$R%((RR¿s   cCs`|idjo<||ijo|i|i|ƒq\|g|i|tvlistRRRR?R3R7R4(RR?R7R>R3RE((RR@Òs  cCsti|iƒS(N(RARR9(R((RRBÙs(RRRR4R@RB(((RRC½s t SectionInfocBs>tZd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCs—|djo>|djotidƒ‚n|ptidƒ‚qKn|iƒo d}n |i}t i |||||||ƒ||_dS(Nit*R2sEsections which can occur more than once must use a name of '*' or '+'sLsections which can occur more than once must specify a target attribute name(RGR2(RR#RR!R%t sectiontypeR'R RRRRR"R$(RR#RHR"RR$R%R((RRÞs     cCs'|ii}d||ii|i fS(Ns<%s for %s (%s)>(RRRR&RHR#(RR&((RRùs cCstS(N(R (R((RR)þscCs |idjS(NRG(RR#(R((Rt allowUnnamedscCsq|djp |djotSnL|idjo|otptSn&|idjotSn||ijSdS(NRGR2(R#RRR (RR#((Rt isAllowedNamescCs |idjogSndSdS(Ni(RRR (R((RRBs(RRRRR)RIRJRB(((RRFÝs      t AbstractTypecBsJtZeZd Zd„Zd„Zd„Zd„Zd„Z d „Z RS( Nt _subtypesR#R+cCsh|_||_d|_dS(N(RRLR#R R+(RR#((RRs  cCs||i|i|i }|i |iƒpd||i<|i |ƒq¡qJqJWq-W|iƒS(Ni(tdRR#tstacktpopReRXR3tciR)RHttR<RDRP(RReRpRmRqR3Rn((Rtgetrequiredtypesys       cCsÅx¥|iD]š\}}|oÐ||jo¿|iƒptid|ƒ‚n|i}|i ƒoKy|i |ƒ}Wq¯tij o"tid| | fƒ‚q¯Xn|i|jp"tid| |i fƒ‚n|Sq¤q |ii|jo4|p |i ƒpti| dƒ‚n|Sq |ii ƒo`|i}|i|jotidƒ‚ny|i |ƒ}Wntij oq¤X|Sq q Wtid||fƒ‚dS(Ns&section name %s already in use for keys'section type %s not allowed for name %ss%name %s must be used for a %s sections sections must be nameds+cannot define section with an abstract types4no matching section defined for type='%s', name='%s'(RRXR3ReR#R)RRkRHtstR'RORRI(RRR#ReR3Rs((Rtgetsectioninfoˆs:     $"   cCstS(N(R(R((RR'²s(RRRR_R`RbRdRfRhRjRlRrRtR'(((RRU7s          *t SchemaTypecBsbtZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z RS( NcCs>ti|d||||hƒh|_||_ ||_ dS(N( RURRR R?RVRRWt _componentsR$turl(RR?RVRR$RwRW((RR·s    cCsH|i}|ii|ƒotid|i ƒ‚n||i|