ó
ˆ˜jLc           @   sÂ   d  Z  d d l m Z d d l Td d l Td d l m Z d d l m Z e e	 ƒ Z
 d e f d „  ƒ  YZ d f  d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d e f d „  ƒ  YZ d f  d „  ƒ  YZ d S(   sN   
The I{sxbase} module provides I{base} classes that represent
schema objects.
iÿÿÿÿ(   t	   getLogger(   t   *(   t   Element(   t	   Namespacet   SchemaObjectc           B   s¸  e  Z d  Z e e ƒ  d „ ƒ Z e e ƒ  d „ ƒ Z d „  Z e ƒ  d „ Z e ƒ  d „ Z	 d „  Z
 d „  Z d* d „ Z d	 „  Z d
 „  Z d „  Z d „  Z e d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d+ d „ Z e  d „ Z! d „  Z" d „  Z# d „  Z$ d „  Z% d „  Z& d* e ƒ  d* d  „ Z' d! d* d" „ Z( d# „  Z) d$ „  Z* d% „  Z+ d& „  Z, d' „  Z- d( „  Z. d) „  Z/ RS(,   s˜  
    A schema object is an extension to object object with
    with schema awareness.
    @ivar root: The XML root element.
    @type root: L{Element}
    @ivar schema: The schema containing this object.
    @type schema: L{schema.Schema}
    @ivar form_qualified: A flag that inidcates that @elementFormDefault
        has a value of I{qualified}.
    @type form_qualified: boolean
    @ivar nillable: A flag that inidcates that @nillable
        has a value of I{true}.
    @type nillable: boolean
    @ivar default: The default value.
    @type default: object
    @ivar rawchildren: A list raw of all children.
    @type rawchildren: [L{SchemaObject},...]
    c         C   sD   d } x7 | D]/ } | | k r | j  | | ƒ | d 7} q q Wd S(   sV  
        Prepend schema object's from B{s}ource list to 
        the B{d}estination list while applying the filter.
        @param d: The destination list.
        @type d: list
        @param s: The source list.
        @type s: list
        @param filter: A filter that allows items to be prepended.
        @type filter: L{Filter}
        i    i   N(   t   insert(   t   clst   dt   st   filtert   it   x(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   prepend3   s
    c         C   s1   x* | D]" } | | k r | j  | ƒ q q Wd S(   sT  
        Append schema object's from B{s}ource list to 
        the B{d}estination list while applying the filter.
        @param d: The destination list.
        @type d: list
        @param s: The source list.
        @type s: list
        @param filter: A filter that allows items to be appended.
        @type filter: L{Filter}
        N(   t   append(   R   R   R   R	   t   item(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR   E   s    c         C   sÑ   | |  _  | |  _ t |  ƒ |  _ | j d ƒ |  _ |  j | j d f |  _ | j d ƒ |  _ | j d ƒ |  _	 | j d ƒ |  _
 | j d ƒ |  _ | j |  _ t |  _ | j d ƒ |  _ g  |  _ i  |  _ d S(	   s¥   
        @param schema: The containing schema.
        @type schema: L{schema.Schema}
        @param root: The xml root node.
        @type root: L{Element}
        t   namei   t	   minOccurst	   maxOccurst   typet   reft   defaultN(   t   schemat   roott   objidt   idt   getR   t   tnst   qnamet   mint   maxR   R   t   form_qualifiedt   Falset   nillableR   t   rawchildrent   cache(   t   selfR   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   __init__U   s    				c         C   sO   g  } xB |  D]: \ } } | j  ƒ  r | | k r | j | | f ƒ q q W| S(   sú   
        Get only the attribute content.
        @param filter: A filter to constrain the result.
        @type filter: L{Filter}
        @return: A list of tuples (attr, ancestry)
        @rtype: [(L{SchemaObject}, [L{SchemaObject},..]),..]
        (   t   isattrR   (   R#   R	   t   resultt   childt   ancestry(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt
   attributesk   s
    c         C   sP   g  } xC |  D]; \ } } | j  ƒ  r | | k r | j | | f ƒ q q W| S(   s
  
        Get only the I{direct} or non-attribute content.
        @param filter: A filter to constrain the result.
        @type filter: L{Filter}
        @return: A list tuples: (child, ancestry)
        @rtype: [(L{SchemaObject}, [L{SchemaObject},..]),..]
        (   R%   R   (   R#   R	   R&   R'   R(   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   childreny   s
    c         C   s@   x3 |  j  ƒ  D]% \ } } | j | k r | | f Sq Wd g  f S(   sø   
        Get (find) a I{non-attribute} attribute by name.
        @param name: A attribute name.
        @type name: str
        @return: A tuple: the requested (attribute, ancestry).
        @rtype: (L{SchemaObject}, [L{SchemaObject},..])
        N(   R)   R   t   None(   R#   R   R'   R(   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   get_attribute‡   s    c         C   sL   x? |  j  ƒ  D]1 \ } } | j ƒ  s4 | j | k r | | f Sq Wd g  f S(   sì   
        Get (find) a I{non-attribute} child by name.
        @param name: A child name.
        @type name: str
        @return: A tuple: the requested (child, ancestry).
        @rtype: (L{SchemaObject}, [L{SchemaObject},..])
        N(   R*   t   anyR   R+   (   R#   R   R'   R(   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt	   get_child”   s    c         C   s3   |  j  j } | d d k r/ | | d f } n  | S(   sÆ   
        Get this properties namespace
        @param prefix: The default prefix.
        @type prefix: str
        @return: The schema's target namespace
        @rtype: (I{prefix},I{URI})
        i    i   N(   R   R   R+   (   R#   t   prefixt   ns(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt	   namespace¡   s    c         C   s   |  j  j ƒ  S(   N(   R   t   defaultNamespace(   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   default_namespace®   s    c         C   sH   |  j  } | d k r d } n  | j ƒ  r: t | ƒ d k S| d k Sd S(   sŽ   
        Get whether this node is unbounded I{(a collection)}
        @return: True if unbounded, else False.
        @rtype: boolean
        t   1i   t	   unboundedN(   R   R+   t   isdigitt   int(   R#   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR5   ±   s    		c         C   s(   |  j  } | d k r d } n  | d k S(   sz   
        Get whether this type is optional.
        @return: True if optional, else False
        @rtype: boolean
        R4   t   0N(   R   R+   (   R#   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   optional¿   s    		c         C   s   |  j  ƒ  S(   sz   
        Get whether this type is required.
        @return: True if required, else False
        @rtype: boolean
        (   R9   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   requiredÊ   s    c         C   s   |  j  j | |  ƒ S(   sô   
        Resolve and return the nodes true self.
        @param nobuiltin: Flag indicates that resolution must
            not continue to include xsd builtins.
        @return: The resolved (true) type.
        @rtype: L{SchemaObject}
        (   R"   R   (   R#   t	   nobuiltin(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   resolveÓ   s    c         C   s   t  S(   sƒ   
        Get whether this is an <xs:sequence/>
        @return: True if <xs:sequence/>, else False
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   sequenceÝ   s    c         C   s   t  S(   st   
        Get whether this is an <xs:list/>
        @return: True if any, else False
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   xslistå   s    c         C   s   t  S(   ss   
        Get whether this is an <xs:all/>
        @return: True if any, else False
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   allí   s    c         C   s   t  S(   su   
        Get whether this is n <xs:choice/>
        @return: True if any, else False
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   choiceõ   s    c         C   s   t  S(   ss   
        Get whether this is an <xs:any/>
        @return: True if any, else False
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR-   ý   s    c         C   s   t  S(   sƒ   
        Get whether this is a schema-instance (xs) type.
        @return: True if any, else False
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   builtin  s    c         C   s   t  S(   s�   
        Get whether this is a simple-type containing an enumeration.
        @return: True if any, else False
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   enum  s    c         C   s   t  S(   s˜   
        Get whether the object is a schema I{attribute} definition.
        @return: True if an attribute, else False.
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR%     s    c         C   s   t  S(   s”   
        Get whether the object is an extension of another type.
        @return: True if an extension, else False.
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt	   extension  s    c         C   s   t  S(   s˜   
        Get whether the object is an restriction of another type.
        @return: True if an restriction, else False.
        @rtype: boolean
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   restriction%  s    c         C   s   t  S(   s4   
        Get whether this I{mixed} content.
        (   R   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   mixed-  s    c         C   sw   t  | ƒ s |  j f } n  |  j | k r= |  j | k r= |  Sx3 |  j D]( } | j | | ƒ } | d k	 rG | SqG Wd S(   sO  
        Find a referenced type in self or children.
        @param qref: A qualified reference.
        @type qref: qref
        @param classes: A list of classes used to qualify the match.
        @type classes: [I{class},...] 
        @return: The referenced type.
        @rtype: L{SchemaObject}
        @see: L{qualify()}
        N(   t   lent	   __class__R   R!   t   findR+   (   R#   t   qreft   classest   ct   p(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRH   3  s    c         C   s   | S(   sž   
        Translate a value (type) to/from a python type.
        @param value: A value to translate.
        @return: The converted I{language} type.
        (    (   R#   t   valuet   topython(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt	   translateH  s    c         C   s   d S(   s|   
        Get a list of valid child tag names.
        @return: A list of child tag names.
        @rtype: [str,...]
        (    (    (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt	   childtagsP  s    c         C   s
   d g  f S(   s²   
        Get a list of dependancies for dereferencing.
        @return: A merge dependancy index and a list of dependancies.
        @rtype: (int, [L{SchemaObject},...])
        N(   R+   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   dependenciesX  s    c         C   s
   d d g S(   s½   
        The list of I{auto} qualified attribute values.
        Qualification means to convert values into I{qref}.
        @return: A list of attibute names.
        @rtype: list
        R   R   (    (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   autoqualified`  s    c         C   s¼   |  j  j ƒ  } t j | ƒ r- |  j j } n  xˆ |  j ƒ  D]z } t |  | ƒ } | d k ra q: n  t	 | ƒ rs q: n  t
 | |  j  | ƒ } t j d |  j | | | ƒ t |  | | ƒ q: Wd S(   sF  
        Convert attribute values, that are references to other
        objects, into I{qref}.  Qualfied using default document namespace.
        Since many wsdls are written improperly: when the document does
        not define a default namespace, the schema target namespace is used
        to qualify references.
        s   %s, convert %s="%s" to %sN(   R   R2   R   t   noneR   R   RR   t   getattrR+   t   isqreft   qualifyt   logt   debugR   t   setattr(   R#   t   defnst   aR   RI   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRV   i  s    c         C   sk   | j  ƒ  xZ d
 D]R } t |  | ƒ d	 k	 r2 q n  t | | ƒ } | d	 k rS q n  t |  | | ƒ q Wd	 S(   s1   
        Merge another object as needed.
        R   R   R   R   R   R   R    R   N(   s   names   qnames   mins   maxs   defaults   types   nillables   form_qualified(   RV   RT   R+   RY   (   R#   t   othert   nt   v(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   merge~  s    
      
c         C   s�   | d k r g  } n  | d k r* g  } n  |  | k r: | S| j |  ƒ |  | k rc | j |  ƒ n  x% |  j D] } | j | | | ƒ qm W| S(   sˆ  
        Get a I{flattened} list of this nodes contents.
        @param collection: A list to fill.
        @type collection: list
        @param filter: A filter used to constrain the result.
        @type filter: L{Filter}
        @param history: The history list used to prevent cyclic dependency.
        @type history: list
        @return: The filled list.
        @rtype: list
        N(   R+   R   R!   t   content(   R#   t
   collectionR	   t   historyRK   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR`   “  s    		i    c         C   s�  | d k r g  } n  |  | k r/ d t |  ƒ S| j |  ƒ d | d d f } g  } | j d | |  j f ƒ xa |  j ƒ  D]S } t |  | ƒ s˜ q} n  t |  | ƒ } | d k r¹ q} n  | j d | | f ƒ q} Wt |  ƒ rs| j d ƒ xX |  j D]M } | j d ƒ | j | j	 | d	 | ƒ ƒ | j
 ƒ  r÷ | j d
 ƒ q÷ q÷ W| j d | ƒ | j d |  j j ƒ n | j d ƒ d j | ƒ S(   s©   
        Get a string representation of this object.
        @param indent: The indent.
        @type indent: int
        @return: A string.
        @rtype: str
        s   %s ...s   %*si   t    s   %s<%ss    %s="%s"t   >s   
i   t   @s   
%ss   </%s>s    />N(   R+   t   ReprR   R   t   descriptiont   hasattrRT   RF   R!   t   strR%   RG   t   __name__t   join(   R#   t   indentRb   t   tabR&   R]   R^   RK   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRi   ¬  s4    	c         C   s   d S(   s—   
        Get the names used for str() and repr() description.
        @return:  A dictionary of relavent attributes.
        @rtype: [str,...]
        (    (    (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRg   Ð  s    c         C   s   t  |  ƒ j d ƒ S(   Ns   utf-8(   t   unicodet   encode(   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   __str__Ø  s    c         C   s   t  |  j ƒ  ƒ S(   N(   Rn   Ri   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   __unicode__Û  s    c         C   s§   g  } | j  d |  j ƒ xa |  j ƒ  D]S } t |  | ƒ sB q' n  t |  | ƒ } | d  k rc q' n  | j  d | | f ƒ q' W| j  d ƒ d j | ƒ } | j d ƒ S(   Ns   <%ss    %s="%s"s    />Rc   s   utf-8(   R   R   Rg   Rh   RT   R+   Rk   Ro   (   R#   R   R]   R^   t   myrep(    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   __repr__Þ  s    c         C   s%   d } x |  D] } | d 7} q W| S(   Ni    i   (    (   R#   R]   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   __len__ì  s     c         C   s
   t  |  ƒ S(   N(   t   Iter(   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   __iter__ñ  s    c         C   s+   d } x |  D] } | | k r | Sq Wd  S(   Ni    (    (   R#   t   indexR
   RK   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   __getitem__ô  s    N(    (0   Rj   t
   __module__t   __doc__t   classmethodt   FilterR   R   R$   R)   R*   R,   R.   R+   R1   R3   R5   R9   R:   R   R<   R=   R>   R?   R@   R-   RA   RB   R%   RC   RD   RE   RH   t   TrueRO   RP   RQ   RR   RV   R_   R`   Ri   Rg   Rp   Rq   Rs   Rt   Rv   Rx   (    (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR      sV   								
																	$						Ru   c           B   sW   e  Z d  Z d d	 d „  ƒ  YZ d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(
   s  
    The content iterator - used to iterate the L{Content} children.  The iterator
    provides a I{view} of the children that is free of container elements
    such as <sequence/> and <choice/>.
    @ivar stack: A stack used to control nesting.
    @type stack: list
    t   Framec           B   s    e  Z d  Z d „  Z d „  Z RS(   s    A content iterator frame. c         C   s"   | |  _  | j |  _ d |  _ d S(   s[   
            @param sx: A schema object.
            @type sx: L{SchemaObject}
            i    N(   t   sxR!   t   itemsRw   (   R#   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR$     s    	c         C   s?   |  j  t |  j ƒ k  r; |  j |  j  } |  j  d 7_  | Sd S(   s˜   
            Get the I{next} item in the frame's collection.
            @return: The next item or None
            @rtype: L{SchemaObject}
            i   N(   Rw   RF   R€   (   R#   R&   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   next  s    (   Rj   Ry   Rz   R$   R�   (    (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR~     s   		c         C   s   g  |  _  |  j | ƒ d S(   sO   
        @param sx: A schema object.
        @type sx: L{SchemaObject}
        N(   t   stackt   push(   R#   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR$     s    	c         C   s   |  j  j t j | ƒ ƒ d S(   s�   
        Create a frame and push the specified object.
        @param sx: A schema object to push.
        @type sx: L{SchemaObject}
        N(   R‚   R   Ru   R~   (   R#   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRƒ   #  s    c         C   s)   t  |  j ƒ r |  j j ƒ  St ƒ  ‚ d S(   s–   
        Pop the I{top} frame.
        @return: The popped frame.
        @rtype: L{Frame}
        @raise StopIteration: when stack is empty.
        N(   RF   R‚   t   popt   StopIteration(   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR„   +  s    c         C   s'   t  |  j ƒ r |  j d St ƒ  ‚ d S(   s“   
        Get the I{top} frame.
        @return: The top frame.
        @rtype: L{Frame}
        @raise StopIteration: when stack is empty.
        iÿÿÿÿN(   RF   R‚   R…   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   top7  s    c         C   s•   |  j  ƒ  } x‚ t r� | j ƒ  } | d k rA |  j ƒ  |  j ƒ  St | t ƒ ry g  |  j D] } | j ^ qZ } | | f S|  j	 | ƒ |  j ƒ  SWd S(   s»   
        Get the next item.
        @return: A tuple: the next (child, ancestry).
        @rtype: (L{SchemaObject}, [L{SchemaObject},..])
        @raise StopIteration: A the end.
        N(
   R†   R}   R�   R+   R„   t
   isinstancet   ContentR‚   R   Rƒ   (   R#   t   frameR&   t   fR(   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR�   C  s    	


c         C   s   |  S(   N(    (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRv   V  s    (    (
   Rj   Ry   Rz   R~   R$   Rƒ   R„   R†   R�   Rv   (    (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRu   û  s   					t   XBuiltinc           B   s8   e  Z d  Z d „  Z d d „ Z d „  Z e d „ Z RS(   s1   
    Represents an (xsd) schema <xs:*/> node
    c         C   s5   t  | ƒ } t j |  | | ƒ | |  _ t |  _ d S(   s^   
        @param schema: The containing schema.
        @type schema: L{schema.Schema}
        N(   R   R   R$   R   R}   R    (   R#   R   R   R   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR$   _  s    	c         C   s   t  j S(   N(   R   t   xsdns(   R#   R/   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR1   i  s    c         C   s   t  S(   N(   R}   (   R#   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRA   l  s    c         C   s   |  S(   N(    (   R#   R;   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR<   o  s    N(	   Rj   Ry   Rz   R$   R+   R1   RA   R   R<   (    (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR‹   Z  s
   	
	Rˆ   c           B   s   e  Z d  Z RS(   sb   
    This class represents those schema objects that represent
    real XML document content.
    (   Rj   Ry   Rz   (    (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRˆ   s  s   t
   NodeFinderc           B   s#   e  Z d  Z d d „ Z d „  Z RS(   s)  
    Find nodes based on flexable criteria.  The I{matcher} is
    may be any object that implements a match(n) method.
    @ivar matcher: An object used as criteria for match.
    @type matcher: I{any}.match(n)
    @ivar limit: Limit the number of matches.  0=unlimited.
    @type limit: int
    i    c         C   s   | |  _  | |  _ d S(   sÈ   
        @param matcher: An object used as criteria for match.
        @type matcher: I{any}.match(n)
        @param limit: Limit the number of matches.  0=unlimited.
        @type limit: int
        N(   t   matchert   limit(   R#   RŽ   R�   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR$   „  s    	c         C   sl   |  j  j | ƒ rD | j | ƒ |  j d 8_ |  j d k rD d Sn  x! | j D] } |  j | | ƒ qN W|  S(   sÃ   
        Traverse the tree looking for matches.
        @param node: A node to match on.
        @type node: L{SchemaObject}
        @param list: A list to fill.
        @type list: list
        i   i    N(   RŽ   t   matchR   R�   R!   RH   (   R#   t   nodet   listRK   (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyRH   Ž  s    (   Rj   Ry   Rz   R$   RH   (    (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyR�   {  s   
N(   Rz   t   loggingR    t   sudst   suds.xsdt   suds.sax.elementR   t   suds.saxR   Rj   RW   t   objectR   Ru   R‹   Rˆ   R�   (    (    (    sI   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/xsd/sxbase.pyt   <module>   s   

ÿ Ý_