Assert.isNotNull(registry);
// ISSUE: should these factories be released? Or just
// removed from this registry, because we are getting ready to
// re-add them?
INodeAdapterFactory factory = null;
if (!registry.contains(DocumentTypeAdapter.class)) {
factory = registry.getFactoryFor(DocumentTypeAdapter.class);
factory.release();
registry.removeFactory(factory);
}
if (!registry.contains(ModelParserAdapter.class)) {
factory = registry.getFactoryFor(ModelParserAdapter.class);
factory.release();
registry.removeFactory(factory);
}
if (!registry.contains(IStyleSelectorAdapter.class)) {
factory = registry.getFactoryFor(IStyleSelectorAdapter.class);
factory.release();
registry.removeFactory(factory);
}
if (!registry.contains(IStyleSheetAdapter.class)) {
factory = registry.getFactoryFor(IStyleSheetAdapter.class);
factory.release();
registry.removeFactory(factory);
}
}