1 |
# Copyright (c) 2001, 2002, 2003 by Intevation GmbH |
# Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH |
2 |
# Authors: |
# Authors: |
3 |
# Jan-Oliver Wagner <[email protected]> |
# Jan-Oliver Wagner <[email protected]> |
4 |
# Bernhard Herzog <[email protected]> |
# Bernhard Herzog <[email protected]> |
131 |
def write(self, file_or_filename): |
def write(self, file_or_filename): |
132 |
XMLWriter.write(self, file_or_filename) |
XMLWriter.write(self, file_or_filename) |
133 |
|
|
134 |
self.write_header("session", "thuban-1.0.dtd") |
self.write_header("session", "thuban-1.1.dtd") |
135 |
self.write_session(self.session) |
self.write_session(self.session) |
136 |
self.close() |
self.close() |
137 |
|
|
158 |
attrs["xmlns:" + name] = uri |
attrs["xmlns:" + name] = uri |
159 |
# default name space |
# default name space |
160 |
attrs["xmlns"] = \ |
attrs["xmlns"] = \ |
161 |
"http://thuban.intevation.org/dtds/thuban-1.0rc1.dtd" |
"http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" |
162 |
self.open_element("session", attrs) |
self.open_element("session", attrs) |
163 |
self.write_db_connections(session) |
self.write_db_connections(session) |
164 |
self.write_data_containers(session) |
self.write_data_containers(session) |
211 |
self.write_element("dbshapesource", |
self.write_element("dbshapesource", |
212 |
{"id": idvalue, |
{"id": idvalue, |
213 |
"dbconn": self.get_id(conn), |
"dbconn": self.get_id(conn), |
214 |
"tablename": container.TableName()}) |
"tablename": container.TableName(), |
215 |
|
"id_column": container.IDColumn().name, |
216 |
|
"geometry_column": |
217 |
|
container.GeometryColumn().name, |
218 |
|
}) |
219 |
elif isinstance(container, DBFTable): |
elif isinstance(container, DBFTable): |
220 |
filename = self.prepare_filename(container.FileName()) |
filename = self.prepare_filename(container.FileName()) |
221 |
self.write_element("filetable", |
self.write_element("filetable", |