
    4Ysh                     R    d Z ddlmZmZmZ ddlmZ erddlmZ dgZ	 G d d      Z
y)aB  
Serializer plugin interface.

This module is useful for those wanting to write a serializer that can
plugin to rdflib. If you are wanting to invoke a serializer you likely
want to do so through the Graph class serialize method.

TODO: info for how to write a serializer that can plugin to rdflib.
See also rdflib.plugin

    )IOTYPE_CHECKINGOptional)URIRef)Graph
Serializerc            	       P    e Zd Zd
dZ	 	 ddee   dee   dee   ddfdZdefd	Z	y)r   c                 .    || _         d| _        d | _        y )Nzutf-8)storeencodingbase)selfr   s     q/var/www/sten-cake5-migrate2.hellocrow.space/lexinfo-master/env/lib/python3.12/site-packages/rdflib/serializer.py__init__zSerializer.__init__   s    #
$#'	    Nstreamr   r   returnc                      y)zAbstract methodN )r   r   r   r   argss        r   	serializezSerializer.serialize   s    r   uric                 |    | j                   }|-|j                  |      rt        |j                  |dd            }|S )N    )r   
startswithr   replace)r   r   r   s      r   
relativizezSerializer.relativize%   s8    yyt 4T2q12C
r   )r   r   )NN)
__name__
__module____qualname__r   r   bytesr   strr   r   r   r   r   r   r      sR    ( #"&	5	 sm 3-	 
c r   N)__doc__typingr   r   r   rdflib.termr   rdflib.graphr   __all__r   r   r   r   <module>r)      s,   
 / . ". r   