update the ac URL value to match the ident
962956
def _update_asset_content_url_to_match_id(self, ac):
        """"""
        mgr = self._provider_session._get_provider_manager('REPOSITORY')
        aas = mgr.get_asset_admin_session_for_repository(self._provider_session._catalog_id,
                                                         proxy=self._provider_session._proxy)
        form = aas.get_asset_content_form_for_update(ac.ident)

        url = ac._my_map['url']
        old_url = os.path.splitext(os.path.basename(url))[0]
        new_url = url.replace(old_url, ac.ident.identifier)

        form.set_url(new_url)
        return aas.update_asset_content(form)
234137
def _getIdentifier(self, url):
        
        for prefix, namespace in self._rdfGraph.namespaces():
            if namespace in url:
                return url.replace(namespace, '')
572520
def update(value, options = {})
      raise Diplomat::IdParameterRequired unless value['ID'] || value[:ID]

      custom_params = use_cas(@options)
      @raw = send_put_request(@conn, ['/v1/acl/update'], options, value, custom_params)
      parse_body
    end
256250
private void updateCacheId() {

        StringBuffer result = new StringBuffer(32);
        if (m_filterVisible) {
            result.append(" Vi");
        }
        if (m_filterTimerange) {
            result.append(" Ti");
        }
        switch (m_filterState) {
            case REQUIRED:
                result.append(" Sr");
                result.append(m_state);
                break;
            case EXCLUDED:
                result.append(" Sx");
                result.append(m_state);
                break;
            default:
                // ignored
        }
        switch (m_filterFlags) {
            case REQUIRED:
                result.append(" Fr");
                result.append(m_flags);
                break;
            case EXCLUDED:
                result.append(" Fx");
                result.append(m_flags);
                break;
            default:
                // ignored
        }
        switch (m_filterType) {
            case REQUIRED:
                result.append(" Tr");
                result.append(m_type);
                break;
            case EXCLUDED:
                result.append(" Tx");
                result.append(m_type);
                break;
            default:
                // ignored
        }
        if (m_onlyFolders != null) {
            if (m_onlyFolders.booleanValue()) {
                result.append(" Fo");
            } else {
                result.append(" Fi");
            }
        }
        if (m_filterLastModified) {
            result.append(" Lt");
            result.append(m_modifiedAfter);
            result.append("-");
            result.append(m_modifiedBefore);
        }
        if (m_filterExpire) {
            result.append(" Ex");
            result.append(m_expireAfter);
            result.append("-");
            result.append(m_expireBefore);
        }
        if (m_filterRelease) {
            result.append(" Re");
            result.append(m_releaseAfter);
            result.append("-");
            result.append(m_releaseBefore);
        }
        m_cacheId = result.toString();
    }
717215
def set_url(self, url):
        """"""
        self.url = url
        self.host, self.path = urllib.parse.urlparse(url)[1:3]
535505
def update_domainalias(self, domainid, aliasid, data):
        """"""
        return self.api_call(
            ENDPOINTS['domainaliases']['update'],
            dict(domainid=domainid, aliasid=aliasid),
            body=data)
10
def update_brand(self) -> None:
        """"""
        self.update(path=URL_GET + GROUP.format(group=BRAND))
175430
function fixRelativeUrls(cssText, href) {
	var base = resolveRelativeUrl(href, document.baseURI);
	return cssText.replace(URL_VALUE_REGEXP, function(match, quote, url1, url2) {
		var url = url1 || url2;
		if (!url) {
			return match;
		}
		return 'url(' + (quote || '"') + resolveRelativeUrl(url, base) + (quote || '"') + ')';
	});
}
455338
def add_url_suffix(url):
    """"""
    url = url.rstrip('/')
    if not has_suffix(url):
        return '{0}.com'.format(url)
    return url
967583
def update(cls, id, params):
        """"""
        cls.echo('Updating your vlan.')
        result = cls.call('hosting.vlan.update', cls.usable_id(id), params)
        return result
694829
function replace(src, token, value) {
    var idx = src.indexOf(token);
    if (idx == -1) {
        return;
    }
    return src.substr(0, idx) + value + src.substr(idx + token.length);
}
389455
def make_anchor_id(self):
        
        result = re.sub(
            '[^a-zA-Z0-9_]', '_', self.user + '_' + self.timestamp)
        return result
