Project

General

Profile

« Previous | Next » 

Revision 140

Fixed DB input to ignore NULL values

View differences:

scripts/test/accepted_output/SALVIAS_db.organisms.VegX.xml
1 1
<?xml version="1.0" ?>
2
<VegX/>
2
<VegX>
3
    <individualOrganismObservations>
4
        <individualOrganismObservation id="1">
5
            <individualOrganismID>0</individualOrganismID>
6
            <plotObservationID>0</plotObservationID>
7
            <simpleUserdefined>
8
                <name>censusNo</name>
9
                <value>1</value>
10
            </simpleUserdefined>
11
            <simpleUserdefined>
12
                <name>individualCode</name>
13
                <value>1</value>
14
            </simpleUserdefined>
15
            <simpleUserdefined>
16
                <name>habit</name>
17
                <value>T</value>
18
            </simpleUserdefined>
19
            <simpleUserdefined>
20
                <name>count</name>
21
                <value>1</value>
22
            </simpleUserdefined>
23
        </individualOrganismObservation>
24
        <individualOrganismObservation id="2">
25
            <individualOrganismID>1</individualOrganismID>
26
            <plotObservationID>1</plotObservationID>
27
            <simpleUserdefined>
28
                <name>censusNo</name>
29
                <value>1</value>
30
            </simpleUserdefined>
31
            <simpleUserdefined>
32
                <name>individualCode</name>
33
                <value>1</value>
34
            </simpleUserdefined>
35
            <simpleUserdefined>
36
                <name>habit</name>
37
                <value>T</value>
38
            </simpleUserdefined>
39
            <simpleUserdefined>
40
                <name>count</name>
41
                <value>1</value>
42
            </simpleUserdefined>
43
        </individualOrganismObservation>
44
    </individualOrganismObservations>
45
    <individualOrganisms>
46
        <individualOrganism id="0">
47
            <taxonNameUsageConceptsID>0</taxonNameUsageConceptsID>
48
        </individualOrganism>
49
        <individualOrganism id="1">
50
            <taxonNameUsageConceptsID>1</taxonNameUsageConceptsID>
51
        </individualOrganism>
52
    </individualOrganisms>
53
    <taxonNameUsageConcepts>
54
        <taxonNameUsageConcept id="0">
55
            <voucher>1</voucher>
56
        </taxonNameUsageConcept>
57
        <taxonNameUsageConcept id="1">
58
            <voucher>1</voucher>
59
        </taxonNameUsageConcept>
60
    </taxonNameUsageConcepts>
61
    <plotObservations>
62
        <plotObservation id="0">
63
            <plotUniqueIdentifierID>0</plotUniqueIdentifierID>
64
        </plotObservation>
65
        <plotObservation id="1">
66
            <plotUniqueIdentifierID>1</plotUniqueIdentifierID>
67
        </plotObservation>
68
    </plotObservations>
69
    <plots>
70
        <plot id="0">
71
            <plotUniqueIdentifier>c2000-1</plotUniqueIdentifier>
72
        </plot>
73
        <plot id="1">
74
            <plotUniqueIdentifier>c2000-1</plotUniqueIdentifier>
75
        </plot>
76
    </plots>
77
    <taxonDeterminations>
78
        <taxonDetermination>
79
            <taxonNameUsageConceptID>0</taxonNameUsageConceptID>
80
            <partyWithRole>
81
                <role>collector</role>
82
            </partyWithRole>
83
            <groupType>direct</groupType>
84
        </taxonDetermination>
85
        <taxonDetermination>
86
            <taxonNameUsageConceptID>0</taxonNameUsageConceptID>
87
            <partyWithRole>
88
                <role>computer</role>
89
            </partyWithRole>
90
            <taxonRelationshipAssertions>
91
                <taxonRelationshipAssertion>
92
                    <assertion>
93
                        <taxonConceptID>0</taxonConceptID>
94
                    </assertion>
95
                </taxonRelationshipAssertion>
96
                <taxonRelationshipAssertion>
97
                    <assertion>
98
                        <taxonConceptID>1</taxonConceptID>
99
                    </assertion>
100
                </taxonRelationshipAssertion>
101
                <taxonRelationshipAssertion>
