ReposRoot Object
There is one root object in each repository. The root object is the starting point for navigating to other objects in the repository. The root object is also the starting point for two kinds of data navigation: type data navigation and instance data navigation.
- Type data navigation
When you create an information model, the corresponding repository type library is attached to the root object through the ReposTypeLibs collection. This collection can be used to enumerate all of the information models that are contained in a repository database.
- Instance data navigation
After an information model is installed, a repository database can be populated with object instance data. This instance data consists of objects and relationships that conform to the classes and relationship types of the information model.
Because the objects are connected through relationships, you can navigate through this data. However, to enable general-purpose repository browsers to navigate this data, the first navigational step must be from the root object of the repository through a root relationship collection to the primary objects of your information model. Primary objects are objects that make a good starting point for navigating to other objects of your information model.
Because this root relationship collection is different for each information model, the information model must define it. There are two options for attaching this relationship collection to the root object:
- The ReposRoot class implements the IReposRoot interface. This interface is provided to information model creators as a connection point. You can add your connecting relationship collection to this interface.
- You can extend the ReposRoot class to implement a new interface that is defined in your information model. This interface implements a relationship collection that attaches the root object to the primary objects in your information model.
- The ReposRoot class implements the IReposRoot interface. This interface is provided to information model creators as a connection point. You can add your connecting relationship collection to this interface.
To facilitate navigation, the root object in all repositories always has the same object identifier. The symbolic name for this object identifier is OBJID_ReposRootObj.
A ReposRoot object is also a RepositoryObject and a RepositoryObjectVersion object. In addition to the members described here, you can access members that are defined for those objects. For more information about accessing a member of an interface that is not the default interface, see Accessing Automation Object Members.
When to Use
Use the ReposRoot object to:
- Obtain a starting point for navigating to objects in a repository database.
- Create a new information model container.
- Attach a relationship collection to the root object of the repository that connects to the primary objects of your information model.
- Determine which information models are currently stored in a repository database.
Methods
Method | Description |
---|---|
CreateTypeLib | Creates an empty repository type library that you can use to define a new information model |
Collections
Collection | Description |
---|---|
ReposTypeLibs | The collection of repository type libraries that are currently stored in the repository |
Properties | The collection of all persistent properties that are attached to the ReposRoot object |
Workspaces | The collection of all workspaces present in the repository |