Show / Hide Table of Contents

Class DTEntityInfo

Class DTEntityInfo corresponds to an element of type Entity in a DTDL model.

Inheritance
object
DTEntityInfo
DTCommandTypeInfo
DTInterfaceInfo
DTLatentTypeInfo
DTNamedEntityInfo
DTSchemaInfo
DTUnitInfo
Implements
IEquatable<DTEntityInfo>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DTDLParser.Models
Assembly: DTDLParser.dll
Syntax
public abstract class DTEntityInfo : IEquatable<DTEntityInfo>
Remarks

This is the base class for all classes that correspond to elements in DTDL models.

Properties

| Edit this page View Source

ChildOf

Gets the identifier of the parent DTDL element in which this element is defined.

Declaration
public Dtmi ChildOf { get; }
Property Value
Type Description
Dtmi

Identifier of the parent DTDL element.

| Edit this page View Source

ClassId

Get the DTMI that identifies type Entity in the version of DTDL used to define this element.

Declaration
public virtual Dtmi ClassId { get; }
Property Value
Type Description
Dtmi

The DTMI for the DTDL type Entity.

| Edit this page View Source

Comment

Gets the value of the 'comment' property of the DTDL element that corresponds to this object.

Declaration
public string Comment { get; }
Property Value
Type Description
string

The 'comment' property of the DTDL element.

| Edit this page View Source

DefinedIn

Gets the identifier of the partition DTDL element in which this element is defined.

Declaration
public Dtmi DefinedIn { get; }
Property Value
Type Description
Dtmi

Identifier of the partition DTDL element.

| Edit this page View Source

Description

Gets the values of the 'description' property of the DTDL element that corresponds to this object.

Declaration
public IReadOnlyDictionary<string, string> Description { get; }
Property Value
Type Description
IReadOnlyDictionary<string, string>

The 'description' property of the DTDL element.

| Edit this page View Source

DisplayName

Gets the values of the 'displayName' property of the DTDL element that corresponds to this object.

Declaration
public IReadOnlyDictionary<string, string> DisplayName { get; }
Property Value
Type Description
IReadOnlyDictionary<string, string>

The 'displayName' property of the DTDL element.

| Edit this page View Source

EntityKind

Gets the kind of Entity, meaning the concrete DTDL type assigned to the corresponding element in the model.

Declaration
public DTEntityKind EntityKind { get; }
Property Value
Type Description
DTEntityKind

The kind of Entity.

| Edit this page View Source

Id

Gets the identifier of the DTDL element that corresponds to this object.

Declaration
public Dtmi Id { get; }
Property Value
Type Description
Dtmi

Identifier of the DTDL element.

| Edit this page View Source

LanguageMajorVersion

Gets the value of the 'languageMajorVersion' property of the DTDL element that corresponds to this object.

Declaration
public int LanguageMajorVersion { get; }
Property Value
Type Description
int

The 'languageMajorVersion' property of the DTDL element.

| Edit this page View Source

SupplementalProperties

Gets the supplemantal properties of the DTDL element that corresponds to this object.

Declaration
public virtual IDictionary<string, object> SupplementalProperties { get; }
Property Value
Type Description
IDictionary<string, object>

A dictionary that maps each string-valued property name to an object that holds the value of the property with the given name.

Remarks

If the property is a literal in the DTDL model, the object holds a literal value. If the property is another DTDL element in the model, the object is the C# object that corresponds to this element.

| Edit this page View Source

SupplementalTypes

Gets a collection of identifiers, each of which is a Dtmi that indicates a supplemental type that applies to the DTDL element that corresponds to this object.

Declaration
public virtual IReadOnlyCollection<Dtmi> SupplementalTypes { get; }
Property Value
Type Description
IReadOnlyCollection<Dtmi>

A collection of DTMIs indicating the supplemental types that apply to the DTDL element.

| Edit this page View Source

UndefinedProperties

Gets any undefined properties of the DTDL element that corresponds to this object.

