- Timestamp:
- 2010-06-01T15:22:29+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/oaiservr/dublincore.cpp
r21799 r22214 74 74 75 75 bool dublin_core::output_custom_metadata(ostream &output, outconvertclass &outconvert, bool &headerDone, const text_t &collection, ResultDocInfo_t &docInfo) { 76 text_t value = get_metadata_value(docInfo, " srclink_file");76 text_t value = get_metadata_value(docInfo, "gs.OAIResourceURL"); 77 77 if (value.empty()) { 78 value = "gs doc"; // todo, situation where no source doc. 79 } else { 80 if (starts_with(value, "[")) { 81 // its a format statement type value eg [SourceFile], need to get the appropriate metadata 82 value = substr(findchar(value.begin(), value.end(), '[')+1,findchar(value.begin(), value.end(), ']') ); 83 value = get_metadata_value(docInfo, value); 84 } 78 // try srclink_file 79 value = get_metadata_value(docInfo, "srclink_file"); 80 if (value.empty()) { 81 // we have no file to link to, so link to the Greenstone version of the 82 // document 83 value = this->oaiConfigure->getBaseLibraryURL()+"?a=d&c="+collection+"&d="+docInfo.OID; 84 } else { 85 if (starts_with(value, "[")) { 86 // its a format statement type value eg [SourceFile], need to get the appropriate metadata 87 value = substr(findchar(value.begin(), value.end(), '[')+1,findchar(value.begin(), value.end(), ']') ); 88 value = get_metadata_value(docInfo, value); 89 } 90 91 if (!value.empty()) { 92 text_t assocfilepath = get_metadata_value(docInfo, "assocfilepath"); 93 if (!assocfilepath.empty()) { 94 value = this->oaiConfigure->getBaseDocRoot()+"/collect/"+collection+"/index/assoc/"+assocfilepath+"/"+value; 95 } else { 96 value = ""; 97 } 98 } 99 } 85 100 } 86 if (!value.empty()) {87 text_t assocfilepath = get_metadata_value(docInfo, "assocfilepath");88 if (!assocfilepath.empty()) {89 value = this->oaiConfigure->getCollectionConfig("", "baseDocRoot")+"/collect/"+collection+"/index/assoc/"+assocfilepath+"/"+value;90 } else {91 value = "";92 }93 94 }95 101 if (!value.empty()) { 96 102 if (!headerDone) {
Note:
See TracChangeset
for help on using the changeset viewer.