Package org.intermine.api.query.codegen
Class WebserviceCodeGenInfo
- java.lang.Object
-
- org.intermine.api.query.codegen.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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBaseUrl()
java.lang.String
getFileName()
Returns the filename that should be associated with this query.java.lang.String
getLineBreak()
java.lang.String
getPerlWSModuleVer()
java.lang.String
getProjectTitle()
java.lang.String
getProperty(java.lang.String key, java.lang.String defaultValue)
Get a configured property for which an accessor does not exist.PathQuery
getQuery()
java.lang.String
getResultsTablesLib()
java.lang.String
getServiceBaseURL()
java.lang.String
getUserName()
The name of the user logged in when this info was generatedjava.lang.String
getUserToken()
A token for the user.boolean
isLoggedIn()
boolean
isPublic()
Returns whether this query is publicly accessible.void
readWebProperties(java.util.Properties props)
-
-
-
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 copyserviceBaseURL
- the base url of web serviceprojectTitle
- the Title of a local InterMine projectperlWSModuleVer
- the perl web service module version on CPANisPubliclyAccessible
- whether this query can be accessed by the publicuser
- 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 copyserviceBaseURL
- the base url of web serviceprojectTitle
- the Title of a local InterMine projectperlWSModuleVer
- the perl web service module version on CPANpathQueryIsPublic
- whether this query can be accessed by the publicprofile
- the profile of the user who was logged in when this info was generatedlineBreak
- 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.
-
-