C# Class SobekCM.Library.MainWriters.Oai_MainWriter

Main writer writes browses in OAI-PMH format
This class extends the abstract class abstractMainWriter.
Inheritance: SobekCM.Library.MainWriters.abstractMainWriter
ファイルを表示 Open project: MarkVSullivan/SobekCM-Web-Application

Public Methods

Method Description
Oai_MainWriter ( NameValueCollection Query_String, RequestCache RequestSpecificValues ) : System

Constructor for a new instance of the Oai_MainWriter class

Write_Html ( TextWriter Output, Custom_Tracer Tracer ) : void

Perform all the work of adding text directly to the response stream back to the web user

Protected Methods

Method Description
GetRecord ( TextWriter Output, string Identifier, string MetadataPrefix ) : void

Gets the OAI-PMH m,etadata for a single digital resource, by identifier

Identify ( TextWriter Output ) : void

Identifies the information about this OAI-PMH server

ListIdentifiers ( TextWriter Output, string SetCode, string From, string Until, string MetadataPrefix, string ResumptionToken ) : void

Lists all of the identifiers within a particular OAI-PMH set

ListMetadataFormats ( TextWriter Output, string Identifier ) : void

Gets the metadata formats available for either the entire set or a single item, by identifier.

ListRecords ( TextWriter Output, string SetCode, string From, string Until, string MetadataPrefix, string ResumptionToken ) : void

Lists all the records associated with a certain OAI-PMH set

ListSets ( TextWriter Output ) : void

Lists all of the sets available for OAI-PMH harvesting

Write_Error ( TextWriter Output, string RequestVerb, string ErrorCode, string ErrorString ) : void

Write the OAI-PMH error in the correct (OAI-PMH) format

Write_OAI_ListRecords ( string SetCode, DateTime From, DateTime Until, string ResumptionToken, string Request, bool HeadersOnly, int Current_Page, bool More_Records, string MetadataPrefix, List Records, TextWriter Output ) : void

Lists all the records associated with a single OAI-PMH set

Private Methods

Method Description
date_in_utc ( DateTime Date ) : string

Method Details

GetRecord() protected method

Gets the OAI-PMH m,etadata for a single digital resource, by identifier
protected GetRecord ( TextWriter Output, string Identifier, string MetadataPrefix ) : void
Output System.IO.TextWriter Stream to which to write the text for this main writer
Identifier string Identifier for the record to retrieve the metadata for
MetadataPrefix string Prefix for the metadata format to return the record
return void

Identify() protected method

Identifies the information about this OAI-PMH server
protected Identify ( TextWriter Output ) : void
Output System.IO.TextWriter Stream to which to write the text for this main writer
return void

ListIdentifiers() protected method

Lists all of the identifiers within a particular OAI-PMH set
protected ListIdentifiers ( TextWriter Output, string SetCode, string From, string Until, string MetadataPrefix, string ResumptionToken ) : void
Output System.IO.TextWriter Stream to which to write the text for this main writer
SetCode string Code for the OAI-PMH set
From string Date from which to return all the identifiers
Until string Date to which to return all the identifiers
MetadataPrefix string Prefix of the metadata fomat to return the identifier information
ResumptionToken string Resumption token from the original query string, if one was provided
return void

ListMetadataFormats() protected method

Gets the metadata formats available for either the entire set or a single item, by identifier.
protected ListMetadataFormats ( TextWriter Output, string Identifier ) : void
Output System.IO.TextWriter Stream to which to write the text for this main writer
Identifier string Identifier to check for different possible identifiers
return void

ListRecords() protected method

Lists all the records associated with a certain OAI-PMH set
protected ListRecords ( TextWriter Output, string SetCode, string From, string Until, string MetadataPrefix, string ResumptionToken ) : void
Output System.IO.TextWriter Stream to which to write the text for this main writer
SetCode string Code for the OAI-PMH set
From string Date from which to return all the identifiers
Until string Date to which to return all the identifiers
MetadataPrefix string Prefix indicates the format for the metadata
ResumptionToken string Resumption token from the original query string, if one was provided
return void

ListSets() protected method

Lists all of the sets available for OAI-PMH harvesting
protected ListSets ( TextWriter Output ) : void
Output System.IO.TextWriter Stream to which to write the text for this main writer
return void

Oai_MainWriter() public method

Constructor for a new instance of the Oai_MainWriter class
public Oai_MainWriter ( NameValueCollection Query_String, RequestCache RequestSpecificValues ) : System
Query_String System.Collections.Specialized.NameValueCollection URL Query string to parse for OAI-PMH verbs and other values
RequestSpecificValues RequestCache All the necessary, non-global data specific to the current request
return System

Write_Error() protected method

Write the OAI-PMH error in the correct (OAI-PMH) format
protected Write_Error ( TextWriter Output, string RequestVerb, string ErrorCode, string ErrorString ) : void
Output TextWriter Stream to which to write the text for this main writer
RequestVerb string Verb from the original request
ErrorCode string OAI-PMH Code for the error encountered
ErrorString string String describes the problem encountered
return void

Write_Html() public method

Perform all the work of adding text directly to the response stream back to the web user
public Write_Html ( TextWriter Output, Custom_Tracer Tracer ) : void
Output TextWriter Stream to which to write the text for this main writer
Tracer Custom_Tracer Trace object keeps a list of each method executed and important milestones in rendering
return void

Write_OAI_ListRecords() protected method

Lists all the records associated with a single OAI-PMH set
protected Write_OAI_ListRecords ( string SetCode, DateTime From, DateTime Until, string ResumptionToken, string Request, bool HeadersOnly, int Current_Page, bool More_Records, string MetadataPrefix, List Records, TextWriter Output ) : void
SetCode string Code for the OAI-PMH set
From DateTime Date from which to return all the identifiers
Until DateTime Date to which to return all the identifiers
ResumptionToken string Resumption token from the original query string, if one was provided
Request string String that represents the original request
HeadersOnly bool Flag indicates to just return the headers of each digital resource
Current_Page int Current page number within the set of results
More_Records bool Flag indicates if a resumption token should be issued
MetadataPrefix string MetadataPrefix requested
Records List List of all the records to return to the user
Output TextWriter Stream to which to write the text for this main writer
return void