Configuring Sun Master Indexes (Repository)

Defining the Master Index Survivor Calculator (Repository)

The survivor calculator is configured in the Best Record file and defines how field values are populated into the single best record, along with the type of survivor strategy to use for each field. If no strategy is defined for a field, the default survivor strategy is used to populate that field in the SBR. Before you begin to define the survivor calculator, make sure you know which fields to include in the SBR and how those fields should be updated. Typically, all but phonetic and standardized fields are included here.

The survivor calculator can only be configured by modifying the XML file directly. Perform the following tasks to configure the survivor calculator.

Specifying the Master Index Survivor Helper (Repository)

The survivor helper class determines how to retrieve values from system records and how to set them in the SBR. The default class is com.stc.eindex.survivor.impl.DefaultSurvivorHelper, which uses the ePath method to retrieve and set the values. You can create a custom survivor helper class to support other methods for retrieving and setting values. If you implement a custom survivor helper class, it must extendcom.stc.eindex.survivor.AbstractSurvivorHelper.

ProcedureTo Specify the Survivor Helper

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the helper-class element in the SurvivorHelperConfig element.

  3. Change the value of the helper-class element to the fully qualified name of new helper class.

    For example:


    <helper-class>com.stc.eindex.survivor.impl.MySurvivorHelper
    </helper-class>
  4. Save and close the file.

Specifying a Master Index Default Survivor Strategy (Repository)

The default survivor strategy specifies the name of the Java class that defines the survivor calculation strategy to use for most of the fields in the SBR. By defining a default strategy, you do not need to define a strategy for every candidate field; you only need to define a strategy for fields that do not use the default strategy.


Note –

If you create a customized class for the default survivor strategy, make sure the class implements com.stc.eindex.survivor.SurvivorStrategyInterface and is accessible by the EJB class loader.


ProcedureTo Specify a Default Survivor Strategy

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the default-survivor-strategy element in the SurvivorHelperConfig element.

  3. To change the name of the default class, modify the value of the strategy-class element to the fully qualified name of the new default strategy class.

    For example:


    <default-survivor-strategy>
       <strategy-class>com.stc.eindex.survivor.impl.MySurvivorStrategy
       </strategy-class>
    </default-survivor-strategy>
  4. Configure the strategy parameters, as described in Configuring the Default Survivor Strategy.

  5. Save and close the file.

Configuring the Default Survivor Strategy

Once you define a default survivor strategy, you might need to specify certain parameters for the strategy. One parameter is required for the WeightedSurvivorStrategy and for the DefaultSurvivorStrategy. If you create a custom strategy, additional parameters can be used.

ProcedureTo Configure the Default Survivor Strategy

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the default-survivor-strategy element, and then to the strategy-class element.

  3. Do any of the following:

    • To modify an existing parameter value, scroll to the parameter you want to modify, and then change the value of the parameter-value element.

      For example:


      <default-survivor-strategy>
         <strategy-class>com.stc.eindex.survivor.impl.MySurvivorStrategy
         </strategy-class>
         <parameters>
            <parameter>
               <parameter-name>ConfigModuleName</parameter-name>
               <parameter-type>java.lang.String</parameter-type>
               <parameter-value>MySurvivorCalculator</parameter-value>
            </parameter>
         </parameters>
      </default-survivor-strategy>
    • To add a new parameter, create a new parameter element within the parameters element, and then define the parameter elements described in Master Index Default Survivor Strategy Parameter Elements (Repository).

    • To delete a parameter, scroll to the parameters element, and then delete all text between and including the parameter element that define the parameter.

    • To delete all parameters, delete the all text between and including the parameters element.

  4. Save and close the file.

Master Index Default Survivor Strategy Parameter Elements (Repository)

The following table lists and describes the elements that configure the parameters for the default survivor strategy in the Best Record file.

Element 

Value 

description

This is an optional element that briefly describes the parameter. Note that there are no parameters to define for the UnionSurvivorStrategy.

parameter-name

The name of the parameter. 

  • For the DefaultSurvivorStrategy, this value is “preferredSystem”.

  • For the WeightedSurvivorStrategy, this value is “ConfigurationModuleName”.

  • For the UnionSurvivorStrategy, this is not used.

parameter-type

The Java data type for the parameter value. For both the DefaultSurvivorStrategy and the WeightedSurvivorStrategy, this value is java.lang.String.

parameter-value

The value of the named parameter. 

  • For the DefaultSurvivorStrategy, this is the processing code of the source system from which the SBR field value is retrieved.

  • For the WeightedSurvivorStrategy, this is the name of the module-name element that defines the weighted calculator to use as the default strategy (by default, WeightedSurvivorCalculator).

