C# Class SobekCM.Library.Static_Pages_Builder

Class builds the static HTML page for a digital resource to allow indexing by search engines
ファイルを表示 Open project: MarkVSullivan/SobekCM-Web-Application Class Usage Examples

Public Methods

Method Description
Build_All_Browse ( SobekCM.Library.Aggregations.Item_Aggregation Aggregation, DataSet AllItems ) : bool

Build the browse all static HTML file that includes links to all items in a particular collection

Build_Site_Maps ( ) : int

Builds all of the site map files which point to the static HTML pages

Create_Item_Citation_HTML ( SobekCM_Item Current_Item, string Static_FileName, string Text_File_Directory ) : bool

Create the static HTML citation page for a single digital resource

Create_Item_Citation_HTML ( string BIBID, string VID, string Static_FileName, string Text_File_Directory, SobekCM.Library.Application_State.Item_Lookup_Object Item_List ) : bool

Create the static HTML citation page for a single digital resource

THis is generally called by the SobekCM Builder windows application/scheduled task

Create_MarcXML_File ( string BIBID, string VID, string DestinationDirectory, SobekCM.Library.Application_State.Item_Lookup_Object Item_List ) : bool

Creates the static MarcXML file for a digital resource

Create_RSS_Feed ( string Collection_Code, string RssFeedLocation, string Collection_Title, DataSet AllItems ) : bool

Create the RSS feed files necessary

Display_Footer ( TextWriter Writer, Web_Skin_Object HTMLSkin ) : void

Writes the static footer to go at the bottom of the static digital resource page

Display_Header ( TextWriter Writer, Web_Skin_Object HTMLSkin, SobekCM_Item CurrentItem ) : void

Writes the static header to go at the top of the static digital resource page

Display_Header ( TextWriter Writer, Web_Skin_Object HTMLSkin, string Banner ) : void

Writes the static header to go at the top of the static digital resource page

Rebuild_All_MARC_Files ( string ResourceDirectory ) : int

Rebuilds all MarcXML files

Rebuild_All_Static_Pages ( SobekCM.Tools.Logs.LogFileXhtml Logger, bool BuildAllCitationPages, string InstanceName, long PrimaryLogId ) : int

Rebuilds all static pages, including the RSS feeds and site maps

Refresh ( ) : void

Forces this builder clsas to refresh all of the data values from the database

Static_Pages_Builder ( string Primary_Web_Server_URL, string Static_Data_Location, string Default_Skin ) : System

Constructor for a new instance of the Static_Pages_Builder class

Private Methods

Method Description
Finish_writing_html ( SobekCM_Item CurrentItem, SobekCM.Resource_Object.Divisions.Page_TreeNode CurrentPage, string Filename, string TextFileLocation ) : void
recursively_write_toc ( StreamWriter Writer, SobekCM.Resource_Object.Divisions.abstract_TreeNode TreeNode, string Indent ) : void

Method Details

Build_All_Browse() public method

Build the browse all static HTML file that includes links to all items in a particular collection
public Build_All_Browse ( SobekCM.Library.Aggregations.Item_Aggregation Aggregation, DataSet AllItems ) : bool
Aggregation SobekCM.Library.Aggregations.Item_Aggregation Aggregation object for which to build the browse ALL static html page
AllItems System.Data.DataSet List of all items linked to that aggregation/collection
return bool

Build_Site_Maps() public method

Builds all of the site map files which point to the static HTML pages
public Build_Site_Maps ( ) : int
return int

Create_Item_Citation_HTML() public method

Create the static HTML citation page for a single digital resource
public Create_Item_Citation_HTML ( SobekCM_Item Current_Item, string Static_FileName, string Text_File_Directory ) : bool
Current_Item SobekCM.Resource_Object.SobekCM_Item Digital resource to write as static citaion html
Static_FileName string Name of the resulting html file
Text_File_Directory string Directory where any text files may exist for this resource
return bool

Create_Item_Citation_HTML() public method

