Diagram of an Information Model
The following figure shows a complete information model that illustrates the various parts of the Type Information Model.
The information model in the preceding figure maintains data about files and directories. Thus, there are two classes, File and Directory.
There are three interfaces:
-
IFile exposes behavior unique to files. Thus, only the File class implements it.
-
IDirectory exposes behavior unique to directories. Thus, only the Directory class implements it.
-
IDirectoryItem exposes behavior appropriate to any object that can appear as an item within a directory. Since files can be contained in directories, the File class implements IDirectoryItem. Similarly, since directories can be contained within directories, the Directory class implements IDirectoryItem.
There is one relationship type: the Containment relationship type.
There are two collection types associated with the Containment relationship:
-
Collections that conform to the Items-of-directory collection type are origin collections for Containment relationships. The IDirectory interface exposes this collection.
-
Collections that conform to the Directory-of-item collection type are destination collections for Containment relationships. The IDirectoryItem interface exposes this collection.
The IFile interface exposes one property: the Size property.
The IDirectoryItem interface exposes one property: the ModificationDate property.
The IDirectory interface exposes one property: the ChildCount property.
This information model exposes no methods through any of its interfaces.