Declaration
public IDictionary<string, JsonElement> UndefinedProperties { get; }
Property Value
Type Description
IDictionary<string, JsonElement>

A dictionary that maps each string-valued property name to an object that holds the value of the property with the given name.

Remarks

An undefined property is any JSON-LD term used as a property name that is not defined in the DTDL language and not defined by any DTDL extension included via the "@context" property.

| Edit this page View Source

UndefinedTypes

Gets a collection of strings, each of which is an undefined type that applies to the DTDL element that corresponds to this object.

Declaration
public IReadOnlyCollection<string> UndefinedTypes { get; }
Property Value
Type Description
IReadOnlyCollection<string>

A collection of undefined type strings.

Remarks

An undefined type is any JSON-LD term used as a value of "@type" that is not defined in the DTDL language and not defined by any DTDL extension included via the "@context" property. The DTDL language permits undefined types to be co-typed on any DTDL element regardless of its primary type. The DTDL language permits undefined propertyes to be added to any DTDL element that has an undefined co-type.

Methods

| Edit this page View Source

DeepEquals(DTEntityInfo)

Compares to another DTEntityInfo object, recursing through the entire subtree of object properties.

Declaration
public virtual bool DeepEquals(DTEntityInfo other)
Parameters
Type Name Description
DTEntityInfo other

The other DTEntityInfo object to compare to.

Returns
Type Description
bool

True if equal.

| Edit this page View Source

Equals(DTEntityInfo)

Compares to another DTEntityInfo object.

Declaration
public virtual bool Equals(DTEntityInfo other)
Parameters
Type Name Description
DTEntityInfo other

The other DTEntityInfo object to compare to.

Returns
Type Description
bool

True if equal.

| Edit this page View Source

ValidateInstance(string)

Validate JSON text to determine whether it conforms to the definition in the DTDL language (for primitive schema types) or to the specific element defined in the model (for complex schema types).

Declaration
public IReadOnlyCollection<string> ValidateInstance(string instanceText)
Parameters
Type Name Description
string instanceText

The JSON text to validate.

Returns
Type Description
IReadOnlyCollection<string>

A list of strings that each indicate a validation failure; the list is empty if the text is valid JSON and conforms.

Remarks

Most subclasses will throw a ValidationException if this method is called, because they have no instance validator defined. Conformance is meaningfull only for schema types, so only these classes can validate an instance.

| Edit this page View Source

ValidateInstance(JsonElement)

Validate a JsonElement to determine whether it conforms to the definition in the DTDL language (for primitive schema types) or to the specific element defined in the model (for complex schema types).

Declaration
public virtual IReadOnlyCollection<string> ValidateInstance(JsonElement instanceElt)
Parameters
Type Name Description
JsonElement instanceElt

The JsonElement to validate.

Returns
Type Description
IReadOnlyCollection<string>

A list of strings that each indicate a validation failure; the list is empty if the JsonElement conforms.

Remarks

This method will throw a ValidationException for subclasses that have no instance validator defined. Conformance is meaningfull only for schema types, so only these classes can validate an instance.

Operators

| Edit this page View Source

operator ==(DTEntityInfo, DTEntityInfo)

Determines whether two DTEntityInfo objects are equal.

Declaration
public static bool operator ==(DTEntityInfo x, DTEntityInfo y)
Parameters
Type Name Description
DTEntityInfo x

One DTEntityInfo object to compare.

DTEntityInfo y

Another DTEntityInfo object to compare to the first.

Returns
Type Description
bool

True if equal.

| Edit this page View Source

operator !=(DTEntityInfo, DTEntityInfo)

Determines whether two DTEntityInfo objects are not equal.

Declaration
public static bool operator !=(DTEntityInfo x, DTEntityInfo y)
Parameters
Type Name Description
DTEntityInfo x

One DTEntityInfo object to compare.

DTEntityInfo y

Another DTEntityInfo object to compare to the first.

Returns
Type Description
bool

True if not equal.

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX