[15418] | 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
|
---|
| 37 | bool 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);
|
---|
| 41 | bool get_info (const text_t &OID, const text_t &collection, const text_t &lang,
|
---|
| 42 | const text_tset &metadata, const OptionValue_tarray &options,
|
---|
| 43 | bool getParents,
|
---|
| 44 | recptproto *collectproto, FilterResponse_t &response,
|
---|
| 45 | ostream &logout);
|
---|
| 46 | bool get_info (const text_tarray &OIDs, const text_t &collection, const text_t &lang,
|
---|
| 47 | const text_tset &metadata, bool getParents,
|
---|
| 48 | recptproto *collectproto, FilterResponse_t &response,
|
---|
| 49 | ostream &logout);
|
---|
| 50 |
|
---|
| 51 | // has_children returns true if OID has children
|
---|
| 52 | bool has_children (const text_t &OID, const text_t &collection, const text_t &lang,
|
---|
| 53 | recptproto *collectproto, ostream &logout);
|
---|
| 54 |
|
---|
| 55 | // get_children does a protocol call and returns (in response) the OIDs and
|
---|
| 56 | // metadata of all the children of OID. The metadata set should be loaded
|
---|
| 57 | // with whatever metadata fields are to be requested.
|
---|
| 58 | bool get_children (const text_t &OID, const text_t &collection, const text_t &lang,
|
---|
| 59 | const text_tset &metadata, bool getParents,
|
---|
| 60 | recptproto *collectproto, FilterResponse_t &response,
|
---|
| 61 | ostream &logout);
|
---|
| 62 |
|
---|
| 63 | // get_contents returns OIDs and metadata of all contents
|
---|
| 64 | // below (and including) OID.
|
---|
| 65 | void get_contents (const text_t &topOID, const bool &is_classify,
|
---|
| 66 | text_tset &metadata, const text_t &collection, const text_t &lang,
|
---|
| 67 | recptproto *collectproto, FilterResponse_t &response,
|
---|
| 68 | ostream &logout);
|
---|
| 69 |
|
---|
[15806] | 70 | bool get_metadata_values (const text_t metadata_element_name, const text_t &collection,
|
---|
[15761] | 71 | recptproto *collectproto, FilterResponse_t &response, ostream &logout);
|
---|
[15418] | 72 |
|
---|
[15836] | 73 | bool get_documents_with_metadata_value (const text_t metadata_element_name, const text_t metadata_value,
|
---|
| 74 | const text_t sort_by_metadata_element_name, const text_t &collection,
|
---|
| 75 | recptproto *collectproto, FilterResponse_t &response, ostream &logout);
|
---|
[15806] | 76 |
|
---|
[15418] | 77 | #endif
|
---|