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

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

changed FilterRequest_t::docSet into an array

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 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 472 1999-08-25 04:50:00Z 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);
37bool get_info (const text_tarray &OIDs, const text_t &collection,
38 const text_tarray &metadata, bool getParents,
39 recptproto *collectproto, FilterResponse_t &response,
40 ostream &logout);
41
42// has_children returns true if OID has children
43bool has_children (const text_t &OID, const text_t &collection,
44 recptproto *collectproto, ostream &logout);
45
46// get_children does a protocol call and returns (in response) the OIDs and
47// metadata of all the children of OID. The metadata array should be loaded
48// with whatever metadata fields are to be requested.
49bool get_children (const text_t &OID, const text_t &collection,
50 const text_tarray &metadata, bool getParents,
51 recptproto *collectproto, FilterResponse_t &response,
52 ostream &logout);
53
54// get_parent returns the parent of the document or classification
55// specified by OID
56text_t get_parent (text_t OID);
57
58// takes an OID like ".2.3 and replaces the " with parent
59void translate_parent (text_t &OID, const text_t &parent);
60
61// shrink_parent does the opposite to translate_parent
62void shrink_parent (text_t &OID);
63
64// checks if OID uses ".fc", ".lc", ".pr", ".ns",
65// or ".ps" syntax (first child, last child, parent,
66// next sibling, previous sibling)
67bool needs_translating (const text_t &OID);
68
69// strips the ".fc", ".lc", ".pr", ".ns",
70// or ".ps" suffix from the end of OID
71void strip_suffix (text_t &OID);
72
73// get_contents returns OIDs and metadata of all contents
74// below (and including) OID.
75void get_contents (const text_t &topOID, const text_t &classifytype,
76 text_tarray &metadata, int &totalcols,
77 const text_t &collection, recptproto *collectproto,
78 FilterResponse_t &response, ostream &logout);
79
80// is_child_of returns true if OID2 is a child of OID1
81bool is_child_of(const text_t &OID1, const text_t &OID2);
82
83
84#endif
Note: See TracBrowser for help on using the repository browser.