The URL as a string of the resource.
482748
def url(self):
        """"""
        if not self._url[2].endswith('/'):
            self._url[2] += '/'
        return RestURL.url.__get__(self)
619481
def to_url(self):
        """"""
        base_url = urlparse(self.url)

        query = parse_qs(base_url.query)
        for k, v in self.items():
            query.setdefault(k, []).append(to_utf8_optional_iterator(v))
        scheme = base_url.scheme
        netloc = base_url.netloc
        path = base_url.path
        params = base_url.params
        fragment = base_url.fragment

        url = (scheme, netloc, path, params, urlencode(query, True), fragment)
        return urlunparse(url)
597585
def __valid_url(cls, url):
        """"""
        bits = urlparse(url)
        return ((bits.scheme == "http" or bits.scheme == "https") and
                _PATTERN_URL_PART.match(bits.netloc) and
                _PATTERN_URL_PART.match(bits.path))
516201
def __build_url(self, api_call, **kwargs):
        """"""
        kwargs['key'] = self.api_key
        if 'language' not in kwargs:
            kwargs['language'] = self.language
        if 'format' not in kwargs:
            kwargs['format'] = self.__format
        api_query = urlencode(kwargs)

        return "{0}{1}?{2}".format(urls.BASE_URL,
                                   api_call,
                                   api_query)
278949
def resource_uri(self):
        
        primary_key_value = getattr(self, self.primary_key(), None)
        return '/{}/{}'.format(self.endpoint(), primary_key_value)
549730
def url(self):
        """"""
        scheme = self.scheme
        host = self.host
        path = self.path
        query = self.query
        port = self.port

        # normalize the port
        host_domain, host_port = Url.split_hostname_from_port(host)
        if host_port:
            port = host_port

        controller_path = ""
        if self.controller_info:
            controller_path = self.controller_info.get("path", "")

        u = Url(
            scheme=scheme,
            hostname=host,
            path=path,
            query=query,
            port=port,
            controller_path=controller_path,
        )
        return u
460719
def uri(self):
        """"""
        uristring = self.path
        if self.query:
            uristring += "?{}".format(self.query)
        if self.fragment:
            uristring += "#{}".format(self.fragment)

        return uristring
1138322
def url_to_text(self, url):
        '''
        

        '''
        path, headers = urllib.request.urlretrieve(url)
        return self.path_to_text(path)
345177
public static URL asURL(Class<?> contextClass, String resourceName) {
		return Resources.getResource(contextClass, resourceName);
	}
1016468
def _url(self):
        """"""
        if self.ID_NAME not in self.route.keys() and "id" in self.data.keys():
            self.route[self.ID_NAME] = self.data["id"]
        return self.config.BASE + self.PATH.format(**self.route)
461724
def resource_urls(request):
    """"""

    url_parsed = urlparse(settings.SEARCH_URL)
    defaults = dict(
        APP_NAME=__description__,
        APP_VERSION=__version__,
        SITE_URL=settings.SITE_URL.rstrip('/'),
        SEARCH_TYPE=settings.SEARCH_TYPE,
        SEARCH_URL=settings.SEARCH_URL,
        SEARCH_IP='%s://%s:%s' % (url_parsed.scheme, url_parsed.hostname, url_parsed.port)
    )
    return defaults
1187257
private URI spliceUrl(String resource) throws RestEndpointIOException {
        try {
            return Strings.isNullOrEmpty(baseUrl) ? new URI(resource) : new URI(baseUrl.concat(resource));
        } catch (URISyntaxException e) {
            throw new RestEndpointIOException(
                    "Unable to builder URL with base url '" + baseUrl + "' and resouce '" + resource + "'", e);
        }
    }
892978
private String resourcesToString(Iterable<CmsResource> resources) {

        StringBuffer buffer = new StringBuffer();
        boolean first = true;
        buffer.append("[");
        for (CmsResource res : resources) {
            if (!first) {
                buffer.append(", ");
            }
            first = false;
            buffer.append(res.getRootPath());
            buffer.append("!");
            buffer.append(res.getState().getAbbreviation());
        }
        buffer.append("]");
        return buffer.toString();
    }
901687
def url(self):
        """"""
        return URL.format(http=self.web_proto, host=self.host, port=self.port)
1364891
def get_resource(url):
    
    response = R25_DAO().getURL(url, {"Accept": "text/xml"})
    if response.status != 200:
        raise DataFailureException(url, response.status, response.data)

    tree = etree.fromstring(response.data.strip())

    # XHTML response is an error response
    xhtml = tree.xpath("//xhtml:html", namespaces=nsmap)
    if len(xhtml):
        raise DataFailureException(url, 500, response.data)

    return tree
693086
def url(self):
        """"""
        return os.path.join(self.path, self.main.value[0])
1293007
def write(url, content, **args):
    """"""
    with FileResource(url, **args) as resource:
        resource.write(content)