Skip to content

Link Resolution

Concept

Within the CortexEngine, it is possible to create relations between records via link fields in order to map relationships between them. Using the plugin makes this possible at any time. With the help of a configuration file, the Java application Implex can also be called via system services to create links regularly and automatically.

Configuration

The configuration file for the linker is an XML file consisting of the sections Global for the login parameters and Linker for the actual configuration.

Linker configuration file
<?xml version="1.0" encoding="UTF-8"?>
<CtxImport>
  <Global>
    <LoginIP>_IP-Adresse_</LoginIP>
    <LoginPort>_DB-Port_</LoginPort>
    <LoginUser>_Benutzerkonto_</LoginUser>
    <LoginPW>_Passwort_</LoginPW>
    <ImportMode>u</ImportMode>
  </Global>

  <Linker>
    <Link>...=...</Link>
  </Linker>
</CtxImport>

Field assignment

The section is used to assign the corresponding field.

  • This defines which field in a record (to the left of the equals sign) is to be used to refer to a target.
  • A target field is specified, but a valid link points to a complete record.
  • If the target field is used in several record types, corresponding fields or additional parameters must be set.
Example with login and simple target field assignment
<?xml version="1.0" encoding="UTF-8"?>
<CtxImport>
  <Global>
    <LoginIP>127.0.0.1</LoginIP>
    <LoginPort>29000</LoginPort>
    <LoginUser>importusr</LoginUser>
    <LoginPW>importpwd</LoginPW>
    <ImportMode>u</ImportMode>
  </Global>
  <Linker>
    <Link>lPerFir=FirNam</Link>
  </Linker>
</CtxImport>
  • The field content with the synonym lPerFir is searched for in the field FirNam.
  • If exactly one record is found, the link is resolved.

Optional source fields

If another field was filled during the data import and the actual link field was left empty, the filled field can be used as an optional source field.

  • The content from this field is searched for.
  • The final link is written to the link field.
  • The content in the optional source field is retained.
Optional source field
<Linker>
  <Link optSource="myFirN">lPerFir=FirNam</Link>
</Linker>

Optional source and target record types

If the same fields are used in different record types, it may not be possible for the linker to clearly identify unambiguous links.

  • To ensure this, the specification of source and target record types is suitable.
  • These are specified as an attribute.
Optional source and target record types
<Linker>
  <Link sourceType="Pers" targetType="Firm">lPerFir=FirNam</Link>
</Linker>

Combination with optional source fields is possible:

Combination
<Linker>
  <Link sourceType="Pers" targetType="Firm" optSource="myFirN">lPerFir=FirNam</Link>
</Linker>

To find an unambiguous target record, several fields can be specified. The linker then searches for the content of the unresolved link field (or the optional source field) within the CortexEngine and resolves the link if the combination of fields returns an unambiguous record.

The source field can have several contents (separated by commas):

Argus Publishing, LLC, Hanover, NY 13146

  • Within the CortexEngine, the linker must search for the contents of the company name, zip code and city in the corresponding fields in order to unambiguously find a record.
  • To limit the search even more precisely, the source and target type are specified.
Source and target type
<Linker>
  <Link sourceType="Pers" targetType="Firm" optSource="myFirN">lPerFir=FirNam,FirPLZ,FirOrt</Link>
</Linker>

This type of configuration leads to a longer search, as several fields have to be checked. In extensive data inventories, it can be faster to enter an unambiguous value in an optional source field, which is then saved as an unambiguous reference in the target record.

Additional filter parameters

You can specify additional filter parameters that are listed after the search fields.

Further filter parameters
<Linker>
  <Link sourceType="Pers" targetType="Firm" optSource="myFirN">lPerFir=FirNam,FirPLZ,FirOrt,FirActv=yes</Link>
</Linker>

The link is only set (resolved) here if the following criteria apply:

  • the link field is used in the record type "Pers"
  • the link should refer to the record type "Firm"
  • an optional source field "myFirN" exists
  • the optional source field has the content for company name, zip code and city in the exact order, separated by a comma
  • the target records have the entry yes in the field with the synonym FirActv

The link is only set if these criteria apply in full.