Class WebserviceCodeGenInfo


  • public class WebserviceCodeGenInfo
    extends java.lang.Object
    Class to represent the information used to generate web service source code.
    Author:
    Fengyuan Hu
    • Constructor Summary

      Constructors 
      Constructor Description
      WebserviceCodeGenInfo​(PathQuery query, java.lang.String serviceBaseURL, java.lang.String projectTitle, java.lang.String perlWSModuleVer, boolean isPubliclyAccessible, Profile user)
      Constructor.
      WebserviceCodeGenInfo​(PathQuery pq, java.lang.String serviceBaseURL, java.lang.String projectTitle, java.lang.String perlWSModuleVer, boolean pathQueryIsPublic, Profile profile, java.lang.String lineBreak)  
    • Constructor Detail

      • WebserviceCodeGenInfo

        public WebserviceCodeGenInfo​(PathQuery query,
                                     java.lang.String serviceBaseURL,
                                     java.lang.String projectTitle,
                                     java.lang.String perlWSModuleVer,
                                     boolean isPubliclyAccessible,
                                     Profile user)
        Constructor.
        Parameters:
        query - a PathQuery to copy
        serviceBaseURL - the base url of web service
        projectTitle - the Title of a local InterMine project
        perlWSModuleVer - the perl web service module version on CPAN
        isPubliclyAccessible - whether this query can be accessed by the public
        user - the name of the user who was logged in when this info was generated
      • WebserviceCodeGenInfo

        public WebserviceCodeGenInfo​(PathQuery pq,
                                     java.lang.String serviceBaseURL,
                                     java.lang.String projectTitle,
                                     java.lang.String perlWSModuleVer,
                                     boolean pathQueryIsPublic,
                                     Profile profile,
                                     java.lang.String lineBreak)
        Parameters:
        pq - a PathQuery to copy
        serviceBaseURL - the base url of web service
        projectTitle - the Title of a local InterMine project
        perlWSModuleVer - the perl web service module version on CPAN
        pathQueryIsPublic - whether this query can be accessed by the public
        profile - the profile of the user who was logged in when this info was generated
        lineBreak - which linebreak to use
    • Method Detail

      • readWebProperties

        public void readWebProperties​(java.util.Properties props)
        Parameters:
        props - properties
      • getProperty

        public java.lang.String getProperty​(java.lang.String key,
                                            java.lang.String defaultValue)
        Get a configured property for which an accessor does not exist.
        Parameters:
        key - The key for this property.
        defaultValue - The value to return if this property is not configured.
        Returns:
        The value of the property.
      • getResultsTablesLib

        public java.lang.String getResultsTablesLib()
        Returns:
        results tables
      • getBaseUrl

        public java.lang.String getBaseUrl()
        Returns:
        base URL
      • getFileName

        public java.lang.String getFileName()
        Returns the filename that should be associated with this query.
        Returns:
        a file name
      • getQuery

        public PathQuery getQuery()
        Returns:
        the query
      • getServiceBaseURL

        public java.lang.String getServiceBaseURL()
        Returns:
        the serviceBaseURL
      • getProjectTitle

        public java.lang.String getProjectTitle()
        Returns:
        the projectTitle
      • getPerlWSModuleVer

        public java.lang.String getPerlWSModuleVer()
        Returns:
        the perlWSModuleVer
      • isPublic

        public boolean isPublic()
        Returns whether this query is publicly accessible. If so, then the webservice will not need to implement a log-in.
        Returns:
        Whether the query is public.
      • getUserName

        public java.lang.String getUserName()
        The name of the user logged in when this info was generated
        Returns:
        The name of the user
      • getLineBreak

        public java.lang.String getLineBreak()
        Returns:
        a line break
      • getUserToken

        public java.lang.String getUserToken()
        A token for the user. The permanent token is preferred, but a temporary one is generated if that is not available.
        Returns:
        A token for the the user
      • isLoggedIn

        public boolean isLoggedIn()
        Returns:
        True if this user has a permanent profile.