ó
{c‹Ac           @   s-   d  Z  d d l m Z d d d „  ƒ  YZ d S(   sC    InstanceOf class
    http://www.topicmaps.org/xtm/#elt-instanceOf
iÿÿÿÿ(   t   TopicReft
   InstanceOfc           B   s>   e  Z d  Z d d „ Z d „  Z d „  Z d „  Z d „  Z RS(   sK    InstanceOf class
        http://www.topicmaps.org/xtm/#elt-instanceOf
    c         C   s)   g  |  _  | r% |  j t | ƒ ƒ n  d S(   sK   Initialize InstanceOf object. (id=None) - Add TopicRef object with given idN(   t	   _childrent   setTopicRefR    (   t   selft   id(    (    s   lib/xtm/InstanceOf.pyt   __init__   s    	 c         C   s   |  j  | ƒ d S(   s   Add TopicRef objectN(   t   addChild(   R   t   topicRef(    (    s   lib/xtm/InstanceOf.pyR      s    c         C   sI   g  |  j  D] } t | t ƒ r
 | ^ q
 } | r> | d g pD d g d S(   s   Return TopicRef object or "" i    t    (   R   t
   isinstanceR    (   R   R   t   topicRefChildren(    (    s   lib/xtm/InstanceOf.pyt   getTopicRef   s    +c         C   s   |  j  j | ƒ d S(   s   Add object (:TopicRef)N(   R   t   append(   R   t   child(    (    s   lib/xtm/InstanceOf.pyR      s    c         C   s   d |  j  ƒ  S(   s2   Return XTM:str representation of InstanceOf objects   <instanceOf>%s</instanceOf>(   R   (   R   (    (    s   lib/xtm/InstanceOf.pyt   __str__   s    N(	   t   __name__t
   __module__t   __doc__t   NoneR   R   R   R   R   (    (    (    s   lib/xtm/InstanceOf.pyR   	   s   			N(    (   R   t   xtm.TopicRefR    R   (    (    (    s   lib/xtm/InstanceOf.pyt   <module>   s   