Skip to main content

%iKnow.Objects.EntityOccurrence

Class %iKnow.Objects.EntityOccurrence 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 Entity Occurrences.

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: 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;

EntOccId

Property EntOccId As %Integer;

EntUniId

Property EntUniId As %Integer;

EntTypeId

Property EntTypeId As %Integer;

SentenceId

Property SentenceId As %Integer;

PosInSentence

Property PosInSentence As %Integer;

CrcOccurrenceIdM

Property CrcOccurrenceIdM As %Integer;

CrcOccurrenceIdR

Property CrcOccurrenceIdR As %Integer;

CrcOccurrenceIdS

Property CrcOccurrenceIdS As %Integer;

PathId

Property PathId As %Integer;

PosInPath

Property PosInPath As %Integer;

StemmedEntUniId

Property StemmedEntUniId As %Integer [ Calculated, SqlComputeCode = {new d  set {StemmedEntUniId} = $s($ld(^IRIS.IK.EntOccId({DomainId},{EntOccId}),10,d):d, 1:{EntUniId}) }, SqlComputed ];

If the domain has stemming enabled, this points to the stemmed entity's ID

Entity

Property Entity As %iKnow.Objects.EntityUnique [ Calculated, SqlComputeCode = { set {Entity} = {DomainId} _"||"_ {EntUniId}}, SqlComputed ];

Sentence

Property Sentence As %iKnow.Objects.Sentence [ Calculated, SqlComputeCode = { set {Sentence} = {DomainId} _"||"_ {SentenceId}}, SqlComputed ];

Literal

Property Literal As %String(MAXLEN = 1000) [ Calculated, SqlComputeCode = { set {Literal} = ##class(%iKnow.Queries.EntityAPI).GetLiteral({DomainId},{EntOccId}) }, SqlComputed ];

SourceId

Property SourceId As %Integer [ Calculated, SqlComputeCode = {set {SourceId} = ##class(%iKnow.Queries.SentenceAPI).GetSourceId({DomainId},{SentenceId}) }, SqlComputed ];

StemmedEntity

Property StemmedEntity As %iKnow.Objects.EntityUnique [ Calculated, SqlComputeCode = { set {StemmedEntity} = {DomainId} _"||"_ {StemmedEntUniId} }, SqlComputed ];