Wrapper class for license map.
More...
|
| __construct (DbManager $dbManager, $groupId, $usageId=null, $full=false) |
|
| getProjectedId ($licenseId) |
| For a given license id, get the projected id. More...
|
|
| getProjectedShortname ($licenseId, $defaultName=null) |
| For a given license id, get the projected shortname. More...
|
|
| getProjectedSpdxId ($licenseId, $defaultID=null) |
| For a given license id, get the projected SPDX ID (or shortname if ID does not exist). More...
|
|
| getProjectedName ($licenseId, $defaultName=null) |
| For a given license id, get the projected fullname. If empty, get the shortname instead. More...
|
|
| getUsage () |
|
| getGroupId () |
|
| getTopLevelLicenseRefs () |
|
| getObligationsForLicenseRef ($license_ref, $candidate=false) |
| Get all Obligations attached with given license ref. More...
|
|
|
const | CONCLUSION = 1 |
|
const | TRIVIAL = 2 |
|
const | FAMILY = 3 |
|
const | REPORT = 4 |
|
const | MAX_CHAR_LIMIT = "32767" |
|
const | TEXT_MAX_CHAR_LIMIT = "The maximum number of characters per cell in a CSV file(32,767) exceeded, Please edit this license text in UI" |
|
|
| $dbManager |
|
| $usageId |
|
| $groupId |
|
| $map = array() |
|
Wrapper class for license map.
Definition at line 18 of file LicenseMap.php.
◆ __construct()
Fossology\Lib\BusinessRules\LicenseMap::__construct |
( |
DbManager |
$dbManager, |
|
|
|
$groupId, |
|
|
|
$usageId = null , |
|
|
|
$full = false |
|
) |
| |
Constructor
- Parameters
-
DbManager | $dbManager | |
int | $groupId | |
int | $usageId | |
bool | $full | |
Definition at line 43 of file LicenseMap.php.
◆ getGroupId()
Fossology\Lib\BusinessRules\LicenseMap::getGroupId |
( |
| ) |
|
Get the group id of the map.
- Returns
- number
Definition at line 159 of file LicenseMap.php.
◆ getMappedLicenseRefView()
static Fossology\Lib\BusinessRules\LicenseMap::getMappedLicenseRefView |
( |
|
$usageExpr = '$1' | ) |
|
|
static |
Query to get license map view along with license ref.
- Parameters
-
string | $usageExpr | Position of usage id in parameter array |
Definition at line 191 of file LicenseMap.php.
◆ getObligationsForLicenseRef()
Fossology\Lib\BusinessRules\LicenseMap::getObligationsForLicenseRef |
( |
|
$license_ref, |
|
|
|
$candidate = false |
|
) |
| |
Get all Obligations attached with given license ref.
- Parameters
-
int | $license_ref | ID of license / candidate license |
bool | $candidate | Is the license candidate? |
- Returns
- int[] Array of obligation ids
Definition at line 204 of file LicenseMap.php.
◆ getProjectedId()
Fossology\Lib\BusinessRules\LicenseMap::getProjectedId |
( |
|
$licenseId | ) |
|
For a given license id, get the projected id.
- Parameters
-
int | $licenseId | License id to be queried |
- Returns
- int Projected license id
Definition at line 87 of file LicenseMap.php.
◆ getProjectedName()
Fossology\Lib\BusinessRules\LicenseMap::getProjectedName |
( |
|
$licenseId, |
|
|
|
$defaultName = null |
|
) |
| |
For a given license id, get the projected fullname. If empty, get the shortname instead.
- Parameters
-
int | $licenseId | License ID |
string | $defaultName | Default name if license not in map |
- Returns
- mixed|string|null Projected fullname or default name
Definition at line 134 of file LicenseMap.php.
◆ getProjectedShortname()
Fossology\Lib\BusinessRules\LicenseMap::getProjectedShortname |
( |
|
$licenseId, |
|
|
|
$defaultName = null |
|
) |
| |
For a given license id, get the projected shortname.
If the license id is not found in the map, then default name is returned.
- Parameters
-
int | $licenseId | License id to be queried |
string | $defaultName | Default name to return if license not found in map |
- Returns
- string|null Projected shortname or default name
Definition at line 103 of file LicenseMap.php.
◆ getProjectedSpdxId()
Fossology\Lib\BusinessRules\LicenseMap::getProjectedSpdxId |
( |
|
$licenseId, |
|
|
|
$defaultID = null |
|
) |
| |
For a given license id, get the projected SPDX ID (or shortname if ID does not exist).
- Parameters
-
int | $licenseId | License id to be queried |
string | $defaultID | Default ID to return if license not found in map |
- Returns
- string|null Projected SPDX ID or default name
Definition at line 118 of file LicenseMap.php.
◆ getTopLevelLicenseRefs()
Fossology\Lib\BusinessRules\LicenseMap::getTopLevelLicenseRefs |
( |
| ) |
|
◆ getUsage()
Fossology\Lib\BusinessRules\LicenseMap::getUsage |
( |
| ) |
|
Get the Usage of the map.
- Returns
- number
Definition at line 150 of file LicenseMap.php.
The documentation for this class was generated from the following file: