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

Public Member Functions

 _getAssocFromUrl ($url, &$errorMsg, $filePath, $lineNumber)
 
 _getCounterRobotListFile ()
 
 _getDataFromLogEntry ($entry)
 
 _getExpectedPageAndOp ()
 
 _getFileType ($assocType, $assocId)
 
 _getInternalArticleId ($id, $journal)
 
 _getInternalIssueId ($id, $journal)
 
 _isLogEntryValid ($entry, $lineNumber)
 
 _loadData ($loadId, &$errorMsg)
 
 processFile ($filePath, &$errorMsg)
 
 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,
$errorMsg,
  $filePath,
  $lineNumber 
)

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

Parameters
$urlstring
$errorMsgstring
$filePathstring
$lineNumberint
Returns
array

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

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

Referenced by processFile().

UsageStatsLoader::_getCounterRobotListFile ( )

Get the COUNTER robot list file.

Returns
mixed string or false in case of error.

Definition at line 619 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 251 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 285 of file UsageStatsLoader.inc.php.

Referenced by _getAssocFromUrl().

UsageStatsLoader::_getFileType (   $assocType,
  $assocId 
)

Get the file type of the object represented by the passed assoc type and id.

Parameters
$assocTypeint
$assocIdint
Returns
int One of the STATISTICS_FILE_TYPE... constants value.

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

References DAORegistry\getDAO().

Referenced by processFile().

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 495 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 519 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 233 of file UsageStatsLoader.inc.php.

Referenced by processFile().

UsageStatsLoader::_loadData (   $loadId,
$errorMsg 
)

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.
$errorMsgstring
Returns
boolean Whether or not the process was successful.

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

References DAORegistry\getDAO().

Referenced by processFile().

UsageStatsLoader::processFile (   $filePath,
$errorMsg 
)

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