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

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

get_info() now takes a getParents argument

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 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 278 1999-06-16 03:11:25Z 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, bool getParents,
35 recptproto *collectproto, FilterResponse_t &response,
36 ostream &logout);
37
38// has_children returns true if OID has children
39bool has_children (const text_t &OID, const text_t &collection,
40 recptproto *collectproto, ostream &logout);
41
42// get_children does a protocol call and returns (in response) the OIDs and
43// metadata of all the children of OID. The metadata array should be loaded
44// with whatever metadata fields are to be requested.
45bool get_children (const text_t &OID, const text_t &collection,
46 const text_tarray &metadata, recptproto *collectproto,
47 FilterResponse_t &response, ostream &logout);
48
49// get_parent returns the parent of the document or classification
50// specified by OID
51text_t get_parent (text_t OID);
52
53// takes an OID like ".2.3 and replaces the " with parent
54void translate_parent (text_t &OID, const text_t &parent);
55
56// shrink_parent does the opposite to translate_parent
57void shrink_parent (text_t &OID);
58
59// checks if OID uses ".fc", ".lc", ".pr", ".ns",
60// or ".ps" syntax (first child, last child, parent,
61// next sibling, previous sibling)
62bool needs_translating (const text_t &OID);
63
64// get_contents returns OIDs and metadata of all contents
65// below (and including) OID.
66// at present the only metadata being returned for each is
67// Title and haschildren
68void get_contents (const text_t &topOID, const text_t &classifytype, int &totalcols,
69 const text_t &collection, recptproto *collectproto,
70 FilterResponse_t &response, ostream &logout);
71
72#endif
Note: See TracBrowser for help on using the repository browser.