201 |
The list includes all tables that are indirectly opened through |
The list includes all tables that are indirectly opened through |
202 |
shape stores and the tables that have been opened explicitly. |
shape stores and the tables that have been opened explicitly. |
203 |
""" |
""" |
204 |
return self.tables + [store.Table() for store in self.ShapeStores()] |
tables = self.tables[:] |
205 |
|
ids = {} |
206 |
|
for t in tables: |
207 |
|
ids[id(t)] = 1 |
208 |
|
for store in self.ShapeStores(): |
209 |
|
t = store.Table() |
210 |
|
if id(t) not in ids: |
211 |
|
ids[id(t)] = 1 |
212 |
|
tables.append(t) |
213 |
|
return tables |
214 |
|
|
215 |
def UnreferencedTables(self): |
def UnreferencedTables(self): |
216 |
"""Return the tables that are not referenced by other data sources""" |
"""Return the tables that are not referenced by other data sources""" |
265 |
self.tables = tables |
self.tables = tables |
266 |
self.changed(TABLE_REMOVED, table) |
self.changed(TABLE_REMOVED, table) |
267 |
|
|
268 |
|
def DataContainers(self): |
269 |
|
"""Return all data containers, i.e. shapestores and tables""" |
270 |
|
return self.tables + self.ShapeStores() |
271 |
|
|
272 |
def OpenTableFile(self, filename): |
def OpenTableFile(self, filename): |
273 |
"""Open the table file filename and return the table object. |
"""Open the table file filename and return the table object. |
274 |
|
|