Object Model

Overview

The Common Data Model object model provides two main types of classes for Common Data Model objects: definition classes and reference classes. Since the object model is heavily interconnected and the concepts have different interactions amongst each other, the object model introduces reference classes to be able to easily reference different concepts without encapsulating them. Every reference class has its own corresponding definition class, and they are closely related. There are also various enum classes, which you'll find at the end of this article.

The C# code can be found here.

Definition classes

Name Description
Argument Exists inside trait references and provides name/value pairs for a trait reference. With arguments traits can contain data.
Argument Collection Extends Collection and adds additional behaviors specific to argument collections.
Attribute Context Provides more insight into an attribute's (parent/child) relationship. It's heavily used during an entity's attribute resolution and can contain the history of all changes that led to an attribute's resolution. Resolved concepts, such as resolved attributes, can contain attribute contexts to provide more insight into the original, non-resolved hierarchical attributes.
Attribute Group Represents a group of attribute items that provide a similar role.
Attribute Item Represents the base interface for a generic attribute that could be a type attribute or an entity attribute.
Attribute Resolution Guidance Provides properties that help with the resolution process of entities, attributes, and other resolvable Common Data Model concepts.
CdmObject Represents the base interface for all Common Data Model objects.
CdmObject Definition Represents the base interface for all Common Data Model object definitions.
CdmObject Definition Collection Extends Collection and adds additional behaviors specific to CdmObject definition collections.
Collection Holds a set of Common Data Model objects and provides easy handling of them.
Constant Entity Provides a way of making an entity with records and an associated schema in a JSON file. We use these whenever we want to store a table of information inside a parameter of a trait. They are used in the enum definitions, in the localized display text, etc.
Corpus Provides the most important basic functionalities to deal with the object model. There will usually only be one corpus when dealing with the object model.
Data Partition Points to a location of entity-related data.
Data Partition Pattern Provides a way of selecting or generating a set of partitions based on the requirements specified as a regular expression.
Data Type Provides the ability to assign different data types to attributes (such as string, boolean, etc.).
Document Enables the object model to have a persisted state. Every document can contain different Common Data Model object definitions, such as entities, data partitions, or attributes.
Document Collection Extends Collection and adds additional behaviors specific to document collections.
E2E Relationship A relationship between two entity's attributes.
Entity Provides a concrete placeholder for a user to attach certain information to a concept. It's a collection of attributes that creates a semantic meaning of why these attributes coexist. Since entities can inherit from other entities, it's possible for them to represent a hierarchical structure. The hierarchical structure can also be removed from the entities by resolving them.
Entity Attribute An attribute that also points to an entity.
Entity Collection Extends Collection and adds behaviors specific to entity collections.
Entity Declaration Provides a simple functionality that's extended by a local entity declaration and a referenced entity declaration.
Folder Provides a hierarchical structure of the object model for organizing documents. Folders can contain other folders or documents.
Folder Collection Extends Collection and adds additional behaviors specific to folder collections. It's used only for the ChildFolders property in Folder and not for any other folder collections, as this collection copies fields from the parent folder to the children.
Import Used by documents to provide the files and documents that need to be imported first.
Import Collection Extends Collection and adds additional behaviors specific to import collections.
Local Entity Declaration A declaration of an entity that resides locally and has associated data partitions.
Manifest A top-level document with the extension '.manifest.cdm.json'. A manifest can reference different documents, including documents with the extension '.cdm.json' that contain entities.
Manifest Declaration A declaration for the Common Data Model manifest format.
Parameter Provides the ability to specify the parameters that a trait should contain. By providing a name, default values, and supported data types, trait references become restricted by which arguments they can contain. Parameters are defined for traits in the schema documents folder.
Purpose Provides an attribute with what it does for an entity (for example, SortedBy or NamedBy).
Referenced Entity Declaration A declaration of an entity that resides in a remote location.
Trait Helps express the semantic meaning and structural guidance. Traits are essentially a metadata's metadata. Traits can extend other traits and have a format that's easy to understand and follow.
Trait Collection Extends Collection and adds additional behaviors specific to trait collections.
Type Attribute Defines data type attributes along with supported functionalities, such as custom default values and descriptions. Model.json attributes are converted into Common Data Model type attributes.

Reference classes

All reference objects extend from the CdmObject Reference interface. Many references are empty interfaces extending from CdmObjectReferenceBase. These references are CdmAttributeContextReference, CdmAttributeGroupReference, CdmAttributeReference, CdmDataTypeReference, CdmEntityReference, and CdmPurposeReference.

Name Description
CdmObject Reference Represents the base interface for all Common Data Model object references.
Trait Reference The reference class for traits.

Enum classes

Name Description
Attribute Context Type The attribute context types.
CdmObject Type The Common Data Model object types.
Data Format The data formats.
Relationship Discovery Style The types of relationships we want populated in a manifest.
Status Level The status levels that could be reported.