102
                    <assertion>
103
                        <taxonConceptID>2</taxonConceptID>
104
                    </assertion>
105
                </taxonRelationshipAssertion>
106
            </taxonRelationshipAssertions>
107
        </taxonDetermination>
108
        <taxonDetermination>
109
            <taxonNameUsageConceptID>0</taxonNameUsageConceptID>
110
            <partyWithRole>
111
                <role>identifier</role>
112
            </partyWithRole>
113
            <taxonRelationshipAssertions>
114
                <taxonRelationshipAssertion>
115
                    <assertion>
116
                        <taxonConceptID>3</taxonConceptID>
117
                    </assertion>
118
                </taxonRelationshipAssertion>
119
                <taxonRelationshipAssertion>
120
                    <assertion>
121
                        <taxonConceptID>4</taxonConceptID>
122
                    </assertion>
123
                </taxonRelationshipAssertion>
124
            </taxonRelationshipAssertions>
125
        </taxonDetermination>
126
        <taxonDetermination>
127
            <taxonNameUsageConceptID>1</taxonNameUsageConceptID>
128
            <partyWithRole>
129
                <role>collector</role>
130
            </partyWithRole>
131
            <groupType>direct</groupType>
132
        </taxonDetermination>
133
        <taxonDetermination>
134
            <taxonNameUsageConceptID>1</taxonNameUsageConceptID>
135
            <partyWithRole>
136
                <role>computer</role>
137
            </partyWithRole>
138
            <taxonRelationshipAssertions>
139
                <taxonRelationshipAssertion>
140
                    <assertion>
141
                        <taxonConceptID>5</taxonConceptID>
142
                    </assertion>
143
                </taxonRelationshipAssertion>
144
                <taxonRelationshipAssertion>
145
                    <assertion>
146
                        <taxonConceptID>6</taxonConceptID>
147
                    </assertion>
148
                </taxonRelationshipAssertion>
149
                <taxonRelationshipAssertion>
150
                    <assertion>
151
                        <taxonConceptID>7</taxonConceptID>
152
                    </assertion>
153
                </taxonRelationshipAssertion>
154
            </taxonRelationshipAssertions>
155
        </taxonDetermination>
156
        <taxonDetermination>
157
            <taxonNameUsageConceptID>1</taxonNameUsageConceptID>
158
            <partyWithRole>
159
                <role>identifier</role>
160
            </partyWithRole>
161
            <taxonRelationshipAssertions>
162
                <taxonRelationshipAssertion>
163
                    <assertion>
164
                        <taxonConceptID>8</taxonConceptID>
165
                    </assertion>
166
                </taxonRelationshipAssertion>
167
                <taxonRelationshipAssertion>
168
                    <assertion>
169
                        <taxonConceptID>9</taxonConceptID>
170
                    </assertion>
171
                </taxonRelationshipAssertion>
172
            </taxonRelationshipAssertions>
173
        </taxonDetermination>
174
    </taxonDeterminations>
175
    <taxonConcepts>
176
        <taxonConcept id="0">
177
            <Rank code="fam"/>
178
            <Name>Arecaceae</Name>
179
        </taxonConcept>
180
        <taxonConcept id="1">
181
            <Rank code="gen"/>
182
            <Name>Geonoma</Name>
183
        </taxonConcept>
184
        <taxonConcept id="2">
185
            <Rank code="sp"/>
186
            <Name>seleri</Name>
187
            <AccordingTo>
188
                <Simple>Burret</Simple>
189
            </AccordingTo>
190
        </taxonConcept>
191
        <taxonConcept id="3">
192
            <Rank code="fam"/>
193
            <Name>Arecaceae</Name>
194
        </taxonConcept>
195
        <taxonConcept id="4">
196
            <Rank code="sp"/>
197
            <Name>seleri</Name>
198
        </taxonConcept>
199
        <taxonConcept id="5">
200
            <Rank code="fam"/>
201
            <Name>Arecaceae</Name>
202
        </taxonConcept>
203
        <taxonConcept id="6">
204
            <Rank code="gen"/>
205
            <Name>Geonoma</Name>
206
        </taxonConcept>
207
        <taxonConcept id="7">
208
            <Rank code="sp"/>
