
    4Ysh1              
       	   U d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	m
Z
mZmZ ddlmZ ddlZddlmZmZmZmZmZmZmZmZmZmZ erdd	lmZ g d
Zeeeee	e
eedZi Zeee ee   f   df   e!d<    G d de      Z" ed      Z# G d dee#         Z$ G d de$e#         Z%de dee   fdZ&de dee#   dee#   fdZ'ejP                  dk  rddl)m*Z* nddl+m*Z*  e*       Z, e-e,d      rSej]                         D ]?  \  Z/Z0e,jc                  e/      D ]%  Z2 e%e2jf                  e0e2      ee2jf                  e0f<   ' A nRej]                         D ]?  \  Z/Z0e,jO                  e/g       D ]%  Z2 e%e2jf                  e0e2      ee2jf                  e0f<   ' A e	 ddee    dee#   dee$e#      fd       Z4eddee    dddee$   fd       Z4	 ddee    deee#      dee$   fdZ4 e&d ed!d"        e&d"ed!d"        e&d#ed!d#        e&d$ed%d&        e&d'ed(d)        e&d*ed+d*        e&d,ed-d,        e&d.ed-d.        e&d/ed0d1        e&d2ed0d1        e&d3ed0d4        e&d5ed6d7        e&d8ed6d7        e&d9ed:d;        e&d<ed:d;        e&d=ed:d;        e&d>ed?d@        e&dAedBdC        e&dDedBdC        e&dEedBdC        e&dFedBdG        e&dHedIdJ        e&dKedIdJ        e&dLedMdN        e&dOedMdN        e&dPedQdR        e&dSedQdR        e&dTedUdV        e&dWedUdV        e&dXedYdZ        e&d/ed[d\        e&d2ed[d\        e&d5ed]d^        e&d8ed]d^        e&d9ed]d_        e&d<ed]d_        e&d=ed]d_        e&dAed`da        e&dDed`da        e&dEed`da        e&dFed`da        e&dKedbdc        e&dHedbdc        e&dLeddde        e&dOeddde        e&dPedfdg        e&dSedfdg        e&dTedhdi        e&dWedhdi        e&dXedjdk        e&dledmdn        e&dle
dmdo        e&dledmdp        e&d2e	dqdr        e&dse	dqdr        e&dte	dudv        e&dwe	dxdy        e&dze	dxdy        e&d{e	d|d}        e&d~e	d|d}        e&d2edqd        e&dsedqd        e&dedqd        e&d/edd        e&dwedxd        e&dzedxd        e&d{ed|d        e&d~ed|d        e&dedd        e&dedd       y)a!  
Plugin support for rdf.

There are a number of plugin points for rdf: parser, serializer,
store, query processor, and query result. Plugins can be registered
either through setuptools entry_points or by calling
rdf.plugin.register directly.

If you have a package that uses a setuptools based setup.py you can add the
following to your setup::

    entry_points = {
        'rdf.plugins.parser': [
            'nt =     rdf.plugins.parsers.ntriples:NTParser',
            ],
        'rdf.plugins.serializer': [
            'nt =     rdf.plugins.serializers.NTSerializer:NTSerializer',
            ],
        }

See the `setuptools dynamic discovery of services and plugins`__ for more
information.

.. __: http://peak.telecommunity.com/DevCenter/setuptools#dynamic-discovery-of-services-and-plugins

    )Store)Parser)
Serializer)ResultParserResultSerializer	ProcessorResultUpdateProcessor)ErrorN)
TYPE_CHECKINGAnyDictGenericIteratorOptionalTupleTypeTypeVaroverload)
EntryPoint)registergetpluginsPluginExceptionPlugin	PKGPlugin)zrdf.plugins.storezrdf.plugins.serializerzrdf.plugins.parserzrdf.plugins.resultparserzrdf.plugins.resultserializerzrdf.plugins.queryprocessorzrdf.plugins.queryresultzrdf.plugins.updateprocessorr   _pluginsc                       e Zd Zy)r   N)__name__
__module____qualname__     m/var/www/sten-cake5-migrate2.hellocrow.space/lexinfo-master/env/lib/python3.12/site-packages/rdflib/plugin.pyr   r   H   s    r#   r   PluginTc                   <    e Zd Zdedee   dedefdZdee   fdZy)	r   namekindmodule_path
class_namec                 J    || _         || _        || _        || _        d | _        y N)r'   r(   r)   r*   _class)selfr'   r(   r)   r*   s        r$   __init__zPlugin.__init__P   s(     		&$/3r#   returnc                     | j                   Dt        | j                  t               t	               dg      }t        || j                        | _         | j                   S )N )r-   
__import__r)   globalslocalsgetattrr*   )r.   modules     r$   getClasszPlugin.getClassY   sD    ;; 0 0')VXtLF!&$//:DK{{r#   Nr   r    r!   strr   r%   r/   r8   r"   r#   r$   r   r   O   s;    44#G}4;>4LO4$w- r#   c                   8    e Zd Zdedee   ddfdZdee   fdZy)	r   r'   r(   epr   c                 <    || _         || _        || _        d | _        y r,   )r'   r(   r<   r-   )r.   r'   r(   r<   s       r$   r/   zPKGPlugin.__init__a   s    		/3r#   r0   c                 p    | j                   | j                  j                         | _         | j                   S r,   )r-   r<   load)r.   s    r$   r8   zPKGPlugin.getClassg   s'    ;;'',,.DK{{r#   Nr9   r"   r#   r$   r   r   `   s0    4S 4W 4< 4$w- r#   r   r'   r(   c                 6    t        | |||      }|t        | |f<   y)zx
    Register the plugin for (name, kind). The module_path and
    class_name should be the path to a plugin class.
    N)r   r   )r'   r(   r)   r*   ps        r$   r   r   m   s"    
 	tT;
