.getSingleValue();
}
String vBundle = new ManifestHeaderValue(mainAttributes.getValue(BUNDLE_VERSION))
.getSingleValue();
Version version;
try {
version = versionOf(vBundle);
} catch (NumberFormatException e) {
throw new ParseException("The " + BUNDLE_VERSION + " has an incorrect version: "
+ vBundle + " (" + e.getMessage() + ")", 0);
}
BundleInfo bundleInfo = new BundleInfo(symbolicName, version);
bundleInfo.setDescription(description);
List/* <String> */environments = new ManifestHeaderValue(
mainAttributes.getValue(BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT)).getValues();
bundleInfo.setExecutionEnvironments(environments);
parseRequirement(bundleInfo, mainAttributes, REQUIRE_BUNDLE, BundleInfo.BUNDLE_TYPE,
ATTR_BUNDLE_VERSION);
parseRequirement(bundleInfo, mainAttributes, IMPORT_PACKAGE, BundleInfo.PACKAGE_TYPE,
ATTR_VERSION);
parseRequirement(bundleInfo, mainAttributes, IMPORT_SERVICE, BundleInfo.SERVICE_TYPE,
ATTR_VERSION);
ManifestHeaderValue exportElements = new ManifestHeaderValue(
mainAttributes.getValue(EXPORT_PACKAGE));
Iterator itExports = exportElements.getElements().iterator();
while (itExports.hasNext()) {
ManifestHeaderElement exportElement = (ManifestHeaderElement) itExports.next();
String vExport = (String) exportElement.getAttributes().get(ATTR_VERSION);
Version v = null;
try {
v = versionOf(vExport);
} catch (NumberFormatException e) {
throw new ParseException("The " + EXPORT_PACKAGE + " has an incorrect version: "
+ vExport + " (" + e.getMessage() + ")", 0);