+++ /dev/null
-/** @file\r
- UsageIdentification class.\r
-\r
- This class an identification for a PCD UsageInstance.\r
- \r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/ \r
-\r
-package org.tianocore.pcd.entity;\r
-\r
-/**\r
- The identification for a UsageInstance. \r
- It should be extend from ModuleIdentification in future.\r
-\r
-**/\r
-public class UsageIdentification {\r
- ///\r
- /// The module CName: one key of Identification\r
- /// \r
- public String moduleName;\r
-\r
- /// \r
- /// The module Guid String: one key of Identification\r
- /// \r
- public String moduleGuid;\r
-\r
- /// \r
- /// The package CName: one key of Identification \r
- ///\r
- public String packageName;\r
-\r
- /// \r
- /// The package Guid: one key of Identification\r
- /// \r
- public String packageGuid;\r
-\r
- /// \r
- /// Module's Arch: one key of Identification\r
- /// \r
- public String arch;\r
-\r
- /// \r
- /// Module's version: one key of Identification\r
- /// \r
- public String version;\r
-\r
- ///\r
- /// Module's type\r
- /// \r
- public String moduleType;\r
-\r
- /**\r
- Constructor function for UsageIdentification class.\r
-\r
- @param moduleName The key of module's name\r
- @param moduleGuid The key of module's GUID string\r
- @param packageName The key of package's name\r
- @param packageGuid The key of package's Guid\r
- @param arch The architecture string\r
- @param version The version String\r
- @param moduleType The module type\r
- **/\r
- public UsageIdentification (String moduleName,\r
- String moduleGuid,\r
- String packageName,\r
- String packageGuid,\r
- String arch,\r
- String version,\r
- String moduleType) {\r
- this.moduleName = moduleName;\r
- this.moduleGuid = moduleGuid;\r
- this.packageName = packageName;\r
- this.packageGuid = packageGuid;\r
- this.arch = arch;\r
- this.version = version;\r
- this.moduleType = moduleType;\r
- }\r
-\r
- /**\r
- Generate the string for UsageIdentification\r
-\r
- @return the string value for UsageIdentification\r
- **/\r
- public String toString() {\r
- //\r
- // Because currently transition schema not require write moduleGuid, package Name, Packge GUID in\r
- // <ModuleSA> section, So currently no expect all paramter must be valid.\r
- // BUGBUG: Because currently we can not get version from MSA, So ignore verison.\r
- // \r
- return(moduleName + "_" +\r
- ((moduleGuid != null) ? moduleGuid.toLowerCase() : "NullModuleGuid") + "_" +\r
- ((packageName != null) ? packageName : "NullPackageName") + "_" +\r
- ((packageGuid != null) ? packageGuid.toLowerCase() : "NullPackageGuid") + "_" +\r
- ((arch != null) ? arch : "NullArch") + "_" +\r
- "NullVersion");\r
- }\r
-}\r