
    01i                        S r SSKJr  SSKJrJrJrJrJrJ	r	  SSK
Jr  \(       a  SSKJr  S/r\" S\S9r " S	 S5      rg
)a  Serializer plugin interface.

The RDF serialization plugins used during
[RDFlib's common serialization of a graph][rdflib.graph.Graph.serialize]
is described in this module.

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

All builtin RDF Serializer are listed
under [`rdflib.plugins.serializers`][rdflib.plugins.serializers].
    )annotations)IOTYPE_CHECKINGAnyOptionalTypeVarUnion)URIRef)Graph
Serializer_StrT)boundc                  P    \ rS rSrSrSS jr  S	         S
S jjrSS jrSrg)r      z}Base class for RDF Serializer.

New Serializer can be registered as plugin as described
in [`rdflib.plugin`][rdflib.plugin].
c                ,    Xl         SU l        S U l        g )Nzutf-8)storeencodingbase)selfr   s     K/home/james-whalen/.local/lib/python3.13/site-packages/rdflib/serializer.py__init__Serializer.__init__$   s    !
$#'	    Nc                    g)a]  Abstract method. Print [Graph][rdflib.graph.Graph].
Used in [Graph.serialize][rdflib.graph.Graph.serialize]

Serialize Graph

Args:
    stream: The destination to serialize the graph to.
    base: The base IRI for formats that support it.
    encoding: Encoding of output.
    args: Additional arguments to pass to the Serializer that will be used.
N )r   streamr   r   argss        r   	serializeSerializer.serialize)   s    r   c                    U R                   nUb2  UR                  U5      (       a  [        UR                  USS5      5      nU$ )N    )r   
startswithr
   replace)r   urir   s      r   
relativizeSerializer.relativize<   s;    yyt 4 4T2q12C
r   )r   r   r   )r   r   )NN)
r   z	IO[bytes]r   Optional[str]r   r(   r   r   returnNone)r%   r   r)   zUnion[_StrT, URIRef])	__name__
__module____qualname____firstlineno____doc__r   r   r&   __static_attributes__r   r   r   r   r      sN    ( #"&	   	
  
&r   N)r/   
__future__r   typingr   r   r   r   r   r	   rdflib.termr
   rdflib.graphr   __all__strr   r   r   r   r   <module>r7      s=    # C C " .s#$ $r   