- Timestamp:
- 2010-01-25T15:03:40+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/oaiservr/metaformat.cpp
r18896 r21605 67 67 } 68 68 69 if (metaItem == this->formatPrefix()) { 69 // Map the element using the "oaimapping" specification from the oai.cfg/collect.cfg files, if defined 70 text_t mapTo = this->get_mapping(collection, here->first); 71 if (mapTo != "") { 72 // Do we actually want to do anything here? Doesn't getting here imply that this 73 // particular metadata is stuff we don't want? 74 if (doOutput) { 75 if (this->is_valid_element(mapTo)) { 76 this->output_item(output, utf8convert, headerDone, mapTo, here->second.values); 77 } 78 } 79 else { 80 if (here->second.values.size() > 0) { 81 return true; 82 } 83 } 84 } 85 86 // Otherwise try to map the element automatically 87 // For example, dc.X is mapped to oai_dc.X (doesn't check X is a valid Dublin Core element though) 88 else if (metaItem == this->formatPrefix()) { 70 89 metaItem = substr(last+1, here->first.end()); // Get the rest of the metadata tag (it's name) but without the '.' 71 90 // remove xxx^ eg Coverage^Spatial becomes spatial … … 90 109 } 91 110 else { 92 text_t mapTo = this->get_mapping(collection, here->first);93 if (mapTo != "") {94 // Do we actually want to do anything here? Doesn't getting here imply that this95 // particular metadata is stuff we don't want?96 if (doOutput) {97 if (this->is_valid_element(mapTo)) {98 this->output_item(output, utf8convert, headerDone, mapTo, here->second.values);99 }100 }101 else {102 if (here->second.values.size() > 0) {103 return true;104 }105 }106 }107 111 } 108 112
Note:
See TracChangeset
for help on using the changeset viewer.