209
            <Name>seleri</Name>
210
            <AccordingTo>
211
                <Simple>Burret</Simple>
212
            </AccordingTo>
213
        </taxonConcept>
214
        <taxonConcept id="8">
215
            <Rank code="fam"/>
216
            <Name>Arecaceae</Name>
217
        </taxonConcept>
218
        <taxonConcept id="9">
219
            <Rank code="sp"/>
220
            <Name>seleri</Name>
221
        </taxonConcept>
222
    </taxonConcepts>
223
</VegX>
scripts/test/accepted_output/SALVIAS_db.organisms.VegBank.xml
1 1
<?xml version="1.0" ?>
2
<VegBank/>
2
<VegBank>
3
    <taxonObservation id="1">
4
        <observation_ID>
5
            <observation>
6
                <plot_ID>
7
                    <plot>
8
                        <confidentialityStatus>0</confidentialityStatus>
9
                        <authorPlotCode>c2000-1</authorPlotCode>
10
                    </plot>
11
                </plot_ID>
12
                <authorObsCode>c2000-1</authorObsCode>
13
            </observation>
14
        </observation_ID>
15
        <taxonInterpretation>
16
            <ROLE_ID>
17
                <aux_Role>
18
                    <roleCode>collector</roleCode>
19
                </aux_Role>
20
            </ROLE_ID>
21
            <interpretationType>Author</interpretationType>
22
            <originalInterpretation>true</originalInterpretation>
23
            <currentInterpretation>false</currentInterpretation>
24
            <interpretationDate>epoch</interpretationDate>
25
            <plantConcept_ID>
26
                <plantConcept>
27
                    <reference_ID>
28
                        <reference/>
29
                    </reference_ID>
30
                    <plantName_ID>
31
                        <plantName>
32
                            <plantName>seleri</plantName>
33
                        </plantName>
34
                    </plantName_ID>
35
                </plantConcept>
36
            </plantConcept_ID>
37
            <party_ID>
38
                <party/>
39
            </party_ID>
40
            <museumAccessionNumber>1</museumAccessionNumber>
41
            <definedValue fkey="tableRecord_ID">
42
                <userDefined_ID>
43
                    <userDefined>
44
                        <tableName>taxonInterpretation</tableName>
45
                        <userDefinedName>censusNo</userDefinedName>
46
                        <userDefinedType>varchar</userDefinedType>
47
                    </userDefined>
48
                </userDefined_ID>
49
                <definedValue>1</definedValue>
50
            </definedValue>
51
            <definedValue fkey="tableRecord_ID">
52
                <userDefined_ID>
53
                    <userDefined>
54
                        <tableName>taxonInterpretation</tableName>
55
                        <userDefinedName>individualCode</userDefinedName>
56
                        <userDefinedType>varchar</userDefinedType>
57
                    </userDefined>
58
                </userDefined_ID>
59
                <definedValue>1</definedValue>
60
            </definedValue>
61
            <definedValue fkey="tableRecord_ID">
62
                <userDefined_ID>
63
                    <userDefined>
64
                        <tableName>taxonInterpretation</tableName>
65
                        <userDefinedName>determinationType</userDefinedName>
66
                        <userDefinedType>varchar</userDefinedType>
67
                    </userDefined>
68
                </userDefined_ID>
69
                <definedValue>direct</definedValue>
70
            </definedValue>
71
            <definedValue fkey="tableRecord_ID">
72
                <userDefined_ID>
73
                    <userDefined>
74
                        <tableName>taxonInterpretation</tableName>
75
                        <userDefinedName>habit</userDefinedName>
76
                        <userDefinedType>varchar</userDefinedType>
77
                    </userDefined>
78
                </userDefined_ID>
79
                <definedValue>T</definedValue>
80
            </definedValue>
81
        </taxonInterpretation>
82
        <taxonInterpretation>
83
            <ROLE_ID>
84
                <aux_Role>
85
                    <roleCode>computer</roleCode>
86
                </aux_Role>
87
            </ROLE_ID>
88
            <plantConcept_ID>
89
                <plantConcept>
90
                    <plantStatus>
91
                        <plantLevel>Family</plantLevel>
92
                        <plantConceptStatus>accepted</plantConceptStatus>
