TRIPsystem Kernel API 8.3
|
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. | |
Functions of miscellaneous kinds.
int TdbDeallocate | ( | void * | buf | ) |
Release member returned by various other kernel API functions.
buf | Memory to release |
Functions that return memory that should be deallocated using this function include:
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.
recordControl | A record control for the record into which to store the extracted text |
partNumber | The part number for the fields identified by targetFieldName , propertyNameField and propertyValueField |
targetFieldName | The name of the TEXT field to receive the extracted text |
propertyNameField | The name of a PHRASE field to receieve a list of extractyed property names (typled with propertyValueField ), or NULL to skip property extarction. |
propertyValueField | The name of a PHRASE field to receieve a list of extractyed property values (typled with propertyNameField ), or NULL to skip property extarction |
sourceFieldName | The name of the STRING field in which the file is stored |
fileName | The name of the file stored in the source field |
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.
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.
recordControl | A record control for the record into which to store the extracted text |
partNumber | The part number for the fields identified by targetFieldName , propertyNameField and propertyValueField |
targetTextFieldName | The name of the TEXT field to receive the extracted text |
propertyNameField | The name of a PHRASE field to receieve a list of extractyed property names (typled with propertyValueField ), or NULL to skip property extarction. |
propertyValueField | The name of a PHRASE field to receieve a list of extractyed property values (typled with propertyNameField ), or NULL to skip property extarction |
targetStringFieldName | The name of a STRING field into which to store a copy of the file, or NULL to not store the file. |
fileName | The name of a local file to extract text and properties from |
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.
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.
recordControl | A record control for the record into which to store the extracted text |
partNumber | The part number for the fields identified by targetFieldName , propertyNameField and propertyValueField |
targetFieldName | The name of the TEXT field to receive the extracted text |
propertyNameField | The name of a PHRASE field to receieve a list of extractyed property names (typled with propertyValueField ), or NULL to skip property extarction. |
propertyValueField | The name of a PHRASE field to receieve a list of extractyed property values (typled with propertyNameField ), or NULL to skip property extarction |
targetStringFieldName | The name of a STRING field into which to store a copy of the file, or NULL to not store the file. |
filedata | The file data to extract text from |
fileDataSize | The length of the data in the filedata buffer |
fileName | The name of the file contained in the filedata buffer |
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.
int TdbOpenBase | ( | char * | base | ) |
Make a database known to TRIP.
base | Name of database |
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.
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.
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. |
int TdbOpenBaseQuota | ( | int * | bases | ) |
Retrieve the number of bases which can be opened.
bases | Number of bases to open in current session |
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. *
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.
Code | Description | Explanation |
---|---|---|
1 | Operation completed successfully | The function completed its operations without error. |