Skip to main content

%iKnow.Objects.EntityUnique

Class %iKnow.Objects.EntityUnique Extends %Persistent [ Deprecated, StorageStrategy = iKnowStorage, System = 4 ]

Note: the use of this class is no longer recommended for accessing elements of a specific domain. For those scenarios, %iKnow.Tables.Utils offers a more flexible and customizable way of projecting iKnow domain data to SQL

This is a read-only object representation wrapping the internal iKnow data structures for unique Entities.

This class can be used from ObjectScript or SQL to access a single or small number of entries, but the storage mappings are not meant to support elaborate or complex queries targeting this SQL table.

Please use the predefined queries in %iKnow.Queries.EntityAPI and other query classes to consult Entity data as the internal global structures are designed to optimize performance for these queries rather than general-purpose access.

Note: the EntUni index only works for entities up to 150 characters.

NOTE: This object assumes all underlying data structures are present. Use domain-specific copies of these objects for domains where not all indices are built. See also the GenerateAllObjectsForDomain() method in %iKnow.Objects.Utils.

Parameters

READONLY

Parameter READONLY = 1;

Properties

DomainId

Property DomainId As %Integer;

EntUniId

Property EntUniId As %Integer;

EntityValue

Property EntityValue As %String(MAXLEN = 2000);

CorpusFrequency

Property CorpusFrequency As %Integer [ Calculated, SqlComputeCode = {set {CorpusFrequency} = {CorpusFrequencyAsConcept} + {CorpusFrequencyAsRelation}}, SqlComputed ];

CorpusFrequencyAsConcept

Property CorpusFrequencyAsConcept As %Integer [ Calculated, SqlComputeCode = {set {CorpusFrequencyAsConcept} = +$lg($g(^IRIS.IK.EntUniDetails({DomainId},{EntUniId})),1) }, SqlComputed ];

CorpusFrequencyAsRelation

Property CorpusFrequencyAsRelation As %Integer [ Calculated, SqlComputeCode = {set {CorpusFrequencyAsRelation} = +$lg($g(^IRIS.IK.EntUniDetails({DomainId},{EntUniId})),2) }, SqlComputed ];

CorpusSpread

Property CorpusSpread As %Integer [ Calculated, SqlComputeCode = {set {CorpusSpread} = +$lg($g(^IRIS.IK.EntUniDetails({DomainId},{EntUniId})),3) }, SqlComputed ];

CorpusSpreadAsConcept

Property CorpusSpreadAsConcept As %Integer [ Calculated, SqlComputeCode = {set {CorpusSpreadAsConcept} = +$lg($g(^IRIS.IK.EntUniDetails({DomainId},{EntUniId})),4) }, SqlComputed ];

CorpusSpreadAsRelation

Property CorpusSpreadAsRelation As %Integer [ Calculated, SqlComputeCode = {set {CorpusSpreadAsRelation} = +$lg($g(^IRIS.IK.EntUniDetails({DomainId},{EntUniId})),5) }, SqlComputed ];

CorpusDominanceAsConcept

Property CorpusDominanceAsConcept As %Numeric [ Calculated, SqlComputeCode = {set {CorpusDominanceAsConcept} = ##class(%iKnow.Semantics.DominanceAPI).GetDomainValue({DomainId},{EntUniId},$$$SDCONCEPT) }, SqlComputed ];

CorpusDominanceAsRelation

Property CorpusDominanceAsRelation As %Numeric [ Calculated, SqlComputeCode = {set {CorpusDominanceAsRelation} = ##class(%iKnow.Semantics.DominanceAPI).GetDomainValue({DomainId},{EntUniId},$$$SDRELATION) }, SqlComputed ];