@Controller @RequestMapping(value="/name_catalogue") public class NameCatalogueController extends AbstractController<TaxonName,INameService> implements org.springframework.context.ResourceLoaderAware
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCEPTED_NAME_STATUS
Taxonomic status 'accepted' string
|
static java.lang.String |
CLASSIFICATION_ALL
Classifcation 'all' key
|
static java.lang.String |
CLASSIFICATION_DEFAULT
Classifcation 'default' key
|
static java.lang.String |
DEFAULT_MAX_NB_FOR_EXACT_SEARCH
Default max number of hits for the exact name search
|
static java.lang.String |
DEFAULT_SEARCH_TYPE
Default name search type
|
static java.lang.String |
DOUBTFUL_FLAG
Flag 'doubtful' strings
|
static java.lang.String |
FUZZY_ATOMISED
Fuzzy Atomised Name search
|
static java.lang.String |
FUZZY_NAME_CACHE
Fuzzy Name Cache search
|
static java.lang.String |
INCLUDE_CLUUIDS
Classification to include uuids key
|
static java.lang.String |
NAME_SEARCH
Base scientific name search type
|
static java.lang.String |
SYNONYM_STATUS
Taxonpmic status 'synonym' string
|
static java.lang.String |
TITLE_SEARCH
Complete scientific name search type
|
DEFAULT_BATCH_THREAD_PRIORITY, DEFAULT_INIT_STRATEGY, DEFAULT_PAGE_SIZE, INCLUDE_UNPUBLISHED, initializationStrategy, NO_UNPUBLISHED, service, userHelper
Constructor and Description |
---|
NameCatalogueController() |
Modifier and Type | Method and Description |
---|---|
org.springframework.web.servlet.ModelAndView |
doGetAcceptedNameSearch(java.lang.String[] queries,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a list of accepted names of input scientific names matching the
{query}
string pattern. |
org.springframework.web.servlet.ModelAndView |
doGetAcceptedNameSearch(java.lang.String[] queries,
java.lang.String searchType,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a list of accepted names of input scientific names matching the
{query}
string pattern. |
org.springframework.web.servlet.ModelAndView |
doGetAcceptedNameSearchDocumentation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a documentation page for the Accepted Name Search API.
|
org.springframework.web.servlet.ModelAndView |
doGetClassificationMap(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a list of all available classifications (with associated referenc information) and the default classification.
|
org.springframework.web.servlet.ModelAndView |
doGetNameFuzzySearch(java.lang.String[] queries,
java.lang.String accuracy,
java.lang.String hits,
java.lang.String type,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a list of scientific names similar to the
{query}
string pattern. |
org.springframework.web.servlet.ModelAndView |
doGetNameFuzzySearchDocumentation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a documentation page for the Fuzzy Name Search API.
|
org.springframework.web.servlet.ModelAndView |
doGetNameInformation(java.lang.String[] nameUuids,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns information related to the scientific name matching the given
{nameUuid} . |
org.springframework.web.servlet.ModelAndView |
doGetNameInformationDocumentation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a documentation page for the Name Information API.
|
org.springframework.web.servlet.ModelAndView |
doGetNameSearch(java.lang.String[] queries,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a list of scientific names matching the
{query}
string pattern. |
org.springframework.web.servlet.ModelAndView |
doGetNameSearch(java.lang.String[] queries,
java.lang.String searchType,
java.lang.String hits,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a list of scientific names matching the
{query}
string pattern. |
org.springframework.web.servlet.ModelAndView |
doGetNameSearchDocumentation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a documentation page for the Name Search API.
|
org.springframework.web.servlet.ModelAndView |
doGetTaxonInformation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns a documentation page for the Taxon Information API.
|
org.springframework.web.servlet.ModelAndView |
doGetTaxonInformation(java.lang.String[] taxonUuids,
java.lang.String classificationType,
java.lang.String[] includes,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns information related to the taxon matching the given
{taxonUuid} . |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
void |
setService(INameService service) |
getInitializationStrategy, readPathParameter, requestPathAndQuery, setInitializationStrategy
public static final java.lang.String ACCEPTED_NAME_STATUS
public static final java.lang.String SYNONYM_STATUS
public static final java.lang.String DOUBTFUL_FLAG
public static final java.lang.String NAME_SEARCH
public static final java.lang.String TITLE_SEARCH
public static final java.lang.String DEFAULT_SEARCH_TYPE
public static final java.lang.String DEFAULT_MAX_NB_FOR_EXACT_SEARCH
public static final java.lang.String CLASSIFICATION_DEFAULT
public static final java.lang.String CLASSIFICATION_ALL
public static final java.lang.String INCLUDE_CLUUIDS
public static final java.lang.String FUZZY_NAME_CACHE
public static final java.lang.String FUZZY_ATOMISED
@Autowired public void setService(INameService service)
setService
in class AbstractController<TaxonName,INameService>
@RequestMapping(value="", method=GET, params={}) public org.springframework.web.servlet.ModelAndView doGetNameSearchDocumentation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
URI: /{datasource-name}/name_catalogue
request
- response
- java.io.IOException
@RequestMapping(value="", method={GET,POST}, params="query") public org.springframework.web.servlet.ModelAndView doGetNameSearch(@RequestParam(value="query",required=true) java.lang.String[] queries, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
{query}
string pattern. Each of these scientific names is accompanied by a list of
name uuids, a list of taxon uuids, a list of accepted taxon uuids, etc.
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue
queries
- The base scientific name pattern(s) to query for. The query can
contain wildcard characters ('*'). The query can be
performed with no wildcard or with the wildcard at the
begin and / or end depending on the search pattern.request
- Http servlet request.response
- Http servlet response.NameSearch
objects each corresponding to a
single query. These are built from TaxonName
entities which are in turn initialized using
the NAME_SEARCH_INIT_STRATEGY
java.io.IOException
@RequestMapping(value="", method={GET,POST}, params={"query","type"}) public org.springframework.web.servlet.ModelAndView doGetNameSearch(@RequestParam(value="query",required=true) java.lang.String[] queries, @RequestParam(value="type",required=false,defaultValue="name") java.lang.String searchType, @RequestParam(value="hits",required=false,defaultValue="100") java.lang.String hits, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
{query}
string pattern. Each of these scientific names is accompanied by a list of
name uuids, a list of taxon uuids and a list of accepted taxon uuids.
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue
query
- The scientific name pattern(s) to query for. The query can
contain wildcard characters ('*'). The query can be
performed with no wildcard or with the wildcard at the
begin and / or end depending on the search pattern.type
- The type of name to query. This be either
"name" : scientific name corresponding to 'name cache' in CDM or
"title" : complete name corresponding to 'title cache' in CDMhits
- Maximum number of responses to be returned.request
- Http servlet request.response
- Http servlet response.NameSearch
objects each corresponding to a
single query. These are built from TaxonName
entities
which are in turn initialized using the NAME_SEARCH_INIT_STRATEGY
java.io.IOException
@RequestMapping(value="fuzzy", method=GET, params={}) public org.springframework.web.servlet.ModelAndView doGetNameFuzzySearchDocumentation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
URI: /{datasource-name}/name_catalogue/accepted
request
- Http servlet request.response
- Http servlet response.java.io.IOException
@RequestMapping(value="fuzzy", method=GET, params="query") public org.springframework.web.servlet.ModelAndView doGetNameFuzzySearch(@RequestParam(value="query",required=true) java.lang.String[] queries, @RequestParam(value="accuracy",required=false,defaultValue="0.6") java.lang.String accuracy, @RequestParam(value="hits",required=false,defaultValue="10") java.lang.String hits, @RequestParam(value="type",required=false,defaultValue="name") java.lang.String type, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
{query}
string pattern. Each of these scientific names is accompanied by a list of
name uuids, a list of taxon uuids and a list of accepted taxon uuids.
The underlying (Lucene FuzzyQuery) string distance metric used is based on a
fail-fast Levenshtein distance algorithm (is aborted if it is discovered that
the mimimum distance between the words is greater than some threshold)
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue/fuzzy
query
- The scientific name pattern(s) to query for. Any wildcard characters in the
query are removed.accuracy
- Similarity measure (between 0 and 1) to impose on the matching algorithm.
Briefly described, this is equivalent to the edit distance between the two words, divided by
the length of the shorter of the compared terms.hits
- Maximum number of responses to be returned.type
- The type of fuzzy search to call. This can be either
"name" : fuzzy searches scientific names corresponding to 'name cache' in CDM or
"atomised" : parses the query into atomised elements and fuzzy searches the individual elements in the CDMrequest
- Http servlet request.response
- Http servlet response.NameSearch
objects each corresponding to a
single query. These are built from TaxonName
entities
which are in turn initialized using the NAME_SEARCH_INIT_STRATEGY
java.io.IOException
@RequestMapping(value="name", method=GET, params={}) public org.springframework.web.servlet.ModelAndView doGetNameInformationDocumentation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
URI: /{datasource-name}/name_catalogue/name
request
- Http servlet request.response
- Http servlet response.java.io.IOException
@RequestMapping(value="name", method={GET,POST}, params="nameUuid") public org.springframework.web.servlet.ModelAndView doGetNameInformation(@RequestParam(value="nameUuid",required=true) java.lang.String[] nameUuids, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
{nameUuid}
. The information includes the name string,
relationships, rank, list of related lsids / taxon uuids, etc.
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue/name
nameUuids
- uuid(s) of the scientific name to search for.request
- Http servlet request.response
- Http servlet response.NameInformation
objects each corresponding to a
single name uuid. These are built from TaxonName
entities
which are in turn initialized using the NAME_INFORMATION_INIT_STRATEGY
java.io.IOException
@RequestMapping(value="taxon", method=GET, params={}) public org.springframework.web.servlet.ModelAndView doGetTaxonInformation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
URI: /{datasource-name}/name_catalogue/taxon
request
- Http servlet request.response
- Http servlet response.java.io.IOException
@RequestMapping(value="taxon", method={GET,POST}, params="taxonUuid") public org.springframework.web.servlet.ModelAndView doGetTaxonInformation(@RequestParam(value="taxonUuid",required=true) java.lang.String[] taxonUuids, @RequestParam(value="classification",required=false,defaultValue="default") java.lang.String classificationType, @RequestParam(value="include",required=false,defaultValue="") java.lang.String[] includes, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
{taxonUuid}
. The information includes the name cache, title cache
relationship type, taxonomic status, information , etc.
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue/taxon
taxonUuid
- The taxon uuid to query for.classification
- [Optional] String representing the taxonomic classification to use for
building the classification tree. Defaults to the first in the alphabetically
sorted list of classifications currently available in the database.include
- Array of data types to be included in addition to the normal responserequest
- Http servlet request.response
- Http servlet response.TaxonInformation
objects each corresponding to a
single query. These are built from entities which are
in turn initialized using the TAXON_INFORMATION_INIT_STRATEGY
java.io.IOException
@RequestMapping(value="accepted", method=GET, params={}) public org.springframework.web.servlet.ModelAndView doGetAcceptedNameSearchDocumentation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
URI: /{datasource-name}/name_catalogue/accepted
request
- Http servlet request.response
- Http servlet response.java.io.IOException
@RequestMapping(value="accepted", method={GET,POST}, params="query") public org.springframework.web.servlet.ModelAndView doGetAcceptedNameSearch(@RequestParam(value="query",required=true) java.lang.String[] queries, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
{query}
string pattern. Each of these scientific names is accompanied by a list of
name uuids, a list of taxon uuids and a list of accepted taxon uuids.
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue
query
- The scientific name pattern(s) to query for. The query can
contain wildcard characters ('*'). The query can be
performed with no wildcard or with the wildcard at the
begin and / or end depending on the search pattern.type
- The type of name to query. This be either
"name" : scientific name corresponding to 'name cache' in CDM or
"title" : complete name corresponding to 'title cache' in CDMrequest
- Http servlet request.response
- Http servlet response.NameSearch
objects each corresponding to a
single query. These are built from TaxonName
entities
which are in turn initialized using the NAME_SEARCH_INIT_STRATEGY
java.io.IOException
@RequestMapping(value="accepted", method={GET,POST}, params={"query","type"}) public org.springframework.web.servlet.ModelAndView doGetAcceptedNameSearch(@RequestParam(value="query",required=true) java.lang.String[] queries, @RequestParam(value="type",required=false,defaultValue="name") java.lang.String searchType, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
{query}
string pattern. Each of these scientific names is accompanied by a list of
name uuids, a list of taxon uuids and a list of accepted taxon uuids.
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue
query
- The scientific name pattern(s) to query for. The query can
contain wildcard characters ('*'). The query can be
performed with no wildcard or with the wildcard at the
begin and / or end depending on the search pattern.type
- The type of name to query. This be either
"name" : scientific name corresponding to 'name cache' in CDM or
"title" : complete name corresponding to 'title cache' in CDMrequest
- Http servlet request.response
- Http servlet response.NameSearch
objects each corresponding to a
single query. These are built from TaxonName
entities
which are in turn initialized using the NAME_SEARCH_INIT_STRATEGY
java.io.IOException
@RequestMapping(value="voc/classification", method=GET, params={}) public org.springframework.web.servlet.ModelAndView doGetClassificationMap(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
Endpoint documentation can be found here
URI: /{datasource-name}/name_catalogue/voc/classification
request
- Http servlet request.response
- Http servlet response.Classification
objects represebted as strings.
These are initialized using the VOC_CLASSIFICATION_INIT_STRATEGY
java.io.IOException
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
Copyright © 2007-2020 EDIT. All Rights Reserved.