Defining the Master Index Single Best Record Structure (Repository)

In order for a field to be populated in the SBR, that field must be defined in the candidate field list of the survivor helper. By default, all the fields that were specified in the wizard are also defined here. Any candidate fields defined for the SBR must also be defined in the Object Definition file. If you add a field to the object definition, you should also add the field here.

The SBR can only be defined by modifying the XML file directly.

ProcedureTo Specify a Candidate Field

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the candidate-definitions element in the SurvivorHelperConfig element.

  3. Do any of the following:

    • To add a new field, add a new candidate-field element within the candidate-definitions tags, and then name the new element using the ePath of the field.

      For example:


         <candidate-definitions>
            <candidate-field name="Person.LastName"/>
            <candidate-field name="Person.DateOfBirth"/>
         <candidate-definitions>
    • To modify an existing field, scroll to the candidate-field element you want to modify, and then change the value of the attribute.

    • If any of the updated fields do not use the default strategy, define a strategy for those fields, as described in Defining a Master Index Survivor Strategy for a Field or Object (Repository).

  4. Save and close the file.

Deleting Candidate Fields

Once a field is defined in the SBR candidate field list, you can delete the field if you do not want to include the field in the SBR. If you delete a field from the object definition, make sure to delete the field here as well.

ProcedureTo Delete a Candidate Field

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the candidate-definitions element in the SurvivorHelperConfig element.

  3. Delete all text between and including the appropriate candidate-field element.

    Using the example below, to delete the Religion field, delete the boldface text; to delete the Alias object, delete the plain text.


    <candidate-field name="Person.Religion"/>
    <candidate-field name="Person.Alias[*].*"/>
       <system-fields>
          <field-name>LastModified</field-name>
       </system-fields>
       <survivor-strategy>
          <strategy-class>com.stc.eindex.user.MyStrategy
          </strategy-class>
       </survivor-strategy>
    </candidate-field>

    Note –

    Do not delete all candidate fields; at a minimum, the match fields must be defined.


  4. Save and close the file.

Defining a Master Index Survivor Strategy for a Field or Object (Repository)

To use a strategy for a specific field other than the strategy defined in the default-survivor-strategy element, you need to specify the new strategy for the appropriate candidate-field element. A candidate-field element can represent a field or child object. You do not need to specify a strategy for any fields that use the default survivor strategy.

ProcedureTo Define a Survivor Strategy for a Field

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the candidate-definitions element in the SurvivorHelperConfig element.

  3. In the candidate-field element for which you want to specify a new strategy, create a new survivor-strategy element.

    For example:


    <candidate-field name="Person.Alias[*].*">
       <survivor-strategy>
       </survivor-strategy>
    </candidate-field>
  4. In the new survivor-strategy element, create and name a new strategy-class element.

    Make sure to specify the fully qualified name of the Java class for the strategy. For example:


    <candidate-field name="Person.Alias[*].*">
       <survivor-strategy>
          <strategy-class>
           com.stc.eindex.survivor.impl.UnionSurvivorStrategy
          </strategy-class>
       </survivor-strategy>
    </candidate-field>

    Note –

    To specify the default survivor strategy for a field, make sure the corresponding candidate-field element does not contain a survivor-strategy element. If you implement a custom strategy class, that class must be defined as a custom plug-in.


  5. Save and close the file.

Defining Master Index Custom Weighted Strategies (Repository)

The WeightedCalculator element defines the Java class used for weighted survivor calculations. If the weighted calculator is defined for the default-survivor-strategy element, then the strategies you define here are used for all fields for which no specific survivor strategy is defined. The weighted calculator defines a default strategy to use for most fields and specialized strategies to use for specific fields.

Configuring the weighted calculator involves the following tasks.

Defining Custom Weighted Strategies

The WeightedCalculator element defines both default and custom survivor strategies. You can override the default weighted calculator strategy for specific fields by defining custom strategies for those fields in the candidate-field elements of the WeightedCalculator element.

