This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
forked from bireme/isis2json
-
Notifications
You must be signed in to change notification settings - Fork 6
/
iso2709_test.txt
137 lines (121 loc) · 3.67 KB
/
iso2709_test.txt
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
-------------------------
One simple record test
-------------------------
Open file and read the record label::
>>> from iso2709 import IsoFile
>>> iso_file = IsoFile('fixtures/field3/field3.iso')
>>> rec = iso_file.next()
>>> rec #doctest: +ELLIPSIS
<iso2709.IsoRecord object at ...>
>>> len(rec)
93
>>> rec.show_label()
rec_len : 93
rec_status : '0'
impl_codes : '0000'
indicator_len : 0
identifier_len : 0
base_addr : 61
user_defined : '000'
fld_len_len : 4
start_len : 5
impl_len : 0
reserved : '0'
Read the directory::
>>> len(rec.directory)
3
>>> rec.directory[0].show()
tag : '011'
len : 5
start : 0
impl : ''
>>> rec.directory[1].show()
tag : '022'
len : 14
start : 5
impl : ''
>>> rec.directory[2].show()
tag : '333'
len : 12
start : 19
impl : ''
Read the field contents::
>>> rec.directory[0].value
'onze'
>>> rec.directory[1].value
'^avinte^bdois'
>>> rec.directory[2].value
'zebra^xzulu'
-------------------------------
CDS sample tests
-------------------------------
Open file and read the record label::
>>> iso_file = IsoFile('fixtures/cds/cds.iso')
>>> rec = iso_file.next()
>>> len(rec)
433
Read directory spanning the 80-column break::
>>> len(rec.directory)
8
>>> rec.directory[0].show()
tag : '044'
len : 78
start : 0
impl : ''
>>> rec.directory[-1].show()
tag : '070'
len : 13
start : 298
impl : ''
Show the record contents::
>>> rec.dump() #doctest: +ELLIPSIS
044 'Methodology of plant eco-physiology: proceedings of the Montpellier...
050 'Incl. bibl.'
069 'Paper on: <plant physiology><plant transpiration><measurement and...
024 'Techniques for the measurement of transpiration of individual plants'
026 '^aParis^bUnesco^c-1965'
030 '^ap. 211-224^billus.'
070 'Magalhaes, A.C.'
070 'Franco, C.M.'
-------------------------------
Lilacs-30 sample tests
-------------------------------
>>> iso_file = IsoFile('fixtures/lilacs30/lilacs30.iso')
>>> rec = iso_file.next()
>>> rec.indicator_len
0
>>> rec.identifier_len # XXX: why does lilacs30.iso have an identifier_len != 0???
2
>>> rec.dump() #doctest: +ELLIPSIS
001 'BR1.1'
002 '538905'
004 'LILACS'
004 'LLXPEDT'
005 'S'
006 'as'
008 'Internet^ihttp://www.demneuropsy.com.br/imageBank/PDF/v3n4a15-ing...
010 'Takada, Leonel Tadao^1Universidade de S\xe3o Paulo^2Faculdade de ...
010 'Camiz, Paulo^1Universidade de S\xe3o Paulo^2Faculdade de Medicina...
010 'Grinberg, Lea T^1University of California^2Department of Neurolog...
010 'Leite, Claudia da Costa^1University of S\xe3o Paulo^2Faculty of M...
012 'Non-inflammatory cerebral amyloid angiopathy as a cause of rapidl...
012 'Angiopatia amil\xf3ide cerebral n\xe3o inflamat\xf3ria como causa...
030 'Dement. neuropsychol'
031 '3'
032 '4'
035 '1980-5764'
040 'Pt'
041 'En'
041 'Pt'
064 'dezembro/2009'
065 '20090000'
067 'BR'
083 'Abstract ? A 77 year-old men developed a subacute-onset, rapidly ...
083 'Resumo ? Um homem de setenta e sete anos desenvolveu quadro de in...
084 '2010-03-05'
091 '20100221'
092 'BR1876.9'
092 'EDT'
098 'FONTE'
113 'p'
778 '538905^dBIREME_LLXPEDT^sS1980-576420090005000200014'