IRISLIB database
Loader Class Reference
Inheritance diagram for Loader:
Collaboration diagram for Loader:

Public Member Functions

_.Library.Status BufferSource (_.Library.String ref, _.Library.String data)
 
_.Library.Status ClearBuffer ()
 
_.Library.Status ClearLogs (_.Library.Boolean clearErrors, _.Library.Boolean clearFailed, _.Library.Boolean clearWarnings)
 Clears the logs, as directed by the boolean parameters.
 
_.Library.Status GetBuffer (pBuffer)
 
_.Library.Status GetCurrentLists (result)
 
_.Library.Status GetErrors (result, _.Library.Boolean returnAll)
 
_.Library.Status GetFailed (result, _.Library.Boolean returnAll)
 
_.Library.List GetSourceIds ()
 
_.Library.Status GetWarnings (result, _.Library.Boolean returnAll)
 
_.Library.Status ProcessBatch ()
 
_.Library.Status ProcessBuffer (_.Library.String cfg)
 
_.Library.Status ProcessList (listargs)
 
_.Library.Status ProcessVirtualBuffer (_.Library.String cfg)
 
_.Library.Status ProcessVirtualList (listargs)
 
_.Library.Status Reset ()
 
_.Library.Status SetLister (_.iKnow.Source.Lister lister)
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Static Public Member Functions

_.Library.Status DeleteAllVirtualSources (_.Library.Integer domId)
 
_.Library.Status DeleteSource (_.Library.Integer domId, _.Library.Integer internalId)
 
_.Library.Status DeleteVirtualSource (_.Library.Integer domId, _.Library.Integer vSrcId)
 
_.Library.Status LogProcess (_.Library.Integer domainId, _.Library.Integer procId, _.Library.List args)
 args(1) = number of sources. More...
 

Public Attributes

 DomainId
   More...
 

Private Attributes

 __DirectInput
   More...
 
 __Indexer
   More...
 
 __KeyId
   More...
 
 __Lister
   More...
 
 __MetaData
   More...
 
 __Processor
   More...
 
 __TempId
 surrogate domain ID for use in IRIS.Temp More...
 

Additional Inherited Members

- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Detailed Description

Deprecation note: Direct use of this class is still supported, but it is recommended to use either Domain Definitions (cf <class>iKnow.DomainDefinition</class>) to manage a domain's contents or use the shorthand methods in <class>SYSTEM.iKnow</class> to work with an existing domain not managed through a domain definition class.

This class coordinates the loading process.

For Batch Loading, use the <method>ProcessBatch</method> after one or more <class>iKnow.Source.Lister</class> instances have been used to register one or more lists of sources to load into the domain using their <method class="%iKnow.Source.Lister">AddListToBatch</method> methods.

For Direct Loading, register a <class>iKnow.Source.Lister</class> instance with this Loader instance and call <method>ProcessList</method> or <method>ProcessVirtualList</method> to add a small number of sources to the domain directly (in the same process).

For Direct Text Loading, you can simply queue <class>String</class> data using the <method>BufferSource</method> and then add these directly (in the same process) to the domain using either <method>ProcessBuffer</method> or <method>ProcessVirtualBuffer</method>.

With both Direct Loading options, the IDs of the sources added in the last execution are available through <method>GetSourceIds</method>

Member Function Documentation

◆ BufferSource()

_.Library.Status BufferSource ( _.Library.String  ref,
_.Library.String  data 
)

Lines up the data supplied to this method to be indexed as a new source with the provided reference

in a subsequent call to <method>ProcessBuffer</method> or <method>ProcessVirtualBuffer</method>.

Multiple calls to this method using the same ref before calling the Process* method, will result in the data being appended to what was previously buffered for that ref. All buffering and processing operations should happen within the same process.

◆ ClearBuffer()

_.Library.Status ClearBuffer ( )

This method clears any data supplied so far through calls to <method>BufferSource</method>

◆ DeleteAllVirtualSources()

_.Library.Status DeleteAllVirtualSources ( _.Library.Integer  domId)
static

Deletes all Virtual Sources associated with this domain.

◆ DeleteSource()

_.Library.Status DeleteSource ( _.Library.Integer  domId,
_.Library.Integer  internalId 
)
static

This method deletes a single source from the domain, including all its entity and CRC occurrences,

sentences and paths. Unique entities and CRCs occurring in this source will have their frequency and spread updated.

If there's any metadata or matching results associated with this source, it will also be deleted.

◆ DeleteVirtualSource()

_.Library.Status DeleteVirtualSource ( _.Library.Integer  domId,
_.Library.Integer  vSrcId 
)
static

This method deletes a single Virtual Source from the domain, including all its entity and

CRC occurrences, sentences and paths.

◆ GetBuffer()

_.Library.Status GetBuffer (   pBuffer)

This method returns all the data currently in the buffer, as entered through calls to

<method>BufferSource</method>, since the last call to <method>ProcessBuffer</method> or <method>ClearBuffer</method>. Data is returned in a two-level array structure:

pBuffer(reference) = numberOfEntries
pBuffer(reference, n) = data

◆ GetCurrentLists()

_.Library.Status GetCurrentLists (   result)

