FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
SPDX2 agent. More...
Public Member Functions | |
processUploadId ($uploadId) | |
Given an upload ID, process the items in it. More... | |
Public Member Functions inherited from Fossology\Lib\Agent\Agent | |
__construct ($agentName, $version, $revision) | |
scheduler_connect () | |
Connect with scheduler and initialize options. More... | |
heartbeat ($newProcessed) | |
Send hear beat to the scheduler. More... | |
bail ($exitvalue) | |
Bail the agent, print the stack and disconnect from scheduler. More... | |
scheduler_disconnect ($exitvalue) | |
Closes connection from scheduler. More... | |
scheduler_greet () | |
Greet the scheduler at the beginning of connection. More... | |
initArsTable () | |
Initialize ARS table. | |
run_scheduler_event_loop () | |
Runs a loop to read commands from scheduler and process them. More... | |
Public Attributes | |
const | OUTPUT_FORMAT_KEY = "outputFormat" |
Argument key for output format. | |
const | DEFAULT_OUTPUT_FORMAT = "spdx2" |
Default output format. | |
const | AVAILABLE_OUTPUT_FORMATS = "spdx2,spdx2tv,dep5,spdx2csv" |
Output formats available. | |
const | UPLOAD_ADDS = "uploadsAdd" |
Argument for additional uploads. | |
const | DATA_LICENSE = "CC0-1.0" |
Data license for SPDX reports. | |
Protected Member Functions | |
preWorkOnArgs ($args) | |
Parse arguments. More... | |
getTemplateFile ($partname) | |
Get TWIG template file based on output format. More... | |
getFileBasename ($packageName) | |
Generate report basename based on upload name. More... | |
getFileName ($packageName) | |
Get absolute path for report. More... | |
getUri ($packageName) | |
Get the URI for the given package. More... | |
renderPackage ($uploadId) | |
Given an upload id, render the report string. More... | |
getLicenseComment ($scannerIds) | |
toLicensesWithFilesAdder (&$filesWithLicenses, $licenses, $copyrights, $file, $fullPath) | |
Map licenses, copyrights, files and full path to filesWithLicenses array. More... | |
toLicensesWithFiles (&$filesWithLicenses, $treeTableName) | |
Map findings to the files. More... | |
computeUri ($uploadId) | |
For a given upload, compute the URI and filename for the report. More... | |
writeReport (&$packageNodes, $packageIds, $uploadId) | |
Write the report the file and update report table. More... | |
updateReportTable ($uploadId, $jobId, $fileName) | |
Update the reportgen table with new report path. More... | |
renderString ($templateName, $vars) | |
Render a twig template. More... | |
generateFileNodes ($filesWithLicenses, $treeTableName, $uploadId) | |
Generate report nodes for files. More... | |
generateFileNodesByFiles ($filesWithLicenses, $treeTableName, $uploadId) | |
For each file, generate the nodes by files. More... | |
generateFileNodesByLicenses ($filesWithLicenses, $treeTableName) | |
For each file, generate the nodes by licenses. More... | |
getVerificationCode (Upload $upload) | |
Get a unique identifier for a given upload. More... | |
getSPDXReportConf ($uploadId, $key) | |
Get spdx license comment state for a given upload. More... | |
getSPDXDataLicense () | |
Protected Attributes | |
$dbManager | |
$renderer | |
$agentNames = AgentRef::AGENT_LIST | |
$filebasename = null | |
$uri | |
$filename | |
$outputFormat = self::DEFAULT_OUTPUT_FORMAT | |
Protected Attributes inherited from Fossology\Lib\Agent\Agent | |
$userId | |
$groupId | |
$jobId | |
$agentSpecifOptions = "" | |
$agentSpecifLongOptions = array() | |
$args = array() | |
$dbManager | |
$agentDao | |
$container | |
$schedulerMode | |
Private Member Functions | |
getObligations (int $uploadId, int $groupId) | |
deduplicateLicenseList () | |
De-duplicate license list by comparing licenses with the same SPDX ID. More... | |
Private Attributes | |
$uploadDao | |
$clearingDao | |
$licenseDao | |
$licenseMap | |
$licenseClearedGetter | |
$licenseMainGetter | |
$obligationsGetter | |
$reportutils | |
$licensesInDocument = [] | |
Additional Inherited Members | |
Static Public Member Functions inherited from Fossology\Lib\Agent\Agent | |
static | heartbeat_handler ($signo) |
Function to handle hear beats from the agent and send them to the scheduler from STDOUT. More... | |
|
protected |
|
private |
De-duplicate license list by comparing licenses with the same SPDX ID.
First sort the license list by concatenating SPDX ID and shortname. Then compare each license with the next one. If they have the same SPDX ID, then the next one is a duplicate. Mark the duplicate by adding prefix of SPDX LicenseRef and suffix of MD5 hash of the license text to the shortname.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Fossology\SpdxTwo\SpdxTwoAgent::processUploadId | ( | $uploadId | ) |
Given an upload ID, process the items in it.
This function is implemented by agent and should call heartbeat() at regular intervals.
int | $uploadId | Upload to be processed by the agent. |
Reimplemented from Fossology\Lib\Agent\Agent.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
protected |