Class PermanentURIHelper


  • public class PermanentURIHelper
    extends java.lang.Object
    Utility class used to build the permanent URI and permanent URL Permanent URLs are used in the Share button and to set the attribute 'url' in Schema.org Permanent URIs are used to set the attribute 'identifier' in Schema.org and in RDF Examples of permanent URIs 1-If the mine is registered in identifiers.org and you've set in the mine properties file identifier.uri.base=identifiers.org/biotestmine, the permanent URI will be identifiers.org/biotestmine/protein:P31946 2-If you use a redirection system and you've set in the mine properties file identifier.uri.base=purl.biotestmine.org/biotestmine, the permanent URI will be purl.biotestmine.org/biotestmine/protein:P31946 3-If identifier.uri.base is not set, the uri generated will be based on {webapp.baseurl}/{webapp.path}/protein:P31946
    Author:
    danielabutano
    • Constructor Summary

      Constructors 
      Constructor Description
      PermanentURIHelper​(javax.servlet.http.HttpServletRequest request)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPermanentBaseURI()
      Returns the permanent base URI
      java.lang.String getPermanentURI​(InterMineLUI lui)
      Returns the permanent URI given the intermine lui, e.g.
      java.lang.String getPermanentURL​(java.lang.Integer interMineId, Profile profile)
      Returns the permanent URL given the class name and the primary identifier The permanent URL is used in the Share button, to set the url in Schema.org
      java.lang.String getPermanentURL​(InterMineLUI lui)
      Returns the permanent URL given the lui The permanent URL is used in the Share button, to set the url in Schema.org
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PermanentURIHelper

        public PermanentURIHelper​(javax.servlet.http.HttpServletRequest request)
        Constructor
        Parameters:
        request - the HttpServletRequest
    • Method Detail

      • getPermanentURI

        public java.lang.String getPermanentURI​(InterMineLUI lui)
        Returns the permanent URI given the intermine lui, e.g. protein:P31946
        Parameters:
        lui - intermine lui
        Returns:
        the permanent uri
      • getPermanentBaseURI

        public java.lang.String getPermanentBaseURI()
        Returns the permanent base URI
        Returns:
        the permanent base uri
      • getPermanentURL

        public java.lang.String getPermanentURL​(java.lang.Integer interMineId,
                                                Profile profile)
        Returns the permanent URL given the class name and the primary identifier The permanent URL is used in the Share button, to set the url in Schema.org
        Parameters:
        interMineId - the internal id
        profile - the profile
        Returns:
        the permanent url or null if can not generate the url
      • getPermanentURL

        public java.lang.String getPermanentURL​(InterMineLUI lui)
        Returns the permanent URL given the lui The permanent URL is used in the Share button, to set the url in Schema.org
        Parameters:
        lui - the InterMine lui
        Returns:
        the permanent url