TRIPsystem Kernel API 8.3
Loading...
Searching...
No Matches
Miscellaneous functions

Functions of miscellaneous kinds. More...

Functions

int TdbDeallocate (void *buf)
 Release member returned by various other kernel API functions.
 
int TdbExtractTextFromField (TdbHandle recordControl, int partNumber, const char *targetFieldName, const char *propertyNameField, const char *propertyValueField, const char *sourceFieldName, const char *fileName)
 Call TRIPcof to extract text from file data stored in a STRING field.
 
int TdbExtractTextFromFile (TdbHandle recordControl, int partNumber, const char *targetTextFieldName, const char *propertyNameField, const char *propertyValueField, const char *targetStringFieldName, const char *fileName)
 Call TRIPcof to extract text from a file on the local file system.
 
int TdbExtractTextFromMem (TdbHandle recordControl, int partNumber, const char *targetFieldName, const char *propertyNameField, const char *propertyValueField, const char *targetStringFieldName, unsigned char *filedata, size_t fileDataSize, const char *fileName)
 Call TRIPcof to extract text from in-memory file data.
 
int TdbOpenBase (char *base)
 Make a database known to TRIP.
 
int TdbOpenBaseQuota (int *bases)
 Retrieve the number of bases which can be opened.
 

Detailed Description

Functions of miscellaneous kinds.

Function Documentation

◆ TdbDeallocate()

int TdbDeallocate ( void *  buf)

Release member returned by various other kernel API functions.

Parameters
bufMemory to release
Returns
1 or other odd value on success, even value on error

Description

Functions that return memory that should be deallocated using this function include:

◆ TdbExtractTextFromField()

int TdbExtractTextFromField ( TdbHandle  recordControl,
int  partNumber,
const char *  targetFieldName,
const char *  propertyNameField,
const char *  propertyValueField,
const char *  sourceFieldName,
const char *  fileName 
)

Call TRIPcof to extract text from file data stored in a STRING field.

Parameters
recordControlA record control for the record into which to store the extracted text
partNumberThe part number for the fields identified by targetFieldName, propertyNameField and propertyValueField
targetFieldNameThe name of the TEXT field to receive the extracted text
propertyNameFieldThe name of a PHRASE field to receieve a list of extractyed property names (typled with propertyValueField), or NULL to skip property extarction.
propertyValueFieldThe name of a PHRASE field to receieve a list of extractyed property values (typled with propertyNameField), or NULL to skip property extarction
sourceFieldNameThe name of the STRING field in which the file is stored
fileNameThe name of the file stored in the source field
Returns
1 or other odd value on success, even value on error

Description

This function extracts text and, optionally, document properties from a file stored in a STRING field. Upon successful completion of this function, the text and optional properties have been stored in the named fields in the record referenced by the recordControl. Use TdbPutRecord() to commit the results.

See also
TdbCreateRecordControl
TdbPutRecord
TdbSetCursor

◆ TdbExtractTextFromFile()

int TdbExtractTextFromFile ( TdbHandle  recordControl,
int  partNumber,
const char *  targetTextFieldName,
const char *  propertyNameField,
const char *  propertyValueField,
const char *  targetStringFieldName,
const char *  fileName 
)

Call TRIPcof to extract text from a file on the local file system.

Parameters
recordControlA record control for the record into which to store the extracted text
partNumberThe part number for the fields identified by targetFieldName, propertyNameField and propertyValueField
targetTextFieldNameThe name of the TEXT field to receive the extracted text
propertyNameFieldThe name of a PHRASE field to receieve a list of extractyed property names (typled with propertyValueField), or NULL to skip property extarction.
propertyValueFieldThe name of a PHRASE field to receieve a list of extractyed property values (typled with propertyNameField), or NULL to skip property extarction
targetStringFieldNameThe name of a STRING field into which to store a copy of the file, or NULL to not store the file.
fileNameThe name of a local file to extract text and properties from
Returns
1 or other odd value on success, even value on error

Description

This function extracts text and, optionally, document properties from a file on the local file system. Upon successful completion of this function, the text and optional properties have been stored in the named fields in the record referenced by the recordControl. A copy of the file can optionally be stored in the record as well. Use TdbPutRecord() to commit the results.

See also
TdbCreateRecordControl
TdbPutRecord

◆ TdbExtractTextFromMem()

int TdbExtractTextFromMem ( TdbHandle  recordControl,
int  partNumber,
const char *  targetFieldName,
const char *  propertyNameField,
const char *  propertyValueField,
const char *  targetStringFieldName,
unsigned char *  filedata,
size_t  fileDataSize,
const char *  fileName 
)

Call TRIPcof to extract text from in-memory file data.

Parameters
recordControlA record control for the record into which to store the extracted text
partNumberThe part number for the fields identified by targetFieldName, propertyNameField and propertyValueField
targetFieldNameThe name of the TEXT field to receive the extracted text
propertyNameFieldThe name of a PHRASE field to receieve a list of extractyed property names (typled with propertyValueField), or NULL to skip property extarction.
propertyValueFieldThe name of a PHRASE field to receieve a list of extractyed property values (typled with propertyNameField), or NULL to skip property extarction
targetStringFieldNameThe name of a STRING field into which to store a copy of the file, or NULL to not store the file.
filedataThe file data to extract text from
fileDataSizeThe length of the data in the filedata buffer
fileNameThe name of the file contained in the filedata buffer
Returns
1 or other odd value on success, even value on error

Description

This function extracts text and, optionally, document properties from a file on the local file system. Upon successful completion of this function, the text and optional properties have been stored in the named fields in the record referenced by the recordControl. A copy of the file can optionally be stored in the record as well. Use TdbPutRecord() to commit the results.

See also
TdbCreateRecordControl
TdbPutRecord

◆ TdbOpenBase()

int TdbOpenBase ( char *  base)

Make a database known to TRIP.

Parameters
baseName of database
Returns
1 or other odd value on success, even value on error

Description

The function TdbOpenBase() makes a database known to TRIP without opening it for searching. The database will however still be included in the list of databases opened in the current session.

Parameter Values

The base parameter is passed a character string as the name of the database to open. On a successful call, this parameter receives the normalized name of the database.

Return Codes

 Code Description Explanation
1 Operation completed successfully The function completed its operations without error.
7010 Database LOG file cannot be opened.
3106 Old version of BIF/VIF files. The database must be reindexed before it can be opened.
11362 Max 250 databases can be opened during a TRIP session.
2530 No access to database name. The logged on user did not have access to the specified database.
9538 No write access to database name. The logged on user did not have write access to the specified database.
15010 name is a database cluster.
17314 No access to DB cluster name.
1934 Database name not found. The specified database did not exist.
962 File name error, check logical names for database. The BAF/BIF/VIF files could not be found at the specified location.
1314 Database name is OS read protected. The protection on the files for this database prohibits read access.

◆ TdbOpenBaseQuota()

int TdbOpenBaseQuota ( int *  bases)

Retrieve the number of bases which can be opened.

Parameters
basesNumber of bases to open in current session
Returns
1 or other odd value on success, even value on error

Description

The function TdbOpenBaseQuota() returns the number of databases that can be opened in addition to those currently open in the session.

One base has to been set. *

Parameter Values

The bases parameter is passed a pointer to an int variable to receive the number of bases that can be opened in the current session.

Return Codes

 Code Description Explanation
1 Operation completed successfully The function completed its operations without error.