<s> __author__ = '<STR_LIT>' <EOL> import atom . core <EOL> ATOM_TEMPLATE = '<STR_LIT>' <EOL> APP_TEMPLATE_V1 = '<STR_LIT>' <EOL> APP_TEMPLATE_V2 = '<STR_LIT>' <EOL> class Name ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT:name>' <EOL> class Email ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT:email>' <EOL> class Uri ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Person ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> name = Name <EOL> email = Email <EOL> uri = Uri <EOL> class Author ( Person ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Contributor ( Person ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Link ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> href = '<STR_LIT>' <EOL> rel = '<STR_LIT>' <EOL> type = '<STR_LIT:type>' <EOL> hreflang = '<STR_LIT>' <EOL> title = '<STR_LIT:title>' <EOL> length = '<STR_LIT>' <EOL> class Generator ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> uri = '<STR_LIT>' <EOL> version = '<STR_LIT:version>' <EOL> class Text ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> type = '<STR_LIT:type>' <EOL> class Title ( Text ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT:title>' <EOL> class Subtitle ( Text ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Rights ( Text ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Summary ( Text ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Content ( Text ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT:content>' <EOL> src = '<STR_LIT:src>' <EOL> class Category ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> term = '<STR_LIT>' <EOL> scheme = '<STR_LIT>' <EOL> label = '<STR_LIT:label>' <EOL> class Id ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT:id>' <EOL> class Icon ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Logo ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Draft ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ( APP_TEMPLATE_V1 % '<STR_LIT>' , APP_TEMPLATE_V2 % '<STR_LIT>' ) <EOL> class Control ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> _qname = ( APP_TEMPLATE_V1 % '<STR_LIT>' , APP_TEMPLATE_V2 % '<STR_LIT>' ) <EOL> draft = Draft <EOL> class Date ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> class Updated ( Date ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class Published ( Date ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> class LinkFinder ( object ) : <EOL> """<STR_LIT>""" <EOL> def find_url ( self , rel ) : <EOL> """<STR_LIT>""" <EOL> for link in self . link : <EOL> if link . rel == rel and link . href : <EOL> return link . href <EOL> return None <EOL> FindUrl = find_url <EOL> def get_link ( self , rel ) : <EOL> """<STR_LIT>""" <EOL> for link in self . link : <EOL> if link . rel == rel and link . href : <EOL> return link <EOL> return None <EOL> GetLink = get_link <EOL> def find_self_link ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . find_url ( '<STR_LIT>' ) <EOL> FindSelfLink = find_self_link <EOL> def get_self_link ( self ) : <EOL> return self . get_link ( '<STR_LIT>' ) <EOL> GetSelfLink = get_self_link <EOL> def find_edit_link ( self ) : <EOL> return self . find_url ( '<STR_LIT>' ) <EOL> FindEditLink = find_edit_link <EOL> def get_edit_link ( self ) : <EOL> return self . get_link ( '<STR_LIT>' ) <EOL> GetEditLink = get_edit_link <EOL> def find_edit_media_link ( self ) : <EOL> link = self . find_url ( '<STR_LIT>' ) <EOL> if link is None : <EOL> return self . find_url ( '<STR_LIT>' ) <EOL> return link <EOL> FindEditMediaLink = find_edit_media_link <EOL> def get_edit_media_link ( self ) : <EOL> link = self . get_link ( '<STR_LIT>' ) <EOL> if link is None : <EOL> return self . get_link ( '<STR_LIT>' ) <EOL> return link <EOL> GetEditMediaLink = get_edit_media_link <EOL> def find_next_link ( self ) : <EOL> return self . find_url ( '<STR_LIT>' ) <EOL> FindNextLink = find_next_link <EOL> def get_next_link ( self ) : <EOL> return self . get_link ( '<STR_LIT>' ) <EOL> GetNextLink = get_next_link <EOL> def find_license_link ( self ) : <EOL> return self . find_url ( '<STR_LIT>' ) <EOL> FindLicenseLink = find_license_link <EOL> def get_license_link ( self ) : <EOL> return self . get_link ( '<STR_LIT>' ) <EOL> GetLicenseLink = get_license_link <EOL> def find_alternate_link ( self ) : <EOL> return self . find_url ( '<STR_LIT>' ) <EOL> FindAlternateLink = find_alternate_link <EOL> def get_alternate_link ( self ) : <EOL> return self . get_link ( '<STR_LIT>' ) <EOL> GetAlternateLink = get_alternate_link <EOL> class FeedEntryParent ( atom . core . XmlElement , LinkFinder ) : <EOL> """<STR_LIT>""" <EOL> author = [ Author ] <EOL> category = [ Category ] <EOL> contributor = [ Contributor ] <EOL> id = Id <EOL> link = [ Link ] <EOL> rights = Rights <EOL> title = Title <EOL> updated = Updated <EOL> def __init__ ( self , atom_id = None , text = None , * args , ** kwargs ) : <EOL> if atom_id is not None : <EOL> self . id = atom_id <EOL> atom . core . XmlElement . __init__ ( self , text = text , * args , ** kwargs ) <EOL> class Source ( FeedEntryParent ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT:source>' <EOL> generator = Generator <EOL> icon = Icon <EOL> logo = Logo <EOL> subtitle = Subtitle <EOL> class Entry ( FeedEntryParent ) : <EOL> """<STR_LIT>""" <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> content = Content <EOL> published = Published <EOL> source = Source <EOL> summary = Summary <EOL> control = Control <EOL> class Feed ( Source ) : <EOL> _qname = ATOM_TEMPLATE % '<STR_LIT>' <EOL> entry = [ Entry ] <EOL> class ExtensionElement ( atom . core . XmlElement ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , tag = None , namespace = None , attributes = None , <EOL> children = None , text = None , * args , ** kwargs ) : <EOL> if namespace : <EOL> self . _qname = '<STR_LIT>' % ( namespace , tag ) <EOL> else : <EOL> self . _qname = tag <EOL> self . children = children or [ ] <EOL> self . attributes = attributes or { } <EOL> self . text = text <EOL> _BecomeChildElement = atom . core . XmlElement . _become_child </s>
