Removes the metadata of all models contained in the provided bundle from the registrar.

@param bundle must not be <code>null</code>
977376
public synchronized void removeMetadataForModelsIn(Bundle bundle) {
        if (bundle == null) {
            throw new IllegalArgumentException("method parameter bundle must not be null");
        }

        Map<Class<?>, ResourceModelMetadataHolder> newCache = copyCache();
        Iterator<Map.Entry<Class<?>, ResourceModelMetadataHolder>> it = newCache.entrySet().iterator();
        while (it.hasNext()) {
            OsgiModelSource<?> source = it.next().getValue().source;
            if (source.getBundleId() == bundle.getBundleId()) {
                it.remove();
            }
        }
        this.cache = newCache;
    }
1138837
def delete_bundle(self, href=None):
        

        # Argument error checking.
        assert href is not None

        raw_result = self.delete(href)

        if raw_result.status != 204:
            raise APIException(raw_result.status, raw_result.json)
1191432
public void removeMetadataProvider(MetadataProvider provider) {
        for (Set<MetadataProvider> providers : metadataProviders.values()) {
            providers.remove(provider);
        }
    }
1215210
def cleanup_bundle():
    
    paths = ['./vendored', './bundle.zip']
    for path in paths:
        if os.path.exists(path):
            log.debug("Deleting %s..." % path)
            if os.path.isdir(path):
                shutil.rmtree(path)
            else:
                os.remove(path)
941507
public synchronized void deactivate() {
        // Allow garbage collection of all slots reserved by this component.
        // Clean up all the metadata used by the slots.
        for (MetaDataSlotImpl slot : slots) {
            MetaDataManager<?, ?> manager = (MetaDataManager<?, ?>) slot.getManager();
            manager.destroyMetaDataSlot(slot);
        }
        slots = null;
    }
257120
public void registerDwBundles(final List<GuiceyBundle> bundles) {
        setScope(ConfigScope.DropwizardBundle.getType());
        for (GuiceyBundle bundle : bundles) {
            register(ConfigItem.Bundle, bundle);
        }
        closeScope();
        lifecycle().bundlesFromDwResolved(bundles);
    }
1327645
public void removeLayer(Layer layer) {
		if (layers.contains(layer)) {
			layers.remove(layer);
			mapInfo.getLayers().remove(layer.getLayerInfo());
			handlerManager.fireEvent(new MapModelChangedEvent(this));
		}
	}
269808
public void removeLinks(ServiceReference<S> declarationBinderRef) {
        for (D declaration : linkerManagement.getMatchedDeclaration()) {
            if (declaration.getStatus().getServiceReferencesBounded().contains(declarationBinderRef)) {
                linkerManagement.unlink(declaration, declarationBinderRef);
            }
        }
    }
858709
@Override
	public void removeByAssetCategoryId(long assetCategoryId) {
		for (CPRuleAssetCategoryRel cpRuleAssetCategoryRel : findByAssetCategoryId(
				assetCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpRuleAssetCategoryRel);
		}
	}
825752
private Set<ModelDescription> loadModelsOfBundle(Bundle bundle) {
        Enumeration<URL> classEntries = bundle.findEntries("/", "*.class", true);
        Set<ModelDescription> models = new HashSet<ModelDescription>();
        if (classEntries == null) {
            LOGGER.debug("Found no classes in the bundle {}", bundle);
            return models;
        }
        while (classEntries.hasMoreElements()) {
            URL classURL = classEntries.nextElement();
            String classname = extractClassName(classURL);
            if (isModelClass(classname, bundle)) {
                models.add(new ModelDescription(classname, bundle.getVersion().toString()));
            }
        }
        return models;
    }
648381
def delete_bundle(self, bundleId):
        """"""
        if not bundleId:
            return None
        url = self.__get_base_bundle_url() + "/" + bundleId
        response = self.__perform_rest_call(requestURL=url, restType='DELETE')
        return response
1064521
def clear(self):
        
        with self.__svc_lock:
            self.__svc_registry.clear()
            self.__svc_factories.clear()
            self.__svc_specs.clear()
            self.__bundle_svc.clear()
            self.__bundle_imports.clear()
            self.__factory_usage.clear()
            self.__pending_services.clear()
1025789
private void removePathMappingFromPathMap(JoinableResourceBundle bundle) {
		for (List<PathMapping> pathMappings : pathToResourceBundle.values()) {
			for (Iterator<PathMapping> iterator = pathMappings.iterator(); iterator.hasNext();) {
				PathMapping pathMapping = (PathMapping) iterator.next();
				if (pathMapping.getBundle().getName().equals(bundle.getName())) {
					iterator.remove();
				}
			}
		}
	}
201519
def _unregister_bundle_factories(self, bundle):
        # type: (Bundle) -> None
        
        with self.__factories_lock:
            # Find out which factories must be removed
            to_remove = [
                factory_name
                for factory_name in self.__factories
                if self.get_factory_bundle(factory_name) is bundle
            ]

            # Remove all of them
            for factory_name in to_remove:
                try:
                    self.unregister_factory(factory_name)
                except ValueError as ex:
                    _logger.warning(
                        "Error unregistering factory '%s': %s", factory_name, ex
                    )
793281
public void removeExtension() {

		try {
			if (extendedRelationsDao.isTableExists()) {
				List<ExtendedRelation> extendedRelations = extendedRelationsDao
						.queryForAll();
				for (ExtendedRelation extendedRelation : extendedRelations) {
					geoPackage.deleteTable(extendedRelation
							.getMappingTableName());
				}
				geoPackage.dropTable(extendedRelationsDao.getTableName());
			}
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByExtension(EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Related Tables extension and table. GeoPackage: "
							+ geoPackage.getName(), e);
		}
	}
584091
@Route(method = HttpMethod.DELETE, uri = "/{id}")
    public Result uninstallBundle(@Parameter("id") long id) {
        final Bundle bundle = context.getBundle(id);
        if (bundle == null) {
            return notFound("Bundle " + id + " not found");
        } else {
            return async(new Callable<Result>() {
                @Override
                public Result call() throws Exception {
                    try {
                        logger().info("Uninstalling bundle {}", bundle.getSymbolicName());
                        bundle.uninstall();
                        return ok();
                    } catch (BundleException e) {
                        logger().error("Cannot uninstall bundle {}", bundle.getSymbolicName(), e);
                        return badRequest(e);
                    }
                }
            });
        }
    }
262007
protected void unsetComponentMetadataDecorator(ServiceReference<ComponentMetaDataDecorator> ref) {
        componentMetadataDecoratorRefs.removeReference((String) ref.getProperty("component.name"), ref);
    }