# Path: rhizi/util.py
# def debug_log_duration(method):
#     def timed(*args, **kw):
#     def str_to_unicode(s):
#     def str_to_unicode(s):


import base64
import gzip
import json
from ..util import str_to_unicode, python2
        def dst_id(self):
            return self['__dst_id']

    @staticmethod
    def link_ptr(src_id=None, dst_id=None):
        """
        init from src_id or dst_id attributes - at least one must be provided
        """
        return Link.Link_Ptr(src_id, dst_id)

class RZDoc():

    def __init__(self, rzdoc_name=None):
        self.id = None  # set upon DB commit
        self.name = rzdoc_name

    def __eq__(self, other):
        if not isinstance(other, RZDoc): return False

        assert self.id != None and other.id != None

        return self.id == other.id

    def __hash__(self):
        assert self.id != None

        return self.id.__hash__()

    def __str__(self):
        """ actually returns unicode. """

# Path: rhizi/util.py
# def debug_log_duration(method):
#     def timed(*args, **kw):
#     def str_to_unicode(s):
#     def str_to_unicode(s):


# Path: rhizi/model/model.py
import base64
import gzip
import json
from ..util import str_to_unicode, python2

        def dst_id(self):
            return self['__dst_id']

    @staticmethod
    def link_ptr(src_id=None, dst_id=None):
        """
        init from src_id or dst_id attributes - at least one must be provided
        """
        return Link.Link_Ptr(src_id, dst_id)

class RZDoc():

    def __init__(self, rzdoc_name=None):
        self.id = None  # set upon DB commit
        self.name = rzdoc_name

    def __eq__(self, other):
        if not isinstance(other, RZDoc): return False

        assert self.id != None and other.id != None

        return self.id == other.id

    def __hash__(self):
        assert self.id != None

        return self.id.__hash__()

    def __str__(self):
        """ actually returns unicode. """

        return str_to_unicode('rzdoc: name: %s') % (self.name)