855456
function updatePathIdentificationString( $pathIdentificationName )
    {
        // Update the path_identification_string column for the node
        $pathIdentificationString = '';
        if ( $this->attribute( 'parent_node_id' ) != 1 )
        {
            if ( !isset( $parentNode ) )
                $parentNode = $this->fetchParent();
            // Avoid crashes due to database inconsistencies
            if ( $parentNode instanceof eZContentObjectTreeNode )
            {
                $pathIdentificationString = $parentNode->attribute( 'path_identification_string' );
            }
            else
            {
                eZDebug::writeError( 'Failed to fetch parent node for pathIdentificationName "' . $pathIdentificationName .
                                     '" and parent_node_id ' . $this->attribute( 'parent_node_id' ), __METHOD__ );
            }
        }
        if ( strlen( $pathIdentificationString ) > 0 )
            $pathIdentificationString .= '/' . $pathIdentificationName;
        else
            $pathIdentificationString = $pathIdentificationName;
        if ( $this->attribute( 'path_identification_string' ) != $pathIdentificationString )
        {
            $db = eZDB::instance();
            $db->query(
                "UPDATE ezcontentobject_tree " .
                "SET path_identification_string = " .
                    $db->concatString(
                        array(
                            "'" . $db->escapeString( $pathIdentificationString ) . "'",
                            $db->subString(
                                "path_identification_string",
                                mb_strlen( $this->attribute( 'path_identification_string' ) ) + 1
                            )
                        )
                    ) . " " .
                "WHERE path_string LIKE '{$this->attribute( 'path_string' )}_%'"
            );

            $this->setAttribute( 'path_identification_string', $pathIdentificationString );
            $this->sync();
        }
    }
721429
def update(self, *a, **ka):
        
        prefix = ''
        if a and isinstance(a[0], basestring):
            prefix = a[0].strip('.') + '.'
            a = a[1:]
        for key, value in dict(*a, **ka).items():
            self[prefix + key] = value
1191786
function makeUrlsRelativeToCss(match, quotationMark, url) {
            if (PathUtils.isRelativeUrl(url)) {
                var absUrl = PathUtils.makeUrlAbsolute(url, docUrl);
                return "url(" + quotationMark + absUrl + quotationMark + ")";
            }
            return match;
        }
848425
public static String changeOrAddParameter(final String aUrl, final String aParameter,
      final String aValue) {
    final StringBuilder newUrlBuilder = new StringBuilder();
    final String[] splittedUrl = aUrl.split(REGEX_ESCAPOR + URL_TO_PARAMETERS_SPLITTERATOR);
    newUrlBuilder.append(splittedUrl[0]);

    if (splittedUrl.length == 2) {
      final String cleanedParameters = splittedUrl[1] + URL_TO_PARAMETERS_SPLITTERATOR
          .replaceAll(String.format(URL_PARAMETER_REPLACEMENT_REGEX_PATTERN, aParameter), "")
          .replaceAll(REGEX_ESCAPOR + WRONG_PARAMETER_START, URL_TO_PARAMETERS_SPLITTERATOR);

      newUrlBuilder.append(URL_TO_PARAMETERS_SPLITTERATOR);
      newUrlBuilder.append(cleanedParameters);
      if (!cleanedParameters.endsWith(URL_PARAMETER_SEPPERATOR) && !cleanedParameters.isEmpty()) {
        newUrlBuilder.append(URL_PARAMETER_SEPPERATOR);
      }
    } else {
      newUrlBuilder.append(URL_TO_PARAMETERS_SPLITTERATOR);
    }

    newUrlBuilder.append(String.format(PARAMETER_PATTERN, aParameter, aValue));
    return newUrlBuilder.toString();
  }
740775
def _update_asset_content_filename_on_disk_to_match_id(self, ac):
        """"""
        def has_secondary_storage():
            return 'secondary_data_store_path' in self._config_map

        datastore_path = ''
        secondary_data_store_path = ''

        if 'data_store_full_path' in self._config_map:
            datastore_path = self._config_map['data_store_full_path']
        if has_secondary_storage():
            secondary_data_store_path = self._config_map['secondary_data_store_path']
        relative_path = self._config_map['data_store_path']

        filepath = os.path.join(datastore_path, ac._my_map['url'])
        old_filename = os.path.splitext(os.path.basename(filepath))[0]
        new_path = filepath.replace(old_filename, ac.ident.identifier)
        os.rename(filepath, new_path)

        # Should also rename the file stored in the secondary path
        if has_secondary_storage():
            old_path = '{0}/repository/AssetContent'.format(relative_path)
            filepath = os.path.join(datastore_path, ac._my_map['url']).replace(old_path, secondary_data_store_path)
            old_filename = os.path.splitext(os.path.basename(filepath))[0]
            new_path = filepath.replace(old_filename, ac.ident.identifier)
            os.rename(filepath, new_path)