'This pulls apart the salient bits of the URI and populates the
resource via a ``obj_get``.
Optionally accepts a ``request``.
If you need custom behavior based on other portions of the URI,
simply override this method.'

def get_via_uri(self, uri, request=None):

    prefix = get_script_prefix()
    chomped_uri = uri
    if (prefix and chomped_uri.startswith(prefix)):
        chomped_uri = chomped_uri[(len(prefix) - 1):]
    end_of_resource_name = chomped_uri.rstrip(u'/').rfind(u'/')
    if (end_of_resource_name == (-1)):
        raise NotFound((u"An    incorrect    URL    was    provided    '%s'    for    the    '%s'    resource." % (uri, self.__class__.__name__)))
    split_url = chomped_uri.rstrip(u'/').rsplit(u'/', 1)[0]
    if (not split_url.endswith((u'/' + self._meta.resource_name))):
        raise NotFound((u"An    incorrect    URL    was    provided    '%s'    for    the    '%s'    resource." % (uri, self.__class__.__name__)))
    found_at = chomped_uri.rfind(self._meta.resource_name, 0, end_of_resource_name)
    chomped_uri = chomped_uri[found_at:]
    try:
        for url_resolver in getattr(self, u'urls', []):
            result = url_resolver.resolve(chomped_uri)
            if (result is not None):
                (view, args, kwargs) = result
                break
        else:
            raise Resolver404(u"URI    not    found    in    'self.urls'.")
    except Resolver404:
        raise NotFound((u"The    URL    provided    '%s'    was    not    a    link    to    a    valid    resource." % uri))
    bundle = self.build_bundle(request=request)
    return self.obj_get(bundle=bundle, **self.remove_api_resource_names(kwargs))
