Home > Class Reference > %SYS namespace > %iKnow.Source.Domain.Processor

%iKnow.Source.Domain.Processor

class %iKnow.Source.Domain.Processor extends %iKnow.Source.Processor

This Processor implementation reads data from existing sources in a (typically different) domain, as listed by the ExpandList method of the %iKnow.Source.Domain.Lister. These Lister and Processor classes are at the core of the %iKnow.Utils.CopyUtils and %iKnow.Utils.UpgradeUtils classes.

Processor parameters:

  1. srcDomainId As %Integer - the domain where to copy data from. (only required when specifying metaFields)
  2. metaFields As %List (optional) - the metadata fields to copy from the source domain into the target one.
  3. overrideLanguage As %String (optional) - the two-letter language code of a language to use overriding what can be derived from the source domain. Leave blank to use source domain values and use "AUTO" to re-detect using normal configuration settings.
  4. preserveSentences As %Boolean (optional, defaults to 1) - whether or not to preserve the exact same sentence splittings as in the original indexation.

Extracted metadata keys: see metaFields Processor parameter.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property MetaFields as %List [ Private ];
Property methods: MetaFieldsGet(), MetaFieldsIsValid(), MetaFieldsLogicalToOdbc(), MetaFieldsOdbcToLogical(), MetaFieldsSet()
property OverrideLanguage as %String [ Private ];
Property methods: OverrideLanguageDisplayToLogical(), OverrideLanguageGet(), OverrideLanguageIsValid(), OverrideLanguageLogicalToDisplay(), OverrideLanguageLogicalToOdbc(), OverrideLanguageNormalize(), OverrideLanguageSet()
property PreserveSentences as %Boolean [ Private , InitialExpression = 1 ];
Property methods: PreserveSentencesDisplayToLogical(), PreserveSentencesGet(), PreserveSentencesIsValid(), PreserveSentencesLogicalToDisplay(), PreserveSentencesNormalize(), PreserveSentencesSet()
property SrcDomainId as %Integer [ Private ];
Property methods: SrcDomainIdDisplayToLogical(), SrcDomainIdGet(), SrcDomainIdIsValid(), SrcDomainIdLogicalToDisplay(), SrcDomainIdNormalize(), SrcDomainIdSet()

Methods (Including Private)

private method FetchSource(loc As %Integer, ref As %List) as %Status [ Language = objectscript ]
Inherited description:

This is the primary method that will need to be implemented by subclasses. It gets the local ID of the source being processed (as assigned by the lister) and the Composite Reference in %List format. Data read by the Processor should be buffered through calling ..Buffer.BufferString(), which will automatically forward the data to the iKnow Indexing engine or, if configured, a %iKnow.Source.Converter object that will in turn push converted data through to the engine.

If this Processor also extracts metadata while reading (as specified in its GetMetadataKeys() implementation), it should make sure to invoke SetCurrentMetadataValues() at some point in this methods execution.

method GetKnownLanguage(loc As %Integer, ref As %List, keyid As %Integer = "") as %String [ Language = objectscript ]
Inherited description:

This method is called from ProcessListElement() and ProcessVirtualListElement() right before calling on the Indexer to process the data read by this Processor instance. It returns the language (two-letter ISO code) for the source being processed, if there is any means to derive it from known facts about the source. If no language can be derived with enough certainty, this method returns "".

The default implementation looks if there is a $$$IKPLANGUAGEFIELDNAME parameter defined pointing to a metadata field containing the language code. Subclasses may override and/or extend this method if they have access to additional information.

classmethod GetMetadataKeys(params As %String) as %List [ Language = objectscript ]

Subclasses should override this method to identify those metadata keys that are calculated or extracted by this Processor implementation and will be registered for every source processed by calling SetCurrentMetadataValues() during the FetchSource() execution.

method SetParams(params As %String) as %Status [ Language = objectscript ]
Inherited description:

This method stores the Processor parameters in the Params property, from where they can be referenced in the FetchSource() implementation.

NOTE: If this method is overridden by a subclass, it should make sure to either call this method via ##super, or set Params itself.

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)