Class WMAssetAssociation
A DTO class representing individual embeddings as they are stored in the database.
Inherited Members
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> |
AssetToAssetType(WMAssetBase)
Converts an asset to its corresponding WMAssetAssociation.AssetType
Declaration
public static WMAssetAssociation.AssetType AssetToAssetType(WMAssetBase asset)
Parameters
| Type | Name | Description |
|---|---|---|
| WMAssetBase | asset | Any WMAssetBase derived asset. |
Returns
| Type | Description |
|---|---|
| WMAssetAssociation.AssetType | The correspdoning WMAssetAssociation.AssetType |
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, WMAssetIdentifier, WMAssetIdentifier, WMAppDbContext)
Creates a WMAssetAssociation record joining the Document and DocumentIndex.
Declaration
public static Task CreateDocumentAccess(WMPrincipal principal, WMAssetIdentifier DocumentIndexIdentifier, WMAssetIdentifier DocumentIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | DocumentIndexIdentifier | |
| WMAssetIdentifier | DocumentIdentifier | |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task |
CreateDocumentIndexAccess(WMPrincipal, WMAssetIdentifier, WMAssetIdentifier, WMAppDbContext)
Creates a WMAssetAssociation record joining the LLM and DocumentIndex.
Declaration
public static Task CreateDocumentIndexAccess(WMPrincipal principal, WMAssetIdentifier LLMIdentifier, WMAssetIdentifier DocumentIndexIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | LLMIdentifier | |
| WMAssetIdentifier | DocumentIndexIdentifier | |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task |
DeleteAllDocumentAssociations(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Deletes all WMAssetAssociation records joining the Document.
Declaration
public static Task DeleteAllDocumentAssociations(WMPrincipal principal, WMAssetIdentifier DocumentIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | DocumentIdentifier | |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task |
DeleteAllDocumentIndexAssociations(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Deletes all WMAssetAssociation records joining the DocumentIndex.
Declaration
public static Task DeleteAllDocumentIndexAssociations(WMPrincipal principal, WMAssetIdentifier DocumentIndexIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | DocumentIndexIdentifier | |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task |
DeleteAllLLMAssociations(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Deletes all WMAssetAssociation records joining the LLM.
Declaration
public static Task DeleteAllLLMAssociations(WMPrincipal principal, WMAssetIdentifier LLMIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | LLMIdentifier | |
| 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, WMAssetIdentifier, WMAssetIdentifier, WMAppDbContext)
Deletes a WMAssetAssociation record joining the Document and DocumentIndex.
Declaration
public static Task DeleteDocumentAccess(WMPrincipal principal, WMAssetIdentifier DocumentIndexIdentifier, WMAssetIdentifier DocumentIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | DocumentIndexIdentifier | |
| WMAssetIdentifier | DocumentIdentifier | |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task |
DeleteDocumentIndexAccess(WMPrincipal, WMAssetIdentifier, WMAssetIdentifier, WMAppDbContext)
Deletes the WMAssetAssociation record joining the LLM and VectorIndex.
Declaration
public static Task DeleteDocumentIndexAccess(WMPrincipal principal, WMAssetIdentifier LLMIdentifier, WMAssetIdentifier DocumentIndexIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | LLMIdentifier | |
| WMAssetIdentifier | DocumentIndexIdentifier | |
| 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, WMAssetIdentifier, WMAppDbContext)
Updates all WMAssetAssociation records joining the Document.
Declaration
public static Task UpdateAllDocumentAssociations(WMPrincipal principal, WMAssetIdentifier DocumentIdentifier, WMAppDbContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| WMPrincipal | principal | The user making this request |
| WMAssetIdentifier | DocumentIdentifier | |
| WMAppDbContext | context |
Returns
| Type | Description |
|---|---|
| Task |