|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.etaxonomy.cdm.remote.controller.AbstractController<T,SERVICE>
eu.etaxonomy.cdm.remote.controller.BaseController<TaxonBase,ITaxonService>
eu.etaxonomy.cdm.remote.controller.TaxonPortalController
@Controller
@RequestMapping(value="/portal/taxon/{uuid}")
public class TaxonPortalControllerThe TaxonPortalController class is a Spring MVC Controller.
The syntax of the mapped service URIs contains the the {datasource-name} path element.
The available {datasource-name}s are defined in a configuration file which
is loaded by the UpdatableRoutingDataSource. If the
UpdatableRoutingDataSource is not being used in the actual application
context any arbitrary {datasource-name} may be used.
Methods mapped at type level, inherited from super classes (BaseController):
URI: /{datasource-name}/portal/taxon/{taxon-uuid} Get theTaxonBaseinstance identified by the{taxon-uuid}. The returned Taxon is initialized by the following strategyTAXON_INIT_STRATEGY
| Field Summary | |
|---|---|
protected static List<String> |
DESCRIPTION_ELEMENT_INIT_STRATEGY
|
static Logger |
logger
|
protected static List<String> |
TAXONDESCRIPTION_INIT_STRATEGY
|
protected static List<String> |
TAXONDESCRIPTION_MEDIA_INIT_STRATEGY
|
protected static List<String> |
TAXONNODE_INIT_STRATEGY
|
protected static List<String> |
TAXONNODE_WITHTAXON_INIT_STRATEGY
|
| Fields inherited from class eu.etaxonomy.cdm.remote.controller.BaseController |
|---|
baseClass |
| Fields inherited from class eu.etaxonomy.cdm.remote.controller.AbstractController |
|---|
DEFAULT_INIT_STRATEGY, DEFAULT_PAGE_SIZE, initializationStrategy, service |
| Constructor Summary | |
|---|---|
TaxonPortalController()
|
|
| Method Summary | |
|---|---|
Pager<IdentifiableEntity> |
doFind(String query,
UUID treeUuid,
Set<NamedArea> areas,
Integer pageNumber,
Integer pageSize,
Boolean doTaxa,
Boolean doSynonyms,
Boolean doMisappliedNames,
Boolean doTaxaByCommonNames,
MatchMode matchMode,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Find Taxa, Synonyms, Common Names by name, either globally or in a specific geographic area. |
Pager<SearchResult<TaxonBase>> |
dofindByDescriptionElementFullText(Class clazz,
String queryString,
UUID treeUuid,
UuidList featureUuids,
List<Language> languages,
Boolean highlighting,
Integer pageNumber,
Integer pageSize,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
org.springframework.web.servlet.ModelAndView |
doGetDescriptionElementsByType(UUID uuid,
String classSimpleName,
UuidList markerTypeUUIDs,
Boolean doCount,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
List<TaxonDescription> |
doGetDescriptions(UUID uuid,
UuidList markerTypeUUIDs,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the list of TaxonDescriptions of the
Taxon instance identified by the {taxon-uuid}. |
List<NameRelationship> |
doGetFromNameRelations(UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the list of NameRelationships of the Name associated with the
TaxonBase instance identified by the {taxon-uuid}. |
List<Media> |
doGetMedia(UUID uuid,
Class<? extends MediaRepresentationPart> type,
String[] mimeTypes,
UuidList relationshipUuids,
UuidList relationshipInversUuids,
Boolean includeTaxonDescriptions,
Boolean includeOccurrences,
Boolean includeTaxonNameDescriptions,
Integer widthOrDuration,
Integer height,
Integer size,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the Media attached to the Taxon instance
identified by the {taxon-uuid}. |
List<TypeDesignationBase> |
doGetNameTypeDesignations(UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Deprecated. |
List<Media> |
doGetSubtreeMedia(UUID uuid,
Class<? extends MediaRepresentationPart> type,
String[] mimeTypes,
UuidList relationshipUuids,
UuidList relationshipInversUuids,
Boolean includeTaxonDescriptions,
Boolean includeOccurrences,
Boolean includeTaxonNameDescriptions,
Integer widthOrDuration,
Integer height,
Integer size,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
org.springframework.web.servlet.ModelAndView |
doGetSynonymy(UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the synonymy for a taxon identified by the {taxon-uuid}. |
Set<TaxonNode> |
doGetTaxonNodes(UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
List<TaxonRelationship> |
doGetTaxonRelations(UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the list of TaxonRelationships for the given
TaxonBase instance identified by the {taxon-uuid}. |
List<NameRelationship> |
doGetToNameRelations(UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the list of NameRelationships of the Name associated with the
TaxonBase instance identified by the {taxon-uuid}. |
List<TaxonDescription> |
doGetUseDescriptions(UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Set<TaxonBase> |
getAccepted(UUID uuid,
UUID classification_uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the set of accepted Taxon entities for a given
TaxonBase entity identified by the {taxon-uuid}. |
void |
initBinder(org.springframework.web.bind.WebDataBinder binder)
|
void |
setService(ITaxonService service)
|
| Methods inherited from class eu.etaxonomy.cdm.remote.controller.BaseController |
|---|
doGet, doGetMethod, getCdmBaseInstance, getCdmBaseInstance, getCdmBaseInstance, getCdmBaseInstance, getCdmBaseInstance, getCdmBaseProperty |
| Methods inherited from class eu.etaxonomy.cdm.remote.controller.AbstractController |
|---|
requestPathAndQuery, setInitializationStrategy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Logger logger
protected static final List<String> TAXONDESCRIPTION_INIT_STRATEGY
protected static final List<String> DESCRIPTION_ELEMENT_INIT_STRATEGY
protected static final List<String> TAXONDESCRIPTION_MEDIA_INIT_STRATEGY
protected static final List<String> TAXONNODE_WITHTAXON_INIT_STRATEGY
protected static final List<String> TAXONNODE_INIT_STRATEGY
| Constructor Detail |
|---|
public TaxonPortalController()
| Method Detail |
|---|
@Autowired public void setService(ITaxonService service)
setService in class AbstractController<TaxonBase,ITaxonService>@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
initBinder in class BaseController<TaxonBase,ITaxonService>
@RequestMapping(method=GET,
value="/portal/taxon/find")
public Pager<IdentifiableEntity> doFind(@RequestParam(value="query",required=false)
String query,
@RequestParam(value="tree",required=false)
UUID treeUuid,
@RequestParam(value="area",required=false)
Set<NamedArea> areas,
@RequestParam(value="pageNumber",required=false)
Integer pageNumber,
@RequestParam(value="pageSize",required=false)
Integer pageSize,
@RequestParam(value="doTaxa",required=false)
Boolean doTaxa,
@RequestParam(value="doSynonyms",required=false)
Boolean doSynonyms,
@RequestParam(value="doMisappliedNames",required=false)
Boolean doMisappliedNames,
@RequestParam(value="doTaxaByCommonNames",required=false)
Boolean doTaxaByCommonNames,
@RequestParam(value="matchMode",required=false)
MatchMode matchMode,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
URI: /{datasource-name}/portal/taxon/find
query - the string to query for. Since the wildcard character '*'
internally always is appended to the query string, a search
always compares the query string with the beginning of a name.
- required parametertreeUuid - the UUID of a Classification to which the
search is to be restricted. - optional parameterareas - restrict the search to a set of geographic NamedAreas.
The parameter currently takes a list of TDWG area labels.
- optional parameterpageNumber - the number of the page to be returned, the first page has the
pageNumber = 1 - optional parameterpageSize - the maximum number of entities returned per page (can be -1
to return all entities in a single page) - optional parameterdoTaxa - weather to search for instances of Taxon - optional parameterdoSynonyms - weather to search for instances of Synonym - optional parameterdoTaxaByCommonNames - for instances of Taxon by a common name used - optional parametermatchMode - valid values are "EXACT", "BEGINNING", "ANYWHERE", "END" (case sensitive !!!)
IdentifiableEntitys initialized by
the following strategy SIMPLE_TAXON_INIT_STRATEGY
IOException
@RequestMapping(method=GET,
value="/portal/taxon/findByDescriptionElementFullText")
public Pager<SearchResult<TaxonBase>> dofindByDescriptionElementFullText(@RequestParam(value="clazz",required=false)
Class clazz,
@RequestParam(value="query",required=true)
String queryString,
@RequestParam(value="tree",required=false)
UUID treeUuid,
@RequestParam(value="features",required=false)
UuidList featureUuids,
@RequestParam(value="languages",required=false)
List<Language> languages,
@RequestParam(value="hl",required=false)
Boolean highlighting,
@RequestParam(value="pageNumber",required=false)
Integer pageNumber,
@RequestParam(value="pageSize",required=false)
Integer pageSize,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
org.apache.lucene.queryParser.ParseException
clazz - queryString - treeUuid - languages - features - one or more feature uuidspageNumber - pageSize - request - response -
IOException
org.apache.lucene.queryParser.ParseException
@RequestMapping(value="synonymy",
method=GET)
public org.springframework.web.servlet.ModelAndView doGetSynonymy(@PathVariable(value="uuid")
UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
{taxon-uuid}.
The synonymy consists
of two parts: The group of homotypic synonyms of the taxon and the
heterotypic synonymy groups of the taxon. The synonymy is ordered
historically by the type designations and by the publication date of the
nomenclatural reference
URI: /{datasource-name}/portal/taxon/{taxon-uuid}/synonymy
request - response -
Synonyms which are initialized using the
following initialization strategy: SYNONYMY_INIT_STRATEGY
IOException
@RequestMapping(value="accepted/{classification_uuid}",
method=GET)
public Set<TaxonBase> getAccepted(@PathVariable(value="uuid")
UUID uuid,
@PathVariable(value="classification_uuid")
UUID classification_uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
Taxon entities for a given
TaxonBase entity identified by the {taxon-uuid}.
URI: /{datasource-name}/portal/taxon/{taxon-uuid}/accepted
request - response -
Taxon entities which are initialized
using the following initialization strategy:
SYNONYMY_INIT_STRATEGY
IOException
@RequestMapping(value="taxonRelationships",
method=GET)
public List<TaxonRelationship> doGetTaxonRelations(@PathVariable(value="uuid")
UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
TaxonRelationships for the given
TaxonBase instance identified by the {taxon-uuid}.
URI: /{datasource-name}/portal/taxon/{taxon-uuid}/taxonRelationships
request - response -
TaxonRelationship entities which are initialized
using the following initialization strategy:
TAXONRELATIONSHIP_INIT_STRATEGY
IOException
@RequestMapping(value="toNameRelationships",
method=GET)
public List<NameRelationship> doGetToNameRelations(@PathVariable(value="uuid")
UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
NameRelationships of the Name associated with the
TaxonBase instance identified by the {taxon-uuid}.
URI: /{datasource-name}/portal/taxon/{taxon-uuid}/nameRelationships
request - response -
NameRelationship entities which are initialized
using the following initialization strategy:
NAMERELATIONSHIP_INIT_STRATEGY
IOException
@RequestMapping(value="fromNameRelationships",
method=GET)
public List<NameRelationship> doGetFromNameRelations(@PathVariable(value="uuid")
UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
NameRelationships of the Name associated with the
TaxonBase instance identified by the {taxon-uuid}.
URI: /{datasource-name}/portal/taxon/{taxon-uuid}/nameRelationships
request - response -
NameRelationship entities which are initialized
using the following initialization strategy:
NAMERELATIONSHIP_INIT_STRATEGY
IOException
@Deprecated
@RequestMapping(value="nameTypeDesignations",
method=GET)
public List<TypeDesignationBase> doGetNameTypeDesignations(@PathVariable(value="uuid")
UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
TypeDesignationBases of the
TaxonBase instance identified by the {taxon-uuid}.
URI: /{datasource-name}/portal/taxon/{taxon-uuid}/nameTypeDesignations
request - response -
TypeDesignationBase entities which are initialized
using the following initialization strategy:
TYPEDESIGNATION_INIT_STRATEGY
IOException
@RequestMapping(value="taxonNodes",
method=GET)
public Set<TaxonNode> doGetTaxonNodes(@PathVariable(value="uuid")
UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
IOException
@RequestMapping(value="descriptions",
method=GET)
public List<TaxonDescription> doGetDescriptions(@PathVariable(value="uuid")
UUID uuid,
@RequestParam(value="markerTypes",required=false)
UuidList markerTypeUUIDs,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
TaxonDescriptions of the
Taxon instance identified by the {taxon-uuid}.
URI: /{datasource-name}/portal/taxon/{taxon-uuid}/descriptions
request - response -
TaxonDescription entities which are initialized
using the following initialization strategy:
TAXONDESCRIPTION_INIT_STRATEGY
IOException
@RequestMapping(value="useDescriptions",
method=GET)
public List<TaxonDescription> doGetUseDescriptions(@PathVariable(value="uuid")
UUID uuid,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
IOException
@RequestMapping(value="descriptions/elementsByType/{classSimpleName}",
method=GET)
public org.springframework.web.servlet.ModelAndView doGetDescriptionElementsByType(@PathVariable(value="uuid")
UUID uuid,
@PathVariable(value="classSimpleName")
String classSimpleName,
@RequestParam(value="markerTypes",required=false)
UuidList markerTypeUUIDs,
@RequestParam(value="count",required=false,defaultValue="false")
Boolean doCount,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
IOException
@RequestMapping(value="media",
method=GET)
public List<Media> doGetMedia(@PathVariable(value="uuid")
UUID uuid,
@RequestParam(value="type",required=false)
Class<? extends MediaRepresentationPart> type,
@RequestParam(value="mimeTypes",required=false)
String[] mimeTypes,
@RequestParam(value="relationships",required=false)
UuidList relationshipUuids,
@RequestParam(value="relationshipsInvers",required=false)
UuidList relationshipInversUuids,
@RequestParam(value="includeTaxonDescriptions",required=true)
Boolean includeTaxonDescriptions,
@RequestParam(value="includeOccurrences",required=true)
Boolean includeOccurrences,
@RequestParam(value="includeTaxonNameDescriptions",required=true)
Boolean includeTaxonNameDescriptions,
@RequestParam(value="widthOrDuration",required=false)
Integer widthOrDuration,
@RequestParam(value="height",required=false)
Integer height,
@RequestParam(value="size",required=false)
Integer size,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
Media attached to the Taxon instance
identified by the {taxon-uuid}.
Usage /{datasource-name}/portal/taxon/{taxon-
uuid}/media/{mime type
list}/{size}[,[widthOrDuration}][,{height}]/
Whereas
request - response -
Media entities which are initialized
using the following initialization strategy:
TAXONDESCRIPTION_INIT_STRATEGY
IOException
@RequestMapping(value="subtree/media",
method=GET)
public List<Media> doGetSubtreeMedia(@PathVariable(value="uuid")
UUID uuid,
@RequestParam(value="type",required=false)
Class<? extends MediaRepresentationPart> type,
@RequestParam(value="mimeTypes",required=false)
String[] mimeTypes,
@RequestParam(value="relationships",required=false)
UuidList relationshipUuids,
@RequestParam(value="relationshipsInvers",required=false)
UuidList relationshipInversUuids,
@RequestParam(value="includeTaxonDescriptions",required=true)
Boolean includeTaxonDescriptions,
@RequestParam(value="includeOccurrences",required=true)
Boolean includeOccurrences,
@RequestParam(value="includeTaxonNameDescriptions",required=true)
Boolean includeTaxonNameDescriptions,
@RequestParam(value="widthOrDuration",required=false)
Integer widthOrDuration,
@RequestParam(value="height",required=false)
Integer height,
@RequestParam(value="size",required=false)
Integer size,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||