FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
LicenseMatch.php
1 <?php
2 /*
3 Copyright (C) 2014-2015, Siemens AG
4 Authors: Andreas Würl, Daniele Fognini
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 version 2 as published by the Free Software Foundation.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 namespace Fossology\Lib\Data;
21 
23 {
27  private $licenseRef;
31  private $agentRef;
35  private $percent;
39  private $fileId;
43  private $licenseFileId;
44 
52  public function __construct($fileId, LicenseRef $licenseRef, AgentRef $agentRef, $licenseFileId, $percent = null)
53  {
54  $this->fileId = $fileId;
55  $this->licenseRef = $licenseRef;
56  $this->agentRef = $agentRef;
57  $this->licenseFileId = $licenseFileId;
58  $this->percent = $percent;
59  }
60 
64  public function getFileId()
65  {
66  return $this->fileId;
67  }
68 
72  public function getLicenseFileId()
73  {
74  return $this->licenseFileId;
75  }
76 
80  public function getLicenseRef()
81  {
82  return $this->licenseRef;
83  }
84 
88  public function getAgentRef()
89  {
90  return $this->agentRef;
91  }
92 
96  public function getPercentage()
97  {
98  return $this->percent;
99  }
100 
104  public function getLicenseId()
105  {
106  return $this->licenseRef->getId();
107  }
108 }
__construct($fileId, LicenseRef $licenseRef, AgentRef $agentRef, $licenseFileId, $percent=null)