C# Class SobekCM.Builder_Library.Statistics.SobekCM_Stats_DataSet

All of the information about a range of hits and sessions against this SobekCM system
This class is used by the SobekCM Stats Reader app
显示文件 Open project: MarkVSullivan/SobekCM-Web-Application Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Add_Bib_Hit ( string BibID, int SessionID ) : void

Add a single hit against a title (or BibID)

Add_Collection_Hit ( string Code, Display_Mode_Enum Mode, Aggregation_Type_Enum AggrType, int SessionID ) : void

Add a single hit against an aggregation (or collection)

Add_IP_Hit ( string IP, string UserAgent ) : void

Add a single mapping from IP address to the user agent, or browser/system information

This is used for determining if there are new search engine robots out there sneaking through my robot detection algorithm

Add_Institution_Hit ( string Code, Display_Mode_Enum Mode, Aggregation_Type_Enum AggrType, int SessionID ) : void

Add a single hit against an institutional aggregation

Add_Item_Hit ( int Item_ID, string BibID, string VID, string ViewerCode, string Text_Search, int SessionID ) : void

Adds a single hit against an item within this library

Add_JSON_Hit ( ) : void

Add the fact that a single hit occurred against the JSON writers

Add_OAI_Hit ( ) : void

Add the fact that a single hit occurred against the OAI-PMH writers

Add_Portal_Hit ( string Portal_Name ) : void

Add a single hit against a portal

Add_Robot_Hit ( ) : void

Add a single robotic hit (otherwise not analyzed)

Add_WebContent_Hit ( string Browse_Mode ) : void

Add a single hit against static web content

Add_XML_Hit ( ) : void

Add the fact that a single hit occurred against the XML writers

Increment_Hits ( ) : void

Increment the number of (human) hits

Increment_Sessions ( ) : void

Increment the number of (human) sessions or visits

Merge ( SobekCM_Stats_DataSet Stats_DataSet ) : void

Merge this data with another existing set of data

Used when merging daily sets into a monthly set

Perform_SQL_Inserts ( int year, int month, int>.Dictionary aggregationHash, int>.Dictionary bibHash, int>.Dictionary portalHash ) : void

Write the list of all SQL insert command to add this new usage statistical information to the SobekCM database

Read_XML ( string file ) : void

Read an existing XML output from this class into this object

SobekCM_Stats_DataSet ( ) : System

Constructor for a new instance of the SobekCM Statistics dataset

Write_Highest_Users ( string directory, string filename ) : void

Write the highest users as a XML file

This clears all other rows, so this must be called last

Write_XML ( string directory ) : void

Write this data as XML

Write_XML ( string directory, string filename ) : void

Write this data as XML

Method Details

Add_Bib_Hit() public method

Add a single hit against a title (or BibID)
public Add_Bib_Hit ( string BibID, int SessionID ) : void
BibID string Bibliographic identifier for the title hit
SessionID int ID for the session from which this hit originated
return void

Add_Collection_Hit() public method

Add a single hit against an aggregation (or collection)
public Add_Collection_Hit ( string Code, Display_Mode_Enum Mode, Aggregation_Type_Enum AggrType, int SessionID ) : void
Code string Aggregation Code
Mode Display_Mode_Enum Mode information
AggrType Aggregation_Type_Enum Aggregation type, if this is Aggregation mode
SessionID int ID for the session from which this hit originated
return void

Add_IP_Hit() public method

Add a single mapping from IP address to the user agent, or browser/system information
This is used for determining if there are new search engine robots out there sneaking through my robot detection algorithm
public Add_IP_Hit ( string IP, string UserAgent ) : void
IP string IP address from which this request came
UserAgent string User agent from the HTTP requrest ( browser/system information )
return void

Add_Institution_Hit() public method

Add a single hit against an institutional aggregation
public Add_Institution_Hit ( string Code, Display_Mode_Enum Mode, Aggregation_Type_Enum AggrType, int SessionID ) : void
Code string Institutional aggregation code
Mode Display_Mode_Enum Mode information
AggrType Aggregation_Type_Enum Aggregation type, if this is aggregation mode
SessionID int ID for the session from which this hit originated
return void

Add_Item_Hit() public method

Adds a single hit against an item within this library
public Add_Item_Hit ( int Item_ID, string BibID, string VID, string ViewerCode, string Text_Search, int SessionID ) : void
Item_ID int
BibID string
VID string
ViewerCode string
Text_Search string
SessionID int ID for the session from which this hit originated
return void

Add_JSON_Hit() public method

Add the fact that a single hit occurred against the JSON writers
public Add_JSON_Hit ( ) : void
return void

Add_OAI_Hit() public method

Add the fact that a single hit occurred against the OAI-PMH writers
public Add_OAI_Hit ( ) : void
return void

Add_Portal_Hit() public method

Add a single hit against a portal
public Add_Portal_Hit ( string Portal_Name ) : void
Portal_Name string Name of the portal
return void

Add_Robot_Hit() public method

Add a single robotic hit (otherwise not analyzed)
public Add_Robot_Hit ( ) : void
return void

Add_WebContent_Hit() public method

Add a single hit against static web content
public Add_WebContent_Hit ( string Browse_Mode ) : void
Browse_Mode string Name of the web content
return void

Add_XML_Hit() public method

Add the fact that a single hit occurred against the XML writers
public Add_XML_Hit ( ) : void
return void

Increment_Hits() public method

Increment the number of (human) hits
public Increment_Hits ( ) : void
return void

Increment_Sessions() public method

Increment the number of (human) sessions or visits
public Increment_Sessions ( ) : void
return void

Merge() public method

Merge this data with another existing set of data
Used when merging daily sets into a monthly set
public Merge ( SobekCM_Stats_DataSet Stats_DataSet ) : void
Stats_DataSet SobekCM_Stats_DataSet Set of usage data to merge with this one
return void

Perform_SQL_Inserts() public method

Write the list of all SQL insert command to add this new usage statistical information to the SobekCM database
public Perform_SQL_Inserts ( int year, int month, int>.Dictionary aggregationHash, int>.Dictionary bibHash, int>.Dictionary portalHash ) : void
year int
month int
aggregationHash int>.Dictionary
bibHash int>.Dictionary
portalHash int>.Dictionary
return void

Read_XML() public method

Read an existing XML output from this class into this object
public Read_XML ( string file ) : void
file string
return void

SobekCM_Stats_DataSet() public method

Constructor for a new instance of the SobekCM Statistics dataset
public SobekCM_Stats_DataSet ( ) : System
return System

Write_Highest_Users() public method

Write the highest users as a XML file
This clears all other rows, so this must be called last
public Write_Highest_Users ( string directory, string filename ) : void
directory string
filename string
return void

Write_XML() public method

Write this data as XML
public Write_XML ( string directory ) : void
directory string Directory to write this XML into
return void

Write_XML() public method

Write this data as XML
public Write_XML ( string directory, string filename ) : void
directory string
filename string
return void