source: main/trunk/greenstone2/runtime-src/src/protocol/recptprototools.h@ 31387

Last change on this file since 31387 was 31387, checked in by ak19, 7 years ago

Round 1 of commits for getting OAI deletion policy to work with GS2 (server end). The perl code writing out the OAI db and the GS3 server code implementing the deletion policy had already been completed earlier (end 2016).

  • Property svn:executable set to *
File size: 3.7 KB
Line 
1/**********************************************************************
2 *
3 * recptprototools.h --
4 * Copyright (C) 1999-2008 The New Zealand Digital Library Project
5 *
6 * A component of the Greenstone digital library software
7 * from the New Zealand Digital Library Project at the
8 * University of Waikato, New Zealand.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 *********************************************************************/
25
26#ifndef RECPTPROTOTOOLS_H
27#define RECPTPROTOTOOLS_H
28
29
30#include "text_t.h"
31#include "recptproto.h"
32
33
34// get_info does a protocol call and returns (in response) the info
35// associated with OID. Metadata should be loaded with whatever
36// metadata fields are to be requested
37bool get_info (const text_t &OID, const text_t &collection, const text_t &lang,
38 const text_tset &metadata, bool getParents,
39 recptproto *collectproto, FilterResponse_t &response,
40 ostream &logout, int filterResultOptions=0);
41bool get_oai_info (const text_t &OID, const text_t &collection, const text_t &lang,
42 const text_tset &metadata, bool getParents,
43 recptproto *collectproto, FilterResponse_t &response,
44 ostream &logout);
45bool get_info (const text_t &OID, const text_t &collection, const text_t &lang,
46 const text_tset &metadata, const OptionValue_tarray &options,
47 bool getParents,
48 recptproto *collectproto, FilterResponse_t &response,
49 ostream &logout);
50bool get_info (const text_tarray &OIDs, const text_t &collection, const text_t &lang,
51 const text_tset &metadata, bool getParents,
52 recptproto *collectproto, FilterResponse_t &response,
53 ostream &logout);
54
55// has_children returns true if OID has children
56bool has_children (const text_t &OID, const text_t &collection, const text_t &lang,
57 recptproto *collectproto, ostream &logout);
58
59// get_children does a protocol call and returns (in response) the OIDs and
60// metadata of all the children of OID. The metadata set should be loaded
61// with whatever metadata fields are to be requested.
62bool get_children (const text_t &OID, const text_t &collection, const text_t &lang,
63 const text_tset &metadata, bool getParents,
64 recptproto *collectproto, FilterResponse_t &response,
65 ostream &logout, int filterResultOptions=0);
66
67// get_contents returns OIDs and metadata of all contents
68// below (and including) OID.
69void get_contents (const text_t &topOID, const bool &is_classify,
70 text_tset &metadata, const text_t &collection, const text_t &lang,
71 recptproto *collectproto, FilterResponse_t &response,
72 ostream &logout);
73
74bool get_metadata_values (const text_t metadata_elements, const text_t metadata_value_filter,
75 const text_t metadata_value_grouping_expression, const text_t &collection,
76 recptproto *collectproto, FilterResponse_t &response, ostream &logout);
77
78bool get_documents_with_metadata_value (const text_t metadata_elements, const text_t metadata_value,
79 const text_t sort_by_metadata_element_name, const text_t &collection,
80 recptproto *collectproto, FilterResponse_t &response, ostream &logout);
81
82#endif
Note: See TracBrowser for help on using the repository browser.