Changeset 20590 for gsdl/trunk/runtime-src/src/oaiservr/resumptiontoken.h
- Timestamp:
- 2009-09-11T11:54:17+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/oaiservr/resumptiontoken.h
r11769 r20590 2 2 #define _RESUMPTIONTOKEN_H_ 3 3 4 #include <vector>5 6 4 #include "text_t.h" 7 5 8 // use the standard namespace9 #if !defined (GSDL_NAMESPACE_BROKEN)10 #if defined(GSDL_USE_OBJECTSPACE)11 using namespace ospace::std;12 #else13 using namespace std;14 #endif15 #endif16 6 17 7 class ResumptionToken 18 { private: 19 text_t collection; 20 text_t browseNode; 21 vector<int> browsePosition; 22 int startItem; 23 text_t buildDate; 24 // TODO: add a server name to the variables list; see getToken in resumptionToken.cpp 8 { 9 private: 10 text_t build_date; 11 text_t set; 12 text_t metadata_prefix; 13 text_t from; 14 text_t until; 15 text_t position; 16 17 bool valid; 25 18 26 19 public: 27 ResumptionToken(const text_t & collection, const text_t &rootNode, const text_t &buildDate);28 ResumptionToken(const text_t &URN);29 text_t getToken();20 ResumptionToken(const text_t &build_date, const text_t &set, const text_t &metadata_prefix, 21 const text_t &from, const text_t &until, const text_t &position); 22 ResumptionToken(const text_t &resumption_token_string); 30 23 31 void setPosition(const text_t &node, int startItem); 24 text_t getBuildDate() { return build_date; } 25 text_t getSet() { return set; } 26 text_t getMetadataPrefix() { return metadata_prefix; } 27 text_t getFrom() { return from; } 28 text_t getUntil() { return until; } 29 text_t getPosition() { return position; } 32 30 33 text_t getCollection() { return collection; } 34 text_t getNode() { return browseNode; } 35 int getPosition() { return startItem; } 36 int getOffsetDepth() { return this->browsePosition.size(); } 37 void setOffset(int depth, int position) { this->browsePosition[depth] = position; } 38 int getOffset(int offset) { return this->browsePosition[offset]; } 31 text_t getResumptionTokenString(); 39 32 bool isValid(); 40 33 }; 41 34 35 42 36 #endif
Note:
See TracChangeset
for help on using the changeset viewer.