pi.setOptional(Boolean.valueOf(attributes.getValue("optional")));
bundle.getBundleInfo().addImport(pi);
}
catch (LDAPParseException e)
{
throw new SAXParseException("Failed to parse filter", locator, e);
}
}
else if ("bundle".equals(name))
{
IRequiredBundle b = ModelElementFactory.getInstance().newModelElement(
IRequiredBundle.class);
try
{
LDAPExpr expr = LDAPParser.parseExpression(attributes.getValue("filter"));
b.setSymbolicName(decodeSymbolicName(expr, locator));
b.setVersions(decodeVersions(expr, locator));
b.setOptional(Boolean.valueOf(attributes.getValue("optional")));
bundle.getBundleInfo().addRequiredBundle(b);
}
catch (Exception e)
{
System.err.println("Failed to parse filter in bundle "
+ bundle.getBundleInfo().getSymbolicName());
throw new SAXParseException("Failed to parse filter in bundle "
+ bundle.getBundleInfo().getSymbolicName(), locator, e);
}
}
//else if ( "ee".equals( name ) ) {
// TODO ignore for now...