Agent to decide license findings in an upload.
More...
|
const | RULES_NOMOS_IN_MONK = 0x1 |
|
const | RULES_NOMOS_MONK_NINKA = 0x2 |
|
const | RULES_BULK_REUSE = 0x4 |
|
const | RULES_WIP_SCANNER_UPDATES = 0x8 |
|
const | RULES_OJO_NO_CONTRADICTION = 0x10 |
|
const | RULES_COPYRIGHT_FALSE_POSITIVE = 0x20 |
|
const | RULES_COPYRIGHT_FALSE_POSITIVE_CLUTTER = 0x40 |
|
const | RULES_LICENSE_TYPE_CONCLUSION = 0x80 |
|
const | RULES_ALL |
|
|
| processItem (Item $item) |
| Given an item, check with the $activeRules and apply rules to it. More...
|
|
| existsUnhandledMatch ($projectedScannerMatches, $licensesFromDecision) |
| Check if matches contains unhandled match. More...
|
|
| autodecideIfOjoMatchesNoContradiction (ItemTreeBounds $itemTreeBounds, $matches) |
| Auto decide matches which are in nomos, monk and OJO findings. More...
|
|
| autodecideIfResoMatchesNoContradiction (ItemTreeBounds $itemTreeBounds, $matches) |
| Auto decide matches which are in nomos, monk, OJO and Reso findings. More...
|
|
| autodecideNomosMonkNinka (ItemTreeBounds $itemTreeBounds, $matches) |
| Auto decide matches which are in nomos, monk and ninka findings. More...
|
|
| autodecideNomosMatchesInsideMonk (ItemTreeBounds $itemTreeBounds, $matches) |
| Auto decide matches by nomos which are in monk findings. More...
|
|
| autodecideLicenseType (ItemTreeBounds $itemTreeBounds, $matches) |
| Auto decide matches where there is no license conflict. More...
|
|
| isRegionIncluded ($small, $big) |
| Check if the small highlight region is inside big one. More...
|
|
| areNomosMatchesInsideAMonkMatch ($licenseMatches) |
| Check if matches by nomos are inside monk findings. More...
|
|
| getCopyrightsToDisableFalsePositivesClutter ($uploadId, $clutter_flag) |
|
| callCopyrightDeactivationClutterRemovalScript ($tmpFilePath, $clutter_flag) |
|
| getLicenseType ($licenseType) |
|
Agent to decide license findings in an upload.
Definition at line 77 of file DeciderAgent.php.
◆ allLicenseInType()
Fossology\Decider\DeciderAgent::allLicenseInType |
( |
|
$licenseMatches | ) |
|
|
protected |
Check if findings by all agents are same or not.
- Parameters
-
- Returns
- boolean True if they match, false otherwise
Definition at line 763 of file DeciderAgent.php.
◆ areNomosMatchesInsideAMonkMatch()
Fossology\Decider\DeciderAgent::areNomosMatchesInsideAMonkMatch |
( |
|
$licenseMatches | ) |
|
|
private |
Check if matches by nomos are inside monk findings.
- Parameters
-
- Returns
- boolean True if matches are inside monk, false otherwise
Definition at line 488 of file DeciderAgent.php.
◆ areNomosMonkNinkaAgreed()
Fossology\Decider\DeciderAgent::areNomosMonkNinkaAgreed |
( |
|
$licenseMatches | ) |
|
|
protected |
Check if findings by all agents are same or not.
- Parameters
-
- Returns
- boolean True if they match, false otherwise
Definition at line 522 of file DeciderAgent.php.
◆ areOtherScannerFindingsAndOJOAgreed()
Fossology\Decider\DeciderAgent::areOtherScannerFindingsAndOJOAgreed |
( |
|
$licenseMatches | ) |
|
|
protected |
Check if the finding by only contains one single license and that no other scanner (nomos) has produced a contradicting statement.
- Parameters
-
- Returns
- boolean True if they match, false otherwise
Definition at line 566 of file DeciderAgent.php.
◆ areOtherScannerFindingsAndRESOAgreed()
Fossology\Decider\DeciderAgent::areOtherScannerFindingsAndRESOAgreed |
( |
|
$licenseMatches | ) |
|
|
protected |
Check if the finding by only contains one single license and that no other scanner (nomos) has produced a contradicting statement.
- Parameters
-
- Returns
- boolean True if they match, false otherwise
Definition at line 593 of file DeciderAgent.php.
◆ autodecideIfOjoMatchesNoContradiction()
Fossology\Decider\DeciderAgent::autodecideIfOjoMatchesNoContradiction |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$matches |
|
) |
| |
|
private |
Auto decide matches which are in nomos, monk and OJO findings.
Get the matches which really agree and apply the decisions.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | ItemTreeBounds to apply decisions |
LicenseMatch[][][] | $matches | New license matches found |
- Returns
- boolean True if decisions applied, false otherwise
Definition at line 323 of file DeciderAgent.php.
◆ autodecideIfResoMatchesNoContradiction()
Fossology\Decider\DeciderAgent::autodecideIfResoMatchesNoContradiction |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$matches |
|
) |
| |
|
private |
Auto decide matches which are in nomos, monk, OJO and Reso findings.
Get the matches which really agree and apply the decisions.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | ItemTreeBounds to apply decisions |
LicenseMatch[][][] | $matches | New license matches found |
- Returns
- boolean True if decisions applied, false otherwise
Definition at line 351 of file DeciderAgent.php.
◆ autodecideLicenseType()
Fossology\Decider\DeciderAgent::autodecideLicenseType |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$matches |
|
) |
| |
|
private |
Auto decide matches where there is no license conflict.
Get the matches where there is no license conflict and licenses are of provided type.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | ItemTreeBounds to apply decisions |
LicenseMatch[][][] | $matches | New license matches found |
- Returns
- boolean True if decisions applied, false otherwise
Definition at line 430 of file DeciderAgent.php.
◆ autodecideNomosMatchesInsideMonk()
Fossology\Decider\DeciderAgent::autodecideNomosMatchesInsideMonk |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$matches |
|
) |
| |
|
private |
Auto decide matches by nomos which are in monk findings.
Get the nomos matches which really are inside monk findings and apply the decisions.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | ItemTreeBounds to apply decisions |
LicenseMatch[][][] | $matches | New license matches found |
- Returns
- boolean True if decisions applied, false otherwise
Definition at line 404 of file DeciderAgent.php.
◆ autodecideNomosMonkNinka()
Fossology\Decider\DeciderAgent::autodecideNomosMonkNinka |
( |
ItemTreeBounds |
$itemTreeBounds, |
|
|
|
$matches |
|
) |
| |
|
private |
Auto decide matches which are in nomos, monk and ninka findings.
Get the matches which really agree and apply the decisions.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | ItemTreeBounds to apply decisions |
LicenseMatch[][][] | $matches | New license matches found |
- Returns
- boolean True if decisions applied, false otherwise
Definition at line 379 of file DeciderAgent.php.
◆ callCopyrightDeactivationClutterRemovalScript()
Fossology\Decider\DeciderAgent::callCopyrightDeactivationClutterRemovalScript |
( |
|
$tmpFilePath, |
|
|
|
$clutter_flag |
|
) |
| |
|
private |
Run the Python script with required parameters and return the output.
- Parameters
-
string | $tmpFilePath | Path to temp file with input JSON |
bool | $clutter_flag | Remove clutter as well? |
- Returns
- string Return from script.
Definition at line 681 of file DeciderAgent.php.
◆ existsUnhandledMatch()
Fossology\Decider\DeciderAgent::existsUnhandledMatch |
( |
|
$projectedScannerMatches, |
|
|
|
$licensesFromDecision |
|
) |
| |
|
private |
Check if matches contains unhandled match.
- Parameters
-
array | $projectedScannerMatches | |
array[] | $licensesFromDecision | |
- Returns
- boolean True if any unhandled match exists, false otherwise
Definition at line 305 of file DeciderAgent.php.
◆ getCopyrightsToDisableFalsePositivesClutter()
Fossology\Decider\DeciderAgent::getCopyrightsToDisableFalsePositivesClutter |
( |
|
$uploadId, |
|
|
|
$clutter_flag |
|
) |
| |
|
private |
Use the copyright deactivation script to remove false positive copyrights.
- Parameters
-
int | $uploadId | Upload to process |
bool | $clutter_flag | Remove clutter as well? |
- Returns
- void
Definition at line 621 of file DeciderAgent.php.
◆ getLicenseIdsOfMatchesForScanner()
Fossology\Decider\DeciderAgent::getLicenseIdsOfMatchesForScanner |
( |
|
$scanner, |
|
|
|
$licenseMatches |
|
) |
| |
|
protected |
extracts the matches corresponding to a scanner from a $licenseMatches structure
- Parameters
-
- Returns
- int[] list of license ids
Definition at line 550 of file DeciderAgent.php.
◆ getLicenseType()
Fossology\Decider\DeciderAgent::getLicenseType |
( |
|
$licenseType | ) |
|
|
private |
Convert the license type key from flag to string value.
- Parameters
-
string | $licenseType | License Type from args |
- Returns
- string License type if key found, empty string otherwise.
Definition at line 716 of file DeciderAgent.php.
◆ isRegionIncluded()
Fossology\Decider\DeciderAgent::isRegionIncluded |
( |
|
$small, |
|
|
|
$big |
|
) |
| |
|
private |
Check if the small highlight region is inside big one.
- Parameters
-
int[] | $small | The smaller region, start at index 0, end at 1 |
int[] | $big | The bigger region, start at index 0, end at 1 |
- Returns
- boolean True if region is inside, else false
Definition at line 478 of file DeciderAgent.php.
◆ noLicenseConflict()
Fossology\Decider\DeciderAgent::noLicenseConflict |
( |
|
$itemTreeBounds, |
|
|
|
$licenseMatches |
|
) |
| |
|
protected |
Check if findings by all agents are same or not.
- Parameters
-
ItemTreeBounds | $itemTreeBounds | Item tree bound to check conflicts |
LicenseMatch[][][] | $licenseMatches | License matches |
- Returns
- boolean True if they match, false otherwise
- Exceptions
-
Definition at line 734 of file DeciderAgent.php.
◆ processItem()
Fossology\Decider\DeciderAgent::processItem |
( |
Item |
$item | ) |
|
|
private |
Given an item, check with the $activeRules and apply rules to it.
Get an UploadTree item, get the previous matches, current matches. Mark new licenses as WIP. Check the $activeRules and apply them on the item
- Parameters
-
Item | $item | Item to be processes |
- Returns
- int 1 if operation resulted in success, 0 otherwise
Definition at line 232 of file DeciderAgent.php.
◆ processUploadId()
Fossology\Decider\DeciderAgent::processUploadId |
( |
|
$uploadId | ) |
|
◆ remapByProjectedId()
Fossology\Decider\DeciderAgent::remapByProjectedId |
( |
|
$matches | ) |
|
|
protected |
Given a set of matches, remap according to project id instead of license id.
- Parameters
-
- Returns
- LicenseMatch[][][] Remapped matches
Definition at line 453 of file DeciderAgent.php.
◆ $activeRules
int Fossology\Decider\DeciderAgent::$activeRules |
|
private |
Rules active for upload (nomos in monk; ninka in monk; nomos, ninka and monk)
Definition at line 94 of file DeciderAgent.php.
◆ $agentLicenseEventProcessor
◆ $clearingDao
ClearingDao Fossology\Decider\DeciderAgent::$clearingDao |
|
private |
◆ $clearingDecisionProcessor
◆ $compatibilityDao
◆ $copyrightDao
◆ $decisionTypes
◆ $highlightDao
◆ $licenseDao
LicenseDao Fossology\Decider\DeciderAgent::$licenseDao |
|
private |
◆ $licenseMap
LicenseMap Fossology\Decider\DeciderAgent::$licenseMap = null |
|
private |
◆ $licenseMapUsage
int Fossology\Decider\DeciderAgent::$licenseMapUsage = null |
|
private |
◆ $licenseType
string Fossology\Decider\DeciderAgent::$licenseType |
|
private |
◆ $showJobsDao
ShowJobsDao Fossology\Decider\DeciderAgent::$showJobsDao |
|
private |
◆ $uploadDao
UploadDao Fossology\Decider\DeciderAgent::$uploadDao |
|
private |
◆ RULES_ALL
const Fossology\Decider\DeciderAgent::RULES_ALL |
Initial value:= self::RULES_NOMOS_IN_MONK | self::RULES_NOMOS_MONK_NINKA |
self::RULES_BULK_REUSE | self::RULES_WIP_SCANNER_UPDATES |
self::RULES_OJO_NO_CONTRADICTION | self::RULES_LICENSE_TYPE_CONCLUSION
Definition at line 87 of file DeciderAgent.php.
The documentation for this class was generated from the following file: