Interface G2Engine

  • All Superinterfaces:
    G2Fallible
    All Known Implementing Classes:
    G2JNI

    public interface G2Engine
    extends G2Fallible
    Defines the Java interface to the G2 engine functions. The G2 engine functions primarily provide means of working with identity data records, entities and their relationships.
    • Field Detail

      • G2_EXPORT_INCLUDE_RESOLVED

        static final long G2_EXPORT_INCLUDE_RESOLVED
        The bitwise flag for export functionality to indicate that we should include "resolved" relationships
        See Also:
        Constant Field Values
      • G2_EXPORT_INCLUDE_POSSIBLY_SAME

        static final long G2_EXPORT_INCLUDE_POSSIBLY_SAME
        The bitwise flag for export functionality to indicate that we should include "possibly same" relationships
        See Also:
        Constant Field Values
      • G2_EXPORT_INCLUDE_POSSIBLY_RELATED

        static final long G2_EXPORT_INCLUDE_POSSIBLY_RELATED
        The bitwise flag for export functionality to indicate that we should include "possibly related" relationships
        See Also:
        Constant Field Values
      • G2_EXPORT_INCLUDE_NAME_ONLY

        static final long G2_EXPORT_INCLUDE_NAME_ONLY
        The bitwise flag for export functionality to indicate that we should include "name only" relationships
        See Also:
        Constant Field Values
      • G2_EXPORT_INCLUDE_DISCLOSED

        static final long G2_EXPORT_INCLUDE_DISCLOSED
        The bitwise flag for export functionality to indicate that we should include "disclosed" relationships
        See Also:
        Constant Field Values
      • G2_EXPORT_INCLUDE_SINGLETONS

        static final long G2_EXPORT_INCLUDE_SINGLETONS
        The bitwise flag for export functionality to indicate that we should include singleton entities
        See Also:
        Constant Field Values
      • G2_EXPORT_INCLUDE_ALL_ENTITIES

        static final long G2_EXPORT_INCLUDE_ALL_ENTITIES
        The bitwise flag for export functionality to indicate that we should include all entities
        See Also:
        Constant Field Values
      • G2_EXPORT_INCLUDE_ALL_RELATIONSHIPS

        static final long G2_EXPORT_INCLUDE_ALL_RELATIONSHIPS
        The bitwise flag for export functionality to indicate that we should include all relationships
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS

        static final long G2_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS
        The bitwise flag for including possibly-same relations for entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_POSSIBLY_RELATED_RELATIONS

        static final long G2_ENTITY_INCLUDE_POSSIBLY_RELATED_RELATIONS
        The bitwise flag for including possibly-related relations for entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_NAME_ONLY_RELATIONS

        static final long G2_ENTITY_INCLUDE_NAME_ONLY_RELATIONS
        The bitwise flag for including name-only relations for entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_DISCLOSED_RELATIONS

        static final long G2_ENTITY_INCLUDE_DISCLOSED_RELATIONS
        The bitwise flag for including disclosed relations for entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_ALL_RELATIONS

        static final long G2_ENTITY_INCLUDE_ALL_RELATIONS
        The bitwise flag for including all relations for entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_ALL_FEATURES

        static final long G2_ENTITY_INCLUDE_ALL_FEATURES
        The bitwise flag for including all features for entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES

        static final long G2_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES
        The bitwise flag for including representative features for entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_ENTITY_NAME

        static final long G2_ENTITY_INCLUDE_ENTITY_NAME
        The bitwise flag for including the name of the entity
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RECORD_SUMMARY

        static final long G2_ENTITY_INCLUDE_RECORD_SUMMARY
        The bitwise flag for including the record summary of the entity
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RECORD_DATA

        static final long G2_ENTITY_INCLUDE_RECORD_DATA
        The bitwise flag for including the basic record data for the entity
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RECORD_MATCHING_INFO

        static final long G2_ENTITY_INCLUDE_RECORD_MATCHING_INFO
        The bitwise flag for including the record matching info for the entity
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RECORD_JSON_DATA

        static final long G2_ENTITY_INCLUDE_RECORD_JSON_DATA
        The bitwise flag for including the record json data for the entity
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RECORD_FORMATTED_DATA

        static final long G2_ENTITY_INCLUDE_RECORD_FORMATTED_DATA
        The bitwise flag for including the record formattted data for the entity
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RECORD_FEATURE_IDS

        static final long G2_ENTITY_INCLUDE_RECORD_FEATURE_IDS
        The bitwise flag for the features identifiers for the records
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RELATED_ENTITY_NAME

        static final long G2_ENTITY_INCLUDE_RELATED_ENTITY_NAME
        The bitwise flag for including the name of the related entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RELATED_MATCHING_INFO

        static final long G2_ENTITY_INCLUDE_RELATED_MATCHING_INFO
        The bitwise flag for including the record matching info of the related entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RELATED_RECORD_SUMMARY

        static final long G2_ENTITY_INCLUDE_RELATED_RECORD_SUMMARY
        The bitwise flag for including the record summary of the related entities
        See Also:
        Constant Field Values
      • G2_ENTITY_INCLUDE_RELATED_RECORD_DATA

        static final long G2_ENTITY_INCLUDE_RELATED_RECORD_DATA
        The bitwise flag for including the basic record data of the related entities.
        See Also:
        Constant Field Values
      • G2_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES

        static final long G2_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES
        The bitwise flag for including internal features in entity output
        See Also:
        Constant Field Values
      • G2_ENTITY_OPTION_INCLUDE_FEATURE_STATS

        static final long G2_ENTITY_OPTION_INCLUDE_FEATURE_STATS
        The bitwise flag for including feature statistics in entity output.
        See Also:
        Constant Field Values
      • G2_FIND_PATH_PREFER_EXCLUDE

        static final long G2_FIND_PATH_PREFER_EXCLUDE
        The bitwise flag for find-path functionality to indicate that excluded entities are still allowed, but not preferred
        See Also:
        Constant Field Values
      • G2_INCLUDE_FEATURE_SCORES

        static final long G2_INCLUDE_FEATURE_SCORES
        The bitwise flag for including feature scores.
        See Also:
        Constant Field Values
      • G2_SEARCH_INCLUDE_STATS

        static final long G2_SEARCH_INCLUDE_STATS
        The bitwise flag for including statistics from search results
        See Also:
        Constant Field Values
      • G2_SEARCH_INCLUDE_FEATURE_SCORES

        static final long G2_SEARCH_INCLUDE_FEATURE_SCORES
        The bitwise flag for including feature scores from search results.
        See Also:
        Constant Field Values
      • G2_SEARCH_INCLUDE_RESOLVED

        static final long G2_SEARCH_INCLUDE_RESOLVED
        The bitwise flag for search functionality to indicate that we should include "resolved" match level results
        See Also:
        Constant Field Values
      • G2_SEARCH_INCLUDE_POSSIBLY_SAME

        static final long G2_SEARCH_INCLUDE_POSSIBLY_SAME
        The bitwise flag for search functionality to indicate that we should include "possibly same" match level results
        See Also:
        Constant Field Values
      • G2_SEARCH_INCLUDE_POSSIBLY_RELATED

        static final long G2_SEARCH_INCLUDE_POSSIBLY_RELATED
        The bitwise flag for search functionality to indicate that we should include "possibly related" match level results
        See Also:
        Constant Field Values
      • G2_SEARCH_INCLUDE_NAME_ONLY

        static final long G2_SEARCH_INCLUDE_NAME_ONLY
        The bitwise flag for search functionality to indicate that we should include "name only" match level results
        See Also:
        Constant Field Values
      • G2_SEARCH_INCLUDE_ALL_ENTITIES

        static final long G2_SEARCH_INCLUDE_ALL_ENTITIES
        The bitwise flag for search functionality to indicate that we should include all match level results
        See Also:
        Constant Field Values
      • G2_RECORD_DEFAULT_FLAGS

        static final long G2_RECORD_DEFAULT_FLAGS
        The default recommended bitwise flag values for getting records
        See Also:
        Constant Field Values
      • G2_ENTITY_DEFAULT_FLAGS

        static final long G2_ENTITY_DEFAULT_FLAGS
        The default recommended bitwise flag values for getting entities
        See Also:
        Constant Field Values
      • G2_ENTITY_BRIEF_DEFAULT_FLAGS

        static final long G2_ENTITY_BRIEF_DEFAULT_FLAGS
        The default recommended bitwise flag values for getting entities
        See Also:
        Constant Field Values
      • G2_EXPORT_DEFAULT_FLAGS

        static final long G2_EXPORT_DEFAULT_FLAGS
        The default recommended bitwise flag values for exporting entities
        See Also:
        Constant Field Values
      • G2_FIND_PATH_DEFAULT_FLAGS

        static final long G2_FIND_PATH_DEFAULT_FLAGS
        The default recommended bitwise flag values for finding entity paths
        See Also:
        Constant Field Values
      • G2_WHY_ENTITY_DEFAULT_FLAGS

        static final long G2_WHY_ENTITY_DEFAULT_FLAGS
        The default recommended bitwise flag values for why-analysis on entities
        See Also:
        Constant Field Values
      • G2_HOW_ENTITY_DEFAULT_FLAGS

        static final long G2_HOW_ENTITY_DEFAULT_FLAGS
        The default recommended bitwise flag values for how-analysis on entities
        See Also:
        Constant Field Values
      • G2_SEARCH_BY_ATTRIBUTES_ALL

        static final long G2_SEARCH_BY_ATTRIBUTES_ALL
        The default recommended bitwise flag values for searching by attributes, returning all matching entities
        See Also:
        Constant Field Values
      • G2_SEARCH_BY_ATTRIBUTES_STRONG

        static final long G2_SEARCH_BY_ATTRIBUTES_STRONG
        The default recommended bitwise flag values for searching by attributes, returning only strongly matching entities
        See Also:
        Constant Field Values
      • G2_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL

        static final long G2_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL
        The default recommended bitwise flag values for searching by attributes, returning minimal data with all matches
        See Also:
        Constant Field Values
      • G2_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG

        static final long G2_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG
        The default recommended bitwise flag values for searching by attributes, returning the minimal data, and returning only the strongest matches
        See Also:
        Constant Field Values
      • G2_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS

        static final long G2_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
        The default recommended bitwise flag values for searching by attributes
        See Also:
        Constant Field Values
    • Method Detail

      • init

        int init​(String moduleName,
                 String iniParams,
                 boolean verboseLogging)
        Initializes the G2 Engine API with the specified module name, init parameters and flag indicating verbose logging. If the G2CONFIGFILE init parameter is absent then the default configuration from the repository is used.
        Parameters:
        moduleName - A short name given to this instance of the engine object
        iniParams - A JSON string containing configuration parameters
        verboseLogging - Enable diagnostic logging which will print a massive amount of information to stdout
        Returns:
        Zero (0) on success, non-zero on failure.
      • initWithConfigID

        int initWithConfigID​(String moduleName,
                             String iniParams,
                             long initConfigID,
                             boolean verboseLogging)
        Initializes the G2 Engine object with the module name, initialization parameters, verbose logging flag and a specific configuration ID identifying the configuration to use.
        Parameters:
        moduleName - The module name with which to initialize.
        iniParams - The JSON initialization parameters.
        initConfigID - The specific configuration ID to initialize with.
        verboseLogging - Whether or not to initialize with verbose logging.
        Returns:
        Zero (0) on success, non-zero on failure.
      • reinit

        int reinit​(long initConfigID)
        Reinitializes with the specified configuration ID.
        Parameters:
        initConfigID - The configuration ID with which to reinitialize.
        Returns:
        Zero (0) on success, non-zero on failure.
      • destroy

        int destroy()
        Uninitializes the G2 engine.
        Returns:
        Zero (0) on success, negative-one (-1) if the engine is not initialized.
      • primeEngine

        int primeEngine()
        May optionally be called to pre-initialize some of the heavier weight internal resources of the G2 engine.
        Returns:
        Zero (0) on success and non-zero on failure.
      • purgeRepository

        int purgeRepository()
        Purges all data in the configured repository WARNING: There is no undoing from this. Make sure your repository is regularly backed up.
        Returns:
        Zero (0) on success and non-zero on failure.
      • stats

        String stats()
        Returns the current internal engine workload statistics for the process. The counters are reset after each call.
        Returns:
        JSON document of workload statistics
      • exportConfig

        int exportConfig​(StringBuffer response)
        Exports the JSON configuration that is currently loaded into the engine.
        Parameters:
        response - The StringBuffer to retrieve the JSON configuration document.
        Returns:
        Zero (0) on success and non-zero on failure.
      • exportConfig

        int exportConfig​(StringBuffer response,
                         Result<Long> configID)
        Exports the JSON configuration that is currently loaded into the engine.
        Parameters:
        response - The StringBuffer to retrieve the JSON configuration document.
        configID - The Result object to store the configuration ID.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getActiveConfigID

        int getActiveConfigID​(Result<Long> configID)
        Returns an identifier for the loaded G2 engine configuration
        Parameters:
        configID - The identifier value for the config
        Returns:
        Zero (0) on success and non-zero on failure.
      • getRepositoryLastModifiedTime

        int getRepositoryLastModifiedTime​(Result<Long> lastModifiedTime)
        Returns a long integer representing number of seconds since January 1, 1970 12:00am GMT (epoch time). This indicates the last time the data repository was modified.
        Parameters:
        lastModifiedTime - The last modified time of the data repository
        Returns:
        Zero (0) on success and non-zero on failure.
      • addRecord

        int addRecord​(String dataSourceCode,
                      String recordID,
                      String jsonData,
                      String loadID)
        Loads the JSON record with the specified data source code and record ID. The specified JSON data may contain the DATA_SOURCE and RECORD_ID elements, but, if so, they must match the specified parameters.
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record
        jsonData - A JSON document containing the attribute information for the observation.
        loadID - The observation load ID for the record, can be null and will default to dataSourceCode
        Returns:
        Zero (0) on success and non-zero on failure.
      • replaceRecord

        int replaceRecord​(String dataSourceCode,
                          String recordID,
                          String jsonData,
                          String loadID)
        Replace the JSON record that has already been loaded
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record
        jsonData - A JSON document containing the attribute information for the observation.
        loadID - The observation load ID for the record, can be null and will default to dataSourceCode.
        Returns:
        Zero (0) on success and non-zero on failure.
      • replaceRecordWithInfo

        int replaceRecordWithInfo​(String dataSourceCode,
                                  String recordID,
                                  String jsonData,
                                  String loadID,
                                  long flags,
                                  StringBuffer response)
        Replace the JSON record that has already been loaded and returns a list of modified resolved entities
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record
        jsonData - A JSON document containing the attribute information for the observation.
        loadID - The observation load ID for the record, can be null and will default to dataSourceCode
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • addRecordWithReturnedRecordID

        int addRecordWithReturnedRecordID​(String dataSourceCode,
                                          StringBuffer recordID,
                                          String jsonData,
                                          String loadID)
        Loads the JSON record. This works similarly to the G2_addRecord function, except that instead or requiring the recordID as an input parameter, the recordID is generated internally and returned through the parameter list.
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - A buffer that returns the ID for the record
        jsonData - A JSON document containing the attribute information for the observation.
        loadID - The observation load ID for the record, can be null and will default to dataSourceCode
        Returns:
        Zero (0) on success and non-zero on failure.
      • addRecordWithInfoWithReturnedRecordID

        int addRecordWithInfoWithReturnedRecordID​(String dataSourceCode,
                                                  String jsonData,
                                                  String loadID,
                                                  long flags,
                                                  StringBuffer recordID,
                                                  StringBuffer response)
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - A buffer that returns the ID for the record
        jsonData - A JSON document containing the attribute information for the observation.
        loadID - The observation load ID for the record, can be null and will default to dataSourceCode.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the response JSON document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • addRecordWithInfo

        int addRecordWithInfo​(String dataSourceCode,
                              String recordID,
                              String jsonData,
                              String loadID,
                              long flags,
                              StringBuffer response)
        This method is used to add entity data into the system. This works similarly to the G2_addRecord function, except that instead or requiring the recordID as an input parameter, the recordID is generated internally and returned through the parameter list. A list of modified resolved entities is also returned
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record. If specified, then it will be used, if empty string, then G2 will generate an ID
        jsonData - A JSON document containing the attribute information for the observation.
        loadID - The observation load ID for the record, can be NULL and will default to dataSourceCode.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • deleteRecord

        int deleteRecord​(String dataSourceCode,
                         String recordID,
                         String loadID)
        Delete the record that has already been loaded
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record
        loadID - The observation load ID for the record, can be null and will default to dataSourceCode.
        Returns:
        Zero (0) on success and non-zero on failure.
      • deleteRecordWithInfo

        int deleteRecordWithInfo​(String dataSourceCode,
                                 String recordID,
                                 String loadID,
                                 long flags,
                                 StringBuffer response)
        Delete the record that has already been loaded. Returns a list of modified resolved entities
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record
        loadID - The observation load ID for the record, can be null and will default to dataSourceCode.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • reevaluateRecord

        int reevaluateRecord​(String dataSourceCode,
                             String recordID,
                             long flags)
        Reevaluate a record that has already been loaded
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record
        flags - The flags to control how the operation is performed.
        Returns:
        Zero (0) on success and non-zero on failure.
      • reevaluateRecordWithInfo

        int reevaluateRecordWithInfo​(String dataSourceCode,
                                     String recordID,
                                     long flags,
                                     StringBuffer response)
        Reevaluate a record that has already been loaded. Returns a list of resolved entities.
        Parameters:
        dataSourceCode - The data source for the observation.
        recordID - The ID for the record
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • reevaluateEntity

        int reevaluateEntity​(long entityID,
                             long flags)
        Reevaluate a resolved entity identified by the specified entity ID.
        Parameters:
        entityID - The ID of the resolved entity to reevaluate
        flags - The flags to control how the operation is performed.
        Returns:
        Zero (0) on success and non-zero on failure.
      • reevaluateEntityWithInfo

        int reevaluateEntityWithInfo​(long entityID,
                                     long flags,
                                     StringBuffer response)
        Reevaluate a resolved entity and return a list of resolved entities
        Parameters:
        entityID - The ID of the resolved entity to reevaluate
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • searchByAttributes

        int searchByAttributes​(String jsonData,
                               StringBuffer response)
        This method searches for entities that contain attribute information that are relevant to a set of input search attributes.
        Parameters:
        jsonData - A JSON document containing the attribute information to search for
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • searchByAttributes

        int searchByAttributes​(String jsonData,
                               long flags,
                               StringBuffer response)
        This method searches for entities that contain attribute information that are relevant to a set of input search attributes.
        Parameters:
        jsonData - A JSON document containing the attribute information to search for
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • searchByAttributes

        int searchByAttributes​(String jsonData,
                               String searchProfile,
                               long flags,
                               StringBuffer response)
        This method searches for entities that contain attribute information that are relevant to a set of input search attributes.
        Parameters:
        jsonData - A JSON document containing the attribute information to search for
        searchProfile - A search-profile identifier
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getEntityByEntityID

        int getEntityByEntityID​(long entityID,
                                StringBuffer response)
        This method is used to retrieve information about a specific resolved entity. The information is returned as a JSON document. An entityID may be named ENTITY_ID, RESOLVED_ID, or RELATED_ID in the JSON or CSV function output.
        Parameters:
        entityID - The resolved entity to retrieve information for
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Returns zero (0) for success. Returns negative-one (-1) if the response status indicates failure or the G2 module is not initialized. Returns negative-two (-2) if an exception was thrown and caught.
      • getEntityByEntityID

        int getEntityByEntityID​(long entityID,
                                long flags,
                                StringBuffer response)
        This method is used to retrieve information about a specific resolved entity. The information is returned as a JSON document. An entityID may be named ENTITY_ID, RESOLVED_ID, or RELATED_ID in the JSON or CSV function output.
        Parameters:
        entityID - The resolved entity to retrieve information for
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Returns zero (0) for success. Returns negative-one (-1) if the response status indicates failure or the G2 module is not initialized. Returns negative-two (-2) if an exception was thrown and caught.
      • getEntityByRecordID

        int getEntityByRecordID​(String dataSourceCode,
                                String recordID,
                                StringBuffer response)
        This method is used to retrieve information about the resolved entity containing a particular observation record.
        Parameters:
        dataSourceCode - The data source of the observation to search for
        recordID - The record ID of the observation to search for
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getEntityByRecordID

        int getEntityByRecordID​(String dataSourceCode,
                                String recordID,
                                long flags,
                                StringBuffer response)
        This method is used to retrieve information about the resolved entity containing a particular observation record.
        Parameters:
        dataSourceCode - The data source of the observation to search for
        recordID - The record ID of the observation to search for
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findInterestingEntitiesByEntityID

        int findInterestingEntitiesByEntityID​(long entityID,
                                              long flags,
                                              StringBuffer response)
        This method is used to find interesting entities close to a specific resolved entity. The information is returned as a JSON document.
        Parameters:
        entityID - The resolved entity to search around
        flags - The flags to control how the operation is performed.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findInterestingEntitiesByRecordID

        int findInterestingEntitiesByRecordID​(String dataSourceCode,
                                              String recordID,
                                              long flags,
                                              StringBuffer response)
        This method is used to find interesting entities close to a specific resolved entity containing a particular observation record.
        Parameters:
        dataSourceCode - The data source of the observation to search around
        recordID - The record ID of the observation to search around
        flags - The flags to control how the operation is performed.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathByEntityID

        int findPathByEntityID​(long entityID1,
                               long entityID2,
                               int maxDegrees,
                               StringBuffer response)
        This method is used to find a relationship path between entities that are identified by entity ID.
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        maxDegrees - The maximum number of degrees for the path search.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathByEntityID

        int findPathByEntityID​(long entityID1,
                               long entityID2,
                               int maxDegrees,
                               long flags,
                               StringBuffer response)
        This method is used to find a relationship path between entities that are identified by entity ID.
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        maxDegrees - The maximum number of degrees for the path search.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathByRecordID

        int findPathByRecordID​(String dataSourceCode1,
                               String recordID1,
                               String dataSourceCode2,
                               String recordID2,
                               int maxDegrees,
                               StringBuffer response)
        This method is used to find a relationship path between entities that are identified by the data source code and record ID of records in each of the entities.
        Parameters:
        dataSourceCode1 - The data source code of the first record.
        recordID1 - The record ID of the first record.
        dataSourceCode2 - The data source code of the second record.
        recordID2 - The record ID of the second record.
        maxDegrees - The maximum number of degrees for the path search.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathByRecordID

        int findPathByRecordID​(String dataSourceCode1,
                               String recordID1,
                               String dataSourceCode2,
                               String recordID2,
                               int maxDegrees,
                               long flags,
                               StringBuffer response)
        This method is used to find a relationship path between entities that are identified by the data source code and record ID of records in each of the entities.
        Parameters:
        dataSourceCode1 - The data source code of the first record.
        recordID1 - The record ID of the first record.
        dataSourceCode2 - The data source code of the second record.
        recordID2 - The record ID of the second record.
        maxDegrees - The maximum number of degrees for the path search.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathExcludingByEntityID

        int findPathExcludingByEntityID​(long entityID1,
                                        long entityID2,
                                        int maxDegrees,
                                        String excludedEntities,
                                        StringBuffer response)

        This method is used to find a relationship path between two entities identified by their entity ID's that excludes one or more entities, also identified by their entity ID's.

        The excluded entities are identified by their entity ID's in a JSON document with the following format:

           {
             "ENTITIES": [
                { "ENTITY_ID": <entity_id1> },
                { "ENTITY_ID": <entity_id2> },
                . . .
                { "ENTITY_ID": <entity_idN> }
             ]
           }
         
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathExcludingByEntityID

        int findPathExcludingByEntityID​(long entityID1,
                                        long entityID2,
                                        int maxDegrees,
                                        String excludedEntities,
                                        long flags,
                                        StringBuffer response)

        This method is used to find a relationship path between two entities identified by their entity ID's that excludes one or more entities, also identified by their entity ID's.

        The excluded entities are identified by their entity ID's in a JSON document with the following format:

           {
             "ENTITIES": [
                { "ENTITY_ID": <entity_id1> },
                { "ENTITY_ID": <entity_id2> },
                . . .
                { "ENTITY_ID": <entity_idN> }
             ]
           }
         
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathExcludingByRecordID

        int findPathExcludingByRecordID​(String dataSourceCode1,
                                        String recordID1,
                                        String dataSourceCode2,
                                        String recordID2,
                                        int maxDegrees,
                                        String excludedEntities,
                                        StringBuffer response)

        This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records where that path excludes one or more entities, also identified by the data sourec codes and record IDs of their composite records.

        The excluded entities are identified by the data source codes and record ID's of their composite records in a JSON document with the following format:

           {
             "ENTITIES": [
                {
                  "DATA_SOURCE": "<data_source1>",
                  "RECORD_ID":  "<record_id1>"
                },
                {
                  "DATA_SOURCE": "<data_source2>",
                  "RECORD_ID":  "<record_id2>"
                },
                . . .
                {
                  "DATA_SOURCE": "<data_sourceN>",
                  "RECORD_ID":  "<record_idN>"
                }
             ]
           }
         
        Parameters:
        dataSourceCode1 - The data source code of the first record.
        recordID1 - The record ID of the first record.
        dataSourceCode2 - The data source code of the second record.
        recordID2 - The record ID of the second record.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathExcludingByRecordID

        int findPathExcludingByRecordID​(String dataSourceCode1,
                                        String recordID1,
                                        String dataSourceCode2,
                                        String recordID2,
                                        int maxDegrees,
                                        String excludedEntities,
                                        long flags,
                                        StringBuffer response)

        This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records where that path excludes one or more entities, also identified by the data sourec codes and record IDs of their composite records.

        The excluded entities are identified by the data source codes and record ID's of their composite records in a JSON document with the following format:

           {
             "ENTITIES": [
                {
                  "DATA_SOURCE": "<data_source1>",
                  "RECORD_ID":  "<record_id1>"
                },
                {
                  "DATA_SOURCE": "<data_source2>",
                  "RECORD_ID":  "<record_id2>"
                },
                . . .
                {
                  "DATA_SOURCE": "<data_sourceN>",
                  "RECORD_ID":  "<record_idN>"
                }
             ]
           }
         
        Parameters:
        dataSourceCode1 - The data source code of the first record.
        recordID1 - The record ID of the first record.
        dataSourceCode2 - The data source code of the second record.
        recordID2 - The record ID of the second record.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathIncludingSourceByEntityID

        int findPathIncludingSourceByEntityID​(long entityID1,
                                              long entityID2,
                                              int maxDegrees,
                                              String excludedEntities,
                                              String requiredSources,
                                              StringBuffer response)

        This method is used to find a relationship path between two entities identified by their entity ID's. The path will exclude the one or more entities, also identified by the specified entity ID's and will require that the path contains at least one of the data sources identified by the one or more specified data sources codes.

        The excluded entities are identified by their entity ID's in a JSON document with the following format:

           {
             "ENTITIES": [
                { "ENTITY_ID": <entity_id1> },
                { "ENTITY_ID": <entity_id2> },
                . . .
                { "ENTITY_ID": <entity_idN> }
             ]
           }
         

        The required set of data sources are identified by their data source codes in a JSON document with the following format:

            { "DATA_SOURCES": [
                "<data_source_code1>",
                "<data_source_code2>",
                . . .
                "<data_source_codeN>"
              ]
            }
         
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        requiredSources - The JSON document identifying the data sources that must be included on the path.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathIncludingSourceByEntityID

        int findPathIncludingSourceByEntityID​(long entityID1,
                                              long entityID2,
                                              int maxDegrees,
                                              String excludedEntities,
                                              String requiredSources,
                                              long flags,
                                              StringBuffer response)

        This method is used to find a relationship path between two entities identified by their entity ID's. The path will exclude the one or more entities, also identified by the specified entity ID's and will require that the path contains at least one of the data sources identified by the one or more specified data sources codes.

        The excluded entities are identified by their entity ID's in a JSON document with the following format:

           {
             "ENTITIES": [
                { "ENTITY_ID": <entity_id1> },
                { "ENTITY_ID": <entity_id2> },
                . . .
                { "ENTITY_ID": <entity_idN> }
             ]
           }
         

        The required set of data sources are identified by their data source codes in a JSON document with the following format:

            { "DATA_SOURCES": [
                "<data_source_code1>",
                "<data_source_code2>",
                . . .
                "<data_source_codeN>"
              ]
            }
         
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        requiredSources - The JSON document identifying the data sources that must be included on the path.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathIncludingSourceByRecordID

        int findPathIncludingSourceByRecordID​(String dataSourceCode1,
                                              String recordID1,
                                              String dataSourceCode2,
                                              String recordID2,
                                              int maxDegrees,
                                              String excludedEntities,
                                              String requiredSources,
                                              StringBuffer response)

        This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records. THe path will exclude the one or more entities also identified by the specified data source code and record ID pairs that identify the composite records of the excluded entities and further will require the path contains at least one of the data sources identified by the one or more specified data sources codes.

        The excluded entities are identified by the data source codes and record ID's of their composite records in a JSON document with the following format:

           {
             "ENTITIES": [
                {
                  "DATA_SOURCE": "<data_source1>",
                  "RECORD_ID":  "<record_id1>"
                },
                {
                  "DATA_SOURCE": "<data_source2>",
                  "RECORD_ID":  "<record_id2>"
                },
                . . .
                {
                  "DATA_SOURCE": "<data_sourceN>",
                  "RECORD_ID":  "<record_idN>"
                }
             ]
           }
         

        The required set of data sources are identified by their data source codes in a JSON document with the following format:

            { "DATA_SOURCES": [
                "<data_source_code1>",
                "<data_source_code2>",
                . . .
                "<data_source_codeN>"
              ]
            }
         
        Parameters:
        dataSourceCode1 - The data source code of the first record.
        recordID1 - The record ID of the first record.
        dataSourceCode2 - The data source code of the second record.
        recordID2 - The record ID of the second record.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        requiredSources - The JSON document identifying the data sources that must be included on the path.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findPathIncludingSourceByRecordID

        int findPathIncludingSourceByRecordID​(String dataSourceCode1,
                                              String recordID1,
                                              String dataSourceCode2,
                                              String recordID2,
                                              int maxDegrees,
                                              String excludedEntities,
                                              String requiredSources,
                                              long flags,
                                              StringBuffer response)

        This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records. THe path will exclude the one or more entities also identified by the specified data source code and record ID pairs that identify the composite records of the excluded entities and further will require the path contains at least one of the data sources identified by the one or more specified data sources codes.

        The excluded entities are identified by the data source codes and record ID's of their composite records in a JSON document with the following format:

           {
             "ENTITIES": [
                {
                  "DATA_SOURCE": "<data_source1>",
                  "RECORD_ID":  "<record_id1>"
                },
                {
                  "DATA_SOURCE": "<data_source2>",
                  "RECORD_ID":  "<record_id2>"
                },
                . . .
                {
                  "DATA_SOURCE": "<data_sourceN>",
                  "RECORD_ID":  "<record_idN>"
                }
             ]
           }
         

        The required set of data sources are identified by their data source codes in a JSON document with the following format:

            { "DATA_SOURCES": [
                "<data_source_code1>",
                "<data_source_code2>",
                . . .
                "<data_source_codeN>"
              ]
            }
         
        Parameters:
        dataSourceCode1 - The data source code of the first record.
        recordID1 - The record ID of the first record.
        dataSourceCode2 - The data source code of the second record.
        recordID2 - The record ID of the second record.
        maxDegrees - The maximum number of degrees for the path search.
        excludedEntities - The JSON document identifying the excluded entities via their entity ID's.
        requiredSources - The JSON document identifying the data sources that must be included on the path.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findNetworkByEntityID

        int findNetworkByEntityID​(String entityList,
                                  int maxDegrees,
                                  int buildOutDegrees,
                                  int maxEntities,
                                  StringBuffer response)

        This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their entity IDs.

        The desired entities are identified by their entity ID's in a JSON document with the following format:

           {
             "ENTITIES": [
                { "ENTITY_ID": <entity_id1> },
                { "ENTITY_ID": <entity_id2> },
                . . .
                { "ENTITY_ID": <entity_idN> }
             ]
           }
         
        Parameters:
        entityList - The JSON document specififying the entity ID's of the desired entities.
        maxDegrees - The maximum number of degrees for the path search between the specified entities.
        buildOutDegrees - The number of relationship degrees to build out from each of the found entities.
        maxEntities - The maximum number of entities to build out to.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findNetworkByEntityID

        int findNetworkByEntityID​(String entityList,
                                  int maxDegrees,
                                  int buildOutDegrees,
                                  int maxEntities,
                                  long flags,
                                  StringBuffer response)

        This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their entity IDs.

        The desired entities are identified by their entity ID's in a JSON document with the following format:

           {
             "ENTITIES": [
                { "ENTITY_ID": <entity_id1> },
                { "ENTITY_ID": <entity_id2> },
                . . .
                { "ENTITY_ID": <entity_idN> }
             ]
           }
         
        Parameters:
        entityList - The JSON document specififying the entity ID's of the desired entities.
        maxDegrees - The maximum number of degrees for the path search between the specified entities.
        buildOutDegrees - The number of relationship degrees to build out from each of the found entities.
        maxEntities - The maximum number of entities to build out to.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findNetworkByRecordID

        int findNetworkByRecordID​(String recordList,
                                  int maxDegrees,
                                  int buildOutDegrees,
                                  int maxEntities,
                                  StringBuffer response)

        This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their composite records having the specified data source code and record ID pairs.

        The composite records af the desired entities are identified by the data source code and record ID pairs in a JSON document with the following format:

           {
             "ENTITIES": [
                {
                  "DATA_SOURCE": "<data_source1>",
                  "RECORD_ID":  "<record_id1>"
                },
                {
                  "DATA_SOURCE": "<data_source2>",
                  "RECORD_ID":  "<record_id2>"
                },
                . . .
                {
                  "DATA_SOURCE": "<data_sourceN>",
                  "RECORD_ID":  "<record_idN>"
                }
             ]
           }
         
        Parameters:
        recordList - The JSON document containing the data source code and record ID pairs for the composite records of the desired entities.
        maxDegrees - The maximum number of degrees for the path search between the specified entities.
        buildOutDegrees - The number of relationship degrees to build out from each of the found entities.
        maxEntities - The maximum number of entities to build out to.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • findNetworkByRecordID

        int findNetworkByRecordID​(String recordList,
                                  int maxDegrees,
                                  int buildOutDegrees,
                                  int maxEntities,
                                  long flags,
                                  StringBuffer response)

        This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their composite records having the specified data source code and record ID pairs.

        The composite records af the desired entities are identified by the data source code and record ID pairs in a JSON document with the following format:

           {
             "ENTITIES": [
                {
                  "DATA_SOURCE": "<data_source1>",
                  "RECORD_ID":  "<record_id1>"
                },
                {
                  "DATA_SOURCE": "<data_source2>",
                  "RECORD_ID":  "<record_id2>"
                },
                . . .
                {
                  "DATA_SOURCE": "<data_sourceN>",
                  "RECORD_ID":  "<record_idN>"
                }
             ]
           }
         
        Parameters:
        recordList - The JSON document containing the data source code and record ID pairs for the composite records of the desired entities.
        maxDegrees - The maximum number of degrees for the path search between the specified entities.
        buildOutDegrees - The number of relationship degrees to build out from each of the found entities.
        maxEntities - The maximum number of entities to build out to.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyRecordInEntity

        int whyRecordInEntity​(String dataSourceCode,
                              String recordID,
                              StringBuffer response)
        This method determines why a particular record is included in its resolved entity.
        Parameters:
        dataSourceCode - The data source code for the composite record of the subject entity.
        recordID - The record ID for the composite record of the subject entity.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyRecordInEntity

        int whyRecordInEntity​(String dataSourceCode,
                              String recordID,
                              long flags,
                              StringBuffer response)
        This method determines why a particular record is included in its resolved entity.
        Parameters:
        dataSourceCode - The data source code for the composite record of the subject entity.
        recordID - The record ID for the composite record of the subject entity.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyEntityByRecordID

        int whyEntityByRecordID​(String dataSourceCode,
                                String recordID,
                                StringBuffer response)
        This method determines why records are included in the resolved entity they belong to. The entity for the operation is the one having the record with the specified data source code and record ID.
        Parameters:
        dataSourceCode - The data source code for the composite record of the subject entity.
        recordID - The record ID for the composite record of the subject entity.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyEntityByRecordID

        int whyEntityByRecordID​(String dataSourceCode,
                                String recordID,
                                long flags,
                                StringBuffer response)
        This method determines why records are included in the resolved entity they belong to. The entity for the operation is the one having the record with the specified data source code and record ID.
        Parameters:
        dataSourceCode - The data source code for the composite record of the subject entity.
        recordID - The record ID for the composite record of the subject entity.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyEntityByEntityID

        int whyEntityByEntityID​(long entityID,
                                StringBuffer response)
        This method determines why records are included in the resolved entity they belong to. The entity is identified with the specified entity ID.
        Parameters:
        entityID - The entity ID of the subject entity.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyEntityByEntityID

        int whyEntityByEntityID​(long entityID,
                                long flags,
                                StringBuffer response)
        This method determines why records are included in the resolved entity they belong to. The entity is identified with the specified entity ID.
        Parameters:
        entityID - The entity ID of the subject entity.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyRecords

        int whyRecords​(String dataSourceCode1,
                       String recordID1,
                       String dataSourceCode2,
                       String recordID2,
                       StringBuffer response)
        This method determines how two records are related to each other.
        Parameters:
        dataSourceCode1 - The data source code for the first record.
        recordID1 - The record ID for the first record.
        dataSourceCode2 - The data source code for the second record.
        recordID2 - The record ID for the second record.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyRecords

        int whyRecords​(String dataSourceCode1,
                       String recordID1,
                       String dataSourceCode2,
                       String recordID2,
                       long flags,
                       StringBuffer response)
        This method determines how two records are related to each other.
        Parameters:
        dataSourceCode1 - The data source code for the first record.
        recordID1 - The record ID for the first record.
        dataSourceCode2 - The data source code for the second record.
        recordID2 - The record ID for the second record.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyEntities

        int whyEntities​(long entityID1,
                        long entityID2,
                        StringBuffer response)
        This method determines how two entities are related to each other.
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • whyEntities

        int whyEntities​(long entityID1,
                        long entityID2,
                        long flags,
                        StringBuffer response)
        This method determines how two entities are related to each other.
        Parameters:
        entityID1 - The entity ID of the first entity.
        entityID2 - The entity ID of the second entity.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • howEntityByEntityID

        int howEntityByEntityID​(long entityID,
                                StringBuffer response)
        This method gives information on how entities were constructed from their base records.
        Parameters:
        entityID - The entity ID.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • howEntityByEntityID

        int howEntityByEntityID​(long entityID,
                                long flags,
                                StringBuffer response)
        This method gives information on how entities were constructed from their base records.
        Parameters:
        entityID - The entity ID.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getVirtualEntityByRecordID

        int getVirtualEntityByRecordID​(String recordList,
                                       StringBuffer response)
        This method gives information on how an entity composed of a given set of records would look.
        Parameters:
        recordList - The list of records used to build the virtual entity.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getVirtualEntityByRecordID

        int getVirtualEntityByRecordID​(String recordList,
                                       long flags,
                                       StringBuffer response)
        This method gives information on how an entity composed of a given set of records would look.
        Parameters:
        recordList - The list of records used to build the virtual entity.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - The StringBuffer to write the JSON response document to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getRecord

        int getRecord​(String dataSourceCode,
                      String recordID,
                      StringBuffer response)
        This method is used to retrieve the stored record.
        Parameters:
        dataSourceCode - The data source of the observation to search for
        recordID - The record ID of the observation to search for
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getRecord

        int getRecord​(String dataSourceCode,
                      String recordID,
                      long flags,
                      StringBuffer response)
        This method is used to retrieve the stored record.
        Parameters:
        dataSourceCode - The data source of the observation to search for
        recordID - The record ID of the observation to search for
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • exportJSONEntityReport

        int exportJSONEntityReport​(long flags,
                                   Result<Long> exportHandle)
        This is used to export entity data from known entities. This function returns an export-handle that can be read from to get the export data in JSON format. The export-handle should be read using the "G2_fetchNext" function, and closed when work is complete. Each output row contains the exported entity data for a single resolved entity.
        Parameters:
        flags - A bit mask specifying control flags, such as "G2_EXPORT_INCLUDE_SINGLETONS". The default and recommended value is "G2_EXPORT_DEFAULT_FLAGS".
        exportHandle - The Result object for storing the export handle.
        Returns:
        Zero (0) on success and non-zero on failure.
      • exportCSVEntityReport

        int exportCSVEntityReport​(String csvColumnList,
                                  long flags,
                                  Result<Long> exportHandle)
        This is used to export entity data from known entities. This function returns an export-handle that can be read from to get the export data in CSV format. The export-handle should be read using the "G2_fetchNext" function, and closed when work is complete. The first output row returned by the export-handle contains the JSON column headers as a string. Each following row contains the exported entity data.
        Parameters:
        csvColumnList - Specify "*" to indicate "all columns", specify empty-string to indicate the "standard columns", otherwise specify a comma-sepatated list of column names.
        flags - A bit mask specifying other control flags, such as "G2_EXPORT_INCLUDE_SINGLETONS". The default and recommended value is "G2_EXPORT_DEFAULT_FLAGS".
        exportHandle - The Result object for storing the export handle.
        Returns:
        Returns an export handle that the entity data can be read from.
      • fetchNext

        int fetchNext​(long exportHandle,
                      StringBuffer response)
        This function is used to read entity data from an export handle, one data row at a time.
        Parameters:
        exportHandle - The export handle to retrieve data from
        response - The StringBuffer to write the next exported record to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • closeExport

        int closeExport​(long exportHandle)
        This function closes an export handle, to clean up system resources.
        Parameters:
        exportHandle - The export handle of the export to close.
        Returns:
        Zero (0) on success and non-zero on failure.
      • processRedoRecord

        int processRedoRecord​(StringBuffer jsonData)
        Processes a redo record.
        Parameters:
        jsonData - TBD: Need to find out if this is an input, an output or both.
        Returns:
        Zero (0) on success and non-zero on failure.
      • processRedoRecordWithInfo

        int processRedoRecordWithInfo​(long flags,
                                      StringBuffer jsonData,
                                      StringBuffer response)
        Processes a redo record.
        Parameters:
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        jsonData - A returned JSON document containing the info.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • getRedoRecord

        int getRedoRecord​(StringBuffer jsonData)
        Retrieves a pending redo record from the reevaluation queue.
        Parameters:
        jsonData - A StringBuffer to write the redo record to.
        Returns:
        Zero (0) on success and non-zero on failure.
      • countRedoRecords

        long countRedoRecords()
        Gets the number of redo records waiting to be processed.
        Returns:
        The number of redo records waiting to be processed.
      • process

        int process​(String record)
        This method will send a record for processing in g2. It is a synchronous call, i.e. it will wait until g2 actually processes the record. This is similar to process(String,StringBuffer) method, but this variant does not return a response. NOTE: there are performance benefits of calling this variant of process that does not require a response.
        Parameters:
        record - An input record to be processed.
        Returns:
        Zero (0) on success and non-zero on failure.
      • processWithInfo

        int processWithInfo​(String record,
                            long flags,
                            StringBuffer response)
        This method will send a record for processing in g2. It is a synchronous call, i.e. it will wait until g2 actually processes the record. This is similar to process(String,StringBuffer) method, but this variant does not return a response. NOTE: there are performance benefits of calling this variant of process that does not require a response. Also returns a list of modified resolved entities
        Parameters:
        record - An input record to be processed.
        flags - The flags to control how the operation is performed and specifically the content of the response JSON document.
        response - A StringBuffer for returning the response document. If an error occurred, an error response is stored here.
        Returns:
        Zero (0) on success and non-zero on failure.
      • process

        int process​(String record,
                    StringBuffer response)
        This method will send a record for processing in g2. It is a synchronous call, i.e. it will wait until g2 actually processes the record, and then return a response message. This is similar to process(String) method, but this variant returns a response. NOTE: there are performance benefits of calling the variant of process that does not require a response.
        Parameters:
        record - An input record to be processed.
        response - A StringBuffer for returning the response document.
        Returns:
        Zero (0) on success and non-zero on failure.