]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/GenBuild/org/tianocore/build/id/PlatformIdentification.java
2 This file is to define PlatformIdentification class.
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 package org
.tianocore
.build
.id
;
17 import org
.tianocore
.build
.global
.GlobalData
;
20 This class is used to identify a platform.
24 public class PlatformIdentification
extends Identification
{
33 @param version Version
35 public PlatformIdentification(String guid
, String version
){
42 @param version Version
44 public PlatformIdentification(String name
, String guid
, String version
){
45 super(name
, guid
, version
);
51 @param version Version
52 @param fpdFilename Fpd File Name
54 public PlatformIdentification(String name
, String guid
, String version
, String fpdFilename
){
55 super(name
, guid
, version
);
56 this.fpdFile
= new File(fpdFilename
);
62 @param version Version
63 @param fpdFile Fpd File
65 public PlatformIdentification(String name
, String guid
, String version
, File fpdFile
){
66 super(name
, guid
, version
);
67 this.fpdFile
= fpdFile
;
70 public String
toString(){
71 return "Platform " + name
+ "["+guid
+"]";
76 @param fpdFile FPD File
78 public void setFpdFile(File fpdFile
) {
79 this.fpdFile
= fpdFile
;
86 public File
getFpdFile() {
91 Get FPD relative file to workspace.
92 @return Fpd Relative file.
94 public String
getRelativeFpdFile (){
95 String relativeDir
= fpdFile
.getPath().substring(GlobalData
.getWorkspacePath().length());
96 if(relativeDir
.startsWith("\\") || relativeDir
.startsWith("/")) {
97 relativeDir
= relativeDir
.substring(1);
103 Get Platform relative directory to workspace.
104 @return Platform relative directory
106 public String
getPlatformRelativeDir(){
107 String relativeDir
= fpdFile
.getParent().substring(GlobalData
.getWorkspacePath().length());
108 if(relativeDir
.startsWith("\\") || relativeDir
.startsWith("/")) {
109 relativeDir
= relativeDir
.substring(1);