Changeset 8337
- Timestamp:
- 2004-10-14T22:36:44+13:00 (19 years ago)
- Location:
- trunk/gsdl/src/oaiservr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/oaiservr/oaitools.cpp
r8219 r8337 4 4 5 5 #include "OIDtools.h" 6 7 void oaiclassifier::swapColonsAndPeriods(text_t &classifier) 8 { 9 for (int i = 1; i <= classifier.size(); i ++) { 10 if (classifier[i] == '.') { 11 classifier[i] = ':'; 12 } 13 else if (classifier[i] == ':') { 14 classifier[i] = '.'; 15 } 16 } 17 18 } 6 19 7 20 text_t oaiclassifier::getGSDL_OID(const text_t &collection, const text_t& oai_id, … … 35 48 void oaiclassifier::toOAI(const text_t &collection, text_t &classifier) 36 49 { 37 for (int i = 1; i <= classifier.size(); i ++) { 38 if (classifier[i] == '.') { 39 classifier[i] = ':'; 40 } 41 } 50 oaiclassifier::swapColonsAndPeriods(classifier); 42 51 43 52 // prepend the collection identifier to the beginning of the … … 57 66 void oaiclassifier::toGSDL(text_t &collection, text_t &classifier) 58 67 { 59 for (int i = 1; i <= classifier.size(); i ++) { 60 if (classifier[i] == ':') { 61 classifier[i] = '.'; 62 } 63 } 68 oaiclassifier::swapColonsAndPeriods(classifier); 64 69 65 70 // separate out the collection identifier that should be -
trunk/gsdl/src/oaiservr/oaitools.h
r8182 r8337 1 1 2 #ifndef _OAITOOLS_H_ 2 3 #define _OAITOOLS_H_ … … 12 13 static void toOAI(const text_t &collection, text_t &classifier); 13 14 static void toGSDL(text_t &collection, text_t &classifier); 15 private: 16 static void swapColonsAndPeriods(text_t &classifier); 14 17 }; 15 18 #endif
Note:
See TracChangeset
for help on using the changeset viewer.