powered by CADENAS

Manual

Manual

1.7.5.9.2. Block [settings] key "GenerationFilterRules" - Filter projects and lines for geo index generation

In the configuration file CADENAS_SETUP/geomsearch.cfg you can define multiple filter rules. If at least one of the rules applies, the part is filtered out.

  1. In the block [settings], in the key GenerationFilterRules, determine a comma-separated list of all the rules.

    [settings]
    GenerationFilterRules=Rule1,Rule2,etc.

  2. For each rule, define a block according to the scheme GenerationFilterRule_Rulex.

    Example:

    [GenerationFilterRule_Rule1]
    Catalogs=cat/__partialtest
    AlgoTypes=PARTIAL,TOPO
    PrjRegExp=.*ass.*
    PrjScriptCallbackFile=
    PrjScriptCallbackFunction=
    LineFilterCount=1
    LineFilterVar0=TYPE
    LineFilterRegExp0=.*ass.*
    Conjunction=AND
    LineScriptCallbackFile=test.vbb
    LineScriptCallbackFunction=checkLine

Explanations to the individual keys:

General settings

  • Catalogs: Catalogs where the rule shall be applied.

  • AlgoTypes: Index types that should NOT be generated (comma separated)

    Possible values: TOPO,GEO,PARTIAL

  • Conjunction: AND | OR

    Concerns project and line conditions. If there is not more than 1 project condition and not more than 1 line condition, it doesn't matter if OR or AND.

    If OR, then a project or line filter is applied if one the rules matches. If AND, all non-empty rules must match.

Settings on project path

  • PrjRegExp: Statement of a regular expression. This is tested for the project path relatively to the catalog. If it matches it will be filtered.

    Example: All projects that have "asm" anywhere in the path will be filtered by following regular expression:

    .*asm.*

  • PrjScriptCallbackFile: Path to vbb script containing the callback

  • PrjScriptCallbackFunction: The function PrjScriptCallbackFunction gets the prj path as a parameter and is expected to return "true" if the filter shall be applied, otherwise 0.

Settings on table line

  • LineFilterCount: Number of line conditions

    Example with 3 line conditions:

    LineFilterCount=3
    LineFilterVar0=A
    LineFilterRegExp0=.*ab.*
    LineFilterVar1=B
    LineFilterRegExp1=.*ac.*
    LineFilterVar2=C
    LineFilterRegExp2=.*ad.*
    

  • LineFilterVar0: Variable name from table (replace 0 by the index of the condition)

  • LineFilterRegExp0= The value of the attribute of the stated variable must match the regular expression to be filtered. (Replace 0 by the index of the condition.)

  • LineScriptCallbackFile: Path to vbb script containing the callback

  • LineScriptCallbackFunction: The function LineScriptCallbackFunction gets the table as a parameter and is expected to return "true" if the filter shall be applied, otherwise 0.

    Following example filters all lines with line-id greater than 50000:

    function filterLines(table)
      dim row = table.SelectedRow
      dim lineId = row.Idnr
      if lineId > 50000 then
        filterLines = 1
      else
        filterLines = 0
      end if
    end function