/** * Finds a given import in the list * * @param imports list of imports * @param id * @param version * @param match * @return IFeatureImport or null */ private IFeatureImport findImport(List imports, String id, String version, int match) { for (int i = 0; i < imports.size(); i++) { IFeatureImport iimport = (IFeatureImport) imports.get(i); if (iimport.getId().equals(id)) { if (version == null) return iimport; if (version.equals(iimport.getVersion()) && match == iimport.getMatch()) return iimport; } } return null; }
private boolean hasRequiredAttributes() { // Verify that all the required attributes are // defined. if (id == null) return false; if (version == null) return false; for (int i = 0; i < fChildren.size(); i++) { IFeatureChild child = (IFeatureChild) fChildren.elementAt(i); if (child.getId() == null || child.getVersion() == null) return false; } for (int i = 0; i < fPlugins.size(); i++) { IFeaturePlugin plugin = (IFeaturePlugin) fPlugins.elementAt(i); if (plugin.getId() == null || plugin.getVersion() == null) return false; } for (int i = 0; i < fData.size(); i++) { IFeatureData entry = (IFeatureData) fData.elementAt(i); if (entry.getId() == null) return false; } for (int i = 0; i < fImports.size(); i++) { IFeatureImport iimport = (IFeatureImport) fImports.elementAt(i); if (iimport.getId() == null) return false; } return true; }