93
                        <startDate>epoch</startDate>
94
                        <party_ID>
95
                            <party/>
96
                        </party_ID>
97
                    </plantStatus>
98
                    <reference_ID>
99
                        <reference/>
100
                    </reference_ID>
101
                    <plantName_ID>
102
                        <plantName>
103
                            <plantName>Arecaceae</plantName>
104
                        </plantName>
105
                    </plantName_ID>
106
                </plantConcept>
107
            </plantConcept_ID>
108
            <interpretationType>Computer (automated)</interpretationType>
109
            <originalInterpretation>false</originalInterpretation>
110
            <currentInterpretation>true</currentInterpretation>
111
            <interpretationDate>epoch</interpretationDate>
112
            <party_ID>
113
                <party/>
114
            </party_ID>
115
        </taxonInterpretation>
116
        <taxonInterpretation>
117
            <ROLE_ID>
118
                <aux_Role>
119
                    <roleCode>computer</roleCode>
120
                </aux_Role>
121
            </ROLE_ID>
122
            <plantConcept_ID>
123
                <plantConcept>
124
                    <plantStatus>
125
                        <plantLevel>Genus</plantLevel>
126
                        <plantConceptStatus>accepted</plantConceptStatus>
127
                        <startDate>epoch</startDate>
128
                        <party_ID>
129
                            <party/>
130
                        </party_ID>
131
                    </plantStatus>
132
                    <reference_ID>
133
                        <reference/>
134
                    </reference_ID>
135
                    <plantName_ID>
136
                        <plantName>
137
                            <plantName>Geonoma</plantName>
138
                        </plantName>
139
                    </plantName_ID>
140
                </plantConcept>
141
            </plantConcept_ID>
142
            <interpretationType>Computer (automated)</interpretationType>
143
            <originalInterpretation>false</originalInterpretation>
144
            <currentInterpretation>true</currentInterpretation>
145
            <interpretationDate>epoch</interpretationDate>
146
            <party_ID>
147
                <party/>
148
            </party_ID>
149
        </taxonInterpretation>
150
        <taxonInterpretation>
151
            <ROLE_ID>
152
                <aux_Role>
153
                    <roleCode>computer</roleCode>
154
                </aux_Role>
155
            </ROLE_ID>
156
            <plantConcept_ID>
157
                <plantConcept>
158
                    <plantStatus>
159
                        <plantLevel>Species</plantLevel>
160
                        <plantConceptStatus>accepted</plantConceptStatus>
161
                        <startDate>epoch</startDate>
162
                        <party_ID>
163
                            <party/>
164
                        </party_ID>
165
                    </plantStatus>
166
                    <reference_ID>
167
                        <reference/>
168
                    </reference_ID>
169
                    <plantName_ID>
170
                        <plantName>
171
                            <plantName>seleri</plantName>
172
                            <reference_ID>
173
                                <reference>
174
                                    <shortName>Burret</shortName>
175
                                </reference>
176
                            </reference_ID>
177
                        </plantName>
178
                    </plantName_ID>
179
                </plantConcept>
180
            </plantConcept_ID>
181
            <interpretationType>Computer (automated)</interpretationType>
182
            <originalInterpretation>false</originalInterpretation>
183
            <currentInterpretation>true</currentInterpretation>
184
            <interpretationDate>epoch</interpretationDate>
185
            <party_ID>
186
                <party/>
187
            </party_ID>
188
        </taxonInterpretation>
189
        <taxonImportance>
190
            <stemCount>
191
                <stemCount>1</stemCount>
192
            </stemCount>
193
        </taxonImportance>
194
        <taxonInterpretation>
195
            <ROLE_ID>
196
                <aux_Role>
197
                    <roleCode>identifier</roleCode>
198
                </aux_Role>
199
            </ROLE_ID>
200
            <plantConcept_ID>
201
                <plantConcept>
202
                    <plantStatus>
203
                        <plantLevel>Family</plantLevel>
204
                        <plantConceptStatus>accepted</plantConceptStatus>
205
                        <startDate>epoch</startDate>
206
                        <party_ID>
207
                            <party/>
208
                        </party_ID>
209
                    </plantStatus>
