<filename>venv/Lib/site-packages/_TFL/_SDG/_XML/External_Id.py<gh_stars>1-10
# -*- coding: utf-8 -*-
# Copyright (C) 2005-2020 Mag. <NAME>. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. <EMAIL>
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.c-tanzer.at/license/bsd_3c.html>.
# ****************************************************************************
#
#++
# Name
#    TFL.SDG.XML.External_Id
#
# Purpose
#    Model an external ID
#
# Revision Dates
#     5-Sep-2005 (CT) Creation
#    23-Jul-2007 (CED) Activated absolute_import
#     6-Aug-2007 (CED) Future import removed again
#    26-Feb-2012 (MG) `__future__` imports added
#    ««revision-date»»···
#--

from   _TFL                   import TFL
import _TFL._SDG._XML.Node

class External_Id (TFL.SDG.XML.Node) :
    """Model an external ID"""

    kind                 = "SYSTEM"

    front_args           = ("uri", )
    init_arg_defaults    = dict \
        ( uri            = None
        ,
        )

    public_id            = None

    xml_format           = \
        ( """%(kind)s"""
          """%(:front0= ¡front=%(NL)s    """
            """¡rear0=¡rear=%(NL)s"""
            """¡head="¡tail="¡sep=    """
            """:@_ext_ids:)s"""
        )

    def _ext_ids (self, ** kw) :
        if self.public_id is not None :
            yield self.public_id
        if self.uri is not None :
            yield self.uri
    # end def _ext_ids

# end class External_Id

class External_Id_Public (External_Id) :
    """Model a public external ID"""

    kind                 = "PUBLIC"

    front_args           = ("public_id", "uri")
    init_arg_defaults    = dict \
        ( public_id      = None
        )

# end class External_Id_Public

if __name__ != "__main__" :
    TFL.SDG.XML._Export ("*")
### __END__ TFL.SDG.XML.External_Id

<filename>venv/Lib/site-packages/_TFL/_SDG/_XML/External_Id.py<gh_stars>1-10
# -*- coding: utf-8 -*-
# Copyright (C) 2005-2020 Mag. <NAME>. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. <EMAIL>
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.c-tanzer.at/license/bsd_3c.html>.
# ****************************************************************************
#
#++
# Name
#    TFL.SDG.XML.External_Id
#
# Purpose
#    Model an external ID
#
# Revision Dates
#     5-Sep-2005 (CT) Creation
#    23-Jul-2007 (CED) Activated absolute_import
#     6-Aug-2007 (CED) Future import removed again
#    26-Feb-2012 (MG) `__future__` imports added
#    ««revision-date»»···
#--

from   _TFL                   import TFL
import _TFL._SDG._XML.Node

class External_Id (TFL.SDG.XML.Node) :
    """Model an external ID"""

    kind                 = "SYSTEM"

    front_args           = ("uri", )
    init_arg_defaults    = dict \
        ( uri            = None
        ,
        )

    public_id            = None

    xml_format           = \
        ( """%(kind)s"""
          """%(:front0= ¡front=%(NL)s    """
            """¡rear0=¡rear=%(NL)s"""
            """¡head="¡tail="¡sep=    """
            """:@_ext_ids:)s"""
        )

    def _ext_ids (self, ** kw) :
        if self.public_id is not None :
            yield self.public_id
        if self.uri is not None :
            yield self.uri
    # end def _ext_ids

# end class External_Id

class External_Id_Public (External_Id) :
    """Model a public external ID"""

    kind                 = "PUBLIC"

    front_args           = ("public_id", "uri")
    init_arg_defaults    = dict \
        ( public_id      = None
        )

# end class External_Id_Public

if __name__ != "__main__" :
    TFL.SDG.XML._Export ("*")
### __END__ TFL.SDG.XML.External_Id

# -*- coding: utf-8 -*- # Copyright (C) 2005-2020 Mag. <NAME>. All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. <EMAIL> # **************************************************************************** # # This module is licensed under the terms of the BSD 3-Clause License # <http://www.c-tanzer.at/license/bsd_3c.html>. # **************************************************************************** # #++ # Name #    TFL.SDG.XML.External_Id # # Purpose #    Model an external ID # # Revision Dates #     5-Sep-2005 (CT) Creation #    23-Jul-2007 (CED) Activated absolute_import #     6-Aug-2007 (CED) Future import removed again #    26-Feb-2012 (MG) `__future__` imports added #    ««revision-date»»··· #-- Model an external ID %(kind)s %(:front0= ¡front=%(NL)s ¡rear0=¡rear=%(NL)s ¡head="¡tail="¡sep= :@_ext_ids:)s # end def _ext_ids # end class External_Id Model a public external ID # end class External_Id_Public ### __END__ TFL.SDG.XML.External_Id