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

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

More library functions for dealing with OIDs. Many of them just
return dummy data at present

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 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 211 1999-03-25 03:13:42Z sjboddie $
9 *
10 *********************************************************************/
11
12
13#ifndef OIDTOOLS_H
14#define OIDTOOLS_H
15
16#include "text_t.h"
17
18// get first four characters of whatever string is passed in
19// OID. This returns the CLSU, HASH etc.
20void get_head (const text_t &OID, text_t &head);
21
22// returns (in top) the top level of OID (i.e. everything
23// up until the first dot)
24void get_top (const text_t &OID, text_t &top);
25
26// checks if OID is top level (i.e. contains no dots)
27bool is_top (const text_t &OID);
28
29// is_classification checks OID to see if it's a classification
30// or a document. I'm not sure how to do this - for now I'll just assume
31// all documents start with HASH and classifications start with something
32// else.
33bool is_classification (const text_t &OID);
34
35// don't know how to do this yet either ...
36bool contains_text (const text_t &OID);
37
38// get_parents_array loads the parents array with all the parents of the
39// document or classification specified by OID
40// note that this function doesn't clear the parents array
41void get_parents_array (const text_t &OID, text_tarray &parents);
42
43// get_children loads the children array with all the children of the
44// document or classification specified by targetdoc
45void get_children_array (const text_t &OID, text_tarray &children);
46
47// get_parent returns the parent of the document or classification
48// specified by OID
49text_t get_parent (text_t OID);
50
51// get_first_child loads child with the first
52// child of OID
53void get_first_child(const text_t &OID, text_t &child);
54
55
56#endif
Note: See TracBrowser for help on using the repository browser.