Show / Hide Table of Contents

Class WMModelBaseDTO

Data Transfer Object for WMModels' collectively.

Inheritance
object
DataTransferObject<WMModelBase>
WMAssetBaseDTO<WMModelBase>
WMModelBaseDTO
Implements
IWMAssetBaseDTO
IDbEntity
IWMEntity
IHasEncryptedValues
Inherited Members
WMAssetBaseDTO<WMModelBase>.ID
WMAssetBaseDTO<WMModelBase>.Name
WMAssetBaseDTO<WMModelBase>.OwnerID
WMAssetBaseDTO<WMModelBase>.OwnerType
WMAssetBaseDTO<WMModelBase>.ParentID
WMAssetBaseDTO<WMModelBase>.FullPathName
WMAssetBaseDTO<WMModelBase>.CreatedBy
WMAssetBaseDTO<WMModelBase>.CreatedDate
WMAssetBaseDTO<WMModelBase>.LastUpdatedBy
WMAssetBaseDTO<WMModelBase>.LastUpdatedDate
WMAssetBaseDTO<WMModelBase>.Summary
WMAssetBaseDTO<WMModelBase>.Documentation
WMAssetBaseDTO<WMModelBase>.DocumentationMIMEType
WMAssetBaseDTO<WMModelBase>.Properties
WMAssetBaseDTO<WMModelBase>.PropertiesSerialized
WMAssetBaseDTO<WMModelBase>.ValidateDirectory<T_Asset>(WMPrincipal, WMAssetBaseDTO<T_Asset>, WMAppDbContext)
DataTransferObject<WMModelBase>.ModelObject
DataTransferObject<WMModelBase>.SetID(string)
DataTransferObject<WMModelBase>.CreateModel(WMPrincipal, DbContext, object[])
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.MLModel
Assembly: WMServer.dll
Syntax
public class WMModelBaseDTO : WMAssetBaseDTO<WMModelBase>, IWMAssetBaseDTO, IDbEntity, IWMEntity, IHasEncryptedValues

Constructors

WMModelBaseDTO()

Constructor for WMModelBaseDTO

Declaration
public WMModelBaseDTO()

WMModelBaseDTO(string)

Constructor for WMModelBaseDTO specifying ID

Declaration
public WMModelBaseDTO(string id)
Parameters
Type Name Description
string id

Properties

EncryptionPlaceholder

Standard string to replace encrypted values with when not returning plain-text values.

Declaration
[NotMapped]
public string EncryptionPlaceholder { get; set; }
Property Value
Type Description
string

RegisteredType

Determines the type of model that should be implemented

Declaration
public string RegisteredType { get; set; }
Property Value
Type Description
string

SourceFormat

Indicates what format the source string is in.

Declaration
public string SourceFormat { get; set; }
Property Value
Type Description
string

SourceMode

Indicates how to interpret the source string.

Declaration
public string SourceMode { get; set; }
Property Value
Type Description
string

SourceString

The source string containing a decision tree.

Declaration
public string SourceString { get; set; }
Property Value
Type Description
string

Methods

Create(WMPrincipal, WMModelBaseDTO, WMAppDbContext, string, string)

Create a new WMModelBaseDTO from the provided data.

Declaration
public static Task<WMModelBase> Create(WMPrincipal principal, WMModelBaseDTO a_dto, WMAppDbContext context, string assetOwnerType, string assetOwnerID)
Parameters
Type Name Description
WMPrincipal principal

The owner of the model

WMModelBaseDTO a_dto

The WMModelBaseDTO to be created.

WMAppDbContext context

The DbContext

string assetOwnerType

TYpe of the WMPrincipal that owns the Asset.

string assetOwnerID

ID of the WMPrincipal that owns the Asset.

Returns
Type Description
Task<WMModelBase>
Exceptions
Type Condition
Exception

Delete(WMPrincipal, string, WMAppDbContext)

Delete the WMModelBaseDTO with the corresponding ID or FullPathName

Declaration
public static Task Delete(WMPrincipal principal, string dir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the directory

string dir

The Id or FullPathName of the corresponding WMModelBaseDTO to be deleted.

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

Evaluate(WMPrincipal, ModelEvaluationArgs, WMAppDbContext)

Performs an evaluation on an existing model.

Declaration
public static Task<ElementValue> Evaluate(WMPrincipal principal, ModelEvaluationArgs args, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal
ModelEvaluationArgs args
WMAppDbContext context
Returns
Type Description
Task<ElementValue>

FromModel()

Create this instance by reading properties from a WMModelBase

Declaration
public override void FromModel()
Overrides
DataTransferObject<WMModelBase>.FromModel()

Get(WMPrincipal, string, WMAppDbContext?)

Gets the WMModelBaseDTO instance with the specified id. Ensures ownership.

Declaration
public static Task<WMModelBaseDTO> Get(WMPrincipal principal, string dir, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir
WMAppDbContext context
Returns
Type Description
Task<WMModelBaseDTO>

Get(WMPrincipal, string?, int, WMAppDbContext?)

Gets a listing of the specified WMModelBaseDTO to the recursion depth specified.

Declaration
public static Task<IEnumerable<WMModelBaseDTO>> Get(WMPrincipal principal, string? dir = null, int recursionDepth = 0, WMAppDbContext? context = null)
Parameters
Type Name Description
WMPrincipal principal

The owner of the model being requested.

string dir

Specification of the directory under which to retrieve WMModelBaseDTO

int recursionDepth

Depth to which the directory subtrees under the specified directory should be traversed.

WMAppDbContext context

Optional reference to a WMAppDbContext instance.

Returns
Type Description
Task<IEnumerable<WMModelBaseDTO>>

GetFromDirectory(WMPrincipal, string, int, WMAppDbContext)

Gets a listing of the specified WMModelBaseDTO to the recursion depth specified with the ID/Dir of a WMAssetDirectory as input.

Declaration
public static Task<IEnumerable<WMModelBaseDTO>> GetFromDirectory(WMPrincipal principal, string dir = null, int recursionDepth = 0, WMAppDbContext context = null)
Parameters
Type Name Description
WMPrincipal principal

The owner of the models being requested.

string dir

Specification of the directory under which to retrieve WMModelBaseDTO

int recursionDepth

Depth to which the directory subtrees under the specified directory should be traversed.

WMAppDbContext context

Optional reference to a WMAppDbContext instance.

Returns
Type Description
Task<IEnumerable<WMModelBaseDTO>>

GetSourceString(WMPrincipal, string, WMAppDbContext)

Returns the SourceString belonging to the model with this ID/dir, otherwise an exception.

Declaration
public static Task<string> GetSourceString(WMPrincipal principal, string dir = null, WMAppDbContext context = null)
Parameters
Type Name Description
WMPrincipal principal
string dir

The ID or fullPathName of the model to get.

WMAppDbContext context
Returns
Type Description
Task<string>

SetSourceString(WMPrincipal, string, string, WMAppDbContext)

Sets the SourceString belonging to the model with this ID/dir, otherwise an exception.

Declaration
public static Task SetSourceString(WMPrincipal principal, string sourceString, string dir = null, WMAppDbContext context = null)
Parameters
Type Name Description
WMPrincipal principal
string sourceString

The plain-text representation of this model's source string.

string dir

The ID or fullPathName of the model to get.

WMAppDbContext context
Returns
Type Description
Task

Update(WMPrincipal, string, WMModelBaseDTO, WMAppDbContext)

Updates the specified WMModelBaseDTO from the provided data.

Declaration
public static Task Update(WMPrincipal principal, string id, WMModelBaseDTO a_dto, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the model

string id

The id or fullpath of the model

WMModelBaseDTO a_dto

The WMModelBaseDTO to be updated.

WMAppDbContext context

The DbContext

Returns
Type Description
Task
Exceptions
Type Condition
Exception

UpdateModel(WMPrincipal, DbContext, object[]?)

Updates and returns the contained WMModelBase.

Declaration
public override Task<WMModelBase> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type Name Description
WMPrincipal principal
DbContext context
object[] data
Returns
Type Description
Task<WMModelBase>
Overrides
WMAssetBaseDTO<WMModelBase>.UpdateModel(WMPrincipal, DbContext, object[])

Implements

IWMAssetBaseDTO
IDbEntity
IWMEntity
IHasEncryptedValues
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE