
    4Ysh                     h    d dl mZmZmZmZ d dlmZmZ  ed      Z G d de      Z	 G d de      Z
y)	    )Graph	NamespaceRDFVariable)ResultResultParserz6http://www.w3.org/2001/sw/DataAccess/tests/result-set#c                       e Zd Zd Zy)RDFResultParserc                     t        |fi |S )N)	RDFResult)selfsourcekwargss      /var/www/sten-cake5-migrate2.hellocrow.space/lexinfo-master/env/lib/python3.12/site-packages/rdflib/plugins/sparql/results/rdfresults.pyparsezRDFResultParser.parse	   s    *6**    N)__name__
__module____qualname__r    r   r   r
   r
      s    +r   r
   c                       e Zd Zd Zy)r   c           
         t        |t              st               } |j                  |fi | n|}|j                  t        j
                  t        j                        }|d}t               }||z  }n'|j                  |t        j                        }|d}nd}t        j                  | |       |dk(  r|j                  |t        j                        D cg c]  }t        |       c}| _        g | _        |j                  |t        j                         D ]  }	i }
|j                  |	t        j"                        D ]L  }|j                  |t        j                        |
t        |j                  |t        j$                              <   N | j                  j'                  |
        y |dk(  r)j                  | _        |j                  t+        d      y |dk(  r| _        y y c c}w )N)	predicateobject	CONSTRUCTASKSELECTz Malformed boolean in ask answer!)
isinstancer   r   valuer   typeRS	ResultSetbooleanr   __init__objectsresultVariabler   varsbindingssolutionbindingvariableappend	askAnswer	Exceptiongraph)r   r   r   r/   rstype_gr-   vssolbs               r   r$   zRDFResult.__init__   s   &%(GEEKK)&)E[[388BLL[A :E AJA B

3I$ e$H.3mmB@Q@Q.RS!SDIDM]]2r{{3 *q"**5 AAF288BCQ!<=> $$S)* e^&__DN& BCC 'k!DJ " Ts   G'N)r   r   r   r$   r   r   r   r   r      s    .r   r   N)rdflibr   r   r   r   rdflib.queryr   r   r!   r
   r   r   r   r   <module>r9      s1    2 2 -GH+l +
/ /r   