changed the way to fetch file name list in spd file, per the schema changes

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@567 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jwang36 2006-06-20 06:56:10 +00:00
parent 652f4bd848
commit 20391ab0d6
1 changed files with 4 additions and 5 deletions

View File

@ -295,25 +295,24 @@ public class GlobalData {
File packageFile = new File(packageFilename);
try {
PackageSurfaceAreaDocument spd = (PackageSurfaceAreaDocument) XmlObject.Factory.parse(packageFile);
List<FilenameDocument.Filename> msaFilenameList;
List<String> msaFilenameList;
List<MsaFilesDocument.MsaFiles.MsaFile> msasList = spd.getPackageSurfaceArea().getMsaFiles()
.getMsaFileList();
if (msasList.size() == 0) {
msaFilenameList = spd.getPackageSurfaceArea().getMsaFiles().getFilenameList();
} else {
msaFilenameList = new ArrayList<FilenameDocument.Filename>(msasList.size());
msaFilenameList = new ArrayList<String>(msasList.size());
Iterator msasIter = msasList.iterator();
while (msasIter.hasNext()) {
MsaFilesDocument.MsaFiles.MsaFile msaFile = (MsaFilesDocument.MsaFiles.MsaFile)msasIter.next();
msaFilenameList.add(msaFile.getFilename());
msaFilenameList.add(msaFile.getFilename().getStringValue());
}
}
Iterator msaFilenameIter = msaFilenameList.iterator();
while (msaFilenameIter.hasNext()) {
FilenameDocument.Filename msaFilename = (FilenameDocument.Filename)msaFilenameIter.next();
String filename = msaFilename.getStringValue();
String filename = (String)msaFilenameIter.next();
File msaFile = new File(workspaceDir + File.separatorChar + GlobalData.getPackagePath(packageName)
+ File.separatorChar + filename);
SurfaceAreaParser surfaceAreaParser = new SurfaceAreaParser();