IRISLIB database
Definition Class Reference

This class represents a Text Transformation model, as defined in its <xdata>Transformation</xdata> XData block. More...

Inheritance diagram for Definition:
Collaboration diagram for Definition:

Private Member Functions

_.Library.Status CreateKeyValue (_.iKnow.TextTransformation.Output pOutput, _.Library.String pHeader, _.Library.String pKey, _.Library.String pValue, _.iKnow.TextTransformation.OutputLocation pLocation)
 Helper method to create a KeyValue object. More...
 
_.Library.Status CreateSection (_.iKnow.TextTransformation.Output pOutput, _.Library.String pHeader, _.Library.String pText, _.iKnow.TextTransformation.OutputLocation pLocation, pKeyValues)
 Helper method to create a Section object. More...
 
_.Library.Status OnAfterTransformation (_.iKnow.TextTransformation.Output pOutput)
 This callback method is invoked after a record has been processed, before the Output object is saved.
 
_.Library.Status OnBeforeTransformation (_.iKnow.TextTransformation.Output pOutput)
 This callback method is invoked before a record is processed, after the Output object has been instantiated.
 
_.Library.Status OnCreateKeyValue (_.iKnow.TextTransformation.OutputKeyValue pKeyValue, _.iKnow.TextTransformation.Output pOutput)
 Callback method invoked upon the creation of a KeyValue object. More...
 
_.Library.Status OnCreateSection (_.iKnow.TextTransformation.OutputSection pSection, _.iKnow.TextTransformation.Output pOutput)
 Callback method invoked upon the creation of a Section object. More...
 

Static Private Member Functions

_.Library.Status Apply (_.Library.String pString, _.iKnow.TextTransformation.Output pOutput)
 
_.Library.Status ApplyBatch (_.Library.ResultSet pResultSet)
 
_.Library.Status ApplyStream (_.Stream.Object pStream, _.iKnow.TextTransformation.Output pOutput)
 Invokes the transformation model on a character stream. More...
 

Additional Inherited Members

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

This class represents a Text Transformation model, as defined in its <xdata>Transformation</xdata> XData block.

See the <method>Apply</method> and <method>ApplyBatch</method> methods for ways how to invoke this model on input text.

Member Function Documentation

◆ Apply()

_.Library.Status Apply ( _.Library.String  pString,
_.iKnow.TextTransformation.Output  pOutput 
)
staticprivate

Invokes the model defined in <XData>Transformation</XData> on the string pString, identifying

sections, headers and key-value pairs as specified in the model. These elements are returned through an pOutput object of the output class specified in the model, defaulting to <class>iKnow.TextTransformation.Output</class>.

pString may also be supplied as an array of strings representing consecutive lines of text (by reference). To invoke the model in batch on a bunch of records, use <method>ApplyBatch</method>.

◆ ApplyBatch()

_.Library.Status ApplyBatch ( _.Library.ResultSet  pResultSet)
staticprivate

Invokes the model specified in <xdata>Transformation</xdata> on all records retrieved by

pResultSet, populating and saving an output object for each record. The first column of pResultSet is used as an identifier and saved as the Ref property of the output object. The second column is assumed to contain the text to be transformed by this model.

Note that the output object used for this batch operation should inherit from <class>Persistent</class> in order for the output to be effectively persisted.

See also <method>Apply</method>.

◆ ApplyStream()

_.Library.Status ApplyStream ( _.Stream.Object  pStream,
_.iKnow.TextTransformation.Output  pOutput 
)
staticprivate

Invokes the transformation model on a character stream.

See also <method>Apply</method>.

◆ CreateKeyValue()

Helper method to create a KeyValue object.

Custom code in any of the callbacks (such as

<method>OnBeforeTransformation</method>) may invoke this method to add default key value pairs.

◆ CreateSection()

_.Library.Status CreateSection ( _.iKnow.TextTransformation.Output  pOutput,
_.Library.String  pHeader,
_.Library.String  pText,
_.iKnow.TextTransformation.OutputLocation  pLocation,
  pKeyValues 
)
private

Helper method to create a Section object.

Custom code in any of the callbacks (such as

<method>OnBeforeTransformation</method>) may invoke this method to add default sections. Note that no further callbacks are invoked for key-value pairs in the pKeyValues array.

◆ OnCreateKeyValue()

Callback method invoked upon the creation of a KeyValue object.

Use this callback to customize behavior upon creating key-value pairs. Setting pKeyValue to null will prevent the key-value pair from being added to the output.

◆ OnCreateSection()

Callback method invoked upon the creation of a Section object.

Use this callback to customize behavior upon creating sections. Setting pSection to null will remove the section from the output.