i2 Connect gateway

    Show / Hide Table of Contents

    Gateway schemas

    A gateway schema is a type of i2 Analyze schema that defines the item types that can be used by any number of connectors. A gateway schema allows multiple connectors to return the same item types, which makes them useful in situations where multiple connectors return similar data.

    Gateway schemas can be used in i2 Analyze deployments that include the i2 Connect gateway. Gateway schemas are optional, and there is no limit to the number of gateway schemas that can be deployed. A connector can be configured to return item types from at most one gateway schema.

    To create a gateway schema, use i2 Analyze Schema Designer, which provides an interface for creating the XML file containing the schema and, optionally, an additional XML file containing the charting schemes. To learn more about how to develop i2 Analyze schemas, see Designing an i2 Analyze schema.

    Gateway schema short names

    All gateway schemas have a short name that is displayed to analysts in i2 Analyst's Notebook when they interact with entity and link types from that schema. The short name must be unique within the i2 Analyze deployment. You specify the short name when you configure the gateway schema.

    For a connector to return item types defined in a gateway schema, the schema must be assigned to the connector using its short name.

    Configuring a gateway schema

    To configure a gateway schema, you must have a schema XML file and provide a short name for it. You can also provide a charting schemes XML file.

    To configure a gateway schema:

    1. Copy your schema and charting schemes files to the configuration/fragments/common/WEB-INF/classes directory in your i2 Analyze configuration.

    2. Open the ApolloServerSettingsMandatory.properties file in the same directory, and add the following properties

      Gateway.<SCHEMA_SHORT_NAME>.SchemaResource=<SCHEMA_XML_FILE_NAME>
      Gateway.<SCHEMA_SHORT_NAME>.ChartingSchemesResource=<CHARTING_SCHEMES_XML_FILE_NAME>
      

    For example, to configure a gateway schema that defines item types relating to telecommunications data:

    • The schema file is telecom-schema.xml
    • The charting schemes file is telecom-schema-charting-schemes.xml
    • The short name is Telecom

    Add the following to ApolloServerSettingsMandatory.properties:

    Gateway.Telecom.SchemaResource=telecom-schema.xml
    Gateway.Telecom.ChartingSchemesResource=telecom-schema-charting-schemes.xml
    

    Assigning a gateway schema to a connector

    For a connector to be able to return item types defined in a gateway schema, you must assign the gateway schema to it using its short name. You can do so in two ways:

    • The connector can specify the short name of the gateway schema it uses in the configuration that is returned from its configuration endpoint.

    • You can specify the short name of the gateway schema that the connector uses when defining the connector in the i2 Analyze topology (topology.xml).

    The setting in the topology takes precedence over the setting in the connector configuration.

    Connector configuration

    In the return value from the configuration endpoint, a gateway schema short name can be specified using the gatewaySchema field of the ConnectorConfig object. For example:

    {
      "gatewaySchema": "Telecom",
      "defaultValues": {
        ...
      },
      "services": [
        ...
      ],
      "clientConfigs": [
        ...
      ]
    }
    

    For more information about the ConnectorConfig object, see the i2 Connect gateway REST SPI.

    i2 Analyze topology

    To assign a gateway schema to a connector in the i2 Analyze topology, specify the gateway schema short name in the <connector> element using the gateway-schema attribute. For example:

    <connector id="example-connector"
               name="Example Connector"
               base-url="http://localhost:3700/"
               gateway-schema="Telecom"/>
    
    Back to top © N. Harris Computer Corporation.