1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
2
|
<!--NewPage-->
|
3
|
<html>
|
4
|
<head>
|
5
|
<!-- Generated by javadoc on Fri Sep 24 03:23:03 CEST 1999 -->
|
6
|
<title>
|
7
|
Class de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument
|
8
|
</title>
|
9
|
</head>
|
10
|
<body>
|
11
|
<a name="_top_"></a>
|
12
|
<pre>
|
13
|
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-de.tudarmstadt.ito.xmldbms.mapfactories.html">This Package</a> <a href="de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.html#_top_">Previous</a> <a href="de.tudarmstadt.ito.xmldbms.mapfactories.XMLDBMSConst.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre>
|
14
|
<hr>
|
15
|
<h1>
|
16
|
Class de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument
|
17
|
</h1>
|
18
|
<pre>
|
19
|
java.lang.Object
|
20
|
|
|
21
|
+----de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument
|
22
|
</pre>
|
23
|
<hr>
|
24
|
<dl>
|
25
|
<dt> public class <b>MapFactory_MapDocument</b>
|
26
|
<dt> extends Object
|
27
|
<dt> implements DocumentHandler
|
28
|
</dl>
|
29
|
Create a Map from a mapping document.
|
30
|
<P>MapFactory_MapDocument assumes that the mapping document is valid. If
|
31
|
it is not, the class will either generate garbage or throw an error. One
|
32
|
way to guarantee that the document is valid is to pass a validating parser
|
33
|
to the map factory.</P>
|
34
|
<P>For example, the following code creates a map from the sales.map
|
35
|
mapping document.</P>
|
36
|
<PRE>
|
37
|
// Instantiate a new map factory from a database connection
|
38
|
// and a SAX parser.
|
39
|
factory = new MapFactory_MapDocument(conn, parser);<BR />
|
40
|
// Create a Map from sales.map.
|
41
|
map = factory.createMap(new InputSource(new FileReader("sales.map")));<BR />
|
42
|
// Pass the Map to DOMToDBMS.
|
43
|
domToDBMS = new DOMToDBMS(map);
|
44
|
</PRE>
|
45
|
<p>
|
46
|
<hr>
|
47
|
<a name="index"></a>
|
48
|
<h2>
|
49
|
<img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
|
50
|
</h2>
|
51
|
<dl>
|
52
|
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
|
53
|
<a href="#MapFactory_MapDocument()"><b>MapFactory_MapDocument</b></a>()
|
54
|
<dd> Construct a new MapFactory_MapDocument.
|
55
|
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
|
56
|
<a href="#MapFactory_MapDocument(java.sql.Connection, org.xml.sax.Parser)"><b>MapFactory_MapDocument</b></a>(Connection, Parser)
|
57
|
<dd> Construct a new MapFactory_MapDocument and set the database connection
|
58
|
and SAX parser.
|
59
|
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
|
60
|
<a href="#MapFactory_MapDocument(java.sql.Connection, java.sql.ResultSet, org.xml.sax.Parser)"><b>MapFactory_MapDocument</b></a>(Connection, ResultSet, Parser)
|
61
|
<dd> Construct a new MapFactory_MapDocument and set the database connection,
|
62
|
SAX parser, and result set.
|
63
|
</dl>
|
64
|
<h2>
|
65
|
<img src="images/method-index.gif" width=207 height=38 alt="Method Index">
|
66
|
</h2>
|
67
|
<dl>
|
68
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
69
|
<a href="#characters(char[], int, int)"><b>characters</b></a>(char[], int, int)
|
70
|
<dd> Implementation of characters in SAX' DocumentHandler interface.
|
71
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
72
|
<a href="#createMap(java.sql.Connection, java.sql.ResultSet, org.xml.sax.Parser, org.xml.sax.InputSource)"><b>createMap</b></a>(Connection, ResultSet, Parser, InputSource)
|
73
|
<dd> Set the connection, mapped result set (if any), and SAX parser, then
|
74
|
create a map from a mapping document.
|
75
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
76
|
<a href="#createMap(org.xml.sax.InputSource)"><b>createMap</b></a>(InputSource)
|
77
|
<dd> Create a map from a mapping document.
|
78
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
79
|
<a href="#endDocument()"><b>endDocument</b></a>()
|
80
|
<dd> Implementation of endDocument in SAX' DocumentHandler interface.
|
81
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
82
|
<a href="#endElement(java.lang.String)"><b>endElement</b></a>(String)
|
83
|
<dd> Implementation of endElement in SAX' DocumentHandler interface.
|
84
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
85
|
<a href="#getConnection()"><b>getConnection</b></a>()
|
86
|
<dd> Get the current Connection.
|
87
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
88
|
<a href="#getParser()"><b>getParser</b></a>()
|
89
|
<dd> Get the current SAX Parser.
|
90
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
91
|
<a href="#getResultSet()"><b>getResultSet</b></a>()
|
92
|
<dd> Get the current ResultSet.
|
93
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
94
|
<a href="#ignorableWhitespace(char[], int, int)"><b>ignorableWhitespace</b></a>(char[], int, int)
|
95
|
<dd> Implementation of ignorableWhitespace in SAX' DocumentHandler interface.
|
96
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
97
|
<a href="#processingInstruction(java.lang.String, java.lang.String)"><b>processingInstruction</b></a>(String, String)
|
98
|
<dd> Implementation of processingInstruction in SAX' DocumentHandler interface.
|
99
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
100
|
<a href="#setConnection(java.sql.Connection)"><b>setConnection</b></a>(Connection)
|
101
|
<dd> Set the current Connection.
|
102
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
103
|
<a href="#setDocumentLocator(org.xml.sax.Locator)"><b>setDocumentLocator</b></a>(Locator)
|
104
|
<dd> Implementation of setDocumentLocator in SAX' DocumentHandler interface.
|
105
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
106
|
<a href="#setParser(org.xml.sax.Parser)"><b>setParser</b></a>(Parser)
|
107
|
<dd> Set the current SAX Parser.
|
108
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
109
|
<a href="#setResultSet(java.sql.ResultSet)"><b>setResultSet</b></a>(ResultSet)
|
110
|
<dd> Set the current ResultSet.
|
111
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
112
|
<a href="#startDocument()"><b>startDocument</b></a>()
|
113
|
<dd> Implementation of startDocument in SAX' DocumentHandler interface.
|
114
|
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
|
115
|
<a href="#startElement(java.lang.String, org.xml.sax.AttributeList)"><b>startElement</b></a>(String, AttributeList)
|
116
|
<dd> Implementation of startElement in SAX' DocumentHandler interface.
|
117
|
</dl>
|
118
|
<a name="constructors"></a>
|
119
|
<h2>
|
120
|
<img src="images/constructors.gif" width=231 height=38 alt="Constructors">
|
121
|
</h2>
|
122
|
<a name="MapFactory_MapDocument"></a>
|
123
|
<a name="MapFactory_MapDocument()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
|
124
|
<b>MapFactory_MapDocument</b>
|
125
|
<pre>
|
126
|
public MapFactory_MapDocument()
|
127
|
</pre>
|
128
|
<dl>
|
129
|
<dd> Construct a new MapFactory_MapDocument.
|
130
|
<p>
|
131
|
</dl>
|
132
|
<a name="MapFactory_MapDocument(java.sql.Connection, org.xml.sax.Parser)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
|
133
|
<b>MapFactory_MapDocument</b>
|
134
|
<pre>
|
135
|
public MapFactory_MapDocument(Connection conn,
|
136
|
Parser parser)
|
137
|
</pre>
|
138
|
<dl>
|
139
|
<dd> Construct a new MapFactory_MapDocument and set the database connection
|
140
|
and SAX parser.
|
141
|
<p>
|
142
|
</dl>
|
143
|
<a name="MapFactory_MapDocument(java.sql.Connection, java.sql.ResultSet, org.xml.sax.Parser)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
|
144
|
<b>MapFactory_MapDocument</b>
|
145
|
<pre>
|
146
|
public MapFactory_MapDocument(Connection conn,
|
147
|
ResultSet mappedResultSet,
|
148
|
Parser parser)
|
149
|
</pre>
|
150
|
<dl>
|
151
|
<dd> Construct a new MapFactory_MapDocument and set the database connection,
|
152
|
SAX parser, and result set.
|
153
|
<P>A result set is needed only when one of the tables in the mapping
|
154
|
document is named "Result Set". It is used to retrieve metadata about
|
155
|
the columns in the result set.</P>
|
156
|
<p>
|
157
|
</dl>
|
158
|
<a name="methods"></a>
|
159
|
<h2>
|
160
|
<img src="images/methods.gif" width=151 height=38 alt="Methods">
|
161
|
</h2>
|
162
|
<a name="getConnection()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
163
|
<a name="getConnection"><b>getConnection</b></a>
|
164
|
<pre>
|
165
|
public Connection getConnection()
|
166
|
</pre>
|
167
|
<dl>
|
168
|
<dd> Get the current Connection.
|
169
|
<p>
|
170
|
<dd><dl>
|
171
|
<dt> <b>Returns:</b>
|
172
|
<dd> The current Connection.
|
173
|
</dl></dd>
|
174
|
</dl>
|
175
|
<a name="setConnection(java.sql.Connection)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
176
|
<a name="setConnection"><b>setConnection</b></a>
|
177
|
<pre>
|
178
|
public void setConnection(Connection conn)
|
179
|
</pre>
|
180
|
<dl>
|
181
|
<dd> Set the current Connection.
|
182
|
<p>
|
183
|
<dd><dl>
|
184
|
<dt> <b>Parameters:</b>
|
185
|
<dd> conn - The current Connection.
|
186
|
</dl></dd>
|
187
|
</dl>
|
188
|
<a name="getResultSet()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
189
|
<a name="getResultSet"><b>getResultSet</b></a>
|
190
|
<pre>
|
191
|
public ResultSet getResultSet()
|
192
|
</pre>
|
193
|
<dl>
|
194
|
<dd> Get the current ResultSet.
|
195
|
<p>
|
196
|
<dd><dl>
|
197
|
<dt> <b>Returns:</b>
|
198
|
<dd> The current ResultSet.
|
199
|
</dl></dd>
|
200
|
</dl>
|
201
|
<a name="setResultSet(java.sql.ResultSet)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
202
|
<a name="setResultSet"><b>setResultSet</b></a>
|
203
|
<pre>
|
204
|
public void setResultSet(ResultSet mappedResultSet)
|
205
|
</pre>
|
206
|
<dl>
|
207
|
<dd> Set the current ResultSet.
|
208
|
<p>
|
209
|
<dd><dl>
|
210
|
<dt> <b>Parameters:</b>
|
211
|
<dd> mappedResultSet - The current ResultSet.
|
212
|
</dl></dd>
|
213
|
</dl>
|
214
|
<a name="getParser()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
215
|
<a name="getParser"><b>getParser</b></a>
|
216
|
<pre>
|
217
|
public Parser getParser()
|
218
|
</pre>
|
219
|
<dl>
|
220
|
<dd> Get the current SAX Parser.
|
221
|
<p>
|
222
|
<dd><dl>
|
223
|
<dt> <b>Returns:</b>
|
224
|
<dd> The current SAX Parser.
|
225
|
</dl></dd>
|
226
|
</dl>
|
227
|
<a name="setParser(org.xml.sax.Parser)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
228
|
<a name="setParser"><b>setParser</b></a>
|
229
|
<pre>
|
230
|
public void setParser(Parser parser)
|
231
|
</pre>
|
232
|
<dl>
|
233
|
<dd> Set the current SAX Parser.
|
234
|
<p>
|
235
|
<dd><dl>
|
236
|
<dt> <b>Parameters:</b>
|
237
|
<dd> parser - The current SAX Parser.
|
238
|
</dl></dd>
|
239
|
</dl>
|
240
|
<a name="createMap(java.sql.Connection, java.sql.ResultSet, org.xml.sax.Parser, org.xml.sax.InputSource)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
241
|
<a name="createMap"><b>createMap</b></a>
|
242
|
<pre>
|
243
|
public <a href="de.tudarmstadt.ito.xmldbms.Map.html#_top_">Map</a> createMap(Connection conn,
|
244
|
ResultSet mappedResultSet,
|
245
|
Parser parser,
|
246
|
InputSource src) throws <a href="de.tudarmstadt.ito.xmldbms.InvalidMapException.html#_top_">InvalidMapException</a>, SQLException
|
247
|
</pre>
|
248
|
<dl>
|
249
|
<dd> Set the connection, mapped result set (if any), and SAX parser, then
|
250
|
create a map from a mapping document.
|
251
|
<p>
|
252
|
<dd><dl>
|
253
|
<dt> <b>Parameters:</b>
|
254
|
<dd> conn - The current Connection.
|
255
|
<dd> mappedResultSet - The current ResultSet. This should be null if
|
256
|
the mapping document does not map an element type-as-class to the
|
257
|
table named "Result Set".
|
258
|
<dd> parser - The current SAX Parser.
|
259
|
<dd> src - A SAX InputSource for the mapping document.
|
260
|
<dt> <b>Throws:</b> <a href="de.tudarmstadt.ito.xmldbms.InvalidMapException.html#_top_">InvalidMapException</a>
|
261
|
<dd> Thrown if the mapping document contained
|
262
|
a mistake.
|
263
|
<dt> <b>Throws:</b> SQLException
|
264
|
<dd> Thrown if an error occurred retrieving column
|
265
|
metadata from the database or result set.
|
266
|
</dl></dd>
|
267
|
</dl>
|
268
|
<a name="createMap(org.xml.sax.InputSource)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
269
|
<a name="createMap"><b>createMap</b></a>
|
270
|
<pre>
|
271
|
public <a href="de.tudarmstadt.ito.xmldbms.Map.html#_top_">Map</a> createMap(InputSource src) throws <a href="de.tudarmstadt.ito.xmldbms.InvalidMapException.html#_top_">InvalidMapException</a>, SQLException
|
272
|
</pre>
|
273
|
<dl>
|
274
|
<dd> Create a map from a mapping document.
|
275
|
<p>
|
276
|
<dd><dl>
|
277
|
<dt> <b>Parameters:</b>
|
278
|
<dd> src - A SAX InputSource for the mapping document.
|
279
|
<dt> <b>Throws:</b> <a href="de.tudarmstadt.ito.xmldbms.InvalidMapException.html#_top_">InvalidMapException</a>
|
280
|
<dd> Thrown if the mapping document contained
|
281
|
a mistake.
|
282
|
<dt> <b>Throws:</b> SQLException
|
283
|
<dd> Thrown if an error occurred retrieving column
|
284
|
metadata from the database or result set.
|
285
|
</dl></dd>
|
286
|
</dl>
|
287
|
<a name="setDocumentLocator(org.xml.sax.Locator)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
288
|
<a name="setDocumentLocator"><b>setDocumentLocator</b></a>
|
289
|
<pre>
|
290
|
public void setDocumentLocator(Locator locator)
|
291
|
</pre>
|
292
|
<dl>
|
293
|
<dd> Implementation of setDocumentLocator in SAX' DocumentHandler interface.
|
294
|
This method is called by the SAX Parser and should not be called by
|
295
|
XML-DBMS programmers.
|
296
|
<p>
|
297
|
</dl>
|
298
|
<a name="startDocument()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
299
|
<a name="startDocument"><b>startDocument</b></a>
|
300
|
<pre>
|
301
|
public void startDocument() throws SAXException
|
302
|
</pre>
|
303
|
<dl>
|
304
|
<dd> Implementation of startDocument in SAX' DocumentHandler interface.
|
305
|
This method is called by the SAX Parser and should not be called by
|
306
|
XML-DBMS programmers.
|
307
|
<p>
|
308
|
</dl>
|
309
|
<a name="endDocument()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
310
|
<a name="endDocument"><b>endDocument</b></a>
|
311
|
<pre>
|
312
|
public void endDocument() throws SAXException
|
313
|
</pre>
|
314
|
<dl>
|
315
|
<dd> Implementation of endDocument in SAX' DocumentHandler interface.
|
316
|
This method is called by the SAX Parser and should not be called by
|
317
|
XML-DBMS programmers.
|
318
|
<p>
|
319
|
</dl>
|
320
|
<a name="startElement(java.lang.String, org.xml.sax.AttributeList)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
321
|
<a name="startElement"><b>startElement</b></a>
|
322
|
<pre>
|
323
|
public void startElement(String name,
|
324
|
AttributeList attrs) throws SAXException
|
325
|
</pre>
|
326
|
<dl>
|
327
|
<dd> Implementation of startElement in SAX' DocumentHandler interface.
|
328
|
This method is called by the SAX Parser and should not be called by
|
329
|
XML-DBMS programmers.
|
330
|
<p>
|
331
|
</dl>
|
332
|
<a name="endElement(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
333
|
<a name="endElement"><b>endElement</b></a>
|
334
|
<pre>
|
335
|
public void endElement(String name) throws SAXException
|
336
|
</pre>
|
337
|
<dl>
|
338
|
<dd> Implementation of endElement in SAX' DocumentHandler interface.
|
339
|
This method is called by the SAX Parser and should not be called by
|
340
|
XML-DBMS programmers.
|
341
|
<p>
|
342
|
</dl>
|
343
|
<a name="characters(char[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
344
|
<a name="characters"><b>characters</b></a>
|
345
|
<pre>
|
346
|
public void characters(char ch[],
|
347
|
int start,
|
348
|
int length) throws SAXException
|
349
|
</pre>
|
350
|
<dl>
|
351
|
<dd> Implementation of characters in SAX' DocumentHandler interface.
|
352
|
This method is called by the SAX Parser and should not be called by
|
353
|
XML-DBMS programmers.
|
354
|
<p>
|
355
|
</dl>
|
356
|
<a name="ignorableWhitespace(char[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
357
|
<a name="ignorableWhitespace"><b>ignorableWhitespace</b></a>
|
358
|
<pre>
|
359
|
public void ignorableWhitespace(char ch[],
|
360
|
int start,
|
361
|
int length) throws SAXException
|
362
|
</pre>
|
363
|
<dl>
|
364
|
<dd> Implementation of ignorableWhitespace in SAX' DocumentHandler interface.
|
365
|
This method is called by the SAX Parser and should not be called by
|
366
|
XML-DBMS programmers.
|
367
|
<p>
|
368
|
</dl>
|
369
|
<a name="processingInstruction(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
|
370
|
<a name="processingInstruction"><b>processingInstruction</b></a>
|
371
|
<pre>
|
372
|
public void processingInstruction(String target,
|
373
|
String data) throws SAXException
|
374
|
</pre>
|
375
|
<dl>
|
376
|
<dd> Implementation of processingInstruction in SAX' DocumentHandler interface.
|
377
|
This method is called by the SAX Parser and should not be called by
|
378
|
XML-DBMS programmers.
|
379
|
<p>
|
380
|
</dl>
|
381
|
<hr>
|
382
|
<pre>
|
383
|
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-de.tudarmstadt.ito.xmldbms.mapfactories.html">This Package</a> <a href="de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.html#_top_">Previous</a> <a href="de.tudarmstadt.ito.xmldbms.mapfactories.XMLDBMSConst.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre>
|
384
|
</body>
|
385
|
</html>
|