source: trunk/gsdl/src/recpt/OIDtools.h@ 274

Last change on this file since 274 was 274, checked in by sjboddie, 25 years ago

just changed a comment that was confusing me

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/**********************************************************************
2 *
3 * OIDtools.h --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
6 * PUT COPYRIGHT NOTICE HERE
7 *
8 * $Id: OIDtools.h 274 1999-06-16 02:05:23Z sjboddie $
9 *
10 *********************************************************************/
11
12
13#ifndef OIDTOOLS_H
14#define OIDTOOLS_H
15
16#include "text_t.h"
17#include "recptproto.h"
18
19// returns (in top) the top level of OID (i.e. everything
20// up until the first dot)
21void get_top (const text_t &OID, text_t &top);
22
23// checks if OID is top level (i.e. contains no dots)
24bool is_top (const text_t &OID);
25
26// get_parents_array loads the parents array with all the parents of the
27// document or classification specified by OID (not including OID itself)
28void get_parents_array (const text_t &OID, text_tarray &parents);
29
30// get_info does a protocol call and returns (in response) the info
31// associated with OID. The metadata array should be loaded with whatever
32// metadata fields are to be requested
33bool get_info (const text_t &OID, const text_t &collection,
34 const text_tarray &metadata, recptproto *collectproto,
35 FilterResponse_t &response, ostream &logout);
36
37// has_children returns true if OID has children
38bool has_children (const text_t &OID, const text_t &collection,
39 recptproto *collectproto, ostream &logout);
40
41// get_children does a protocol call and returns (in response) the OIDs and
42// metadata of all the children of OID. The metadata array should be loaded
43// with whatever metadata fields are to be requested.
44bool get_children (const text_t &OID, const text_t &collection,
45 const text_tarray &metadata, recptproto *collectproto,
46 FilterResponse_t &response, ostream &logout);
47
48// get_parent returns the parent of the document or classification
49// specified by OID
50text_t get_parent (text_t OID);
51
52// takes an OID like ".2.3 and replaces the " with parent
53void translate_parent (text_t &OID, const text_t &parent);
54
55// shrink_parent does the opposite to translate_parent
56void shrink_parent (text_t &OID);
57
58// checks if OID uses ".fc", ".lc", ".pr", ".ns",
59// or ".ps" syntax (first child, last child, parent,
60// next sibling, previous sibling)
61bool needs_translating (const text_t &OID);
62
63// get_contents returns OIDs and metadata of all contents
64// below (and including) OID.
65// at present the only metadata being returned for each is
66// Title and haschildren
67void get_contents (const text_t &topOID, const text_t &classifytype, int &totalcols,
68 const text_t &collection, recptproto *collectproto,
69 FilterResponse_t &response, ostream &logout);
70
71#endif
Note: See TracBrowser for help on using the repository browser.