Ë
    4Ysh	  ã                   ó¼   — d Z ddlmZmZmZ ddlmZ ddlmZm	Z	 ddl
mZmZ ddlmZ ddlmZ i dfd	„Zi i dfd
„Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)za
Code for tying SPARQL Engine into RDFLib

These should be automatically registered with RDFLib

é    )Ú	ProcessorÚResultÚUpdateProcessor)ÚQuery)Ú
parseQueryÚparseUpdate)ÚtranslateQueryÚtranslateUpdate)Ú	evalQuery)Ú
evalUpdateNc                 óF   — t        t        | «      ||«      }| ||f|_        |S )z,
    Parse and translate a SPARQL Query
    )r	   r   Ú_original_args)ÚqueryStringÚinitNsÚbaseÚrets       ú/var/www/sten-cake5-migrate2.hellocrow.space/lexinfo-master/env/lib/python3.12/site-packages/rdflib/plugins/sparql/processor.pyÚprepareQueryr      s+   € ô œ KÓ0°$¸Ó
?€CØ% v¨tÐ4€CÔØ€Jó    c                 óF   — t        | t        t        |«      ||«      |«       y)zf
    Process a SPARQL Update Request
    returns Nothing on success or raises Exceptions on error
    N)r   r
   r   )ÚgraphÚupdateStringÚinitBindingsr   r   s        r   ÚprocessUpdater      s!   € ô
 ØŒœ{¨<Ó8¸$ÀÓGÈõr   c                   ó   — e Zd Zd„ Zy)ÚSPARQLResultc                 óæ   — t        j                  | |d   «       |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        |j                  d«      | _        y )NÚtype_Úvars_ÚbindingsÚ	askAnswerr   )r   Ú__init__ÚgetÚvarsr    r!   r   )ÚselfÚress     r   r"   zSPARQLResult.__init__(   sT   € Ü‰˜˜c '™lÔ+Ø—G‘G˜GÓ$ˆŒ	ØŸ™ 
Ó+ˆŒØŸ™ Ó-ˆŒØ—W‘W˜WÓ%ˆ
r   N)Ú__name__Ú
__module__Ú__qualname__r"   © r   r   r   r   '   s   „ ó&r   r   c                   ó   — e Zd Zd„ Zi i fd„Zy)ÚSPARQLUpdateProcessorc                 ó   — || _         y ©N©r   ©r%   r   s     r   r"   zSPARQLUpdateProcessor.__init__1   ó	   € Øˆ
r   c                 ó|   — t        |t        «      rt        t        |«      |¬«      }t	        | j
                  ||«      S )N)r   )Ú
isinstanceÚstrr
   r   r   r   )r%   Ú
strOrQueryr   r   s       r   ÚupdatezSPARQLUpdateProcessor.update4   s0   € Üj¤#Ô&Ü(¬°ZÓ)@ÈÔPˆJä˜$Ÿ*™* j°,Ó?Ð?r   N)r'   r(   r)   r"   r6   r*   r   r   r,   r,   0   s   „ òð /1¸ô @r   r,   c                   ó"   — e Zd Zd„ Zi i ddfd„Zy)ÚSPARQLProcessorc                 ó   — || _         y r.   r/   r0   s     r   r"   zSPARQLProcessor.__init__<   r1   r   NFc                 óˆ   — t        |t        «      st        |«      }t        |||«      }n|}t	        | j
                  |||«      S )zß
        Evaluate a query with the given initial bindings, and initial
        namespaces. The given base is used to resolve relative URIs in
        the query and will be overridden by any BASE given in the query.
        )r3   r   r   r	   r   r   )r%   r5   r   r   r   ÚDEBUGÚ	parsetreeÚquerys           r   r=   zSPARQLProcessor.query?   s@   € ô ˜*¤eÔ,Ü" :Ó.ˆIÜ" 9¨d°FÓ;‰EàˆEÜ˜Ÿ™ U¨L¸$Ó?Ð?r   )r'   r(   r)   r"   r=   r*   r   r   r8   r8   ;   s   „ òð .0¸ÀÈUô @r   r8   )Ú__doc__Úrdflib.queryr   r   r   Úrdflib.plugins.sparql.sparqlr   Úrdflib.plugins.sparql.parserr   r   Úrdflib.plugins.sparql.algebrar	   r
   Úrdflib.plugins.sparql.evaluater   Úrdflib.plugins.sparql.updater   r   r   r   r,   r8   r*   r   r   ú<module>rE      sc   ðñ÷ <Ñ ;å .ç @ß Iå 4Ý 3ð &(¨dó ð 57¸rÈó ô&6ô &ô@˜Oô @ô@iõ @r   