Skip to main content
Each GKR file has a set of parameters and corresponding values. The GKRInfo process is designed to provide information about the GKR files’ parameters. The GKR files are read from the data folder provided.

API Usage

The following code walks through API usage.

Initialize the server

lqtServer srv = lqtServer.create();
srv.init("C:\\loqate\\data");
lqtProcessList lst = lqtProcessList.create();
lqtProcessOptions opts = lqtProcessOptions.create();

Set the tool

lst.add("GKRInfo", opts);

Execute the process

lqtInputRecord rec = lqtInputRecord.create();
lqtProcessResult res = lqtProcessResult.create();
srv.process(rec, lst, res);

Dump the output from the GKRInfo

FileWriter outputFile = new FileWriter("C:\\output.txt");
PrintWriter out = new PrintWriter(outputFile);
for (int record = 0; record < res.getCount(); record++)
{
    out.print( "\n");
    for (long field=0; field < res.getFieldCount(record); field++)
    {
        out.print( res.getFieldName(record, field) + ": " +"\t");
        out.print( res.getField(record, field) + "\n");
    }
}

Output Information

The GKRInfo tool enumerates data files in the data folder and collects all GKR parameters and their values. Each data file’s information is stored in a separate Record inside the ProcessResult structure.

Common Parameters

ParameterDescription
NameName of the data file
DataVersionRelease version
GKRVersionVersion number of data format
Reference.FieldCountThe fields that have available data in the Reference data file for the specific country
Reference.ContentType.()The actual fields
Reference.FieldBlank.()Count of records where the particular field is blank (output for each relevant field)
Reference.FieldDistinct.()Count of records where the particular field is unique and not blank (output for each relevant field)
Most other parameters vary by file and provide miscellaneous information about the respective files.

Example Output

The following example shows parameters and values for context.lfs:
Name                        context.lfs
CompressionType             0
Context.MaxNodeSize         256
Context.NodeLookupPos       2036
Context.RecordLookupPos     167805
File.Build.Context          1357346307
File.Version.Context        1
DataVersion                 2013Q1.0
GKRVersion                  1