Ignore:
Timestamp:
2009-04-06T13:18:45+12:00 (15 years ago)
Author:
kjdon
Message:

added is_valid_element to metaformat, which checks elementSet for the element name. metaformat subclass constructors must set up elementSet. Currently they do this in the code. would be good if it could read in from a file eventually, maybe?? When metaformat is outputting the m,etadata, it checks whether the element is valid before outputting. otherwise it will invalidate the response as it won't conform to the schema. also, changed where we lowercased the entire name to lowercasing only the first letter - some qdc fields have an internal upper case letter.

File:
1 edited

Legend:

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

    r8219 r18895  
    11
    22#include "dublincore.h"
     3
     4dublin_core::dublin_core() : metaformat() {
     5  // These element names taken from the schema
     6  // http://www.openarchives.org/OAI/2.0/oai_dc.xsd
     7  elementSet.insert("contributor");
     8  elementSet.insert("coverage");
     9  elementSet.insert("creator");
     10  elementSet.insert("date");
     11  elementSet.insert("description");
     12  elementSet.insert("format");
     13  elementSet.insert("identifier");
     14  elementSet.insert("language");
     15  elementSet.insert("publisher");
     16  elementSet.insert("relation");
     17  elementSet.insert("rights");
     18  elementSet.insert("source");
     19  elementSet.insert("subject");
     20  elementSet.insert("title");
     21  elementSet.insert("type");
     22 
     23
     24}
    325
    426const text_t dublin_core::formatName() {
Note: See TracChangeset for help on using the changeset viewer.