Sun Java System Portal Server 7 Developer's Guide

rdm.h File

The file rdm.h defines structures and functions for creating RDMs. The intent of these functions is to construct queries and instructions that can be output as RDM and sent via the sendrdm program to a search engine for processing. These queries and instructions are created in the C programming language.

The basic structures are:

To support each of these main structures, there are additional structures like RDMViewAttributes, RDMViewOrder, and RDMViewHit which are used to represent attributes in an RDMQuery.

The RDM API defined in rdm.h file provides functions for creating and modifying these structures. For example, the following statement:

RDMQuery *myquery = RDMQuery_Create("varrius");

creates an RDMQuery that corresponds to the following SOIF:


@RDMQUERY { -
    scope{7}:varrius
}

The following statement:

RDMQuery_SetViewAttr(myquery, "URL,Title");

modifies the RDMQuery so that it corresponds to the following SOIF:


@RDMQUERY { -
    scope{7}:varrius
    view-attributes{30}: URL,Title,Author,Last-Modified
}

Both the RDMHeader and RDMQuery structures have soif fields, which contain the SOIF data for the header or the query. To extract SOIF data from RDMHeader or RDMQuery, you can access the soif field. Thus, you can also use the RDM SOIF API to create and modify RDMHeader and RDMQuery objects.