i2 Connect gateway

    Show / Hide Table of Contents

    Type location

    The type location of an item type used by a connector indicates where - between the Information Store schema, the gateway schema used by the connector, or its own connector schema - the item type is defined.

    With the introduction of gateway schemas and connector schemas, it has become important for i2 Analyze to determine the origin of item types. It is possible for two schemas to have item types with the same identifier, in which case the gateway will infer the type location by looking in the following order:

    1. The connector's own schema
    2. The gateway schema used by the connector
    3. The Information Store schema

    A connector can explicitly specify the type locations for item types to avoid ambiguity and ensure that the desired item type from the appropriate schema is used.

    Default type locations

    You can specify the default type location for all entities and links returned from the connector in the defaultValues field of the connector configuration as follows:

    {
      "defaultValues": {
        "entityTypeLocation": "<LOCATION>",
        "linkTypeLocation": "<LOCATION>"
      },
      "services": {
        /* ... */
      }
    }
    

    Legal values for <LOCATION> are as follows:

    • INFOSTORE - The Information Store schema.
    • GATEWAY - The gateway schema used by the connector.
    • CONNECTOR - The connector's own schema.

    Type locations for results

    A service's resultItemTypeIds property specifies the item types expected to be returned from the service. It also provides type location overrides for specific item types using the following structure:

    {
      "<LOCATION>": ["TYPEID1", "TYPEID2", /* ... */ ]
    }
    

    Again, <LOCATION> can be INFOSTORE, GATEWAY, or CONNECTOR.

    Since a service can use item types from all three type locations, all three type locations can be specified. For example, a service that returns records with entity type ET1 from the Information Store schema, ET2 from the gateway schema, and ET3 from a connector schema, will look like the following:

    {
      "services": [
        {
          /* ... */
          "resultItemTypeIds": {
            "INFOSTORE": ["ET1", "LT1"],
            "GATEWAY": ["ET2", "LT2"],
            "CONNECTOR": ["ET3", "LT3"]
          }
        }
      ]
    }
    

    Specifying type locations in this way overrides the defaultValues set for entityTypeLocation and linkTypeLocation.

    Type locations for seed constraints

    It is also possible to specify the type locations of seed records by including typeLocation attributes for each allowed item type of a service's seed constraint definition. This is shown as follows:

    {
      "services": [
        {
          /* ... */
          "resultItemTypeIds": {
            "INFOSTORE": ["ET1", "LT1"],
            "GATEWAY": ["ET2", "LT2"],
            "CONNECTOR": ["ET3", "LT3"]
          },
          "seedConstraints": {
            "min": 1,
            "max": 1,
            "seedTypes": {
              "allowedTypes": "ENTITY",
              "itemTypes": [
                {
                  "id": "ET1",
                  "typeLocation": "INFOSTORE", 
                  "min": 1,
                  "max": 1
                },
                {
                  "id": "ET3",
                  "typeLocation": "CONNECTOR", 
                  "min": 1,
                  "max": 1
                }
              ]
            }
          }
        }
      ]
    }
    
    Back to top © N. Harris Computer Corporation.