URL of document on ProvStore

        :Example:
          >>> stored_document.url
          'https://provenance.ecs.soton.ac.uk/store/documents/148'
325229
def url(self):
        
        if not self.abstract:
            return "%s/documents/%i" % ("/".join(self._api.base_url.split("/")[:-2]), self.id)
1166619
def get_download_url(self, proapi=False):
        
        if self._download_url is None:
            self._download_url = \
                self.api._req_files_download_url(self.pickcode, proapi)
        return self._download_url
860699
def _get_document(self, source):
        """"""
        scheme_url = source
        if not source.startswith("http"):
            scheme_url = "http://%s" % source

        text = source

        try:
            text = urllib.urlopen(scheme_url).read()
        except:
            pass
        else:
            return (text, scheme_url)

        try:
            text = open(source, "r").read()
        except:
            pass
        else:
            return (text, source)

        return (text, None)
319109
def url(self):
        
        if self._href is not None:
            return self._href
        if self.identifier:
            #  for some reason atlas does not use classifications here in the path when considering one classification
            path = '/'.join([self.parent.url.replace('classifications/', 'classficiation/'), self.identifier])
            return path
        raise exceptions.ClientError("Not able to determine object URL")
461789
def resolve_url(self, catalog_url):
        
        if catalog_url != '':
            resolver_base = catalog_url.split('catalog.xml')[0]
            resolver_url = resolver_base + self.url_path
            resolver_xml = session_manager.urlopen(resolver_url)
            tree = ET.parse(resolver_xml)
            root = tree.getroot()
            if 'name' in root.attrib:
                self.catalog_name = root.attrib['name']
            else:
                self.catalog_name = 'No name found'
            resolved_url = ''
            found = False
            for child in root.iter():
                if not found:
                    tag_type = child.tag.split('}')[-1]
                    if tag_type == 'dataset':
                        if 'urlPath' in child.attrib:
                            ds = Dataset(child)
                            resolved_url = ds.url_path
                            found = True
            if found:
                return resolved_url
            else:
                log.warning('no dataset url path found in latest.xml!')
779604
def get_documentation(self, request, *args, **kw):
        
        ret = dict()
        ret['resource'] = self.name()
        ret['urls'] = self._get_url_doc()
        ret['description'] = self.__doc__
        ret['representation'] = self._get_representation_doc()
        ret['methods'] = self._get_method_doc()
        return ret
112067
def get_download_url(self, instance, default=None):
        
        download = default
        # calculate the download url
        download = "{url}/@@download/{fieldname}/{filename}".format(
            url=api.get_url(instance),
            fieldname=self.get_field_name(),
            filename=self.get_filename(instance),
        )
        return download
64926
def oaiset_url(self):
        
        return url_for(
            'invenio_oaiserver.response',
            verb='ListRecords',
            metadataPrefix='oai_dc', set=self.oaiset_spec, _external=True)
376792
def submission_storage_path(instance, filename):
    
    string = '/'.join(['submissions', instance.submission_user.user_nick, str(instance.submission_question.question_level), str(instance.submission_question.question_level_id)])
    string += '/'+datetime.datetime.now().strftime("%I:%M%p-%m-%d-%Y")
    string += filename
    return string
232147
def activity_has_provenance(self, activity, prov_ids):
        # type: (str, List[Identifier]) -> None
        """"""
        # NOTE: The below will only work if the corresponding metadata/provenance arcp URI
        # is a pre-registered namespace in the PROV Document
        attribs = [(PROV["has_provenance"], prov_id) for prov_id in prov_ids]
        self.document.activity(activity, other_attributes=attribs)
        # Tip: we can't use https://www.w3.org/TR/prov-links/#term-mention
        # as prov:mentionOf() is only for entities, not activities
        uris = [i.uri for i in prov_ids]
        self.research_object.add_annotation(activity, uris, PROV["has_provenance"].uri)
583555
def _permalink(self, absolute=False, expand=True, **kwargs):
        
        return flask.url_for('entry',
                             entry_id=self._record.id,
                             category=self._record.category if expand else None,
                             slug_text=self._record.slug_text if expand else None,
                             _external=absolute,
                             **kwargs)
977562
def get_url(self):
        
        return os.path.join(
            '/archive',
            self.get_year(),
            self.get_month(),
            self.get_day()
        )
1219956
public static URL getDocumentation(Class<?> comp, Locale loc) {
        Documentation doc = (Documentation) comp.getAnnotation(Documentation.class);
        if (doc != null) {
            String v = doc.value();
            try {
                // try full URL first (external reference)
                URL url = new URL(v);
                return url;
            } catch (MalformedURLException E) {
                // local resource bundled with the class
                String name = v.substring(0, v.lastIndexOf('.'));
                String ext = v.substring(v.lastIndexOf('.'));
                String lang = loc.getLanguage();

                URL f = comp.getResource(name + "_" + lang + ext);
                if (f != null) {
                    return f;
                }

                f = comp.getResource(v);
                if (f != null) {
                    return f;
                }
            }
        }
        return null;
    }
855311
def public_url(self):
        
        return "{storage_base_url}/{bucket_name}/{quoted_name}".format(
            storage_base_url=_API_ACCESS_ENDPOINT,
            bucket_name=self.bucket.name,
            quoted_name=quote(self.name.encode("utf-8")),
        )
33884
function getCurrentDocumentUrl() {
            var $activePage = $("body").pagecontainer("getActivePage");
            if (null == $activePage) {
                return $.mobile.path.documentBase.hrefNoHash;
            }
            var base = $.mobile.path.documentBase.hrefNoHash;
            var url = $.mobile.activePage.closest(".ui-page").jqmData("url");
            if (!url || !$.mobile.path.isPath(url)) {
                url = base;
            }
            return $.mobile.path.makeUrlAbsolute(url, base);
        }
969089
def get_file_urls(self):
        
        if self.use_bundle:
            return [self.get_url()]
        return [bundle_file.file_url for bundle_file in self.files]
300205
def _generate_openapi_object(document):
    
    parsed_url = urlparse.urlparse(document.url)

    swagger = OrderedDict()

    swagger['swagger'] = '2.0'
    swagger['info'] = OrderedDict()
    swagger['info']['title'] = document.title
    swagger['info']['description'] = document.description
    swagger['info']['version'] = document.version

    if parsed_url.netloc:
        swagger['host'] = parsed_url.netloc
    if parsed_url.scheme:
        swagger['schemes'] = [parsed_url.scheme]

    swagger['paths'] = _get_paths_object(document)

    return swagger