]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identification/ModuleIdentification.java
95ada64f9f91da217e127be2ef00027e90ff674a
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / Identification / ModuleIdentification.java
1 /** @file
2
3 The file is used to save basic information of module
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 package org.tianocore.frameworkwizard.module.Identification;
17
18
19 import org.tianocore.frameworkwizard.common.Identification;
20 import org.tianocore.frameworkwizard.packaging.PackageIdentification;
21
22 public class ModuleIdentification extends Identification {
23
24 private PackageIdentification packageId;
25
26 public ModuleIdentification(String name, String guid, String version, String path) {
27 super(name, guid, version, path);
28 }
29
30 public ModuleIdentification(Identification id) {
31 super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());
32 }
33
34 public ModuleIdentification(String name, String guid, String version, String path, PackageIdentification packageId){
35 super(name, guid, version, path);
36 this.packageId = packageId;
37 }
38
39 public ModuleIdentification(Identification id, PackageIdentification packageId) {
40 super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());
41 this.packageId = packageId;
42 }
43
44 // public boolean equals(Object obj) {
45 // if (obj instanceof Identification) {
46 // Identification id = (Identification)obj;
47 // if ( this.getName().equalsIgnoreCase(id.getName())) {
48 // return true;
49 // }
50 // // and package is the same one
51 // return false;
52 // }
53 // else {
54 // return super.equals(obj);
55 // }
56 // }
57
58 public String toString(){
59 return "Module " + this.getName() + "[" + this.getGuid() + "] in package " + packageId;
60 }
61
62 public PackageIdentification getPackageId() {
63 return packageId;
64 }
65
66 public void setPackageId(PackageIdentification packageId) {
67 this.packageId = packageId;
68 }
69 }