+++ /dev/null
-/** @file\r
- \r
- The file is used to save basic information of platform\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.frameworkwizard.platform;\r
-\r
-\r
-import java.io.File;\r
-\r
-import org.tianocore.frameworkwizard.common.Tools;\r
-import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
-import org.tianocore.frameworkwizard.workspace.Workspace;\r
-\r
-public class PlatformIdentification extends Identification{\r
-\r
- public PlatformIdentification(String name, String guid, String version, String path){\r
- super(name, guid, version, path);\r
- }\r
- \r
- public PlatformIdentification(Identification id){\r
- super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());\r
- }\r
- \r
- public File getFpdFile(){\r
- File fpdFile = new File(this.getPath());\r
- return fpdFile;\r
- }\r
- \r
- public String toString() {\r
- return getName() + " " + getVersion() + " [" + Tools.getRelativePath(getFpdFile().getPath(), Workspace.getCurrentWorkspace()) + "]";\r
- }\r
- \r
- public boolean equals(String platformGuid, String platformVersion) {\r
- boolean b = false;\r
- if (this.getGuid().equals(platformGuid)) {\r
- b = true;\r
- //\r
- // Check Version\r
- //\r
- if (platformVersion != null) {\r
- if (!Tools.isEmpty(platformVersion)) {\r
- if (!platformVersion.equals(this.getVersion())) {\r
- b = false;\r
- }\r
- }\r
- }\r
- }\r
- return b;\r
- }\r
-}
\ No newline at end of file