Show / Hide Table of Contents

Class WMAssetAssociation

A DTO class representing individual embeddings as they are stored in the database.

Inheritance
object
WMAssetAssociation
Implements
IDbEntity
IWMEntity
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Asset.Base
Assembly: WMServer.dll
Syntax
public class WMAssetAssociation : IDbEntity, IWMEntity

Properties

Asset1ID

The ID of asset 1

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

Asset1Type

The type of asset 1

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

Asset2ID

The ID of asset 2

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

Asset2Type

The type of asset 2

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

CreatedBy

ID of the user that created this entity.

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

CreatedDate

Date and time this entity was last updated.

Declaration
public DateTime CreatedDate { get; set; }
Property Value
Type Description
DateTime

ID

The unique ID of this embedding

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

LastUpdatedBy

ID of the user that last updated this entity.

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

LastUpdatedDate

Date and time at which this entity was last updated.

Declaration
public DateTime LastUpdatedDate { get; set; }
Property Value
Type Description
DateTime

Relationship

The relationship between asset 1 and 2

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

Methods

AnyAssociation(WMAssetBase?, WMAssetBase?, RelationshipType, WMAppDbContext)

Returns whether any associations exist between Asset1 and Asset2 with relationship. If either Asset1 or Asset2 are null, they will be exempted from the search. i.e. If Asset1 and Asset2 are stated, only the single association between the two are considered. If only Asset1 or Asset2 are stated, all of their corresponding associations will be considered. If neither is stated, every association with the given relationship will be considered.

Declaration
public static Task<bool> AnyAssociation(WMAssetBase? Asset1, WMAssetBase? Asset2, WMAssetAssociation.RelationshipType relationship, WMAppDbContext context)
Parameters
Type Name Description
WMAssetBase Asset1
WMAssetBase Asset2
WMAssetAssociation.RelationshipType relationship
WMAppDbContext context
Returns
Type Description
Task<bool>

CreateAssociation(WMPrincipal, WMAssetBase, WMAssetBase, RelationshipType, WMAppDbContext)

Creates a new association with the given parameters

Declaration
public static Task<bool> CreateAssociation(WMPrincipal principal, WMAssetBase Asset1, WMAssetBase Asset2, WMAssetAssociation.RelationshipType relationship, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The owner of the association

WMAssetBase Asset1
WMAssetBase Asset2
WMAssetAssociation.RelationshipType relationship
WMAppDbContext context
Returns
Type Description
Task<bool>

True if an association was created, false otherwise

CreateDocumentAccess(WMPrincipal, string, string, WMAppDbContext)

Creates a WMAssetAssociation record joining the Document and DocumentIndex.

Declaration
public static Task CreateDocumentAccess(WMPrincipal principal, string DocumentIndexDir, string DocumentDir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The user making this request

string DocumentIndexDir

The VectorIndex ID

string DocumentDir

The Document ID

WMAppDbContext context
Returns
Type Description
Task

CreateDocumentIndexAccess(WMPrincipal, string, string, WMAppDbContext)

Creates a WMAssetAssociation record joining the LLM and DocumentIndex.

Declaration
public static Task CreateDocumentIndexAccess(WMPrincipal principal, string LLMDir, string DocumentIndexDir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The user making this request

string LLMDir

The LLM ID

string DocumentIndexDir

The VectorIndex ID

WMAppDbContext context
Returns
Type Description
Task

DeleteAllDocumentAssociations(WMPrincipal, string, WMAppDbContext)

Deletes all WMAssetAssociation records joining the Document.

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

The user making this request

string DocumentDir

The Document ID

WMAppDbContext context
Returns
Type Description
Task

DeleteAllDocumentIndexAssociations(WMPrincipal, string, WMAppDbContext)

Deletes all WMAssetAssociation records joining the DocumentIndex.

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

The user making this request

string DocumentIndexDir

The Document ID

WMAppDbContext context
Returns
Type Description
Task

DeleteAllLLMAssociations(WMPrincipal, string, WMAppDbContext)

Deletes all WMAssetAssociation records joining the LLM.

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

The user making this request

string LLMDir

The Document ID

WMAppDbContext context
Returns
Type Description
Task

DeleteAssociation(WMAssetBase?, WMAssetBase?, RelationshipType, WMAppDbContext)

Deletes all associations that exist between Asset1 and Asset2 with relationship. If either Asset1 or Asset2 are null, they will be exempted from the search. i.e. If Asset1 and Asset2 are stated, only the single association between the two are considered. If only Asset1 or Asset2 are stated, all of their corresponding associations will be considered. If neither is stated, every association with the given relationship will be considered.

Declaration
public static Task DeleteAssociation(WMAssetBase? Asset1, WMAssetBase? Asset2, WMAssetAssociation.RelationshipType relationship, WMAppDbContext context)
Parameters
Type Name Description
WMAssetBase Asset1
WMAssetBase Asset2
WMAssetAssociation.RelationshipType relationship
WMAppDbContext context
Returns
Type Description
Task

DeleteDocumentAccess(WMPrincipal, string, string, WMAppDbContext)

Deletes a WMAssetAssociation record joining the Document and DocumentIndex.

Declaration
public static Task DeleteDocumentAccess(WMPrincipal principal, string DocumentIndexDir, string DocumentDir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The user making this request

string DocumentIndexDir

The VectorIndex ID

string DocumentDir

The Document ID

WMAppDbContext context
Returns
Type Description
Task

DeleteDocumentIndexAccess(WMPrincipal, string, string, WMAppDbContext)

Deletes the WMAssetAssociation record joining the LLM and VectorIndex.

Declaration
public static Task DeleteDocumentIndexAccess(WMPrincipal principal, string LLMDir, string DocumentIndexDir, WMAppDbContext context)
Parameters
Type Name Description
WMPrincipal principal

The user making this request

string LLMDir

The LLM ID

string DocumentIndexDir

The VectorIndex ID

WMAppDbContext context
Returns
Type Description
Task

GetAssociation(WMAssetBase?, WMAssetBase?, RelationshipType, WMAppDbContext)

Returns all asset associations between Asset1 and Asset2 with relationship. If either Asset1 or Asset2 are null, they will be exempted from the search. i.e. If Asset1 and Asset2 are stated, only the single association between the two are returned. If only Asset1 or Asset2 are stated, all of their corresponding associations will be returned. If neither is stated, every association with the given relationship will be returned.

Declaration
public static Task<List<WMAssetAssociation>> GetAssociation(WMAssetBase? Asset1, WMAssetBase? Asset2, WMAssetAssociation.RelationshipType relationship, WMAppDbContext context)
Parameters
Type Name Description
WMAssetBase Asset1
WMAssetBase Asset2
WMAssetAssociation.RelationshipType relationship
WMAppDbContext context
Returns
Type Description
Task<List<WMAssetAssociation>>

UpdateAllDocumentAssociations(WMPrincipal, string, WMAppDbContext)

Updates all WMAssetAssociation records joining the Document.

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

The user making this request

string DocumentDir

The Document ID

WMAppDbContext context
Returns
Type Description
Task

Implements

IDbEntity
IWMEntity
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