210
                    <reference_ID>
211
                        <reference/>
212
                    </reference_ID>
213
                    <plantName_ID>
214
                        <plantName>
215
                            <plantName>Arecaceae</plantName>
216
                        </plantName>
217
                    </plantName_ID>
218
                </plantConcept>
219
            </plantConcept_ID>
220
            <interpretationType>Author</interpretationType>
221
            <originalInterpretation>true</originalInterpretation>
222
            <currentInterpretation>true</currentInterpretation>
223
            <interpretationDate>epoch</interpretationDate>
224
            <party_ID>
225
                <party/>
226
            </party_ID>
227
        </taxonInterpretation>
228
        <taxonInterpretation>
229
            <ROLE_ID>
230
                <aux_Role>
231
                    <roleCode>identifier</roleCode>
232
                </aux_Role>
233
            </ROLE_ID>
234
            <plantConcept_ID>
235
                <plantConcept>
236
                    <plantStatus>
237
                        <plantLevel>Species</plantLevel>
238
                        <plantConceptStatus>accepted</plantConceptStatus>
239
                        <startDate>epoch</startDate>
240
                        <party_ID>
241
                            <party/>
242
                        </party_ID>
243
                    </plantStatus>
244
                    <reference_ID>
245
                        <reference/>
246
                    </reference_ID>
247
                    <plantName_ID>
248
                        <plantName>
249
                            <plantName>seleri</plantName>
250
                        </plantName>
251
                    </plantName_ID>
252
                </plantConcept>
253
            </plantConcept_ID>
254
            <interpretationType>Author</interpretationType>
255
            <originalInterpretation>true</originalInterpretation>
256
            <currentInterpretation>true</currentInterpretation>
257
            <interpretationDate>epoch</interpretationDate>
258
            <party_ID>
259
                <party/>
260
            </party_ID>
261
        </taxonInterpretation>
262
    </taxonObservation>
263
    <taxonObservation id="2">
264
        <observation_ID>
265
            <observation>
266
                <plot_ID>
267
                    <plot>
268
                        <confidentialityStatus>0</confidentialityStatus>
269
                        <authorPlotCode>c2000-1</authorPlotCode>
270
                    </plot>
271
                </plot_ID>
272
                <authorObsCode>c2000-1</authorObsCode>
273
            </observation>
274
        </observation_ID>
275
        <taxonInterpretation>
276
            <ROLE_ID>
277
                <aux_Role>
278
                    <roleCode>collector</roleCode>
279
                </aux_Role>
280
            </ROLE_ID>
281
            <interpretationType>Author</interpretationType>
282
            <originalInterpretation>true</originalInterpretation>
283
            <currentInterpretation>false</currentInterpretation>
284
            <interpretationDate>epoch</interpretationDate>
285
            <plantConcept_ID>
286
                <plantConcept>
287
                    <reference_ID>
288
                        <reference/>
289
                    </reference_ID>
290
                    <plantName_ID>
291
                        <plantName>
292
                            <plantName>seleri</plantName>
293
                        </plantName>
294
                    </plantName_ID>
295
                </plantConcept>
296
            </plantConcept_ID>
297
            <party_ID>
298
                <party/>
299
            </party_ID>
300
            <museumAccessionNumber>1</museumAccessionNumber>
301
            <definedValue fkey="tableRecord_ID">
302
                <userDefined_ID>
303
                    <userDefined>
304
                        <tableName>taxonInterpretation</tableName>
305
                        <userDefinedName>censusNo</userDefinedName>
306
                        <userDefinedType>varchar</userDefinedType>
307
                    </userDefined>
308
                </userDefined_ID>
309
                <definedValue>1</definedValue>
310
            </definedValue>
311
            <definedValue fkey="tableRecord_ID">
312
                <userDefined_ID>
313
                    <userDefined>
314
                        <tableName>taxonInterpretation</tableName>
315
                        <userDefinedName>individualCode</userDefinedName>
316
                        <userDefinedType>varchar</userDefinedType>
317
                    </userDefined>
318
                </userDefined_ID>
319
                <definedValue>1</definedValue>
320
            </definedValue>
321
            <definedValue fkey="tableRecord_ID">
322
                <userDefined_ID>
323
                    <userDefined>
324
                        <tableName>taxonInterpretation</tableName>
325
                        <userDefinedName>determinationType</userDefinedName>
326
                        <userDefinedType>varchar</userDefinedType>
327
                    </userDefined>
328
                </userDefined_ID>
329
                <definedValue>direct</definedValue>
330
            </definedValue>
331
            <definedValue fkey="tableRecord_ID">
332
                <userDefined_ID>
333
                    <userDefined>
334
                        <tableName>taxonInterpretation</tableName>
335
                        <userDefinedName>habit</userDefinedName>
336
                        <userDefinedType>varchar</userDefinedType>
337
                    </userDefined>
338
                </userDefined_ID>
339
                <definedValue>T</definedValue>
340
            </definedValue>
341
        </taxonInterpretation>
342
        <taxonInterpretation>
343
            <ROLE_ID>
344
                <aux_Role>
345
                    <roleCode>computer</roleCode>
346
                </aux_Role>
347
            </ROLE_ID>
348
            <plantConcept_ID>
349
                <plantConcept>
350
                    <plantStatus>
351
                        <plantLevel>Family</plantLevel>
352
                        <plantConceptStatus>accepted</plantConceptStatus>
353
                        <startDate>epoch</startDate>
354
                        <party_ID>
355
                            <party/>
356
                        </party_ID>
357
                    </plantStatus>
358
                    <reference_ID>
359
                        <reference/>
360
                    </reference_ID>
361
                    <plantName_ID>
362
                        <plantName>
363
                            <plantName>Arecaceae</plantName>
364
                        </plantName>
365
                    </plantName_ID>
366
                </plantConcept>
367
            </plantConcept_ID>
368
            <interpretationType>Computer (automated)</interpretationType>
369
            <originalInterpretation>false</originalInterpretation>
370
            <currentInterpretation>true</currentInterpretation>
371
            <interpretationDate>epoch</interpretationDate>
372
            <party_ID>
373
                <party/>
374
            </party_ID>
375
        </taxonInterpretation>
376
        <taxonInterpretation>
377
            <ROLE_ID>
378
                <aux_Role>
379
                    <roleCode>computer</roleCode>
380
                </aux_Role>
381
            </ROLE_ID>
382
            <plantConcept_ID>
383
                <plantConcept>
384
                    <plantStatus>
385
                        <plantLevel>Genus</plantLevel>
386
                        <plantConceptStatus>accepted</plantConceptStatus>
387
                        <startDate>epoch</startDate>
388
                        <party_ID>
389
                            <party/>
390
                        </party_ID>
391
                    </plantStatus>
392
                    <reference_ID>
393
                        <reference/>
394
                    </reference_ID>
395
                    <plantName_ID>
396
                        <plantName>
397
                            <plantName>Geonoma</plantName>
398
                        </plantName>
399
                    </plantName_ID>
400
                </plantConcept>
401
            </plantConcept_ID>
402
            <interpretationType>Computer (automated)</interpretationType>
403
            <originalInterpretation>false</originalInterpretation>
404
            <currentInterpretation>true</currentInterpretation>
405
            <interpretationDate>epoch</interpretationDate>
406
            <party_ID>
407
                <party/>
408
            </party_ID>
409
        </taxonInterpretation>
410
        <taxonInterpretation>
411
            <ROLE_ID>
412
                <aux_Role>
413
                    <roleCode>computer</roleCode>
414
                </aux_Role>
415
            </ROLE_ID>
416
            <plantConcept_ID>
417
                <plantConcept>
418
                    <plantStatus>
419
                        <plantLevel>Species</plantLevel>
420
                        <plantConceptStatus>accepted</plantConceptStatus>
421
                        <startDate>epoch</startDate>
422
                        <party_ID>
423
                            <party/>
424
                        </party_ID>
425
                    </plantStatus>
426
                    <reference_ID>
427
                        <reference/>
428
                    </reference_ID>
429
                    <plantName_ID>
430
                        <plantName>
431
                            <plantName>seleri</plantName>
432
                            <reference_ID>
433
                                <reference>
434
                                    <shortName>Burret</shortName>
435
                                </reference>
436
                            </reference_ID>
437
                        </plantName>
438
                    </plantName_ID>
439
                </plantConcept>
440
            </plantConcept_ID>
441
            <interpretationType>Computer (automated)</interpretationType>
442
            <originalInterpretation>false</originalInterpretation>
443
            <currentInterpretation>true</currentInterpretation>
444
            <interpretationDate>epoch</interpretationDate>
445
            <party_ID>
446
                <party/>
447
            </party_ID>
448
        </taxonInterpretation>
449
        <taxonImportance>
450
            <stemCount>
451
                <stemCount>1</stemCount>
452
            </stemCount>
453
        </taxonImportance>
454
        <taxonInterpretation>
455
            <ROLE_ID>
456
                <aux_Role>
457
                    <roleCode>identifier</roleCode>
458
                </aux_Role>
459
            </ROLE_ID>
460
            <plantConcept_ID>
461
                <plantConcept>
462
                    <plantStatus>
463
                        <plantLevel>Family</plantLevel>
464
                        <plantConceptStatus>accepted</plantConceptStatus>
465
                        <startDate>epoch</startDate>
466
                        <party_ID>
467
                            <party/>
468
                        </party_ID>
469
                    </plantStatus>
470
                    <reference_ID>
471
                        <reference/>
472
                    </reference_ID>
473
                    <plantName_ID>
474
                        <plantName>
475
                            <plantName>Arecaceae</plantName>
476
                        </plantName>
477
                    </plantName_ID>
478
                </plantConcept>
479
            </plantConcept_ID>
480
            <interpretationType>Author</interpretationType>
481
            <originalInterpretation>true</originalInterpretation>
482
            <currentInterpretation>true</currentInterpretation>
483
            <interpretationDate>epoch</interpretationDate>
484
            <party_ID>
485
                <party/>
486
            </party_ID>
487
        </taxonInterpretation>
488
        <taxonInterpretation>
489
            <ROLE_ID>
490
                <aux_Role>
491
                    <roleCode>identifier</roleCode>
492
                </aux_Role>
493
            </ROLE_ID>
494
            <plantConcept_ID>
495
                <plantConcept>
496
                    <plantStatus>
497
                        <plantLevel>Species</plantLevel>
498
                        <plantConceptStatus>accepted</plantConceptStatus>
499
                        <startDate>epoch</startDate>
500
                        <party_ID>
501
                            <party/>
502
                        </party_ID>
503
                    </plantStatus>
504
                    <reference_ID>
505
                        <reference/>
506
                    </reference_ID>
507
                    <plantName_ID>
508
                        <plantName>
509
                            <plantName>seleri</plantName>
510
                        </plantName>
511
                    </plantName_ID>
512
                </plantConcept>
513
            </plantConcept_ID>
514
            <interpretationType>Author</interpretationType>
515
            <originalInterpretation>true</originalInterpretation>
516
            <currentInterpretation>true</currentInterpretation>
517
            <interpretationDate>epoch</interpretationDate>
518
            <party_ID>
519
                <party/>
520
            </party_ID>
521
        </taxonInterpretation>
522
    </taxonObservation>
523
</VegBank>
scripts/lib/sql.py
52 52

  
53 53
def value(cur): return row(cur)[0]
54 54

  
55
def value_or_none(cur):
56
    try: return value(cur)
57
    except StopIteration: return None
58

  
55 59
def with_savepoint(db, func):
56 60
    savepoint = 'savepoint_'+str(random.randint(0, sys.maxint)) # must be unique
57 61
    run_query(db, 'SAVEPOINT '+savepoint)
scripts/map
104 104
                    xml_dom.replace(root, root.cloneNode(False))
105 105
                    xml_dom.set_id(root, row_id)
106 106
                    
107
                    cur = db_xml.get(in_db, in_, in_pkeys)
108
                    try: value = sql.value(cur)
109
                    except StopIteration: continue
110
                    put_col(out, str(value))
107
                    value = sql.value_or_none(db_xml.get(in_db, in_, in_pkeys))
108
                    if value != None: put_col(out, str(value))
111 109
            in_db.close()
112 110
        elif in_is_xml: raise SystemExit('XML input not supported yet')
113 111
        else: # input is CSV

Also available in: Unified diff