Adlib API home page > Documentation > Pointer file structures

Pointer file structures

The default XML structure of a pointer file in Adlib can be seen in the following example:

<adlibXML>   <recordList>      <record>          <number>3</number>          <title>My collection</title>          <selection/>          <owner>bert</owner>          <hits>5</hits>          <created>2010-07-23T08:29:41</created>          <modified>2010-07-23T08:29:41</modified>          <frequency/>          <subject/>          <expires>1970-01-01T00:00:00</expires>          <prunemode>0</prunemode>          <hit>2</hit>          <hit>38</hit>          <hit>172</hit>          <hit>176</hit>          <hit>179</hit>          <accesslist>             <access>                <name>erik</name>                <rights>3</rights>             </access>          </accesslist>      </record>   </recordList>   <diagnostic>      <hits>0</hits>      <xmltype>Undefined</xmltype>   </diagnostic> </adlibXML>

Of course, the number of hits depends on the pointer file, and the access list is only present if access rights have been assigned to the pointer file.
(If some kind of user authentication for the API application has been set up, any access rights returned in the access list of pointer files are used by wwwopac.ashx to determine if the user of the current session is allowed access to the relevant pointer file, and if so, to which degree.)

From version 3.6.0.25721, a second XML pointer file structure is available for use with the Adlib API. By specifying xmltype=structured in the wwwopac.ashx request, the same pointer file is retrieved in the new structure. The difference is in the hit list.

<adlibXML>   <recordList>      <record>          <number>3</number>          <title>My collection</title>          <selection/>          <owner>bert</owner>          <hits>5</hits>          <created>2010-07-23T08:29:41</created>          <modified>2010-07-23T08:29:41</modified>          <frequency/>          <subject/>          <expires>1970-01-01T00:00:00</expires>          <prunemode>0</prunemode>          <hitlist>             <record priref="2"/>             <record priref="38"/>             <record priref="172"/>             <record priref="176"/>             <record priref="179"/>          </hitlist>          <accesslist>             <access>                <name>erik</name>                <rights>3</rights>             </access>          </accesslist>      </record>   </recordList>   <diagnostic>      <hits>0</hits>      <xmltype>Undefined</xmltype>   </diagnostic> </adlibXML>

The advantage of the structured XML type is that the <record> nodes underneath the <hitlist> node may contain custom XML documents to store metadata about the record in this pointer file. This is of particular use if a record has different aspects, and you would like to have each record/aspect combination to appear in the pointer file. In the default XML type this is not possible since a record can only appear once in a pointer file. Although In the structured XML type a record can still only appear once, you are now able to include your own XML document to list all aspects separately. For example, suppose you have a record describing a movie, and of this movie you have selected a number of scenes which are of particular interest. Of these scenes you have collected information like the start frame and end frame and maybe a specific still frame. Further you wish to create pointer files which contain media records, and per record you want to list some scenes. Via the Adlib API you can store this information in a pointer file, by using the structured XML type. For your custom information you can create any XML document and include it in the relevant <record> nodes. For example:

<adlibXML>   <recordList>      <record>          <number>3</number>          <title>My collection</title>          <selection/>          <owner>bert</owner>          <hits>5</hits>          <created>2010-07-23T08:29:41</created>          <modified>2010-07-23T08:29:41</modified>          <frequency/>          <subject/>          <expires>1970-01-01T00:00:00</expires>          <prunemode>0</prunemode>          <hitlist>             <record priref="2">                <clips>                  <clip startframe="3445" endframe= "3785" stillframe="3505"/>                  <clip startframe="10125" endframe= "22620" stillframe="0"/>                  <clip startframe="31590" endframe= "39715" stillframe="38640"/>               </clips>             <record>             <record priref="38"/>             <record priref="172"/>             <record priref="176"/>             <record priref="179"/>          </hitlist>          <accesslist>             <access>               <name>erik</name>               <rights>3</rights>             </access>          </accesslist>      </record>   </recordList>   <diagnostic>      <hits>0</hits>      <xmltype>Undefined</xmltype>   </diagnostic> </adlibXML>

Besides using a current version of wwwopac.ashx and its accompanying files, you'll have to update your Adlib SQL database structure, before you can write record metadata into your pointer files. You, or AIS, can do this with a special tool for this purpose, called Update64. Please, ask the AIS Helpdesk for more information.
The update of your database structure creates a metadata column in your pointer files structure to contain your custom metadata XML documents. It also creates a creation column, which will contain the date on which the pointer file was created, but this only applies to newly created pointer files after this update. Previously only the modification information was present. Note that the <created> node in the resulting XML of a requested pre-existing pointer file will contain the same date as the <modified> node, by default.