diff options
author | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-31 16:26:40 +0000 |
---|---|---|
committer | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-31 16:26:40 +0000 |
commit | 808def96aa4589fba9c2d0ea55837754a3b7a4f7 (patch) | |
tree | 0ea221c59abb2474c694e7ab5bd61006be77e47e /Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java | |
parent | 9216450d1143056a50a5f916984a2d7faf590488 (diff) | |
download | edk2-platforms-808def96aa4589fba9c2d0ea55837754a3b7a4f7.tar.xz |
Retiring the ANT/JAVA build and removing the older EDK II packages that required ANT/JAVA.
Last Ant/Java build was r7166
Developers requiring the Java/Ant packages should checkout the branch from:
https://edk2.tianocore.org/svn/edk2/branches/AntJava
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7168 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java')
-rw-r--r-- | Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java deleted file mode 100644 index f76af054ba..0000000000 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/PackageQuery.java +++ /dev/null @@ -1,127 +0,0 @@ -/** @file
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-
-package org.tianocore.frameworkwizard.far;
-
-import java.io.File;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.apache.xmlbeans.XmlObject;
-import org.tianocore.ModuleSurfaceAreaDocument;
-import org.tianocore.PackageDependenciesDocument;
-import org.tianocore.PackageSurfaceAreaDocument;
-import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;
-import org.tianocore.frameworkwizard.common.OpenFile;
-import org.tianocore.frameworkwizard.common.Tools;
-import org.tianocore.frameworkwizard.packaging.PackageIdentification;
-import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
-
-public class PackageQuery implements PackageQueryInterface {
-
- public PackageIdentification getPackageIdentification(File spdFile) {
- PackageIdentification packageId = null;
- try {
- String path = spdFile.getPath();
- packageId = Tools.getId(path, OpenFile.openSpdFile(path));
- } catch (Exception e) {
- e.printStackTrace();
- }
- return packageId;
- }
-
- public List<String> getPackageMsaList(InputStream spdInput) {
- List<String> result = new ArrayList<String>();
- try {
- PackageSurfaceAreaDocument spd = (PackageSurfaceAreaDocument) XmlObject.Factory.parse(spdInput);
- result = spd.getPackageSurfaceArea().getMsaFiles().getFilenameList();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return result;
- }
-
- public List<PackageIdentification> getModuleDependencies(InputStream msaInput) {
- List<PackageIdentification> result = new ArrayList<PackageIdentification>();
- try {
- ModuleSurfaceAreaDocument msa = (ModuleSurfaceAreaDocument) XmlObject.Factory.parse(msaInput);
- ModuleSurfaceAreaDocument.ModuleSurfaceArea sa = msa.getModuleSurfaceArea();
- if (sa == null) {
- return result;
- }
- PackageDependenciesDocument.PackageDependencies pkgDep = sa.getPackageDependencies();
- if (pkgDep == null) {
- return result;
- }
- List<PackageDependenciesDocument.PackageDependencies.Package> list = pkgDep.getPackageList();
- Iterator<PackageDependenciesDocument.PackageDependencies.Package> iter = list.iterator();
- while (iter.hasNext()) {
- PackageDependenciesDocument.PackageDependencies.Package item = iter.next();
- PackageIdentification packageId = new PackageIdentification(null, item.getPackageGuid(),
- item.getPackageVersion());
- result.add(packageId);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return result;
- }
-
- public List<File> getPackageMsaList(File spdFile) {
- List<File> result = new Vector<File>();
- WorkspaceTools wt = new WorkspaceTools();
- List<String> v = wt.getAllModulesOfPackage(spdFile.getPath());
- Iterator<String> iter = v.iterator();
- while (iter.hasNext()) {
- result.add(new File(iter.next()));
- }
- return result;
- }
-
- public List<PackageIdentification> getPackageDependencies(File spdFile) {
- List<File> msaFiles = getPackageMsaList(spdFile);
- return getPackageDependencies(msaFiles);
- }
-
- public List<PackageIdentification> getPackageDependencies(List<File> msaFiles) {
- List<PackageIdentification> result = new ArrayList<PackageIdentification>();
- Iterator<File> iter = msaFiles.iterator();
- while (iter.hasNext()) {
- result = AggregationOperation.union(result, getModuleDependencies(iter.next()));
- }
- return result;
- }
-
- public List<PackageIdentification> getModuleDependencies(File msaFile) {
- List<PackageIdentification> result = new ArrayList<PackageIdentification>();
- try {
- ModuleSurfaceArea msa = OpenFile.openMsaFile(msaFile.getPath());
- List<PackageDependenciesDocument.PackageDependencies.Package> p = msa.getPackageDependencies()
- .getPackageList();
- Iterator<PackageDependenciesDocument.PackageDependencies.Package> iter = p.iterator();
- while (iter.hasNext()) {
- PackageDependenciesDocument.PackageDependencies.Package item = iter.next();
- PackageIdentification packageId = new PackageIdentification(null, item.getPackageGuid(),
- item.getPackageVersion());
- if (!AggregationOperation.belongs(packageId, result)) {
- result.add(packageId);
- }
- }
- } catch (Exception e) {
- }
- return result;
- }
-}
|