Create the static HTML citation page for a single digital resource
THis is generally called by the SobekCM Builder windows application/scheduled task
public Create_Item_Citation_HTML ( string BIBID, string VID, string Static_FileName, string Text_File_Directory, SobekCM.Library.Application_State.Item_Lookup_Object Item_List ) : bool
BIBID string Bibliographic identifier for the digital resource
VID string Volume idenfitier for the digital resource
Static_FileName string Name of the resulting html file
Text_File_Directory string Directory where any text files may exist for this resource
Item_List SobekCM.Library.Application_State.Item_Lookup_Object Item lookup object
return bool

Create_MarcXML_File() public method

Creates the static MarcXML file for a digital resource
public Create_MarcXML_File ( string BIBID, string VID, string DestinationDirectory, SobekCM.Library.Application_State.Item_Lookup_Object Item_List ) : bool
BIBID string Bibliographic identifier ( BibID )
VID string Volume identifier ( VID )
DestinationDirectory string Directory where the resultant MarcXML file should be written
Item_List SobekCM.Library.Application_State.Item_Lookup_Object Item lookup object
return bool

Create_RSS_Feed() public method

Create the RSS feed files necessary
public Create_RSS_Feed ( string Collection_Code, string RssFeedLocation, string Collection_Title, DataSet AllItems ) : bool
Collection_Code string Aggregation Code for this collection
RssFeedLocation string Location for the updated RSS feed to be updated
Collection_Title string Title of this aggregation/collection
AllItems System.Data.DataSet DataSet of all items within this aggregation
return bool

Display_Footer() public method

Writes the static footer to go at the bottom of the static digital resource page
public Display_Footer ( TextWriter Writer, Web_Skin_Object HTMLSkin ) : void
Writer System.IO.TextWriter Open stream to write the HTML footer to
HTMLSkin Web_Skin_Object Default html web skin/interface
return void

Display_Header() public method

Writes the static header to go at the top of the static digital resource page
public Display_Header ( TextWriter Writer, Web_Skin_Object HTMLSkin, SobekCM_Item CurrentItem ) : void
Writer System.IO.TextWriter Open stream to write the HTML header to
HTMLSkin Web_Skin_Object Default html web skin/interface
CurrentItem SobekCM.Resource_Object.SobekCM_Item Current item, to include the aggregationPermissions in the breadcrumbs
return void

Display_Header() public method

Writes the static header to go at the top of the static digital resource page
public Display_Header ( TextWriter Writer, Web_Skin_Object HTMLSkin, string Banner ) : void
Writer System.IO.TextWriter Open stream to write the HTML header to
HTMLSkin Web_Skin_Object Default html web skin/interface
Banner string Banner HTML
return void

Rebuild_All_MARC_Files() public method

Rebuilds all MarcXML files
public Rebuild_All_MARC_Files ( string ResourceDirectory ) : int
ResourceDirectory string Directory under which all the resources within this SobekCM library exist
return int

Rebuild_All_Static_Pages() public method

Rebuilds all static pages, including the RSS feeds and site maps
public Rebuild_All_Static_Pages ( SobekCM.Tools.Logs.LogFileXhtml Logger, bool BuildAllCitationPages, string InstanceName, long PrimaryLogId ) : int
Logger SobekCM.Tools.Logs.LogFileXhtml Log file to record progress
BuildAllCitationPages bool Flag indicates to build the individual static HTML pages for each digital resource
InstanceName string Name of this instance
PrimaryLogId long Log ID in the case this is the builder and it has been pre-logged
return int

Refresh() public method

Forces this builder clsas to refresh all of the data values from the database
public Refresh ( ) : void
return void

Static_Pages_Builder() public method

Constructor for a new instance of the Static_Pages_Builder class
public Static_Pages_Builder ( string Primary_Web_Server_URL, string Static_Data_Location, string Default_Skin ) : System
Primary_Web_Server_URL string URL for the primary web server
Static_Data_Location string Network location for the data directory
Default_Skin string Default skin code
return System