FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Fossology\Lib\BusinessRules\LicenseMap Class Reference

Wrapper class for license map. More...

Collaboration diagram for Fossology\Lib\BusinessRules\LicenseMap:
Collaboration graph

Public Member Functions

 __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...
 
 getUsage ()
 
 getGroupId ()
 
 getTopLevelLicenseRefs ()
 
 getObligationsForLicenseRef ($license_ref, $candidate=false)
 Get all Obligations attached with given license ref. More...
 

Static Public Member Functions

static getMappedLicenseRefView ($usageExpr='$1')
 Query to get license map view along with license ref. More...
 

Public Attributes

const CONCLUSION = 1
 
const TRIVIAL = 2
 
const FAMILY = 3
 
const REPORT = 4
 

Private Attributes

 $dbManager
 
 $usageId
 
 $groupId
 
 $map = array()
 

Detailed Description

Wrapper class for license map.

Definition at line 29 of file LicenseMap.php.

Constructor & Destructor Documentation

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 52 of file LicenseMap.php.

Member Function Documentation

Fossology\Lib\BusinessRules\LicenseMap::getGroupId ( )

Get the group id of the map.

Returns
number

Definition at line 128 of file LicenseMap.php.

static Fossology\Lib\BusinessRules\LicenseMap::getMappedLicenseRefView (   $usageExpr = '$1')
static

Query to get license map view along with license ref.

Parameters
string$usageExprPosition of usage id in parameter array

Definition at line 160 of file LicenseMap.php.

Fossology\Lib\BusinessRules\LicenseMap::getObligationsForLicenseRef (   $license_ref,
  $candidate = false 
)

Get all Obligations attached with given license ref.

Parameters
int$license_refID of license / candidate license
bool$candidateIs the license candidate?
Returns
int[] Array of obligation ids

Definition at line 173 of file LicenseMap.php.

Fossology\Lib\BusinessRules\LicenseMap::getProjectedId (   $licenseId)

For a given license id, get the projected id.

Parameters
int$licenseIdLicense id to be queried
Returns
int Projected license id

Definition at line 91 of file LicenseMap.php.

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$licenseIdLicense id to be queried
string$defaultNameDefault name to return if license not found in map
Returns
string|null Projected shortname or default name

Definition at line 107 of file LicenseMap.php.

Fossology\Lib\BusinessRules\LicenseMap::getTopLevelLicenseRefs ( )

Get the top level license refs from the license map.

Returns
Fossology::Lib::Data::LicenseRef[]

Definition at line 137 of file LicenseMap.php.

Fossology\Lib\BusinessRules\LicenseMap::getUsage ( )

Get the Usage of the map.

Returns
number

Definition at line 119 of file LicenseMap.php.


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