1 |
|
---|
2 | #include "qualified_dublincore.h"
|
---|
3 |
|
---|
4 | const text_t qualified_dublin_core::formatName() {
|
---|
5 | return "gsdl_qdc";
|
---|
6 | }
|
---|
7 |
|
---|
8 | const text_t qualified_dublin_core::formatPrefix() {
|
---|
9 | return "dc";
|
---|
10 | }
|
---|
11 |
|
---|
12 | bool qualified_dublin_core::output_record(ostream &output, recptproto *protocol, const text_t &collection,
|
---|
13 | const text_t &record_OID)
|
---|
14 | {
|
---|
15 | return metaformat::output_record(output, protocol, collection, record_OID);
|
---|
16 | }
|
---|
17 |
|
---|
18 | void qualified_dublin_core::output_metadata_header(ostream &output)
|
---|
19 | {
|
---|
20 | output << " <metadata>\n";
|
---|
21 |
|
---|
22 | if (this->oaiConfigure->getOAIVersion() <= 110){
|
---|
23 | // output dublin core wrapper for OAI v1.1
|
---|
24 | output << " <gsdl_qdc xmlns=\"http://greenstone.org/namespace/gsdl_qdc/1.0/\"\n"
|
---|
25 | << " xmlns:xsi=\"http://www.w3c.org/2001/XMLSchema-instance\"\n"
|
---|
26 | << " xsi:schemaLocation=\"http://greenstone.org/namespace/gsdl_qdc/1.0/ \n"
|
---|
27 | << " http://greenstone.org/namespace/gsdl_qdc/1.0/gsdl_qdc.xsd\">\n";
|
---|
28 | }
|
---|
29 | else {
|
---|
30 | output << " <gsdl_qdc:gsdl_qdc\n"
|
---|
31 | << " xmlns:gsdl_qdc=\"http://greenstone.org/namespace/gsdl_qdc/1.0/\"\n"
|
---|
32 | << " xmlns:dc=\"http://purl.org/dc/terms/\"\n"
|
---|
33 | << " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
|
---|
34 | << " xsi:schemaLocation=\"http://greenstone.org/namespace/gsdl_qdc/1.0/ \n"
|
---|
35 | << " http://greenstone.org/namespace/gsdl_qdc/1.0/gsdl_qdc.xsd\">\n";
|
---|
36 | }
|
---|
37 | }
|
---|
38 |
|
---|
39 | void qualified_dublin_core::output_metadata_footer(ostream &output)
|
---|
40 | {
|
---|
41 | if (this->oaiConfigure->getOAIVersion() <= 110) {
|
---|
42 | output << " </gsdl_qdc>" << endl;
|
---|
43 | }
|
---|
44 | else {
|
---|
45 | output << " </gsdl_qdc:gsdl_qdc>" << endl;
|
---|
46 | }
|
---|
47 |
|
---|
48 | output << " </metadata>" << endl;
|
---|
49 | output.flush();
|
---|
50 | }
|
---|
51 |
|
---|
52 | bool qualified_dublin_core::output_formatdata(ostream &output)
|
---|
53 | {
|
---|
54 | output << " <metadataPrefix>gsdl_qdc</metadataPrefix>" << endl;
|
---|
55 | output << " <schema>http://greenstone.org/namespace/gsdl_qdc/1.0/gsdl_qdc.xsd</schema>" << endl;
|
---|
56 | output << " <metadataNamespace>http://greenstone.org/namespace/gsdl_qdc/1.0/</metadataNamespace>"<<endl;
|
---|
57 | return true;
|
---|
58 | }
|
---|