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

Static Public Member Functions

_.Library.Status Transform (_.Library.String pTransformed, _.Library.String pString, _.Library.String pArguments, _.Library.String pLanguage)
 This method transforms pString into a "normalized" form pTransformed, based. More...
 
_.Library.Status TransformObject (pTransformed, _.Library.DynamicObject pString, _.Library.String pArguments, _.Library.String pLanguage)
 This method transforms pStringinto a "normalized" form pTransformed, based. 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 abstracts a Word Transformation, an operation that translates a given actual word (as found in a document to be indexed) in some more "normalized" form. For example, stemming normalizes verbs, nouns and other conjugated words by transforming them into their base form (= normalized form). When a user then wants to search for a conjugated word, the search query will be processed by the same transformation used at indexing time and any conjugated form that maps to the same base form will be considered a match.

The transformation(s) to be applied at indexing time can be supplied through the TRANSFORMATIONSPEC index parameter (see <class>iFind.Index.Basic</class>). At search time, the search option argument can be used to identify which transformation to apply to the search string. This can be either one of these transformation specification strings defined in the index parameter, an asterisk (*) to identify the default transformation of the index parameter or 0 to do an exact search on the non- transformed string.

Custom transformations can be created by implementing this class and implementing the <method>Transform</method> method. This class can then be referred in the TRANSFORMATIONSPEC index parameter as described above.

Member Function Documentation

◆ Transform()

_.Library.Status Transform ( _.Library.String  pTransformed,
_.Library.String  pString,
_.Library.String  pArguments,
_.Library.String  pLanguage 
)
static

This method transforms pString into a "normalized" form pTransformed, based.

on the language context pLanguage.
Implementations of this class can optionally be parameterized through the pArguments string, which can be supplied through the TRANSFORMATIONSPEC index parameter. Transformations in this method should match the transformations in TransformObject(), notwithstanding the use of wildcards, or unexpected behavior can occur.

◆ TransformObject()

_.Library.Status TransformObject (   pTransformed,
_.Library.DynamicObject  pString,
_.Library.String  pArguments,
_.Library.String  pLanguage 
)
static

This method transforms pStringinto a "normalized" form pTransformed, based.

on the language context pLanguage.
Implementations of this class can optionally be parameterized through the pArguments string, which can be supplied through the TRANSFORMATIONSPEC index parameter. This method takes in pString as a DynamicObject, with the search string contained in pString.query. pString also contains a mask in pString.mask, where $c(0) in a character's slot represents a wildcard. For example, if pString.query = "?ab?" and pString.mask = "?ab_$c(0)", the first ? is a literal character, and the second is a wildcard. Unlike the <method>Transform()</method> method, pString may contain wildcards/ pTransformed may contain wildcards, but if so the user must implement pTransformed as a DynamicObject, with the transformed search string stored in the "query" key. Note that a user MUST implement a mask for each transformaton in pTransformed that they wish to include wildcards with, or the wildcards in the transformations will be treated as escaped literals. Transformations in this method should match the transformations in Transform(), notwithstanding the use of wildcards, or unexpected behavior can occur.