Ñò ÅEBMc@sjddkZddkZddkZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS(iÿÿÿÿNtWeaveStorageExceptioncBs&eZdd„Zd„Zd„ZRS(cCs||_||_dS(N(tvaluetnested(tselfRtnestedException((s$/usr/local/www/weave/storage_base.pyt__init__ s cCs d|iS(Ns(R(R((s$/usr/local/www/weave/storage_base.pyt__repr__ scCs|iS(N(R(R((s$/usr/local/www/weave/storage_base.pyt__str__sN(t__name__t __module__tNoneRRR(((s$/usr/local/www/weave/storage_base.pyRs  tWeaveStorageBasecBs\eZdZd„Zdd„Zd„Zd„Zd„Zddd„Z ddd„Z RS( sAThe required interface that storage implementations must provide.cCs tƒ‚dS(N(tNotImplementedException(Rtname((s$/usr/local/www/weave/storage_base.pyt get_contextscCs tƒ‚dS(N(R (Rtcontextt collectiontidtquery((s$/usr/local/www/weave/storage_base.pytgetscCs tƒ‚dS(N(R (RRR((s$/usr/local/www/weave/storage_base.pytcollection_modification_datescCs tƒ‚dS(N(R (RR((s$/usr/local/www/weave/storage_base.pytcollection_timestampsscCs tƒ‚dS(N(R (RR((s$/usr/local/www/weave/storage_base.pytcollection_counts"scCs tƒ‚dS(N(R (RRRtitemRR((s$/usr/local/www/weave/storage_base.pyt add_or_modify%scCs tƒ‚dS(N(R (RRRRR((s$/usr/local/www/weave/storage_base.pytdelete(sN( RR t__doc__RR RRRRRR(((s$/usr/local/www/weave/storage_base.pyR s     tWBOcBsSeZdZdddddddd„Zd„Zd„Zd„Zed„Z RS(sÎRepresents a single object that is stored in a storage engine. The name is inappropriately connected to the idea of a web browser object, since there's nothing web-browser-ish about this implementation.c Csª|oit|ƒtjpt|ƒtjoti|ƒ}nd|_d|jop|d}t|ƒtjpt|ƒtjpt|ƒ}nt|ƒdjotdƒ‚n||_nd|_ d|_ d|_ d|_ d|_ d|joS|d}t|ƒtjo)t|ƒtjoti|ƒ|_ qS||_ n|i|dd|jƒn7||_||_ ||_ ||_ ||_ ||_ dS(sÄCan take either a 'data', which is a JSON-formatted blob (or the dict resulting from same), or a bunch of named parameters. Messy to take both signatures through the constructor. Refactor.Ri@sIllegal id valuetpayloadtupdateModifiedDateN(ttypetstrtunicodetjsontloadsR RtlenRtparentidt predecessoridt sortindexRtmodifiedtdumpstupdate( RtdataRR$R%R&RR't payloadObj((s$/usr/local/www/weave/storage_base.pyR4s8&   &        &      cCs±h}|i|d<|io|i|dt|dƒdjotdƒ‚n|d|_t}nd|jo8t|dƒdjotdƒ‚n|d|_nd|joä|d}t|ƒtjo*|djotdƒ‚n||_qt|ƒtjpt|ƒt jost|ƒd jotdƒ‚nyt|ƒ|_Wq}ytt |ƒƒ|_Wqytdƒ‚qyXq}Xqn|ott i ƒd ƒ|_ ndS( NR$i@sIllegal parentid valueR%sIllegal predecessorid valueR&IÿçvHsIllegal sortindex valuei id( R#RR$tTrueR%RtintR&RR R,ttimeR'(RtfromMapRtval((s$/usr/local/www/weave/storage_base.pyR)os6        &N( RR RR RR.RRtFalseR)(((s$/usr/local/www/weave/storage_base.pyR,s *  (R1R!tloggingt ExceptionRtobjectR R(((s$/usr/local/www/weave/storage_base.pyts