3AHdD\r#   r0   c                 x    	 t         | |f   }|j                         S # t        $ r t        d| d|d      w xY w)zk
    Return the class for the specified (name, kind). Raises a
    PluginException if unable to do so.
    zNo plugin registered for (z, ))r   KeyErrorr   r8   r'   r(   rA   s      r$   r   r   v   sG    
R%tTl3 ::<  RT4PQQRs    9)      )entry_pointsselect)groupc                      y r,   r"   r'   r(   s     r$   r   r      s     r#   c                      y r,   r"   rL   s     r$   r   r      s    r#   c              #      K   t         j                         D ]*  }| | |j                  k(  s|||j                  k(  s'| , yw)zk
    A generator of the plugins.

    Pass in name and kind to filter... else leave None to match all.
    N)r   valuesr'   r(   rE   s      r$   r   r      s@      __ LDAFFNGs   )AAAdefaultzrdflib.plugins.stores.memoryMemorySimpleMemory	Auditablezrdflib.plugins.stores.auditableAuditableStore
Concurrentz rdflib.plugins.stores.concurrentConcurrentStore
BerkeleyDBz rdflib.plugins.stores.berkeleydbSPARQLStorez!rdflib.plugins.stores.sparqlstoreSPARQLUpdateStorezapplication/rdf+xmlz!rdflib.plugins.serializers.rdfxmlXMLSerializerxmlz
pretty-xmlPrettyXMLSerializerztext/n3zrdflib.plugins.serializers.n3N3Serializern3ztext/turtlez!rdflib.plugins.serializers.turtleTurtleSerializerturtlettl
longturtlez%rdflib.plugins.serializers.longturtleLongTurtleSerializerzapplication/n-tripleszrdflib.plugins.serializers.ntNTSerializerntriplesntnt11NT11Serializerzjson-ldz!rdflib.plugins.serializers.jsonldJsonLDSerializerzapplication/ld+jsonzapplication/n-quadsz!rdflib.plugins.serializers.nquadsNQuadsSerializernquadszapplication/trixzrdflib.plugins.serializers.trixTriXSerializertrixzapplication/trigzrdflib.plugins.serializers.trigTrigSerializertrighextzrdflib.plugins.serializers.hextHextuplesSerializerzrdflib.plugins.parsers.rdfxmlRDFXMLParserz rdflib.plugins.parsers.notation3N3ParserTurtleParserzrdflib.plugins.parsers.ntriplesNTParserzrdflib.plugins.parsers.jsonldJsonLDParserzrdflib.plugins.parsers.nquadsNQuadsParserzrdflib.plugins.parsers.trix
TriXParserzrdflib.plugins.parsers.trig
TrigParserzrdflib.plugins.parsers.hextHextuplesParsersparqlzrdflib.plugins.sparql.processorSPARQLResultSPARQLProcessorSPARQLUpdateProcessorz(rdflib.plugins.sparql.results.xmlresultsXMLResultSerializerzapplication/sparql-results+xmltxtz(rdflib.plugins.sparql.results.txtresultsTXTResultSerializerjsonz)rdflib.plugins.sparql.results.jsonresultsJSONResultSerializerzapplication/sparql-results+jsoncsvz(rdflib.plugins.sparql.results.csvresultsCSVResultSerializerztext/csvXMLResultParserz-application/sparql-results+xml; charset=UTF-8z#rdflib.plugins.sparql.results.graphGraphResultParserJSONResultParserCSVResultParsertsvz(rdflib.plugins.sparql.results.tsvresultsTSVResultParserztext/tab-separated-values)..)NN)5__doc__rdflib.storer   rdflib.parserr   rdflib.serializerr   rdflib.queryr   r   r   r	   r
   rdflib.exceptionsr   systypingr   r   r   r   r   r   r   r   r   r   pkg_resourcesr   __all__rdflib_entry_pointsr   r:   __annotations__r   r%   r   r   r   r   version_infoimportlib_metadatarH   importlib.metadataall_entry_pointshasattritemsentry_pointr(   rI   r<   r'   r   r"   r#   r$   <module>r      s  6    (  $ 
   (
R (  ,$4"+%#2	  35$uS$s)^$h.
/ 4	e 	 )
WW "
w 
3 d3i 	c 	g 	4= 	 f//> 
X&0668 ET")))< 	EB(1"''4(DHbggt_%	EE
 1668 ET"&&{B7 	EB(1"''4(DHbggt_%	EE
 
58
3-%)']fWo 
 
(3- T HV<L  

 AE

3-
&.tG}&=
f
 		"	 		"	 		"	 		%	 		&	 		&	 		'	 		'	 	'	 		'	 	'	 	#	 	#	 	'	 	'	 		'	 	+	 	#	 	#	 	#	 	
#	 	'	 	'	 	'	 	'	 	%	 	
%	 	%	 	
%	 	
%	 	
#	 		
#	 	
&	 	
&	 	
&	 	
&	 		
&	 	
%	 	
%	 	
%	 	

%	 	
#	 	
#	 	
#	 	
#	 	
!	 	

!	 	
!	 	

!	 	

!	 	
%	 	%	 	%	 		.	 	$.	 		.	 	
/	 	%/	 		.	 	.	 		.	 	$.	 	3.	 	)	 	
/	 	%/	 		.	 	.	 		.	 	.	r#   