Interface SzEngine
Defines the interface to the Senzing engine functions.
public interface SzEngine
Remarks
The Senzing engine functions primarily provide means of working with identity data records, entities and their relationships.
Methods
AddRecord(string, string, string, SzFlag?)
Loads the record described by the specified string
record
definition having the specified data source code and record ID using
the specified bitwise-OR'd SzFlag values.
string AddRecord(string dataSourceCode, string recordID, string recordDefinition, SzFlag? flags = (SzFlag)0)
Parameters
dataSourceCode
stringThe data source code identifying the data source for the record being added.
recordID
stringThe record ID that uniquely identifies the record being added within the scope of its associated data source.
recordDefinition
stringThe
string
that defines the record, typically in JSON format.flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzModifyFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzNoFlags. Specify SzWithInfo for an INFO response. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
result produced by adding the record to the repository, ornull
if the specified flags do not indicate that an INFO message should be returned.
Remarks
If a record already exists with the same data source code and record ID, then it will be replaced.
The specified JSON data may optionally contain the DATA_SOURCE
and RECORD_ID
properties, but, if so, they must match the
specified parameters.
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzModifyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzBadInputException
If the specified record definition has a data source or record ID value that conflicts with the specified data source code and/or record ID values.
- SzException
If a failure occurs.
- See Also
CloseExport(IntPtr)
This function closes an export handle of a previously opened export to clean up system resources.
void CloseExport(IntPtr exportHandle)
Parameters
exportHandle
IntPtrThe export handle of the export to close.
Remarks
This function is idempotent and may be called for an export that has already been closed.
Exceptions
- SzException
If a failure occurs.
- See Also
CountRedoRecords()
Gets the number of redo records pending to be processed.
long CountRedoRecords()
Returns
- long
The number of redo records pending to be processed.
Exceptions
- SzException
If a failure occurs.
- See Also
DeleteRecord(string, string, SzFlag?)
Delete a previously loaded record identified by the specified data source code and record ID.
string DeleteRecord(string dataSourceCode, string recordID, SzFlag? flags = (SzFlag)0)
Parameters
dataSourceCode
stringThe data source code identifying the data source for the record being deleted.
recordID
stringThe record ID that uniquely identifies the record being deleted within the scope of its associated data source.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzModifyFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzNoFlags. Specify SzWithInfo for an INFO response. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
result produced by deleting the record from the repository, ornull
if the specified flags do not indicate that an INFO message should be returned.
Remarks
This method is idempotent, meaning multiple calls this method with the same parameters will all succeed regardless of whether or not the record is found in the repository.
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzModifyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzException
If a failure occurs.
- See Also
ExportCsvEntityReport(string, SzFlag?)
Iniitiates an export of entity data in CSV format and returns an "export handle" that can be used to read the export data and must be closed when complete.
IntPtr ExportCsvEntityReport(string csvColumnList, SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludeSingleRecordEntities | SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)
Parameters
csvColumnList
stringSpecify
"*"
to indicate "all columns", specify empty-string to indicate the "standard columns", otherwise specify a comma-sepatated list of column names.flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzExportFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzExportDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- IntPtr
The export handle to use for retrieving the export data.
Remarks
The first exported line contains the CSV header and each subsequent line contains the exported entity data for a single resolved entity.
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzExportFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzException
If a failure occurs.
- See Also
ExportJsonEntityReport(SzFlag?)
Iniitiates an export of entity data as JSON-lines format and returns an "export handle" that can be used to read the export data and must be closed when complete.
IntPtr ExportJsonEntityReport(SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludeSingleRecordEntities | SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)
Parameters
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzExportFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzExportDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- IntPtr
The export handle to use for retrieving the export data.
Remarks
Each output line contains the exported entity data for a single resolved entity.
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzExportFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzException
If a failure occurs.
- See Also
FetchNext(IntPtr)
Fetches the next line of entity data from the export identified by the specified export handle.
string FetchNext(IntPtr exportHandle)
Parameters
exportHandle
IntPtrThe export handle to identify the export from which to retrieve the next line of data.
Returns
- string
The next line of export data whose format depends on which function was used to initiate the export, or
null
if there is no more data to be exported via the specified handle.
Remarks
The specified export handle can be obtained from ExportJsonEntityReport(SzFlag?) or ExportCsvEntityReport(string, SzFlag?).
Exceptions
- SzException
If a failure occurs.
- See Also
FindInterestingEntities(long, SzFlag?)
An experimental method to obtain interesting entities pertaining to the entity identified by the specified entity ID using the specified flags.
string FindInterestingEntities(long entityID, SzFlag? flags = (SzFlag)0)
Parameters
entityID
longThe entity ID identifying the entity that will be the focus for the interesting entities to be returned.
flags
SzFlag?The optional bitwise-OR'd SzFlag values for the operation, though no flags are currently defined for this experimental method. Omitting this parameter will default its value to SzNoFlags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the interesting entities.
Remarks
The result is returned as a JSON document describing the interesting entities.
The optionally specified bitwise-OR'd SzFlag values may contain any flags, but currenlty no flags are specifically defined for this experimental method. Flags are not applicable to this method will simply be ignored.
Exceptions
- SzNotFoundException
If no enitty could be found with the specified entity ID.
- SzException
If a failure occurs.
FindInterestingEntities(string, string, SzFlag?)
An experimental method to obtain interesting entities pertaining to the entity that contains a specific record that is identified by the specified data source code and record ID using the specified flags.
string FindInterestingEntities(string dataSourceCode, string recordID, SzFlag? flags = (SzFlag)0)
Parameters
dataSourceCode
stringThe data source code that identifies the data source of the constiuent record belonging to the entity that is the focus for the interesting entities to be returned.
recordID
stringThe record ID (unique within the scope of the record's data source) identifying the constituent record belonging to the entity that is the focus for the interesting entities to be returned.
flags
SzFlag?The optional bitwise-OR'd SzFlag values for the operation, though no flags are currently defined for this experimental method. Omitting this parameter will default its value to SzNoFlags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the interesting entities.
Remarks
The result is returned as a JSON document describing the interesting entities.
The optionally specified bitwise-OR'd SzFlag values may contain any flags, but currenlty no flags are specifically defined for this experimental method. Flags are not applicable to this method will simply be ignored.
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzNotFoundException
If no record can be found for the specified record ID.
- SzException
If a failure occurs.
FindNetwork(ISet<long>, int, int, int, SzFlag?)
Finds a network of entity relationships surrounding the paths between
a set of entities identified by one or more long
entity ID's
included in the specified ISet<T>.
string FindNetwork(ISet<long> entityIDs, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindNetworkIncludeMatchingInfo)
Parameters
entityIDs
ISet<long>The non-null ISet<T> of
long
entity ID's identifying the entities for which to build the network.maxDegrees
intThe maximum number of degrees for the path search between the specified entities.
buildOutDegrees
intThe number of relationship degrees to build out from each of the found entities on the network, or zero to prevent network build-out.
buildOutMaxEntities
intThe maximum number of entities to build out for the entire network.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzFindNetworkFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindNetworkDefaultFlags). Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the resultant entity network and the entities on the network.
Remarks
Additionally, the maximum degrees of separation for the paths between entities must be specified so as to prevent the network growing beyond the desired size. Further, a non-zero number of degrees to build out the network may be specified to find other related entities. If build out is specified, it can be limited to a maximum total number of build-out entities for the whole network.
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzFindNetworkFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzNotFoundException
If any of the entities for the specified entity ID's cannot be found.
- SzException
If a failure occurs.
- See Also
FindNetwork(ISet<(string dataSourceCode, string recordID)>, int, int, int, SzFlag?)
Finds a network of entity relationships surrounding the paths between a set of entities having the constiuent records identified by the tuples of data source code and record ID pairs included in the specified ISet<T>.
string FindNetwork(ISet<(string dataSourceCode, string recordID)> recordKeys, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindNetworkIncludeMatchingInfo)
Parameters
recordKeys
ISet<(string dataSourceCode, string recordID)>The non-null ISet<T> of tuples of data source code and record ID pairs identifying the constiuent records of the entities for which to build the network.
maxDegrees
intThe maximum number of degrees for the path search between the specified entities.
buildOutDegrees
intThe number of relationship degrees to build out from each of the found entities on the network, or zero to prevent network build-out.
buildOutMaxEntities
intThe maximum number of entities to build out for the entire network.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzFindNetworkFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindNetworkDefaultFlags). Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the resultant entity network and the entities on the network.
Remarks
Additionally, the maximum degrees of separation for the paths between entities must be specified so as to prevent the network growing beyond the desired size. Further, a non-zero number of degrees to build out the network may be specified to find other related entities. If build out is specified, it can be limited to a maximum total number of build-out entities for the whole network.
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzFindNetworkFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzNotFoundException
If any of the records for the specified data source code and record ID pairs cannot be found.
- SzException
If a failure occurs.
- See Also
FindPath(long, long, int, ISet<long>, ISet<string>, SzFlag?)
Finds a relationship path between two entities identified by their entity ID's.
string FindPath(long startEntityID, long endEntityID, int maxDegrees, ISet<long> avoidEntityIDs, ISet<string> requiredDataSources, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindPathIncludeMatchingInfo)
Parameters
startEntityID
longThe entity ID of the first entity.
endEntityID
longThe entity ID of the second entity.
maxDegrees
intThe maximum number of degrees for the path search.
avoidEntityIDs
ISet<long>The optional ISet<T> of
long
entity ID's identifying entities to be avoided when finding the path, ornull
if no entities are to be avoided.requiredDataSources
ISet<string>The optional ISet<T> of non-null
string
data source codes identifying the data sources for which at least one record must be included on the path, ornull
if none are required.flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzFindPathFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindPathDefaultFlags). Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the resultant entity path which may be an empty path if no path exists between the two entities given the path parameters.
Remarks
Entities to be avoided when finding the path may optionally be specified
as a non-null ISet<T> of long
entity ID's identifying
entities to be avoided. By default the specified entities will be avoided
unless absolutely neccessary to find the path. To strictly avoid the
specified entities specify the SzFindPathStrictAvoid flag.
Further, a ISet<T> of string
data source codes may
optionally be specified to identify required data sources. If specified
as non-null, then the required data sources set
contains non-null string
data source codes that identify data
sources for which a record from at least one must exist on the path.
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the level of detail provided for the entity path and those entities on the path. Any SzFlag value may be included, but only flags belonging to the SzFindPathFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzNotFoundException
If either the path-start or path-end entities for the specified entity ID's cannot be found.
- SzUnknownDataSourceException
If an unrecognized required data source is specified.
- SzException
If a failure occurs.
- See Also
FindPath(string, string, string, string, int, ISet<(string dataSourceCode, string recordID)>, ISet<string>, SzFlag?)
Finds a relationship path between two entities identified by the specified data source codes and record ID's of their constituent records.
string FindPath(string startDataSourceCode, string startRecordID, string endDataSourceCode, string endRecordID, int maxDegrees, ISet<(string dataSourceCode, string recordID)> avoidRecordKeys, ISet<string> requiredDataSources, SzFlag? flags = SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzFindPathIncludeMatchingInfo)
Parameters
startDataSourceCode
stringThe data source code identiyfing the data source for the starting record of the requested path.
startRecordID
stringThe record ID that uniquely identifies the starting record of the requested path within the scope of its associated data source.
endDataSourceCode
stringThe data source code identiyfing the data source for the ending record of the requested path.
endRecordID
stringThe record ID that uniquely identifies the ending record of the requested path within the scope of its associated data source.
maxDegrees
intThe maximum number of degrees for the path search.
avoidRecordKeys
ISet<(string dataSourceCode, string recordID)>The optional ISet<T> of tuples containing data source code and record ID pairs identifying records whose entities are to be avoided when finding the path, or
null
if no entities are to be avoided.requiredDataSources
ISet<string>The optionalISet<T> of non-null
string
data source codes identifying the data sources for which at least one record must be included on the path, ornull
if none are required.flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzFindPathFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to the default recommended flags (SzFindPathDefaultFlags). Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the resultant entity path which may be an empty path if no path exists between the two entities given the path parameters.
Remarks
Entities to be avoided when finding the path may optionally be specified as a non-null ISet<T> of tuples of data source code and record ID pairs identifying the constituent records of entities to be avoided. By default the associated entities will be avoided unless absolutely neccessary to find the path. To strictly avoid the associated entities specify the SzFindPathStrictAvoid flag.
Further, a ISet<T> of string
data source codes may
optionally be specified to identify required data sources. If specified
as non-null, then the required data sources set
contains non-null string
data source codes that identify data
sources for which a record from at least one must exist on the path.
The optionally specified bitwise-OR'd SzFlag values may contain any SzFlag value, but only flags belonging to the SzFindPathFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags).
Exceptions
- SzNotFoundException
If either the path-start or path-end records for the specified data source code and record ID pairs cannot be found.
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzException
If a failure occurs.
- See Also
GetEntity(long, SzFlag?)
This method is used to retrieve information about a specific resolved entity.
string GetEntity(long entityID, SzFlag? flags = SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)
Parameters
entityID
longThe entity ID identifying the entity to retrieve.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzEntityDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the entity.
Remarks
The result is returned as a JSON document describing the entity.
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzNotFoundException
If no enitty could be found with the specified entity ID.
- SzException
If a failure occurs.
- See Also
GetEntity(string, string, SzFlag?)
This method is used to retrieve information about the resolved entity that contains a specific record that is identified by the specified data source code and record ID.
string GetEntity(string dataSourceCode, string recordID, SzFlag? flags = SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary)
Parameters
dataSourceCode
stringThe data source code that identifies the data source of the constiuent record belonging to the entity to be retrieved.
recordID
stringThe record ID (unique within the scope of the record's data source) identifying the constituent record belonging to the entity to be retrieved.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzEntityDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the entity.
Remarks
The result is returned as a JSON document describing the entity.
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzNotFoundException
If no enitty could be found with the specified entity ID.
- SzException
If a failure occurs.
- See Also
GetRecord(string, string, SzFlag?)
Retrieves the record identified by the specified data source code and record ID.
string GetRecord(string dataSourceCode, string recordID, SzFlag? flags = SzFlag.SzEntityIncludeRecordJsonData)
Parameters
dataSourceCode
stringThe data source code identiyfing the data source for the record.
recordID
stringThe record ID that uniquely identifies the record within the scope of its associated data source.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzRecordFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzRecordDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the record.
Remarks
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzRecordFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzNotFoundException
If the record for the specified data source code and record ID pairs cannot be found.
- SzException
If a failure occurs.
- See Also
GetRedoRecord()
Retrieves a pending redo record from the reevaluation queue.
string GetRedoRecord()
Returns
- string
The retrieved redo record or
null
if there were no pending redo records.
Remarks
If no redo records are availbale then this returns an null
.
Exceptions
- SzException
If a failure occurs.
- See Also
GetStats()
Returns the current internal engine workload statistics for the process. The counters are reset after each call.
string GetStats()
Returns
- string
The
string
describing the statistics as JSON.
Exceptions
- SzException
If a failure occurs.
GetVirtualEntity(ISet<(string dataSourceCode, string recordID)>, SzFlag?)
Describes a hypothetically entity that would be composed of the one or more records identified by the tuples of data source code and record ID pairs in the specified ISet<T>.
string GetVirtualEntity(ISet<(string dataSourceCode, string recordID)> recordKeys, SzFlag? flags = SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo)
Parameters
recordKeys
ISet<(string dataSourceCode, string recordID)>The non-null non-empty ISet<T> of tuples of data source code and record ID pairs identifying the records to use to build the virtual entity.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzVirtualEntityFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyEntitiesDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the virtual entity having the specified constituent records.
Remarks
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzVirtualEntityFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzNotFoundException
If any of the records for the specified data source code and record ID pairs cannot be found.
- SzException
If a failure occurs.
- See Also
HowEntity(long, SzFlag?)
Deterimes how an entity identified by the specified entity ID was constructed from its constituent records.
string HowEntity(long entityID, SzFlag? flags = SzFlag.SzIncludeFeatureScores)
Parameters
entityID
longThe entity ID of the entity.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzHowFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzHowEntityDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the how the entity was constructed.
Remarks
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzHowFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzNotFoundException
If the entity for the specified entity ID could not be found.
- SzException
If a failure occurs.
- See Also
PreprocessRecord(string, SzFlag?)
Performs a hypothetical load of a the record described by the specified
string
record definition using the specified bitwise-OR'd
SzFlag values.
string PreprocessRecord(string recordDefinition, SzFlag? flags = SzFlag.SzEntityIncludeRecordJsonData)
Parameters
recordDefinition
stringThe
string
that defines the record, typically in JSON format.flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzRecordFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzRecordDefaultFlags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
result produced by preprocessing the record (depending on the specified flags).
Remarks
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzRecordFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzException
If a failure occurs.
- See Also
PrimeEngine()
May optionally be called to pre-initialize some of the heavier weight
internal resources of the SzEngine
.
void PrimeEngine()
Exceptions
- SzException
If a failure occurs.
ProcessRedoRecord(string, SzFlag?)
Processes the specified redo record using the specified flags. The redo record can be retrieved from GetRedoRecord().
string ProcessRedoRecord(string redoRecord, SzFlag? flags = (SzFlag)0)
Parameters
redoRecord
stringThe redo record to be processed.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzModifyFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzNoFlags. Specify SzWithInfo for an INFO response. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
result produced by processing the redo record, ornull
if the specified flags do not indicate that an INFO message should be returned.
Remarks
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzModifyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzException
If a failure occurs.
- See Also
ReevaluateEntity(long, SzFlag?)
Reevaluate a resolved entity identified by the specified entity ID.
string ReevaluateEntity(long entityID, SzFlag? flags = (SzFlag)0)
Parameters
entityID
longThe ID of the resolved entity to reevaluate.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzModifyFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzNoFlags. Specify SzWithInfo for an INFO response. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
result produced by reevaluating the entity, ornull
if the specified flags do not indicate that an INFO message should be returned.
Remarks
If the entity for the entity ID is not found, then the operation silently does nothing with no exception. This is to ensure consistent behavior in case of a race condition with entity re-resolve or unresolve. To ensure that the entity was found, specify the SzWithInfo flag and check the returned INFO document for affected entities.
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzModifyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzException
If a failure occurs.
- See Also
ReevaluateRecord(string, string, SzFlag?)
Reevaluate the record identified by the specified data source code and record ID.
string ReevaluateRecord(string dataSourceCode, string recordID, SzFlag? flags = (SzFlag)0)
Parameters
dataSourceCode
stringThe data source code identifying the data source for the record to reevaluate.
recordID
stringThe record ID that uniquely identifies the record to reevaluate within the scope of its associated data source.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzModifyFlags group to control how the operation is performed and the content of the response. Omitting this parameter will default its value to SzNoFlags. Specify SzWithInfo for an INFO response. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
result produced by reevaluating the record, ornull
if the specified flags do not indicate that an INFO message should be returned.
Remarks
If the data source code is not recognized then an SzUnknownDataSourceException is thrown but if the record for the record ID is not found, then the operation silently does nothing with no exception. This is to ensure consistent behavior in case of a race condition with record deletion. To ensure that the record was found, specify the SzWithInfo flag and check the returned INFO document for affected entities.
The optionally specified bitwise-OR'd SzFlag values not only controls how the operation is performed, but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzModifyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzException
If a failure occurs.
- See Also
SearchByAttributes(string, SzFlag?)
This method is equivalent to calling
SearchByAttributes(string, string, SzFlag?)
with a null
value for the search profile parameter.
string SearchByAttributes(string attributes, SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludePossiblySame | SzFlag.SzExportIncludePossiblyRelated | SzFlag.SzExportIncludeNameOnly | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzIncludeFeatureScores)
Parameters
attributes
stringThe search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzSearchFlags group to control how the operation is performed and the content of the response, omitting this parameter will default its value to SzSearchByAttributesDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The resulting JSON
string
describing the result of the search.
Remarks
See SearchByAttributes(string, string, SzFlag?) documentation for details.
Exceptions
- SzException
If a failure occurs.
- See Also
SearchByAttributes(string, string, SzFlag?)
This method searches for entities that match or relate to the provided search attributes using the optionally specified search profile.
string SearchByAttributes(string attributes, string searchProfile, SzFlag? flags = SzFlag.SzExportIncludeMultiRecordEntities | SzFlag.SzExportIncludePossiblySame | SzFlag.SzExportIncludePossiblyRelated | SzFlag.SzExportIncludeNameOnly | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzIncludeFeatureScores)
Parameters
attributes
stringThe search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.
searchProfile
stringThe optional search profile identifier, or
null
if the default search profile should be used for the search.flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzSearchFlags group to control how the operation is performed and the content of the response, omitting this parameter will default its value to SzSearchByAttributesDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The resulting JSON
string
describing the result of the search.
Remarks
The specified search attributes are treated as a hypothetical record and the search results are those entities that would match or relate to that hypothetical record on some level (depending on the specified flags).
If the specified search profile is null
then the default
generic thresholds from the default search profile will be used for the
search (alternatively, use SearchByAttributes(string, SzFlag?)
to omit the parameter). If your search requires different behavior using
alternate generic thresholds, please contact
support@senzing.com for
details on configuring a custom search profile.
The optionally specified bitwise-OR'd SzFlag values not only control how the search is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzSearchFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzException
If a failure occurs.
- See Also
WhyEntities(long, long, SzFlag?)
Determines the ways in which two entities identified by the specified entity ID's are related to each other.
string WhyEntities(long entityID1, long entityID2, SzFlag? flags = SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary | SzFlag.SzEntityIncludeInternalFeatures | SzFlag.SzEntityIncludeFeatureStats | SzFlag.SzIncludeFeatureScores)
Parameters
entityID1
longThe entity ID of the first entity.
entityID2
longThe entity ID of the second entity.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzWhyFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyEntitiesDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the ways in which the records are related to one another.
Remarks
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzWhyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzNotFoundException
If either of the entities for the specified entity ID's could not be found.
- SzException
If a failure occurs.
- See Also
WhyRecordInEntity(string, string, SzFlag?)
Determines why the record identified by the specified data source code and record ID is included in its respective entity.
string WhyRecordInEntity(string dataSourceCode, string recordID, SzFlag? flags = SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary | SzFlag.SzEntityIncludeInternalFeatures | SzFlag.SzEntityIncludeFeatureStats | SzFlag.SzIncludeFeatureScores)
Parameters
dataSourceCode
stringThe data source code that identifies the data source of the record.
recordID
stringThe record ID that identifies the record within the scope of the record's data source.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzWhyFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyRecordInEntityDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing why the record is included in its respective entity.
Remarks
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzWhyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzNotFoundException
If any of the records for the specified data source code and record ID pairs cannot be found.
- SzException
If a failure occurs.
- See Also
WhyRecords(string, string, string, string, SzFlag?)
Determines ways in which two records identified by their data source code and record IDs are related to each other.
string WhyRecords(string dataSourceCode1, string recordID1, string dataSourceCode2, string recordID2, SzFlag? flags = SzFlag.SzEntityIncludePossiblySameRelations | SzFlag.SzEntityIncludePossiblyRelatedRelations | SzFlag.SzEntityIncludeNameOnlyRelations | SzFlag.SzEntityIncludeDisclosedRelations | SzFlag.SzEntityIncludeRepresentativeFeatures | SzFlag.SzEntityIncludeEntityName | SzFlag.SzEntityIncludeRecordSummary | SzFlag.SzEntityIncludeRecordData | SzFlag.SzEntityIncludeRecordMatchingInfo | SzFlag.SzEntityIncludeRelatedEntityName | SzFlag.SzEntityIncludeRelatedMatchingInfo | SzFlag.SzEntityIncludeRelatedRecordSummary | SzFlag.SzEntityIncludeInternalFeatures | SzFlag.SzEntityIncludeFeatureStats | SzFlag.SzIncludeFeatureScores)
Parameters
dataSourceCode1
stringThe data source code identiyfing the data source for the first record.
recordID1
stringThe record ID that uniquely identifies the first record within the scope of its associated data source.
dataSourceCode2
stringThe data source code identiyfing the data source for the second record.
recordID2
stringThe record ID that uniquely identifies the second record within the scope of its associated data source.
flags
SzFlag?The optional bitwise-OR'd SzFlag values belonging to the SzWhyFlags group to control how the operation is performed and the content of the response. Omitting this parameter defaults it value to SzWhyRecordsDefaultFlags for the default recommended flags. Specifying
null
is equivalent to specifying SzNoFlags.
Returns
- string
The JSON
string
describing the ways in which the records are related to one another.
Remarks
The optionally specified bitwise-OR'd SzFlag values not only control how the operation is performed but also the content of the response. Any SzFlag value may be included, but only flags belonging to the SzWhyFlags group will be recognized (other SzFlag values will be ignored unless they have equivalent bit flags to recognized flags).
Exceptions
- SzUnknownDataSourceException
If an unrecognized data source code is specified.
- SzNotFoundException
If either of the records for the specified data source code and record ID pairs cannot be found.
- SzException
If a failure occurs.
- See Also