1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 __authors__ = [ "Marie-Francoise Incardona", "Olof Svensson" ]
29 __contact__ = "svensson@esrf.fr"
30 __license__ = "LGPLv3+"
31 __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
36 """
37 This class allows to handle "dna_tables" objects.
38
39 See http://www.edna-site.org/svn/trunk/edna/kernel/datamodel/XSDataDnaTables.xsd
40 for the definition of "dna_tables".
41 """
42
43 @staticmethod
45 """
46 Returns a list of "table" objects from a "dna_table" object which matches a given table name.
47 """
48 listTables = []
49 for table in _dna_table.getTable():
50 if table.getName() == _strTableName:
51 listTables.append(table)
52 return listTables
53
54
55 @staticmethod
57 """
58 Returns the last "table" object of name "_strTableName" from a "dna_tables" object
59 """
60 tableMatch = None
61 for table in _dna_table.getTable():
62 if table.getName() == _strTableName:
63 tableMatch = table
64 return tableMatch
65
66
67 @staticmethod
69 """
70 Returns a list of "list" objects which matches "_strListName" in a give "table" object
71 """
72 listOfListMatch = []
73
74 for dnaList in _table.getList():
75 if dnaList.getName() == _strListName:
76 listOfListMatch.append(dnaList)
77 return listOfListMatch
78
79
80 @staticmethod
82 """
83 Returns the last "item" object that matches _strItemName in a given "list" object
84 """
85 itemMatch = None
86 for item in _list.getItem():
87 if item.getName() == _strItemName:
88 itemMatch = item
89 return itemMatch
90