doclist

Top  Previous  Next

doclist

docs=new("doclist"[,filename$[,initfile]])

 

A doclist is a list of documents from one or more libraries.  Each document is identified by a library, document type, and document ID, called a document record.  Doclist objects can be manipulated and listed.  A doclist object is also created by the search object, providing a set of methods for processing the search results.

 

If filename$ is supplied, then that file is opened and used for the document lists.  If not, a new temporary file is created, which is automatically erased when the object is destroyed.  If initfile is provided and true (1), the document list is initialized so no document records are present.

 

Properties

 

listfile$ is a read-only property that provides the name of the document list data file.

 

Methods

 

clear() clears the list of all documents.

count() returns the number of records in the list.

count(library$) returns the number of records in the list for the given library.

count(library,doctype$) returns the number of records in the list for the given library and document type.

deldoc(library$,doctype$,docid$) removes the specified document from the list.  Note this does not affect the document stored in the library.

getalldocs$(first,count [,descending]) returns a list of document library, doc type, and doc ID's.  The three fields are delimited by tabs ($09$) and the records are delimited by linefeeds.  Up to count records are returned, from starting with index indicated by first.  If descending is true (1), the list is returned in reverse order.

getdoc(library$,doctype$,docid$[,prop$]) returns 1 if the document exists in the list. If prop$ is provided, it creates it as a template and fills it if the document exists.  The prop$ template contains document properties of the document itself, from the archive storage system, using a library object.  The following properties are provided:

prop.date$
prop.time$
prop.title$
prop.entityid$
prop.notes$
prop.keywords$
prop.categories$
prop.links$

getdocs$(library$,doctype$,first$|first,count [,descending]) returns a list of document library, doc type, and doc ID's.  The three fields are delimited by tabs ($09$) and the records are delimited by linefeeds.  Within the range of library and document type, up to count records are returned, from starting with the document ID indicated by first$, or index indicated by first.  If descending is true (1), the list is returned in reverse order.

getlibs$() returns a linefeed ($0A$) delimited list of libraries in the list.

gettypes$(library$) returns a linefeed delimited list of document types, within a library name, in the list.

movefirst(library$,doctype$,docid$[,docprop$]) moves to the first record and returns the library, document type, document ID, and optional document properties template with the following fields: date$, time$, title$, entityid$, notes$, keywords$, categories$, and links$, referenced as docprop.name.  Returns 1 if successful, 0 if not.

movelast(library$,doctype$,docid$[,docprop$]) moves to the last record.  Returns 1 if successful, 0 if not.

movenext(library$,doctype$,docid$[,docprop$]) moves to the next record.  Returns 1 if successful, 0 if not.

moveprev(library$,doctype$,docid$[,docprop$]) moves to the previous record.  Returns 1 if successful, 0 if not.

moveto(library$,doctype$,docid$) navigates a specific point in the document list.  Use this as a seed for subsequent moveprev() or movenext() methods.

putdoc(library$,doctype$,docid$) adds the specified document to the list.  Note this does not affect the document stored in the library.