'Get the properties string according to parent/children
props is the properties dictionnary'

def propertiesAsStringGet(self, eid, props):

    properties = ''
    applied_style = 0
    if self.__default_style:
        e = self.getEdge(eid)
        if self.__has_children(eid):
            for s in self.__default_style:
                properties += ('%s="%s";\n' % (str(s[0]), str(s[1])))
        else:
            applied_style = 1
            properties = '['
            for s in self.__default_style:
                properties += ('%s="%s",' % (str(s[0]), str(s[1])))
            if (not props):
                properties = properties[:(-1)]
                properties += ']'
    e = self.getEdge(eid)
    if e['style']:
        stylename = e['style']
        if self.__has_children(eid):
            for s in self.__styles[stylename]:
                properties += ('%s="%s";\n' % (str(s[0]), str(s[1])))
        else:
            applied_style = 1
            properties = '['
            for s in self.__styles[stylename]:
                properties += ('%s="%s",' % (str(s[0]), str(s[1])))
            if (not props):
                properties = properties[:(-1)]
                properties += ']'
    if self.__has_children(eid):
        if props:
            for k in props.keys():
                val = props[k]
                properties += ('%s="%s";\n' % (str(k), str(val)))
    elif props:
        if (not applied_style):
            properties = '['
        for k in props.keys():
            val = props[k]
            properties += ('%s="%s",' % (str(k), str(val)))
        properties = properties[:(-1)]
        properties += ']'
    return properties
