public void Set_Default()
{
OAI_PMH_Metadata_Format dcFormat = new OAI_PMH_Metadata_Format
{
Class = "DC_OAI_Metadata_Type_Writer",
Enabled = true,
MetadataNamespace = "http://www.openarchives.org/OAI/2.0/oai_dc/",
Namespace = "SobekCM.Resource_Object.OAI.Writer",
Prefix = "oai_dc",
Schema = "http://www.openarchives.org/OAI/2.0/oai_dc.xsd"
};
Metadata_Prefixes.Add(dcFormat);
OAI_PMH_Metadata_Format marcFormat = new OAI_PMH_Metadata_Format
{
Class = "MarcXML_OAI_PMH_Metadata_Type_Writer",
Enabled = true,
MetadataNamespace = "http://www.loc.gov/MARC21/slim",
Namespace = "SobekCM.Resource_Object.OAI.Writer",
Prefix = "marc21",
Schema = "http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
};
Metadata_Prefixes.Add(marcFormat);
}
/// <summary> Constructor for a new instance of the Oai_MainWriter class </summary> /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param> /// <param name="Query_String"> URL Query string to parse for OAI-PMH verbs and other values </param> public Oai_MainWriter(NameValueCollection Query_String, RequestCache RequestSpecificValues) : base(RequestSpecificValues) { // Build list of valid arguments validArgs = new List<string> { "from", "until", "metadataPrefix", "set", "resumptionToken", "identifier", "verb", "portal", "urlrelative" }; // Load the list of OAI sets oaiSets = SobekCM_Database.Get_OAI_Sets(); queryString = Query_String; // Set the response type HttpContext.Current.Response.ContentType = "text/xml"; // Determine some global settings if (UI_ApplicationCache_Gateway.Configuration.OAI_PMH != null) { config = UI_ApplicationCache_Gateway.Configuration.OAI_PMH; oai_resource_identifier_base = UI_ApplicationCache_Gateway.Configuration.OAI_PMH.Identifier_Base; oai_repository_name = UI_ApplicationCache_Gateway.Configuration.OAI_PMH.Name; oai_repository_identifier = UI_ApplicationCache_Gateway.Configuration.OAI_PMH.Identifier; } else { config = new OAI_PMH_Configuration(); config.Set_Default(); config.Enabled = true; } if (String.IsNullOrEmpty(oai_resource_identifier_base)) oai_resource_identifier_base = "oai:" + UI_ApplicationCache_Gateway.Settings.System.System_Abbreviation + ":"; if (String.IsNullOrEmpty(oai_repository_name)) oai_repository_name = UI_ApplicationCache_Gateway.Settings.System.System_Name; if (String.IsNullOrEmpty(oai_repository_identifier)) oai_repository_identifier = UI_ApplicationCache_Gateway.Settings.System.System_Abbreviation; // Get the list of metadata prefixes permissiable by the system metadataPrefixes = new List<string>(); foreach (OAI_PMH_Metadata_Format thisConfig in config.Metadata_Prefixes) { metadataPrefixes.Add(thisConfig.Prefix); } }