ó
ØoôJc           @   s�   d  Z  d d l m Z d d l Td d l Td d l m Z d d l m Z d d l	 m
 Z
 d d l m Z e e ƒ Z d d d	 „  ƒ  YZ d
 S(   s&   
Provides I{marshaller} core classes.
iÿÿÿÿ(   t	   getLogger(   t   *(   t   ContentAppender(   t   Element(   t   Document(   t   Propertyt   Corec           B   sz   e  Z 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 „  Z RS(   s·   
    An I{abstract} marshaller.  This class implement the core
    functionality of the marshaller.
    @ivar appender: A content appender.
    @type appender: L{ContentAppender}
    c         C   s   t  |  ƒ |  _ d S(   s	   
        N(   R   t   appender(   t   self(    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt   __init__)   s    c         C   s•   t  j d | ƒ |  j ƒ  | j d k r> | j j j | _ n  t ƒ  } t	 | j t
 ƒ r{ |  j | ƒ } |  j | | ƒ n |  j | | ƒ | j ƒ  S(   sÂ   
        Process (marshal) the tag with the specified value using the
        optional type information.
        @param content: The content to process.
        @type content: L{Object}
        s   processing:
%sN(   t   logt   debugt   resett   tagt   Nonet   valuet	   __class__t   __name__R   t
   isinstanceR   t   nodet   appendt   root(   R   t   contentt   documentR   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt   process.   s    
	c         C   sL   t  j d | | ƒ |  j | ƒ rH |  j j | | ƒ |  j | | ƒ n  d S(   sé   
        Append the specified L{content} to the I{parent}.
        @param parent: The parent node to append to.
        @type parent: L{Element}
        @param content: The content to append.
        @type content: L{Object}
        s    appending parent:
%s
content:
%sN(   R
   R   t   startR   R   t   end(   R   t   parentR   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyR   A   s    c         C   s   d S(   s'   
        Reset the marshaller.
        N(    (   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyR   N   s    c         C   s   t  | j ƒ S(   s×   
        Create and return an XML node.
        @param content: The content for which proccessing has been suspended.
        @type content: L{Object}
        @return: An element.
        @rtype: L{Element}
        (   R   R   (   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyR   T   s    c         C   s   t  S(   sâ   
        Appending this content has started.
        @param content: The content for which proccessing has started.
        @type content: L{Content}
        @return: True to continue appending
        @rtype: boolean
        (   t   True(   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyR   ^   s    c         C   s   d S(   s§   
        Appending this content has suspended.
        @param content: The content for which proccessing has been suspended.
        @type content: L{Content}
        N(    (   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt   suspendh   s    c         C   s   d S(   s£   
        Appending this content has resumed.
        @param content: The content for which proccessing has been resumed.
        @type content: L{Content}
        N(    (   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt   resumep   s    c         C   s   d S(   sê   
        Appending this content has ended.
        @param parent: The parent node ending.
        @type parent: L{Element}
        @param content: The content for which proccessing has ended.
        @type content: L{Content}
        N(    (   R   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyR   x   s    c         C   s   d S(   sÌ   
        Set the value of the I{node} to nill.
        @param node: A I{nil} node.
        @type node: L{Element}
        @param content: The content to set nil.
        @type content: L{Content}
        N(    (   R   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt   setnil‚   s    c         C   s   d S(   s  
        Set the value of the I{node} to a default value.
        @param node: A I{nil} node.
        @type node: L{Element}
        @param content: The content to set the default value.
        @type content: L{Content}
        @return: The default.
        N(    (   R   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt
   setdefaultŒ   s    	c         C   s   t  S(   s–   
        Get whether the specified content is optional.
        @param content: The content which to check.
        @type content: L{Content}
        (   t   False(   R   R   (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt   optional—   s    (   R   t
   __module__t   __doc__R	   R   R   R   R   R   R   R   R   R   R    R"   (    (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyR   !   s   					
	
			
	
	N(    (   R$   t   loggingR    t   sudst   suds.mxt   suds.mx.appenderR   t   suds.sax.elementR   t   suds.sax.documentR   t   suds.sudsobjectR   R   R
   R   (    (    (    sF   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/suds/mx/core.pyt   <module>   s   

