FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
License.php
1 <?php
2 /*
3 Copyright (C) 2014, Siemens AG
4 Authors: Johannes Najjar, Andreas Würl
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 
22 class License extends LicenseRef
23 {
27  private $text;
31  private $url;
35  private $risk;
39  private $detectorType;
43  private $spdxCompatible;
44 
45  function __construct($id, $shortName, $fullName, $risk, $text, $url, $detectorType, $spdxCompatible = false)
46  {
47  parent::__construct($id, $shortName, $fullName);
48  $this->text = $text;
49  $this->url = $url;
50  $this->risk = $risk;
51  $this->detectorType = $detectorType;
52  $this->spdxCompatible = $spdxCompatible;
53  }
54 
58  public function getRisk()
59  {
60  return $this->risk;
61  }
62 
66  public function getDetectorType()
67  {
68  return $this->detectorType;
69  }
70 
74  public function getSpdxCompatible()
75  {
76  return $this->spdxCompatible;
77  }
78 
82  public function getText()
83  {
84  return $this->text;
85  }
86 
90  public function getUrl()
91  {
92  return $this->url;
93  }
94 
96  public function getRef()
97  {
98  return new parent($this->getId(), $this->getShortName(), $this->getFullName());
99  }
100 }