Naming and Unique-Naming Collections

Meta Data Services Programming

Meta Data Services Programming

Naming and Unique-Naming Collections

Certain relationships can provide a name by which the origin object refers to the destination object. Such a relationship is called a naming relationship. A collection of naming relationships is a naming collection.

Certain naming collections require that all destination objects in the collection have unique names. Such a collection is referred to as a unique-naming collection.

User requirements may require objects to support multiple names. For example, consider a system in which a single program can have two different file names, because there are two different file systems that allow and disallow long names, respectively. The following figure illustrates this case.

The figure shows four relationships. Each relationship specifies a name by which one of the objects (the origin object) refers to the other object (the destination object). In particular, notice that the object representing the error-handling program file has two different names, ErrHndl and ErrorHandler.

In order to support this kind of capability, the Repository Type Information Model (RTIM) attaches the Name property to the relationship type, not to the object class. This enables an object to have as many names as it has relationships (that is, relationships for which it is the destination).

Object Naming Collections

If the COLLECTION_OBJECTNAMING flag is set, there is no relation-specific naming of this object. The object has the same name in the relationship as specified by the INamedObject::Name property on the object. Specifying a name during the collection's Add operation or attempting to set the IRepositoryItem:Name property on the relationship object will return the error EREP_COL_OBJECTNAMING. If you attempt to add an object that does not support INamedObject to the collection, the error EREP_COL_OBJECTNOTNAMED is returned.

See Also

CollectionDefFlags Enumeration

INamedObject Interface

Naming Objects, Collections, and Relationships

Repository Errors (alphabetical order)