Επεξεργασία

Κοινή χρήση μέσω


CdmObject

This is the base interface for all Common Data Model objects. It's extended by CdmObjectBase and CdmObjectDefinitionBase in C#, Java, and TypeScript.

public interface CdmObject

This interface is substituted with a regular class in Python.

Properties

Name Type Description
Id int The object's ID.
InDocument CdmDocumentDefinition The document where this object is defined inside of.
AtCorpusPath string The corpus path to the object.
ObjectType CdmObjectType The object's type.
Owner CdmObject The object that owns or contains this object.

Methods

Name Description Return Type
FetchObjectDefinition<T>(ResolveOptions)
resOpt [optional]: The resolve options.
Returns the resolved object reference. T, where T extends CdmObjectDefinition

Note: In TypeScript, there is an async variant of this function called FetchObjectDefinitionAsync. This function loads the import files when they are required.
FetchObjectDefinitionName() Returns the name of the object if this is an object definition, or the name of the referenced object if this is an object reference. string
IsDerivedFrom(string, ResolveOptions)
baseDef: The name of the object that we want to check whether this object is derived from it.
resOpt [optional]: The resolve options.
Returns true if the object (or the referenced object) is an extension of the specified symbol name in some way. bool
Copy(ResolveOptions, CdmObject)
resOpt: The resolve options.
host [optional]: For internal use. The host to copy the object into, instead of creating a new object instance.
Creates a copy of this object. CdmObject
Validate() Validates that the object is configured properly. Returns false if it's not. bool
CreateSimpleReference(ResolveOptions)
resOpt [optional]: The resolve options.
Takes an object definition and returns the object reference that points to the definition. CdmObjectReference