File: //proc/self/root/lib/python3/dist-packages/wadllib/__pycache__/application.cpython-38.pyc
U
��Q[�� �
@ s� d Z eZddddddddd d
g
ZddlZdd
lmZ ddlZddlZddl Z ddl
Z
ddlZddlZzddl
mZ W n ek
r� ddlmZ Y nX ddlm mZ ddlmZmZ ddlmZmZ ddlmZ dZdZdd� Zdd� Z dd� Z!G dd
� d
e"�Z#G dd� de#�Z$G dd� de#�Z%G dd� de&�Z'G d d!� d!�Z(G d"d#� d#e'�Z)G d$d� de)�Z*G d%d� de'�Z+G d&d'� d'e'e(�Z,G d(d� de(�Z-G d)d� de)e(�Z.G d*d� de'�Z/G d+d,� d,e'�Z0G d-d� de)�Z1G d.d � d e'�Z2G d/d� de'�Z3dS )0a� Navigate the resources exposed by a web service.
The wadllib library helps a web client navigate the resources
exposed by a web service. The service defines its resources in a
single WADL file. wadllib parses this file and gives access to the
resources defined inside. The client code can see the capabilities of
a given resource and make the corresponding HTTP requests.
If a request returns a representation of the resource, the client can
bind the string representation to the wadllib Resource object.
�Application�Link�Method�NoBoundRepresentationError� Parameter�RepresentationDefinition�ResponseDefinition�Resource�ResourceType� WADLError� N)�quote)� urlencode)�URI�merge)�
_make_unicode�
_string_types)�iso_strptimez xmlns:mapz http://www.w3.org/2001/XMLSchemac C s d| S )z)Scope a tag name with the WADL namespace.z&{http://research.sun.com/wadl/2006/10}� �Ztag_namer r �5/usr/lib/python3/dist-packages/wadllib/application.py�wadl_tagE s r c C s dt | � S )z#Turn a tag name into an XPath path.z./)r r r r r �
wadl_xpathJ s r c G s$ i }| D ]}|dk r|� |� q|S )z<Merge any number of dictionaries, some of which may be None.N)�update)Zdicts�final�dictr r r �_merge_dictsO s
r c @ s e Zd ZdZdS )r
zAAn exception having to do with the state of the WADL application.N��__name__�
__module__�__qualname__�__doc__r r r r r
X s c @ s e Zd ZdZdS )r aA An unbound resource was used where wadllib expected a bound resource.
To obtain the value of a resource's parameter, you first must bind
the resource to a representation. Otherwise the resource has no
idea what the value is and doesn't even know if you've given it a
parameter name that makes sense.
Nr r r r r r ] s c @ s e Zd ZdZdS )�UnsupportedMediaTypeErrorz�A media type was given that's not supported in this context.
A resource can only be bound to media types it has representations
of.
Nr r r r r r! g s r! c @ s e Zd ZdZdS )�WADLBasez?A base class for objects that contain WADL-derived information.Nr r r r r r"