Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
UsageStatsLoader Class Reference
Inheritance diagram for UsageStatsLoader:
FileLoader ScheduledTask

Public Member Functions

 _getAssocFromUrl ($url)
 
 _getCounterRobotListFile ()
 
 _getDataFromLogEntry ($entry)
 
 _getExpectedPageAndOp ()
 
 _getInternalArticleId ($id, $journal)
 
 _getInternalIssueId ($id, $journal)
 
 _isLogEntryValid ($entry, $lineNumber)
 
 _loadData ($loadId)
 
 processFile ($filePath)
 
 UsageStatsLoader ($args)
 
- Public Member Functions inherited from FileLoader
 _archiveFile ()
 
 _claimNextFile ()
 
 _moveFile ($sourceDir, $destDir, $filename)
 
 _rejectFile ()
 
 _stageFile ()
 
 checkFolderStructure ($install=false)
 
 execute ()
 
 FileLoader ($args)
 
 getArchivePath ()
 
 getName ()
 
 getProcessingPath ()
 
 getRejectPath ()
 
 getStagePath ()
 
 processFile ($filePath, &$errorMsg)
 
- Public Member Functions inherited from ScheduledTask
 _getAllMessageTypes ()
 
 _newProcessId ()
 
 execute ()
 
 getName ()
 
 getProcessId ()
 
 notify ($type, $message, $subject= '')
 
 ScheduledTask ($args=array())
 

Detailed Description

Scheduled task to extract transform and load usage statistics data into database.

Definition at line 23 of file UsageStatsLoader.inc.php.

Member Function Documentation

UsageStatsLoader::_getAssocFromUrl (   $url)

Get the assoc type and id of the object that is accessed through the passed url.

Parameters
$urlstring
Returns
array

Definition at line 338 of file UsageStatsLoader.inc.php.

References _getExpectedPageAndOp(), _getInternalArticleId(), _getInternalIssueId(), Core\getArgs(), Core\getContextPaths(), DAORegistry\getDAO(), Core\getOp(), and Core\getPage().

Referenced by processFile().

UsageStatsLoader::_getCounterRobotListFile ( )

Get the COUNTER robot list file.

Returns
mixed string or false in case of error.

Definition at line 582 of file UsageStatsLoader.inc.php.

Referenced by UsageStatsLoader().

UsageStatsLoader::_getDataFromLogEntry (   $entry)

Get data from the passed log entry.

Parameters
$entrystring
Returns
mixed array

Definition at line 279 of file UsageStatsLoader.inc.php.

Referenced by processFile().

UsageStatsLoader::_getExpectedPageAndOp ( )

Get the expected page and operation from the stats plugin. They are grouped by the object type constant that they give access to.

Returns
array

Definition at line 313 of file UsageStatsLoader.inc.php.

Referenced by _getAssocFromUrl().

UsageStatsLoader::_getInternalArticleId (   $id,
  $journal 
)

Get internal article id.

Parameters
$idstring The id to be used to retrieve the object.
$journalJournal The journal that the article belongs to.
Returns
mixed The internal id if any object was found or false.

Definition at line 517 of file UsageStatsLoader.inc.php.

References DAORegistry\getDAO().

Referenced by _getAssocFromUrl().

UsageStatsLoader::_getInternalIssueId (   $id,
  $journal 
)

Get internal issue id.

Parameters
$idstring The id to be used to retrieve the object.
$journalJournal The journal that the issue belongs to.
Returns
mixed The internal id if any object was found or false.

Definition at line 541 of file UsageStatsLoader.inc.php.

References DAORegistry\getDAO().

Referenced by _getAssocFromUrl().

UsageStatsLoader::_isLogEntryValid (   $entry,
  $lineNumber 
)

Validate a access log entry.

Parameters
$entryarray
Returns
boolean

Definition at line 261 of file UsageStatsLoader.inc.php.

Referenced by processFile().

UsageStatsLoader::_loadData (   $loadId)

Load the entries inside the temporary database associated with the passed load id to the metrics table.

Parameters
$loadIdstring The current load id. file path.
Returns
boolean Whether or not the process was successful.

Definition at line 564 of file UsageStatsLoader.inc.php.

References DAORegistry\getDAO().

Referenced by processFile().

UsageStatsLoader::processFile (   $filePath)

The documentation for this class was generated from the following file: