def __init__(self, sources=None, start=0, size=-1, conf=None, port_desc=None, factory=None): PortData.__init__(self, None, conf, factory) if conf is not None: self._sources = [] for sconf in conf["sources"]: self._sources += [self.factory(sconf)] self._start = conf.get("start", start, dtype=int) self._size = conf.get("size", size, dtype=int) else: self._sources = sources self._start = start self._size = size if self._sources: i = 0 serializer = None while i < len(self._sources) and serializer is None: self._serializer = self._sources[i].serializer i += 1
def fill_element(self, e): PortData.fill_element(self, e) e["type"] = self.TYPE_NAME e["path"] = self._path e["partition"] = self._partition e["start"] = self._start e["size"] = self._size return e
def fill_element(self, e): PortData.fill_element(self, e) e["type"] = self.TYPE_NAME e["path"] = self._path e["start"] = self._start e["size"] = self._size if self._seek_pos >= 0: e["seek_pos"] = self._seek_pos return e
def fill_element(self, e): PortData.fill_element(self, e) e["type"] = self.TYPE_NAME e["start"] = self._start e["size"] = self._size l = e.create_list() for src in self._sources: pe = e.create_element() l += [src.fill_element(pe)] e["sources"] = l return e
def fill_element(self, e): PortData.fill_element(self, e) e["type"] = self.TYPE_NAME e["start"] = self._start e["size"] = self._size l = e.list() for src in self._sources: pe = e.element() l += [src.fill_element(pe)] e["sources"] = l return e
def __init__(self, serializer = None, path = None, start = 0, size = -1, conf = None, port_desc = None, factory = None): PortData.__init__(self, serializer, conf, port_desc, factory) if conf is not None: self._path = conf.get("path", path) self._start = conf.get("start", start, dtype=int) self._size = conf.get("size", size, dtype=int) self._seek_pos = conf.get("seek_pos", -1, dtype=long) else: self._path = path self._start = start self._size = size self._seek_pos = -1
def __init__(self, serializer = None, path = None, partition = -1, start = 0, size = -1, conf = None, factory = None): PortData.__init__(self, serializer, conf, factory) if conf is not None: self._path = conf.get("path", path) self._partition = conf.get("partition", partition, dtype=int) self._start = conf.get("start", start, dtype=int) self._size = conf.get("size", size, dtype=int) else: self._path = path self._partition = partition self._start = start self._size = size self._last_partition = 0
def __init__(self, serializer=None, path=None, start=0, size=-1, conf=None, factory=None): PortData.__init__(self, serializer, conf, factory) if conf is not None: self._path = conf.get("path", path) self._start = conf.get("start", start, dtype=int) self._size = conf.get("size", size, dtype=int) self._seek_pos = conf.get("seek_pos", -1, dtype=long) else: self._path = path self._start = start self._size = size self._seek_pos = -1
def __init__(self, sources = None, start = 0, size = -1, conf = None, port_desc = None, factory = None): PortData.__init__(self, None, conf, port_desc, factory) if conf is not None: self._sources = [] for sconf in conf["sources"]: self._sources += [self.factory(sconf)] self._start = conf.get("start", start, dtype=int) self._size = conf.get("size", size, dtype=int) else: self._sources = sources self._start = start self._size = size if self._sources: i = 0 serializer = None while i < len(self._sources) and serializer is None: self._serializer = self._sources[i].serializer i += 1
def __init__(self, serializer=None, path=None, partition=-1, start=0, size=-1, conf=None, factory=None): PortData.__init__(self, serializer, conf, factory) if conf is not None: self._path = conf.get("path", path) self._partition = conf.get("partition", partition, dtype=int) self._start = conf.get("start", start, dtype=int) self._size = conf.get("size", size, dtype=int) else: self._path = path self._partition = partition self._start = start self._size = size self._last_partition = 0