]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/PackageIdentification.java
1. Support to Create/Update/Delete/Install far file
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / packaging / PackageIdentification.java
1 /** @file
2
3 The file is used to save basic information of package
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.packaging;
17
18 import java.io.File;
19
20 import org.tianocore.frameworkwizard.common.Tools;
21 import org.tianocore.frameworkwizard.common.Identifications.Identification;
22 import org.tianocore.frameworkwizard.workspace.Workspace;
23
24 public class PackageIdentification extends Identification{
25
26 public PackageIdentification(String name, String guid, String version){
27 super(name, guid, version);
28 }
29
30 public PackageIdentification(String name, String guid, String version, String path){
31 super(name, guid, version, path);
32 }
33
34 public PackageIdentification(Identification id){
35 super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());
36 }
37
38 public File getSpdFile(){
39 File spdFile = new File(this.getPath());
40 return spdFile;
41 }
42
43 public String toString() {
44 return getName() + " " + getVersion() + " [" + Tools.getRelativePath(getSpdFile().getPath(), Workspace.getCurrentWorkspace()) + "]";
45 }
46 }