]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/PcdTools/org/tianocore/pcd/entity/UsageIdentification.java
Changed spelling to manifest
[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 The identification for a UsageInstance.
21 It should be extend from ModuleIdentification in future.
22
23 **/
24 public class UsageIdentification {
25 ///
26 /// The module CName: one key of Identification
27 ///
28 public String moduleName;
29
30 ///
31 /// The module Guid String: one key of Identification
32 ///
33 public String moduleGuid;
34
35 ///
36 /// The package CName: one key of Identification
37 ///
38 public String packageName;
39
40 ///
41 /// The package Guid: one key of Identification
42 ///
43 public String packageGuid;
44
45 ///
46 /// Module's Arch: one key of Identification
47 ///
48 public String arch;
49
50 ///
51 /// Module's version: one key of Identification
52 ///
53 public String version;
54
55 ///
56 /// Module's type
57 ///
58 public String moduleType;
59
60 /**
61 Constructor function for UsageIdentification class.
62
63 @param moduleName The key of module's name
64 @param moduleGuid The key of module's GUID string
65 @param packageName The key of package's name
66 @param packageGuid The key of package's Guid
67 @param arch The architecture string
68 @param version The version String
69 @param moduleType The module type
70 **/
71 public UsageIdentification (String moduleName,
72 String moduleGuid,
73 String packageName,
74 String packageGuid,
75 String arch,
76 String version,
77 String moduleType) {
78 this.moduleName = moduleName;
79 this.moduleGuid = moduleGuid;
80 this.packageName = packageName;
81 this.packageGuid = packageGuid;
82 this.arch = arch;
83 this.version = version;
84 this.moduleType = moduleType;
85 }
86
87 /**
88 Generate the string for UsageIdentification
89
90 @return the string value for UsageIdentification
91 **/
92 public String toString() {
93 //
94 // Because currently transition schema not require write moduleGuid, package Name, Packge GUID in
95 // <ModuleSA> section, So currently no expect all paramter must be valid.
96 // BUGBUG: Because currently we can not get version from MSA, So ignore verison.
97 //
98 return(moduleName + "_" +
99 ((moduleGuid != null) ? moduleGuid.toLowerCase() : "NullModuleGuid") + "_" +
100 ((packageName != null) ? packageName : "NullPackageName") + "_" +
101 ((packageGuid != null) ? packageGuid.toLowerCase() : "NullPackageGuid") + "_" +
102 ((arch != null) ? arch : "NullArch") + "_" +
103 "NullVersion");
104 }
105 }