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