\r
package org.tianocore.frameworkwizard.module.Identifications;\r
\r
-\r
import java.io.IOException;\r
\r
import org.apache.xmlbeans.XmlException;\r
import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
\r
public class ModuleIdentification extends Identification {\r
- \r
+\r
private PackageIdentification packageId;\r
- \r
+\r
private String moduleType;\r
- \r
+\r
private boolean isLibrary;\r
- \r
+\r
public ModuleIdentification(String name, String guid, String version, String path) {\r
- super(name, guid, version, path);\r
+ super(name, guid, version, path);\r
setModuleType();\r
}\r
- \r
+\r
public ModuleIdentification(String name, String guid, String version, String path, boolean library) {\r
super(name, guid, version, path);\r
this.isLibrary = library;\r
}\r
- \r
+\r
public ModuleIdentification(Identification id) {\r
super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());\r
}\r
- \r
+\r
public ModuleIdentification(Identification id, boolean library) {\r
super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());\r
this.isLibrary = library;\r
}\r
- \r
- public ModuleIdentification(String name, String guid, String version, String path, PackageIdentification packageId){\r
+\r
+ public ModuleIdentification(String name, String guid, String version, String path, PackageIdentification packageId) {\r
super(name, guid, version, path);\r
this.packageId = packageId;\r
setModuleType();\r
}\r
- \r
- public ModuleIdentification(String name, String guid, String version, String path, PackageIdentification packageId, String type){\r
+\r
+ public ModuleIdentification(String name, String guid, String version, String path, PackageIdentification packageId,\r
+ String type) {\r
super(name, guid, version, path);\r
this.packageId = packageId;\r
this.moduleType = type;\r
}\r
- \r
+\r
public ModuleIdentification(Identification id, PackageIdentification packageId) {\r
super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());\r
this.packageId = packageId;\r
setModuleType();\r
}\r
- \r
+\r
public ModuleIdentification(Identification id, PackageIdentification packageId, boolean library) {\r
super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());\r
this.packageId = packageId;\r
this.isLibrary = library;\r
}\r
- \r
+\r
public ModuleIdentification(Identification id, PackageIdentification packageId, String type) {\r
super(id.getName(), id.getGuid(), id.getVersion(), id.getPath());\r
this.packageId = packageId;\r
this.moduleType = type;\r
}\r
- \r
- public String toString(){\r
+\r
+ public String toString() {\r
return "Module " + this.getName() + "[" + this.getGuid() + "] in package " + packageId;\r
}\r
\r
public void setModuleType(String moduleType) {\r
this.moduleType = moduleType;\r
}\r
- \r
+\r
private void setModuleType() {\r
ModuleSurfaceArea msa = null;\r
try {\r
msa = OpenFile.openMsaFile(this.getPath());\r
} catch (IOException e) {\r
// TODO Auto-generated catch block\r
- \r
+\r
} catch (XmlException e) {\r
// TODO Auto-generated catch block\r
- \r
+\r
} catch (Exception e) {\r
// TODO Auto-generated catch block\r
- \r
+\r
}\r
setModuleType(DataType.MODULE_TYPE_MODULE);\r
setLibrary(false);\r
}\r
}\r
}\r
- \r
+\r
public boolean equals(String moduleGuid, String moduleVersion, String packageGuid, String packageVersion) {\r
boolean b = false;\r
if (this.getGuid().equals(moduleGuid) && this.getPackageId().getGuid().equals(packageGuid)) {\r