Changeset 18889

Show
Ignore:
Timestamp:
06.04.2009 11:49:09 (10 years ago)
Author:
kjdon
Message:

constructor now takes a text_tset containing a list of metadata set names. Only those listed will be used

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/oaiservr/recordaction.cpp

    r18861 r18889  
    88 
    99 
    10 recordaction::recordaction() : oaiaction("GetRecord") { 
     10recordaction::recordaction(text_tset &metadataset) : oaiaction("GetRecord") { 
    1111  metaformatptr fptr; 
    1212 
    13   fptr.set_class(new dublin_core());   
    14   this->formatMap[fptr.get_class()->formatName()] = fptr; 
    15    
    16   fptr.set_class(new qualified_dublin_core());   
    17   this->formatMap[fptr.get_class()->formatName()] = fptr; 
    18  
    19   fptr.set_class(new rfc1807()); 
    20   this->formatMap[fptr.get_class()->formatName()] = fptr; 
     13  if (metadataset.count("oai_dc") > 0) { 
     14    fptr.set_class(new dublin_core());   
     15    this->formatMap[fptr.get_class()->formatName()] = fptr; 
     16  } 
     17   
     18  if (metadataset.count("gsdl_qdc") > 0) { 
     19    fptr.set_class(new qualified_dublin_core());   
     20    this->formatMap[fptr.get_class()->formatName()] = fptr; 
     21  } 
     22   
     23  if (metadataset.count("rfc1807") > 0) { 
     24 
     25    fptr.set_class(new rfc1807()); 
     26    this->formatMap[fptr.get_class()->formatName()] = fptr; 
     27  } 
    2128} 
    2229