]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageIdentification.java
Because Pcd entity, exception and some action package are shared by Building tools...
[mirror_edk2.git] / Tools / Source / PcdTools / org / tianocore / pcd / entity / UsageIdentification.java
CommitLineData
d14ebb43 1/** @file\r
2 UsageIdentification class.\r
3\r
4 This class an identification for a PCD UsageInstance.\r
5 \r
6Copyright (c) 2006, Intel Corporation\r
7All rights reserved. This program and the accompanying materials\r
8are licensed and made available under the terms and conditions of the BSD License\r
9which accompanies this distribution. The full text of the license may be found at\r
10http://opensource.org/licenses/bsd-license.php\r
11 \r
12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/ \r
16\r
17package org.tianocore.pcd.entity;\r
18\r
19/**\r
20 \r
21**/\r
22public class UsageIdentification {\r
23 ///\r
24 /// The module CName: one key of Identification\r
25 /// \r
26 public String moduleName;\r
27 /// \r
28 /// The module Guid String: one key of Identification\r
29 /// \r
30 public String moduleGuid;\r
31 /// \r
32 /// The package CName: one key of Identification \r
33 ///\r
34 public String packageName;\r
35 /// \r
36 /// The package Guid: one key of Identification\r
37 /// \r
38 public String packageGuid;\r
39 /// \r
40 /// Module's Arch: one key of Identification\r
41 /// \r
42 public String arch;\r
43 /// \r
44 /// Module's version: one key of Identification\r
45 /// \r
46 public String version;\r
47 ///\r
48 /// Module's type\r
49 /// \r
50 public String moduleType;\r
51\r
52 /**\r
53 Constructor function for UsageIdentification class.\r
54\r
55 @param moduleName The key of module's name\r
56 @param moduleGuid The key of module's GUID string\r
57 @param packageName The key of package's name\r
58 @param packageGuid The key of package's Guid\r
59 @param arch The architecture string\r
60 @param version The version String\r
61 @param moduleType The module type\r
62 **/\r
63 public UsageIdentification (String moduleName,\r
64 String moduleGuid,\r
65 String packageName,\r
66 String packageGuid,\r
67 String arch,\r
68 String version,\r
69 String moduleType) {\r
70 this.moduleName = moduleName;\r
71 this.moduleGuid = moduleGuid;\r
72 this.packageName = packageName;\r
73 this.packageGuid = packageGuid;\r
74 this.arch = arch;\r
75 this.version = version;\r
76 this.moduleType = moduleType;\r
77 }\r
78\r
79 /**\r
80 Generate the string for UsageIdentification\r
81\r
82 @return the string value for UsageIdentification\r
83 **/\r
84 public String toString() {\r
85 //\r
86 // Because currently transition schema not require write moduleGuid, package Name, Packge GUID in\r
87 // <ModuleSA> section, So currently no expect all paramter must be valid.\r
88 // BUGBUG: Because currently we can not get version from MSA, So ignore verison.\r
89 // \r
90 return(moduleName + "_" +\r
91 ((moduleGuid != null) ? moduleGuid.toLowerCase() : "NullModuleGuid") + "_" +\r
92 ((packageName != null) ? packageName : "NullPackageName") + "_" +\r
93 ((packageGuid != null) ? packageGuid.toLowerCase() : "NullPackageGuid") + "_" +\r
94 ((arch != null) ? arch : "NullArch") + "_" +\r
95 "NullVersion");\r
96 }\r
97}\r