Beispiel #1
0
 def __init__(self, name, sort_names=None):
     Result.__init__(self, name)
     self._keys = list()
     if sort_names is None:
         self._sort_names = list()
     else:
         self._sort_names = sort_names
Beispiel #2
0
 def __init__(self, name, sort_names=None, res_filter=None):
     Result.__init__(self, name, res_filter)
     self._keys = list()
     if sort_names is None:
         self._sort_names = list()
     else:
         self._sort_names = sort_names
Beispiel #3
0
 def etree_repr(self):
     """Return etree object representation"""
     result_etree = Result.etree_repr(self)
     table_etree = ET.SubElement(result_etree, "table")
     table_etree.attrib["name"] = self._name
     table_etree.attrib["style"] = self._style
     table_etree.attrib["separator"] = self._separator
     table_etree.attrib["transpose"] = str(self._transpose)
     if len(self._sort_names) > 0:
         table_etree.attrib["sort"] = \
             jube2.conf.DEFAULT_SEPARATOR.join(self._sort_names)
     for column in self._keys:
         table_etree.append(column.etree_repr())
     return result_etree
Beispiel #4
0
 def etree_repr(self):
     """Return etree object representation"""
     result_etree = Result.etree_repr(self)
     table_etree = ET.SubElement(result_etree, "table")
     table_etree.attrib["name"] = self._name
     table_etree.attrib["style"] = self._style
     if self._separator is not None:
         table_etree.attrib["separator"] = self._separator
     if self._res_filter is not None:
         table_etree.attrib["filter"] = self._res_filter
     table_etree.attrib["transpose"] = str(self._transpose)
     if len(self._sort_names) > 0:
         table_etree.attrib["sort"] = \
             jube2.conf.DEFAULT_SEPARATOR.join(self._sort_names)
     for column in self._keys:
         table_etree.append(column.etree_repr())
     return result_etree
Beispiel #5
0
 def etree_repr(self):
     """Return etree object representation"""
     result_etree = Result.etree_repr(self)
     syslog_etree = ET.SubElement(result_etree, "syslog")
     syslog_etree.attrib["name"] = self._name
     if self._syslog_address is not None:
         syslog_etree.attrib["address"] = self._syslog_address
     if self._syslog_host is not None:
         syslog_etree.attrib["host"] = self._syslog_host
     if self._syslog_port is not None:
         syslog_etree.attrib["port"] = self._syslog_port
     if self._syslog_fmt_string is not None:
         syslog_etree.attrib["format"] = self._syslog_fmt_string
     if len(self._sort_names) > 0:
         syslog_etree.attrib["sort"] = \
             jube2.conf.DEFAULT_SEPARATOR.join(self._sort_names)
     for key in self._keys:
         syslog_etree.append(key.etree_repr())
     return result_etree
Beispiel #6
0
 def etree_repr(self):
     """Return etree object representation"""
     result_etree = Result.etree_repr(self)
     syslog_etree = ET.SubElement(result_etree, "syslog")
     syslog_etree.attrib["name"] = self._name
     if self._syslog_address is not None:
         syslog_etree.attrib["address"] = self._syslog_address
     if self._syslog_host is not None:
         syslog_etree.attrib["host"] = self._syslog_host
     if self._syslog_port is not None:
         syslog_etree.attrib["port"] = self._syslog_port
     if self._syslog_fmt_string is not None:
         syslog_etree.attrib["format"] = self._syslog_fmt_string
     if self._res_filter is not None:
         syslog_etree.attrib["filter"] = self._res_filter
     if len(self._sort_names) > 0:
         syslog_etree.attrib["sort"] = \
             jube2.conf.DEFAULT_SEPARATOR.join(self._sort_names)
     for key in self._keys:
         syslog_etree.append(key.etree_repr())
     return result_etree