Remove the extension from a specified GeoPackage

@param geoPackage
GeoPackage name
545012
public void removeExtension(String geoPackage) {
		PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap
				.get(geoPackage);
		if (properties != null) {
			properties.removeExtension();
		}
	}
913070
private void deleteStyleRelationship(String mappingTableName,
			String featureTable) {

		relatedTables.removeRelationshipsWithMappingTable(mappingTableName);

		if (!hasRelationship(featureTable)) {
			try {
				if (extensionsDao.isTableExists()) {
					extensionsDao.deleteByExtension(EXTENSION_NAME,
							featureTable);
				}
			} catch (SQLException e) {
				throw new GeoPackageException(
						"Failed to delete Feature Style extension. GeoPackage: "
								+ geoPackage.getName() + ", Feature Table: "
								+ featureTable, e);
			}
		}

	}
1071926
public void removeExtension() {

		try {
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByExtension(EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete CRS WKT extension. GeoPackage: "
							+ geoPackage.getName(), e);
		}

	}
136228
public boolean deleteLink(String featureTable, String tileTable) {

		boolean deleted = false;

		try {
			if (featureTileLinkDao.isTableExists()) {
				FeatureTileLinkKey id = new FeatureTileLinkKey(featureTable,
						tileTable);
				deleted = featureTileLinkDao.deleteById(id) > 0;
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete feature tile link for GeoPackage: "
							+ geoPackage.getName() + ", Feature Table: "
							+ featureTable + ", Tile Table: " + tileTable, e);
		}

		return deleted;
	}
1089602
public static void deleteSchemaExtension(GeoPackageCore geoPackage) {

		SchemaExtension schemaExtension = new SchemaExtension(geoPackage);
		if (schemaExtension.has()) {
			schemaExtension.removeExtension();
		}

	}
813687
public ExtensionElement removeExtension(ExtensionElement extension)  {
        String key = XmppStringUtils.generateKey(extension.getElementName(), extension.getNamespace());
        synchronized (packetExtensions) {
            List<ExtensionElement> list = packetExtensions.getAll(key);
            boolean removed = list.remove(extension);
            if (removed) {
                return extension;
            }
        }
        return null;
    }
1172575
public void removeSamePackage (String pkg)
    {
        Iterator<String> i = _imports.iterator();
        while (i.hasNext()) {
            String name = i.next();
            if (name.startsWith(pkg) &&
                name.indexOf('.', pkg.length() + 1) == -1) {
                    i.remove();
            }
        }
    }
1077169
public static void removeFileOpener(ServletContext servletContext, String ... extensions) {
		synchronized(fileOpenersLock) {
			@SuppressWarnings("unchecked")
			Map<String,FileOpener> fileOpeners = (Map<String,FileOpener>)servletContext.getAttribute(FILE_OPENERS_REQUEST_ATTRIBUTE_NAME);
			if(fileOpeners != null) {
				for(String extension : extensions) {
					fileOpeners.remove(extension);
				}
				if(fileOpeners.isEmpty()) {
					servletContext.removeAttribute(FILE_OPENERS_REQUEST_ATTRIBUTE_NAME);
				}
			}
		}
	}
425951
public static void deleteTableExtensions(GeoPackageCore geoPackage,
			String table) {

		deleteGeometryIndex(geoPackage, table);
		deleteFeatureTileLink(geoPackage, table);
		deleteTileScaling(geoPackage, table);
		deleteProperties(geoPackage, table);
		deleteFeatureStyle(geoPackage, table);
		deleteContentsId(geoPackage, table);

		// Delete future extensions for the table here
	}
275787
public static void deleteFeatureTileLink(GeoPackageCore geoPackage,
			String table) {

		FeatureTileLinkDao featureTileLinkDao = geoPackage
				.getFeatureTileLinkDao();
		try {
			if (featureTileLinkDao.isTableExists()) {
				featureTileLinkDao.deleteByTableName(table);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Feature Tile Link. GeoPackage: "
							+ geoPackage.getName() + ", Table: " + table, e);
		}
	}
887898
public void removeOutputExtension(OutputExtensionModel<?, ?> outputExtension) {
        IdentifiableSet<OutputExtensionModel<?, ?>> outputExtensions =
                this.outputExtensions.get(outputExtension.getPluginId());
        if (outputExtensions != null)
            outputExtensions.remove(outputExtension);
        IdentificationManager.getInstance().getIdentification(outputExtension)
                .ifPresent(id -> outputPlugins.stream()
                        .filter(outputPlugin -> outputPlugin.getID().equals(outputExtension.getPluginId()))
                        .forEach(outputPlugin -> outputPlugin.outputExtensionRemoved(id)));
    }
441806
public void addPackage(String strPackage)
    {
        if ((strPackage.length() == 0) || (strPackage.equals(DBConstants.ROOT_PACKAGE)))
            return;
        if (this.addName(strPackage) == false)
            return;     // This name was already included in the header
        m_MethodOut.writeit("import " + strPackage + ".*;\n");
    }
1362220
public int deleteLinks(String table) {

		int deleted = 0;

		try {
			if (featureTileLinkDao.isTableExists()) {
				deleted = featureTileLinkDao.deleteByTableName(table);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete feature tile links for GeoPackage: "
							+ geoPackage.getName() + ", Table: " + table, e);
		}

		return deleted;
	}
736978
public static void deleteContentsIdExtension(GeoPackageCore geoPackage) {

		ContentsIdExtension contentsIdExtension = new ContentsIdExtension(
				geoPackage);
		if (contentsIdExtension.has()) {
			contentsIdExtension.removeExtension();
		}

	}
865647
private void removeWebpackModuleShim(Node root) {
    checkState(root.isScript());
    Node n = root.getFirstChild();

    // Sometimes scripts start with a semicolon for easy concatenation.
    // Skip any empty statements from those
    while (n != null && n.isEmpty()) {
      n = n.getNext();
    }

    // An IIFE wrapper must be the only non-empty statement in the script,
    // and it must be an expression statement.
    if (n == null || !n.isExprResult() || n.getNext() != null) {
      return;
    }

    Node call = n.getFirstChild();
    if (call == null || !call.isCall()) {
      return;
    }

    // Find the IIFE call and function nodes
    Node fnc;
    if (call.getFirstChild().isFunction()) {
      fnc = n.getFirstFirstChild();
    } else if (call.getFirstChild().isGetProp()
        && call.getFirstFirstChild().isFunction()
        && call.getFirstFirstChild().getNext().matchesQualifiedName("call")) {
      fnc = call.getFirstFirstChild();
    } else {
      return;
    }

    Node params = NodeUtil.getFunctionParameters(fnc);
    Node moduleParam = null;
    Node param = params.getFirstChild();
    int paramNumber = 0;
    while (param != null) {
      paramNumber++;
      if (param.isName() && param.getString().equals(MODULE)) {
        moduleParam = param;
        break;
      }
      param = param.getNext();
    }
    if (moduleParam == null) {
      return;
    }

    boolean isFreeCall = call.getBooleanProp(Node.FREE_CALL);
    Node arg = call.getChildAtIndex(isFreeCall ? paramNumber : paramNumber + 1);
    if (arg == null) {
      return;
    }

    if (arg.isCall()
        && arg.getFirstChild().isCall()
        && isCommonJsImport(arg.getFirstChild())
        && arg.getSecondChild().isName()
        && arg.getSecondChild().getString().equals(MODULE)) {
      String importPath = getCommonJsImportPath(arg.getFirstChild());

      ModulePath modulePath =
          compiler
              .getInput(root.getInputId())
              .getPath()
              .resolveJsModule(
                  importPath, arg.getSourceFileName(), arg.getLineno(), arg.getCharno());
      if (modulePath == null) {
        // The module loader will issue an error
        return;
      }

      if (modulePath.toString().contains("/buildin/module.js")) {
        arg.detach();
        param.detach();
        compiler.reportChangeToChangeScope(fnc);
        compiler.reportChangeToEnclosingScope(fnc);
      }
    }
  }
769312
public static void validateGeoPackageExtension(File file) {
		if (!hasGeoPackageExtension(file)) {
			throw new GeoPackageException("GeoPackage database file '" + file
					+ "' does not have a valid extension of '"
					+ GeoPackageConstants.GEOPACKAGE_EXTENSION + "' or '"
					+ GeoPackageConstants.GEOPACKAGE_EXTENDED_EXTENSION + "'");
		}
	}
887392
public boolean closeGeoPackage(String name) {
		T geoPackage = removeGeoPackage(name);
		if (geoPackage != null) {
			geoPackage.close();
		}
		return geoPackage != null;
	}