Title: HDF5 Abstract Data Model
1HDF5 Abstract Data Model
- Classes, Objects and their relationships
- http//hdf.ncsa.uiuc.edu/HDF5/ADM_EOS_Sep99/index.
htm
2Outline
- Motivation and goals
- Overview of HDF5 file structure and HDF5 objects
- UML notation
- Formal description of HDF5 file, HDF5 objects and
operations in UML
3Motivation and Goals
- Need a formal description of HDF5 file and
library - Need an HDF5 abstract data model (ADM) for high
level C, F90, Java, Ada(?) APIs - Attempt to look at HDF5 ADM from OO point of view
- HDF group does not have experience in OO design
and languages - Universal Modeling Language (UML) has been chosen
to document current HDF5 ADM and HDF5 Library - Suggestions and help from HDF5 OO users is
WELCOME!
4HDF5 File (conceptual view)
- Container for storing scientific data
- Primary Objects
- Groups
- Datasets
- Secondary Objects
- Datatypes
- Dataspaces
- Additional means to organize data
- Attributes
- Sharable objects
- Storage and access properties
5Example of an HDF5 File
Dataset path /B /C/D/G
6Example of an HDF5 File (cont.)
/
RGroup
B
C
F
Group
Dataset
Datatype
D
G
Group
K
Dataset path /B /C/D/G
7Example of an HDF5 File (cont.)
/
File
RGroup
B
C
F
Group
Dataset
Datatype
D
Group
K
Dataset path /B
8HDF5 File (logical view)
- Directed graph with an entry point (root group)
- nodes are HDF5 objects
- Group, Dataset, Dataspace, Datatype
- each object may have more than one path to it
- edges are inclusion directions (HDF5 links)
- graph may have
- loops
- isolated nodes
- dangling edges
9 UML Notation Book
UML Distilled Applying the
Standard Object Modeling Language
by Martin Fowler
Booch Jacobson Rumbaugh Object Technology
Series
Addison-Wesley
10UML Notation
Class
Class Name ____________ Attribute __________
__ Operation
Class Name
11UML Notation
Association Describes connection
between object instances, should be a verb.
Object A has object B associated with it.
Class A
Class B
Multiplicity of Association Object A
has zero or more objects B associated with it.
Object B belongs to at least one and up to N
objects A
Class A
Class B
1..N
0...
12UML Notation
Generalization(Inheritance)
is a relationship
B is an A
Class A
Class B
13UML Notation
Aggregation
a part of relationship Objects B
and C are part of object A
Class A
Class B
Class C
14UML Notation
Composition
a part of relationship Objects B
and C live and die with A
Class A
Class B
Class C
15HDF5 Classes
- Named_Object Class
- Group
- Dataset
- Named Dataspace
- Named Datatype
- User_Defined_Attribute Class
- File Class
- Group Class
- Dataset Class
- Dataspace Class
- Datatype Class
16HDF5 Classes
- Property List Class
- File Property List
- Creation Property List
- Access Property List
- Dataset Property List
- Transfer Property List
- Storage property List
- Link Class
- Root Link
- Non-Root Link
- Soft Link
- Hard Link
17File Class File , Group Class and Root Link
Class Association Diagram
1
1
File Class
Group Class
1
0
1
1
Root Link Class
File Property List Class
File is a composition of a Group. Root Link is
created when File is created. Root Link points
to the Group which is called Root Group. Root
Group is automatically created/opened/closed
when File is created/opened/closed.
18 File and Group Classes
File Class _______________________________________
________ open/close create is_hdf5 get_create_prp
get_access_prp mount/unmount reopen
Group Class _____________________ ________________
_____ open/close iterate get_object_info get_link
_value get/set_comment
19Group Class and Associated Classes
Group
Group Class
1
C
0
Non-Root Link Class
1
D
A
B
01
...
HDF5 object
HDF5 object
Named Object Class
20Link Class
Link Class
Non-Root Link Class
Root Link Class
Hard Link
Soft Link
0...
1...
0...1
1
Named Object
Named Object
21Non-Root Link Class
Non-Root Link Class ____________________________ n
ame ______________________ link/unlink create move
(rename)
22Named_Object Class
Named Datatype Class
Group Class
Dataset Class
Named Dataspace Class
Named_Object Class
1
0...1
1
0
0
1...
User Defined Attribute
Hard Link Class
Soft Link Class
Not implemented yet
23Dataset Class and associated Classes
0...
1
0...
0...
1
1
0...
1
1
1
1...
0
24Dataset Class
Dataset Class ________________________ u
ser defined attribute ________________________ cre
ate open/close write/read extend get_space/type/pr
operty
25Attribute Class and associated Classes
Named Object Class
1
0...
Attribute Class
0...
0...
1
1
Dataspace Class
Datatype Class
26Attribute Class
Attribute Class ________________________
_ name _____________________ create open/close wri
te/read get_space/type/property
27Property List Class and Subclasses
Property List
File Property List
Dataset Property List
Transfer PList
Storage PList
Access PList
Creation PList
28 Dataspace Class
Dataspace Class
Hard Link
0
1
Transient Dataspace Class
29Dataspace Class
Dataspace Class _______________________________ ra
nk current_size maximum_size _____________________
__________ create/create_simple open/close/lock is
_simple copy extent_class extent_copy set_extent_s
imple set_extent_none get_simple_extent_npoints/nd
ims/dims
Dataspace Extent
General operations
Extent operations
30Transient Dataspace Class
Dataspace Class ______________ selection _________
_____ select_elements select_none select_hyperslab
select_valid offset_simple ...
Dataspace Selection
Set and modify selections
31Datatype Class and Subclasses
Datatype Class
Compound
Enumeration
Atomic
Variable Length
Array
32Datatype Class
Datatype Class ______________ ______________ copy
equal close convert get_class get_size
33Atomic Datatype Class and Subclasses
Atomic Datatype Class
Predefined Atomic
Userdefined Atomic
H5Tcopy
1
0
Link Class
34Predefined Atomic Datatype Class
Predefined Atomic Datatype Class
String
Time
Integer
Float
Opaque
Reference
Bitfield
Object Reference
Region Reference
35Examples of Predefined Atomic Datatype
Predefined Atomic Datatype _______________________
name H5T_arch_base _______________________
H5T_IEEE_F64LE Eight-byte little-endian, IEEE
floating-point H5T_STD_U16BE Two-byte
big-endian, unsigned integer H5T_C_S1
One-byte null-terminated string of eight-bit
characters H5T_CRAY_F64 Eight-byte Cray
floating point H5T_STD_ROBJ Reference
to entire object in a file H5T_NATIVE_LONG long
36Compound Datatype Class
Compound Datatype Class
typedef struct int a float b
my_type c10 compound_t
1
Datatype Class
37Enumeration Datatype Class
Enumeration Datatype
1
Datatype Class
1
RED 0 GREEN 1 BLUE 2
( string, value of type Datatype )
Only Integer datatype for now
38Variable Length Datatype Class
Variable Length Datatype Class
1
Datatype Class
1
2
3
4
5
A
C
RED
GREEN
BLUE
39Reading Dataset into Memory from File
File
Memory
2D array of integers
3D array of floats
40Reading Dataset into Memory from File
Memory
2D array with selected rectangle
I/O hint
floats
3D array with selected union of cubes