ó „%zSc@sgddlmZddlmZddlTdd d„ƒYZdd d„ƒYZdd d „ƒYZd S(i’’’’(tetree(tdump(t*t CpropertycBsVeZd dd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( tNAFcCs7||_|dkr*tjdƒ|_n ||_dS(Ntproperty(ttypetNoneRtElementtnode(tselfR R((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyt__init__s  cCs|jS(N(R (R ((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytget_nodescCsB|jdkr|jjdƒS|jdkr>|jjdƒSdS(NtKAFtpidRtid(RR tget(R ((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytget_idscCsH|jdkr"|jjd|ƒS|jdkrD|jjd|ƒSdS(NR RRR(RR tset(R R((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytset_idscCs|jjdƒS(Ntlemma(R R(R ((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytget_typescCs|jjd|ƒS(NR(R R(R tt((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytset_type!sccs,x%|jjdƒD]}t|ƒVqWdS(Nt references(R tfindallt Creferences(R tref_node((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytget_references$scCs|jj|jƒƒdS(N(R tappendR (R tref((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyt set_reference(sN( t__name__t __module__RR R RRRRRR(((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyRs      t CpropertiescBs2eZddd„Zd„Zd„Zd„ZRS(RcCs7||_|dkr*tjdƒ|_n ||_dS(Nt properties(RRRRR (R R R((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyR .s  cCs|jS(N(R (R ((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyR 5sccs2x+|jjdƒD]}t||jƒVqWdS(NR(R RRR(R t prop_node((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyt__iter__8sc Csątd|jƒ}|jj|jƒƒ|dkrŸg|D]}|jƒ^q;}d}d}x4tr•dt|ƒ}||krˆPn|d7}qbW|}n|j |ƒ|j |ƒt ƒ} | j |ƒ|j | ƒdS(NRittpi(RRR RR RRtTruetstrRRRtadd_spanR( R Rtlabelt term_spant new_propertyRt existing_pidstntnew_pidtnew_ref((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyt add_property<s"        N(R R!RR R R%R2(((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyR"-s  t CfeaturescBsMeZddd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS( RcCs7||_|dkr*tjdƒ|_n ||_dS(Ntfeatures(RRRRR (R R R((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyR Us  cCs|jS(N(R (R ((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyR \scCsV|jdkrRx@|jjdƒD])}|jd|jdƒƒ|jd=q"WndS(NRsproperties/propertyRR(RR RRRtattrib(R R ((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytto_kaf_scCsV|jdkrRx@|jjdƒD])}|jd|jdƒƒ|jd=q"WndS(NR sproperties/propertyRR(RR RRRR5(R R ((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytto_naffscCsx|jjdƒ}|dkrItd|jƒ}|jj|jƒƒntd|d|jƒ}|j|||ƒdS(NR#RR (R tfindRR"RRR R2(R RR+R,t node_propR#((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyR2ms  ccsM|jjdƒ}|dk rIt||jƒ}x|D] }|Vq7WndS(NR#(R R8RR"R(R R9tobj_propertiestprop((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytget_propertiesxs   cCs5|jjdƒ}|dk r1|jj|ƒndS(NR#(R R8Rtremove(R R9((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pytremove_propertiess N( R R!RR R R6R7R2R<R>(((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyR3Ts    N((((tlxmlRtlxml.objectifyRtreferences_dataRR"R3(((s7/tmp/tmphMOK1S/lib/python/KafNafParser/features_data.pyts  &'