@@ -156,7 +156,7 @@ Basic knowledge on odML
156
156
157
157
Before we start, it is important to know the basic structure of an odML
158
158
file. Within an odML file metadata are grouped and stored in a
159
- hierarchical tree structure which consists of four different odML
159
+ hierarchical tree structure which consists of three basic odML
160
160
objects.
161
161
162
162
Document:
@@ -208,6 +208,7 @@ In the IPython shell, first import the odml package::
208
208
>>> import odml
209
209
210
210
Second, load the example odML file with the following command lines::
211
+
211
212
>>> to_load = './doc/example_odMLs/THGTTG.odml'
212
213
>>> odmlEX = odml.load(to_load)
213
214
@@ -221,10 +222,10 @@ Section, Property).
221
222
222
223
How you can create the different odML objects on your own and how to connect
223
224
them to build your own metadata odML file will be described in later chapters.
224
- Further advanced functions you can use to navigate threw your odML files, or to
225
+ Further advanced functions you can use to navigate through your odML files, or to
225
226
create an odML template file, or to make use of common odML terminologies
226
227
provided via `the G-Node repository
227
- <http://portal.g-node.org/odml/terminologies/v1.0 /terminologies.xml> `_ can also
228
+ <http://portal.g-node.org/odml/terminologies/v1.1 /terminologies.xml> `_ can also
228
229
be found later on in this tutorial.
229
230
230
231
But now, let us first have a look at the example odML file (THGTTG.odml)!
@@ -259,8 +260,8 @@ author
259
260
- Returns the author (returned as string) of this odML file.
260
261
261
262
date
262
- - Returns ta user defined date (returned as string) . Could for example be
263
- used to state the date of first creation or the date of last changes.
263
+ - Returns ta user defined date. Could for example be used to state
264
+ the date of first creation or the date of last changes.
264
265
265
266
document
266
267
- Returns the current Document object.
@@ -276,11 +277,16 @@ repository
276
277
version
277
278
- Returns the user defined version (returned as string) of this odML file.
278
279
280
+ id
281
+ - id is a UUID (universally unique identifiers) that uniquely identifies
282
+ the current document. If not otherwise specified, this id is automatically
283
+ created and assigned.
284
+
279
285
Let's check out all attributes with the following commands::
280
286
281
287
>>> print(odmlEX.author)
282
288
D. N. Adams
283
- >>> print(odmlfile .date)
289
+ >>> print(odmlEX .date)
284
290
1979-10-12
285
291
>>> print(odmlEX.document)
286
292
<Doc 42 by D. N. Adams (2 sections)>
@@ -301,7 +307,7 @@ Sections were attached to the Document of our example odML file using the
301
307
following command::
302
308
303
309
>>> print(odmlEX.sections)
304
- [<Section TheCrew[crew] (4)>, <Section TheStarship[crew ] (1)>]
310
+ [<Section TheCrew[crew] (4)>, <Section TheStarship[starship ] (1)>]
305
311
306
312
As expected from the Document printout our example contains two Sections. The
307
313
printout and attributes of a Section are explained in the next chapter.
0 commit comments