
    Ki                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	  G d d      Z
 G d	 d
e
      Z G d de
      Z G d de      Zy)zJSONSchema spec readers module.    )Path)all_urls_handler)file_handler)SupportsRead)Schemac                   "    e Zd Zdeeef   fdZy)
BaseReaderreturnc                     t         N)NotImplementedErrorselfs    c/home/jay/workspace/scripts/.codegraph-venv/lib/python3.12/site-packages/jsonschema_path/readers.pyreadzBaseReader.read   s    !!    N)__name__
__module____qualname__tupler   strr    r   r   r	   r	      s    "eFCK( "r   r	   c                   .    e Zd ZdefdZdeeef   fdZy)
FileReaderfileobjc                     || _         y r   )r   )r   r   s     r   __init__zFileReader.__init__   s	    r   r
   c                 0    t        | j                        dfS )N )r   r   r   s    r   r   zFileReader.read   s    DLL)2--r   N)	r   r   r   r   r   r   r   r   r   r   r   r   r   r      s#     .eFCK( .r   r   c                   .    e Zd ZdefdZdeeef   fdZy)
PathReaderpathc                     || _         y r   )r"   )r   r"   s     r   r   zPathReader.__init__   s	    	r   r
   c                     | j                   j                         st        d| j                          | j                   j                         }t	        |      |fS )NzNo such file: )r"   is_fileOSErroras_urir   )r   uris     r   r   zPathReader.read   sJ    yy  "N499+677ii $c))r   N)	r   r   r   r   r   r   r   r   r   r   r   r   r!   r!      s#    T *eFCK( *r   r!   c                   $     e Zd Zdef fdZ xZS )FilePathReader	file_pathc                 V    t        |      j                         }t        |   |       y r   )r   absolutesuperr   )r   r+   r"   	__class__s      r   r   zFilePathReader.__init__%   s"    I'')r   )r   r   r   r   r   __classcell__)r/   s   @r   r*   r*   $   s    #  r   r*   N)__doc__pathlibr   jsonschema_path.handlersr   r   "jsonschema_path.handlers.protocolsr   jsonschema_path.typingr   r	   r   r!   r*   r   r   r   <module>r6      sE    %  5 1 ; )" "
. .	* 	*Z r   