ProcedureTo Define Custom Weighted Calculators

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the WeightedCalculator element.

  3. Add and name a new candidate-field element in the WeightedCalculator.

    For example:


    <WeightedCalculator module-name="WeightedSurvivorCalculator"
     parser-class=
     "com.stc.eindex.configurator.impl.WeightedCalculatorConfig">
       <candidate-field name="Person.DOB">
       </candidate-field>
    
  4. Create one or more parameter elements for the new candidate field.


    <candidate-field name="Person.DOB">
       <parameter>
       </parameter>
       <parameter>
       </parameter>
    </candidate-field>
  5. For each new parameter element, define the elements listed in Master Index Weighted Calculator Parameter Elements (Repository).


    <candidate-field name="Person.DOB">
       <parameter>
          <quality>SourceSystem</quality>
          <preference>CDI</preference>
          <utility>80.0</utility>
       </parameter>
       <parameter>
          <quality>MostRecentModified</quality>
          <utility>75.0</utility>
       </parameter>
    </candidate-field>
  6. Save and close the file.

Configuring Weighted Strategies

The wizard creates a default weighted strategy that defines a general weighting structure to be used by most fields. Unless custom weighted calculator strategies are defined for a field, the default strategies defined in the default-parameters element are used for each field using the weighted calculator.

ProcedureTo Add Default Weighted Calculator Parameters

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the default-parameters element in the WeightedCalculator element.

  3. Create new a new parameter element within the default-parameters element, but outside any existing parameter elements.

  4. In the new parameter element, define the elements listed in Master Index Weighted Calculator Parameter Elements (Repository).

    For example:


    <default-parameters>
       <parameter>
          <quality>SourceSystem</quality>
          <preference>CDA</preference>
          <utility>80.0</utility>
       </parameter>
       <parameter>
          <quality>MostRecentModified</quality>
          <utility>75.0</utility>
       </parameter>
    </default-parameters>
  5. Save and close the file.

Modifying Weighted Calculator Parameters

Once a candidate field is specified and custom weighted calculators are defined for the field, you can modify the parameters. You can also modify any existing default weighted calculator parameters.

ProcedureTo Modify Weighted Calculator Parameters

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the WeightedCalculator element.

  3. Do either of the following:

    • To modify a custom weighted calculator parameter, scroll to the candidate-field element naming the field to modify.

    • To modify a default weighted calculator parameter, scroll to the default-parameters element.

  4. Modify the value of any of the elements listed in Master Index Weighted Calculator Parameter Elements (Repository).

    For example:


    <parameter>
       <quality>SourceSystem</quality>
       <preference>DDI</preference>
       <utility>60.0</utility>
    </parameter>
  5. Save and close the file.

Deleting Weighted Calculator Parameters

Once default and custom parameters are defined, they can be deleted if necessary. If a candidate field is defined for custom weighted calculations, you can specify that the field use the default weighted calculator instead by removing the entire field from the candidate-fields list.

ProcedureTo Delete Weighted Calculator Parameters

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Best Record file.

    The file opens in the NetBeans XML editor.

  2. Scroll to the WeightedCalculator element and then to the candidate-field element identifying the field you want to delete.

  3. Do either of the following:

    • To delete a custom weighted calculator parameter, scroll to the candidate-field element naming the field to modify.

    • To delete a default weighted calculator parameter, scroll to the default-parameters element.

  4. To delete an existing parameter, scroll to the parameter element you want to delete, and then remove all text between and including the parameter element.

    For example, to delete the SourceSystem parameter below, delete the boldface text.


    <parameter>
       <quality>SourceSystem</quality>
       <preference>CDI</preference>
       <utility>80.0</utility>
    </parameter>
    <parameter>
       <quality>MostRecentModified</quality>
       <utility>75.0</utility>
    </parameter>

    Note –

    At least one parameter must be defined for the default-parameter element; you cannot delete all parameters from this section. You cannot delete all parameters from a candidate field, but you can delete the entire candidate field (see below for more information).


  5. To delete a field from the candidate field list, delete all text between and including the candidate-field tags for the field you want to delete.

    Using the following example, to delete the Person.DOB candidate field from the custom calculator, delete all the text below.


    <candidate-field name="Person.DOB">
       <parameter>
          <quality>SourceSystem</quality>
          <preference>CDI</preference>
          <utility>80.0</utility>
       </parameter>
       <parameter>
          <quality>MostRecentModified</quality>
          <utility>75.0</utility>
       </parameter>
    </candidate-field>
  6. Save and close the file.

Master Index Weighted Calculator Parameter Elements (Repository)

The following table lists and describes the elements that configure the parameters for the weighted calculator in the Best Record file.

Element 

Description 

quality

The type of weighted calculation to perform, such as: 

preference

The preferred value for the specified quality. This element is only used for the SourceSystem quality and the preference must be a source system code. 

utility

A value that indicates the reliability of the specified quality for determining the best field value for the SBR. You define the scale for the utility values.