def __init__(self, name='DynFilterSrv', condition_srv_name='ConditionSrv'): ''' @param name: The unique name of the service ''' self._dfilters = Case().tag(name).tag(DynFilter.__name__) self._conditions = Showcase.instance().get_case(condition_srv_name) INamed.__init__(self, name)
def __init__(self, name='TableSrv'): ''' @param name: The unique name of the service ''' self._tables = Case().tag(name) \ .tag(Table.__name__) \ .tag(TableView.__name__) INamed.__init__(self, name)
def __init__(self, name='HubSrv'): ''' :param name: The unique name of the service ''' self._gateways = {} self.hub = None WSGateway.gateways = self._gateways INamed.__init__(self, name)
def __init__(self, name=None, schema=None, prefix=""): """ :param str name: If a name is not provided, an uuid is generated :param schema: The schema associated to the data. :param str prefix: Prepended to the name creates the oid """ self._backend = self._backend(name, schema, prefix=prefix) INamed.__init__(self, name, prefix=prefix) ITable.__init__(self, schema) TableView.__init__(self, None, None, prefix)
def __init__(self, name='ConditionSrv'): ''' @param name: The unique name of the service ''' self._conditions = Case().tag(name) \ .tag(Condition.__name__) \ .tag(CategoricalCondition.__name__) \ .tag(AttributeCondition.__name__) \ .tag(RangeCondition.__name__) \ .tag(QueryCondition.__name__) INamed.__init__(self, name)
def __init__(self, parent, view_args, prefix=""): """ :param str prefix: Prepended to the name creates the oid """ if parent is not None: self._backend = parent._backend self._schema = parent._schema bus = parent._bus INamed.__init__(self, self._new_name(parent.name), prefix=prefix) else: bus = Bus(prefix="{0}{1}:".format(prefix, self.name)) topics = ["add", "update", "remove"] IPublisher.__init__(self, bus, topics) ITableView.__init__(self, parent, view_args)
def __init__(self, data, name=None, enabled=True, prefix=''): ''' :param data: The dataset that will be queried :param str name: If a name is not provided, an uuid is generated :param bool enabled: If the condition is disabled it will be ignored in the computation of the ConditionSet combination :param str prefix: Prepended to the name creates the oid ''' INamed.__init__(self, name, prefix=prefix) self._data = data self._sieve = None self._enabled = enabled topics = ['change', 'enable'] bus = Bus(prefix= '{0}{1}:'.format(prefix, self.name)) IPublisher.__init__(self, bus, topics)
def __init__(self, name, data, setop='AND', prefix=''): ''' :param str name: unique name :param data: the dataset that is going to suffer the conditions :param str setop: [AND, OR] Is the aggregation operation for sets :param str prefix: Prepended to the name creates the oid ''' INamed.__init__(self, name, prefix=prefix) self._data = data self._setop = setop self._sieves = SieveSet(data, setop) self._conditions = {} topics = ['change', 'remove'] bus = Bus(prefix='{0}{1}:'.format(prefix, self._name)) IPublisher.__init__(self, bus, topics)
def __init__(self, endpoint, srv_description, name): ''' :param str endpoint: The ZeroMQ endpoint definition :param dict srv_description: The description of the exposed methods * Has the form: {method_name: {params: ['name_param', 'data type, description, default=val (if optional)'], return: 'description with data type, maybe using the same structure (like list or dict)'}} * Currently is used mainly for online documentation proposes, only the method_name has effect on the code behavior :param str name: The unique name of the service ''' self.ctx = zmq.Context.instance() transport = ZmqClientTransport.create(self.ctx, endpoint) self.rpc = RPCClient(JSONRPCProtocol(), transport) self.endpoint = endpoint self.srv_description = srv_description INamed.__init__(self, name)
def __init__(self, name='SessionSrv'): ''' :param name: The unique name of the service ''' INamed.__init__(self, name)
def __init__(self, name='SharedObjectSrv'): ''' @param name: The unique name of the service ''' self._shared_objects = Case().tag(name).tag(SharedObject.__name__) INamed.__init__(self, name)
def __init__(self, name='GrammarSrv'): ''' :param name: The unique name of the service ''' self._roots = Case().tag(name).tag(Root.__name__) INamed.__init__(self, name)
def __init__(self, name, port=None): self._bus = Bus(prefix='') self.port = port if port is not None else get_random_port() INamed.__init__(self, name)
def __init__(self, front, name='FrontSrv'): ''' :param name: The unique name of the service ''' self.front = front INamed.__init__(self, name)
def __init__(self, name='IOSrv', table_srv_name='TableSrv'): ''' @param name: The unique name of the service ''' INamed.__init__(self, name) self._table_srv_name = table_srv_name
def __init__(self, name, prefix=''): INamed.__init__(self, name, prefix=prefix) self._nodes = {}