HDF5 Abstract Data Model
Classes, Objects and their relationships
http://hdf.ncsa.uiuc.edu/HDF5/ADM_EOS_Sep99/index.htm

0...
Outline
• Motivation and goals
• Overview of HDF5 file structure and HDF5
objects
• UML notation
• Formal description of H...
Motivation and Goals
• Need a formal description of HDF5 file and library
• Need an HDF5 abstract data model (ADM) for hig...
HDF5 File (conceptual view)
• Container for storing scientific data
– Primary Objects:
– Groups
– Datasets
– Secondary Obj...
Example of an HDF5 File
/

File

RGroup
B

A

C
F

Datatype

Group

Dataset

H

D

G
Group

E
Dataset

K

Dataset path : /...
Example of an HDF5 File (cont.)
/

File

RGroup
B

A

C
F

Datatype

Group

Dataset

H

D

G
Group

E
Dataset

K

Dataset ...
Example of an HDF5 File (cont.)
File

/

RGroup
B

C
F

Datatype

Group

Dataset
D
Group

K

Dataset path : /B
02/21/14

7
HDF5 File (logical view)
• Directed graph with an entry point (root group)
• nodes are HDF5 objects :
– Group, Dataset, Da...
UML Notation
Book:
UML Distilled
Applying the Standard Object Modeling Language
by Martin Fowler
Booch Jacobson Rumbaugh O...
UML Notation
Class

Class Name

Class Name
____________
Attribute
____________
Operation

02/21/14

10
UML Notation
Association
Describes connection between object instances, should be a verb.
Object A has object B associated...
UML Notation
Generalization(Inheritance)
“is a” relationship
B is an A

Class A

Class B

02/21/14

12
UML Notation
Aggregation
“a part of” relationship
Objects B and C are part of object A

Class A

Class B

02/21/14

Class ...
UML Notation
Composition
“a part of” relationship
Objects B and C “live and die” with A

Class A

Class B

02/21/14

Class...
HDF5 Classes
–
–
–
–
–

File Class
Group Class
Dataset Class
Dataspace Class
Datatype Class

02/21/14

– Named_Object Clas...
HDF5 Classes
– Link Class
• Root Link
• Non-Root Link
– Soft Link
– Hard Link

02/21/14

– Property List Class
• File Prop...
File Class File , Group Class and Root Link Class
Association Diagram
File Class

1

1

Group Class

0…*

1

1

1

File Pr...
File and Group Classes
File Class
_______________________
_______________________
_

open/close
create
is_hdf5
get_create_...
Group Class and Associated Classes
Group

Group Class
1

C

0…*

Non-Root Link
Class
1…*

A

D

B

0…1

Named Object Class...
Link Class
Link Class

Root Link Class

Non-Root Link Class

Hard Link

Soft Link
0...*

1...*

0...1

1

Named Object
02/...
Non-Root Link Class
Non-Root Link Class
____________________________

name
______________________
link/unlink
create
move ...
Named_Object Class

Group Class

Dataset Class

Named Datatype Class

Named Dataspace Class

Named_Object Class
0...1

1

...
Dataset Class and associated Classes
User Defined Attribute
0...*

0...*

Datatype

1

0…*

Soft Link
02/21/14

1

Dataset...
Dataset Class
Dataset Class
________________________

user defined attribute
________________________

create
open/close
w...
Attribute Class and associated Classes
Named Object Class
1

0...*

Attribute Class
0...*

0...*

1

1

Datatype Class
02/...
Attribute Class
Attribute Class
_________________________

name
_____________________
create
open/close
write/read
get_spa...
Property List Class and Subclasses
Property List

File Property List

Creation PList

02/21/14

Access PList

Dataset Prop...
Dataspace Class

Hard Link

0…*

1

Dataspace Class

Transient Dataspace Class

02/21/14

28
Dataspace Class

Dataspace Extent

General operations

Extent operations

02/21/14

Dataspace Class
______________________...
Transient Dataspace Class

Dataspace Selection

Set and modify selections

02/21/14

Dataspace Class
______________
select...
Datatype Class and Subclasses
Datatype Class

Compound

Atomic

Array

02/21/14

Enumeration

Variable Length

31
Datatype Class
Datatype Class
______________
______________
copy
equal
close
convert
get_class
get_size
02/21/14

32
Atomic Datatype Class and Subclasses
Atomic Datatype Class

Predefined Atomic

Userdefined Atomic
H5Tcopy

1

0…*

Link Cl...
Predefined Atomic Datatype Class
Predefined Atomic Datatype Class

String

Time
Opaque

Integer
Reference

Object Referenc...
Examples of Predefined Atomic Datatype
Predefined Atomic Datatype
_______________________
name = H5T_arch_base
___________...
Compound Datatype Class
Compound Datatype Class

1…*

Datatype Class

02/21/14

typedef struct {
int a;
float b;
my_type c...
Enumeration Datatype Class
Datatype Class

RED
GREEN
BLUE

1

0
1
2

Enumeration Datatype

1…*

( string, value of type Da...
Variable Length Datatype Class
Datatype Class

1

Variable Length Datatype Class

A

1

2

3

C
RED

GREEN

02/21/14

BLUE...
Reading Dataset into Memory from File
File
2D array of integers

02/21/14

Memory
3D array of floats

39
Reading Dataset into Memory from File
File

Dataset

Memory

2D array with selected rectangle

Copy of File Dataspace
____...
Upcoming SlideShare
Loading in …5
×

HDF5 Abstract Data Model

796 views
617 views

Published on

Source: http://hdfeos.org/workshops/ws03/presentations/elena.ppt

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
796
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

HDF5 Abstract Data Model

  1. 1. HDF5 Abstract Data Model Classes, Objects and their relationships http://hdf.ncsa.uiuc.edu/HDF5/ADM_EOS_Sep99/index.htm 02/21/14 1
  2. 2. Outline • Motivation and goals • Overview of HDF5 file structure and HDF5 objects • UML notation • Formal description of HDF5 file, HDF5 objects and operations in UML 02/21/14 2
  3. 3. Motivation 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! 02/21/14 3
  4. 4. HDF5 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 02/21/14 4
  5. 5. Example of an HDF5 File / File RGroup B A C F Datatype Group Dataset H D G Group E Dataset K Dataset path : /B /C/D/G 02/21/14 5
  6. 6. Example of an HDF5 File (cont.) / File RGroup B A C F Datatype Group Dataset H D G Group E Dataset K Dataset path : /B /C/D/G 02/21/14 6
  7. 7. Example of an HDF5 File (cont.) File / RGroup B C F Datatype Group Dataset D Group K Dataset path : /B 02/21/14 7
  8. 8. HDF5 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 02/21/14 8
  9. 9. UML Notation Book: UML Distilled Applying the Standard Object Modeling Language by Martin Fowler Booch Jacobson Rumbaugh Object Technology Series Addison-Wesley 02/21/14 9
  10. 10. UML Notation Class Class Name Class Name ____________ Attribute ____________ Operation 02/21/14 10
  11. 11. UML 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 02/21/14 1..N 0...* Class B 11
  12. 12. UML Notation Generalization(Inheritance) “is a” relationship B is an A Class A Class B 02/21/14 12
  13. 13. UML Notation Aggregation “a part of” relationship Objects B and C are part of object A Class A Class B 02/21/14 Class C 13
  14. 14. UML Notation Composition “a part of” relationship Objects B and C “live and die” with A Class A Class B 02/21/14 Class C 14
  15. 15. HDF5 Classes – – – – – File Class Group Class Dataset Class Dataspace Class Datatype Class 02/21/14 – Named_Object Class • Group • Dataset • Named Dataspace • Named Datatype – User_Defined_Attribute Class 15
  16. 16. HDF5 Classes – Link Class • Root Link • Non-Root Link – Soft Link – Hard Link 02/21/14 – Property List Class • File Property List – Creation Property List – Access Property List • Dataset Property List – Transfer Property List – Storage property List 16
  17. 17. File Class File , Group Class and Root Link Class Association Diagram File Class 1 1 Group Class 0…* 1 1 1 File Property List Class Root Link 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. 02/21/14 17
  18. 18. File and Group Classes File Class _______________________ _______________________ _ open/close create is_hdf5 get_create_prp get_access_prp mount/unmount reopen 02/21/14 Group Class _____________________ _____________________ open/close iterate get_object_info get_link_value get/set_comment 18
  19. 19. Group Class and Associated Classes Group Group Class 1 C 0…* Non-Root Link Class 1…* A D B 0…1 Named Object Class 02/21/14 ... HDF5 object HDF5 object 19
  20. 20. Link Class Link Class Root Link Class Non-Root Link Class Hard Link Soft Link 0...* 1...* 0...1 1 Named Object 02/21/14 Named Object 20
  21. 21. Non-Root Link Class Non-Root Link Class ____________________________ name ______________________ link/unlink create move (rename) 02/21/14 21
  22. 22. Named_Object Class Group Class Dataset Class Named Datatype Class Named Dataspace Class Named_Object Class 0...1 1 1 0…* 1...* 0…* Soft Link Class Hard Link Class User Defined Attribute Not implemented yet 02/21/14 22
  23. 23. Dataset Class and associated Classes User Defined Attribute 0...* 0...* Datatype 1 0…* Soft Link 02/21/14 1 Dataset 1 1 0...* 1...* Hard Link 0...* 1 Dataspace 1 Storage Property List 23
  24. 24. Dataset Class Dataset Class ________________________ user defined attribute ________________________ create open/close write/read extend get_space/type/property 02/21/14 24
  25. 25. Attribute Class and associated Classes Named Object Class 1 0...* Attribute Class 0...* 0...* 1 1 Datatype Class 02/21/14 Dataspace Class 25
  26. 26. Attribute Class Attribute Class _________________________ name _____________________ create open/close write/read get_space/type/property 02/21/14 26
  27. 27. Property List Class and Subclasses Property List File Property List Creation PList 02/21/14 Access PList Dataset Property List Transfer PList Storage PList 27
  28. 28. Dataspace Class Hard Link 0…* 1 Dataspace Class Transient Dataspace Class 02/21/14 28
  29. 29. Dataspace Class Dataspace Extent General operations Extent operations 02/21/14 Dataspace Class _______________________________ rank current_size maximum_size _______________________________ create/create_simple open/close/lock is_simple copy extent_class extent_copy set_extent_simple set_extent_none get_simple_extent_npoints/ndims/dims 29
  30. 30. Transient Dataspace Class Dataspace Selection Set and modify selections 02/21/14 Dataspace Class ______________ selection ______________ select_elements select_none select_hyperslab select_valid offset_simple ………………... 30
  31. 31. Datatype Class and Subclasses Datatype Class Compound Atomic Array 02/21/14 Enumeration Variable Length 31
  32. 32. Datatype Class Datatype Class ______________ ______________ copy equal close convert get_class get_size 02/21/14 32
  33. 33. Atomic Datatype Class and Subclasses Atomic Datatype Class Predefined Atomic Userdefined Atomic H5Tcopy 1 0…* Link Class 02/21/14 33
  34. 34. Predefined Atomic Datatype Class Predefined Atomic Datatype Class String Time Opaque Integer Reference Object Reference 02/21/14 Float Bitfield Region Reference 34
  35. 35. Examples 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 02/21/14 35
  36. 36. Compound Datatype Class Compound Datatype Class 1…* Datatype Class 02/21/14 typedef struct { int a; float b; my_type c[10]; } compound_t 36
  37. 37. Enumeration Datatype Class Datatype Class RED GREEN BLUE 1 0 1 2 Enumeration Datatype 1…* ( string, value of type Datatype ) Only Integer datatype for now 02/21/14 37
  38. 38. Variable Length Datatype Class Datatype Class 1 Variable Length Datatype Class A 1 2 3 C RED GREEN 02/21/14 BLUE 38 4 5
  39. 39. Reading Dataset into Memory from File File 2D array of integers 02/21/14 Memory 3D array of floats 39
  40. 40. Reading Dataset into Memory from File File Dataset Memory 2D array with selected rectangle Copy of File Dataspace _______________________ Selection I/O hint Dataset Xfer Prp List Dataspace Data ( H5Dread Buffer Datatype Memory Dataspace ___________________ Memory Datatype Selection floats 3D array with selected union of cubes 02/21/14 40 )

×