ķ
Jc           @   sA   d  Z  d d l Td d l Td d l m Z d d d     YZ d S(   s+   
Provides filtered attribute list classes.
i˙˙˙˙(   t   *(   t	   Namespacet   AttrListc           B   s;   e  Z d  Z d   Z d   Z d   Z d   Z d   Z RS(   sÂ   
    A filtered attribute list.
    Items are included during iteration if they are in either the (xs) or
    (xml) namespaces.
    @ivar raw: The I{raw} attribute list.
    @type raw: list
    c         C   s   | |  _  d S(   sX   
        @param attributes: A list of attributes
        @type attributes: list
        N(   t   raw(   t   selft
   attributes(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/umx/attrlist.pyt   __init__"   s    c         c   s2   x+ |  j  D]  } |  j |  r% q
 n  | Vq
 Wd S(   sĄ   
        Get list of I{real} attributes which exclude xs and xml attributes.
        @return: A list of I{real} attributes.
        @rtype: I{generator}
        N(   R   t   skip(   R   t   a(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/umx/attrlist.pyt   real)   s     c         C   s+   d } x |  j    D] } | d 7} q W| S(   sŖ   
        Get the number of I{real} attributes which exclude xs and xml attributes.
        @return: A count of I{real} attributes. 
        @rtype: L{int}
        i    i   (   R	   (   R   t   nR   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/umx/attrlist.pyt   rlen3   s    c         C   s2   x+ |  j  D]  } | j   d k r) | j Sd SWd S(   s   
        Get list of I{filtered} attributes which exclude xs.
        @return: A list of I{filtered} attributes.
        @rtype: I{generator}
        s   xml:langN(   R   t   qnamet   valuet   None(   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/umx/attrlist.pyt   lang>   s    c         C   sB   | j    } t j d d d d f } t j |  pA | d | k S(   sĐ   
        Get whether to skip (filter-out) the specified attribute.
        @param attr: An attribute.
        @type attr: I{Attribute}
        @return: True if should be skipped.
        @rtype: bool
        i   s)   http://schemas.xmlsoap.org/soap/encoding/s)   http://schemas.xmlsoap.org/soap/envelope/s'   http://www.w3.org/2003/05/soap-envelope(   t	   namespaceR   t   xmlnst   xs(   R   t   attrt   nsR   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/umx/attrlist.pyR   I   s    
	(   t   __name__t
   __module__t   __doc__R   R	   R   R   R   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/umx/attrlist.pyR      s   		
		N(    (   R   t   sudst   suds.umxt   suds.saxR   R   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/umx/attrlist.pyt   <module>   s   