Simple utility method to retrieve an overview of all Lists as currently scheduled through

AddListToBatch calls on <class>iKnow.Source.Lister</class> objects for this Loaders domain.

◆ GetErrors()

_.Library.Status GetErrors (   result,
_.Library.Boolean  returnAll 
)

Returns all logged errors for this domain. By default only the errors logged since this

Loader object's last load operation are returned, unless the returnAll parameter is set to 1. The returned result contains the following columns:

  1. Error message
  2. Location: indication of the class and method where the error occurred
  3. Timestamp: in $horolog format

◆ GetFailed()

_.Library.Status GetFailed (   result,
_.Library.Boolean  returnAll 
)

Returns all logged source failures for this domain. By default only the failures logged since this

Loader object's last load operation are returned, unless the returnAll parameter is set to 1. The returned result contains the following columns:

  1. Composite reference: elements used to generate the external ID (in case it didn't get generated)
  2. External ID
  3. Location: indication of the class and method where the error occurred
  4. Error message
  5. Internal error ID: Contact WRC if this is a positive integer.
  6. Timestamp: in $horolog format

◆ GetSourceIds()

_.Library.List GetSourceIds ( )

This method returns the Source IDs of the sources created in the last call to

<method>ProcessList</method>, <method>ProcessBuffer</method>, <method>ProcessVirtualList</method> or <method>ProcessVirtualBuffer</method>.

◆ GetWarnings()

_.Library.Status GetWarnings (   result,
_.Library.Boolean  returnAll 
)

Returns all logged warnings for this domain. By default only the warnings logged since this

Loader object's last load operation are returned, unless the returnAll parameter is set to 1. The returned result contains the following columns:

  1. Composite reference: elements used to generate the external ID (in case it didn't get generated)
  2. External ID
  3. Location: indication of the class and method where the error occurred
  4. Error message
  5. Timestamp: in $horolog format

◆ LogProcess()

_.Library.Status LogProcess ( _.Library.Integer  domainId,
_.Library.Integer  procId,
_.Library.List  args 
)
static

args(1) = number of sources.

args(2) = the status global to log the process for LoadSources. args(3) = the time to queue work into the queue.

◆ ProcessBatch()

_.Library.Status ProcessBatch ( )

This is the primary method for starting a Batch Load. When executed, this method will first

go through the lists registered through AddListToBatch() calls on <class>iKnow.Source.Lister</class> objects and call their ExpandList() method to get a complete list of all the sources to index. Then, it will instantiate the appropriate <class>iKnow.Source.Processor</class> objects to read their contents and forward it to the iKnow engine (optionally through a <class>iKnow.Source.Converter</class> instance). Finally, it will invoke the ^iKnow.BuildGlobals routine to transform the output of the iKnow engine into the persistent domain data structures.

◆ ProcessBuffer()

_.Library.Status ProcessBuffer ( _.Library.String  cfg)

Indexes all data buffered within this process through previous calls to

<method>BufferSource</method> using the Direct Loading approach. This includes calling <method>SetLister</method> with a <class>iKnow.Source.Temp.Lister</class> instance and initiating the Direct Load through <method>ProcessList</method>. The buffer is cleaned automatically at the end of successfully processing the data.

After this method has finished, the generated source IDs can be retrieved through <method>GetSourceIds</method>.

◆ ProcessList()

_.Library.Status ProcessList (   listargs)

This method initiates a Direct Load, indexing the sources identified by the Lister registered

with <method>SetLister</method>. The Lister Parameters passed as listargs to this method should correspond in type and number to what the currently registered Lister expects as its (implementation-specific) Lister Parameters.

All operations will execute within the current process and therefore has superior performance over Batch Loading when used for small numbers of sources.

After this method has finished, the generated source IDs can be retrieved through <method>GetSourceIds</method>.

◆ ProcessVirtualBuffer()

_.Library.Status ProcessVirtualBuffer ( _.Library.String  cfg)

Same As <method>ProcessBuffer<method>, but buffered sources will be added as Virtual Sources.

◆ ProcessVirtualList()

_.Library.Status ProcessVirtualList (   listargs)

Same As <method>ProcessList</method>, but listed sources will be added as Virtual Sources.

◆ Reset()

_.Library.Status Reset ( )

This method resets the internal globals used during the load process.

◆ SetLister()

_.Library.Status SetLister ( _.iKnow.Source.Lister  lister)

This call registers the supplied <class>iKnow.Source.Lister</class> object to be used for Direct Loading by

subsequent calls to <method>ProcessList</method>.

The supplied Lister object should be fully configured, but cannot have any lists already scheduled for it (through calls to its AddListToBatch method).

Member Data Documentation

◆ __DirectInput

__DirectInput
private

 

 

◆ DomainId

DomainId

 

 

◆ __Indexer

__Indexer
private

 

 

◆ __KeyId

__KeyId
private

 

 

◆ __Lister

__Lister
private

 

 

◆ __MetaData

__MetaData
private

 

 

◆ __Processor

__Processor
private

 

 

◆ __TempId

__TempId
private

surrogate domain ID for use in IRIS.Temp

guaranteed to be unique across namespaces