Changeset 10738
- Timestamp:
- 2005-10-20T10:36:24+13:00 (18 years ago)
- Location:
- trunk/gsdl/src/oaiservr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/oaiservr/metaformat.cpp
r9608 r10738 1 1 #include "metaformat.h" 2 2 #include "gsdlunicode.h" 3 3 #include <fstream> 4 4 … … 18 18 } 19 19 20 void metaformat::output_item(ostream &output, bool &headerDone, const text_t &label, 20 void metaformat::output_item(ostream &output, outconvertclass &outconvert, 21 bool &headerDone, const text_t &label, 21 22 const text_tarray &values) 22 23 { 24 23 25 if (!headerDone && (values.size() > 0)) { 24 26 this->output_metadata_header(output); … … 28 30 for (int item = 0; item < values.size(); ++item) { 29 31 if (this->oaiConfigure->getOAIVersion() >= 200) { // TODO: GRB: This code may need to be subclassed by dc for 200 and later... 30 output << " <" << this->formatPrefix() << ":" << label << ">" << values[item] << "</" << this->formatPrefix() << ":" << label << ">\n";32 output << outconvert << " <" << this->formatPrefix() << ":" << label << ">" << values[item] << "</" << this->formatPrefix() << ":" << label << ">\n"; 31 33 } 32 34 else { 33 output << " <" << label << ">" << values[item] << "</" << label << ">\n";35 output << outconvert << " <" << label << ">" << values[item] << "</" << label << ">\n"; 34 36 } 35 37 } … … 42 44 MetadataInfo_tmap::iterator here = docInfo.metadata.begin(); 43 45 MetadataInfo_tmap::iterator end = docInfo.metadata.end(); 46 47 utf8outconvertclass utf8convert; // we want to output metadata in utf8 44 48 45 49 // metaItem is used initially to identify the rfc1807 (etc) metadata items. It is … … 66 70 67 71 if (doOutput) { 68 this->output_item(output, headerDone, metaItem, here->second.values);72 this->output_item(output, utf8convert, headerDone, metaItem, here->second.values); 69 73 } 70 74 else { … … 80 84 // particular metadata is stuff we don't want? 81 85 if (doOutput) { 82 this->output_item(output, headerDone, mapTo, here->second.values);86 this->output_item(output, utf8convert, headerDone, mapTo, here->second.values); 83 87 } 84 88 else { -
trunk/gsdl/src/oaiservr/metaformat.h
r8306 r10738 19 19 protected: 20 20 virtual void output_metadata_header(ostream &output) = 0; 21 virtual void output_item(ostream &output, bool &headerDone, const text_t &label,21 virtual void output_item(ostream &output, outconvertclass &outconvert, bool &headerDone, const text_t &label, 22 22 const text_tarray &values); 23 23 virtual void output_metadata_footer(ostream &output) = 0;
Note:
See TracChangeset
for help on using the changeset viewer.