Project

General

Profile

CdmRestServices2 » History » Version 53

Andreas Kohlbecker, 03/12/2010 10:03 AM

1 1 Andreas Kohlbecker
{{>toc}}
2
3
4
5 41 Andreas Kohlbecker
_Developers implementation notes are found in [[CdmRestServicesImplementationNotes]]._
6 1 Andreas Kohlbecker
7
8 36 Andreas Kohlbecker
9
----
10
11
12
13 2 Andreas Kohlbecker
# CDM REST Services 2.0
14 1 Andreas Kohlbecker
15
16 52 Ben Clark
The CDM REST Services are a web based interface to resources stored in a [[CommunityServer|CDM Community Server]]. The RESTful architecture allows accessing the various resources like Taxa, Names, References, Media, etc by stable URIs. Due to security constraints and to assure the integration of data, currently only read operations (= HTTP GET) are permitted, [[CdmServerReadWriteRest|write operations]] will be available in the near future.
17 1 Andreas Kohlbecker
18 3 Andreas Kohlbecker
19 16 Andreas Kohlbecker
In contrast to the former [[CdmRestServices1|CDM REST Services 1.0]] the new architecture directly exposes domain model entities. Whereas the version 1.0 still was build using the  [DTO/Assembler pattern](http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html)  the new implementation provides direct serializations of the objects as they are stored in the CDM where ever possible. For the external representations, like LSIDs and TDWG data exchange schema like TCS however using DTOs is unavoidable. Now for the **API Service** there is no longer a difference between the data model used to store and manage CDM objects and another one used to transfer them to web based clients. Thereby it has become much easier to use the web service. The same account also for the **Portal Service** except that this service adds some fields like localized representations and to the pure CDM entities.
20 3 Andreas Kohlbecker
21 1 Andreas Kohlbecker
22
23 16 Andreas Kohlbecker
## Service Sections
24 1 Andreas Kohlbecker
25 16 Andreas Kohlbecker
26
The CDM REST Services architecture is functionally separated into tree different parts:
27
28
29 18 Andreas Kohlbecker
* The **API Service** a clean RESTful bit, which will expose data in a modular, normalized way. It is a more-or-less one-to-one concordance between URIs and service api methods.
30 16 Andreas Kohlbecker
31 18 Andreas Kohlbecker
* The **Portal Service** which is specially taliored for the needs of dataportals which will primarily display "Species Page". Thus this service will be provide denormalized pages which contain a specific assemblys of information. 
32 1 Andreas Kohlbecker
33 19 Andreas Kohlbecker
* The **External Service** services supporting non CDM applications and services like for example a map generation service, LSID Services.
34 18 Andreas Kohlbecker
35 16 Andreas Kohlbecker
 
36 17 Andreas Kohlbecker
Detailed descriptions of the services are available [[CdmRestServices2#ServiceDescriptions|below]].
37 16 Andreas Kohlbecker
38
39
40 1 Andreas Kohlbecker
## Object Boundaries
41 14 Andreas Kohlbecker
42 1 Andreas Kohlbecker
43 16 Andreas Kohlbecker
Nearly all CDM entities are related to each other more or less dicrectly or indirectly and thus forming a huge object graph. A web services however should only deliver a specific object perhaps with some attached associated objects, so it id crucial to draw the line quite sensible between the objects in question and the full object graph. The CDM Service solves this by selectively initializing CDM entities.
44 1 Andreas Kohlbecker
45
46 27 Andreas Kohlbecker
The primary idea is that the **API Service** delivers the requested object with all its *toOne relations. Associated objects of the requested object which are at the many side of the *toMany relations are available through URIs which map the fieldname of the *toMany relation. Transient fields are not serialized. 
47 14 Andreas Kohlbecker
48 18 Andreas Kohlbecker
49 1 Andreas Kohlbecker
In contrast the *Portal Service*, often adds *toMany relations and transient fields to the requested objects. It even may deliver sub object graphs with a depth to about ten levels for specific branches.
50 19 Andreas Kohlbecker
51
52 26 Andreas Kohlbecker
The extend of objects, i.e the initialization depth of CDM entities is documented in the [[CdmRestServices2#ServiceDescriptions|ServiceDescriptions]] below. The extend is explained using a _property path syntax_ which indicates the properties and transient getters of a specific CDM entity bean which are being initialized by the service. 
53 16 Andreas Kohlbecker
54 1 Andreas Kohlbecker
55 20 Andreas Kohlbecker
* Simple (name) - The specified name identifies an individual property of a particular CDM entity bean. The name of the actual getter method is determined using standard JavaBeans instrospection, so that a property named "xyz" will have a getter method named getXyz() or (for boolean properties only) isXyz(), and a setter method named setXyz().
56 1 Andreas Kohlbecker
57 20 Andreas Kohlbecker
* Nested (name1.name2.name3) The first name element is used to select a property getter, as for simple references above. The object returned for this property is then consulted, using the same approach, for a property getter for a property named name2, and so on. The property value that is ultimately retrieved or modified is the one identified by the last name element.
58 1 Andreas Kohlbecker
59 20 Andreas Kohlbecker
* Indexed (name[index]) - The underlying property value is assumed to be an array, or this JavaBean is assumed to have indexed property getter and setter methods. The appropriate (zero-relative) entry in the array is selected. List objects are now also supported for read/write. You simply need to define a getter that returns the List
60
61 22 Andreas Kohlbecker
* *toOne-Wildcard ($) This wildcard is used to select all property getters which reference to one associated bean. A wildcard subsequently terminates a 'property path'.
62 20 Andreas Kohlbecker
63 22 Andreas Kohlbecker
* *toAny-Wildcard (*) This wildcard is used to select all property getters which reference to one associated bean and to to many associated bean. A wildcard subsequently terminates a 'property path'.
64 1 Andreas Kohlbecker
65 23 Andreas Kohlbecker
* Combined (name1.name2[index].$) - Combining mapped, nested, and indexed and wildcard references is also supported.
66
67 1 Andreas Kohlbecker
	
68 26 Andreas Kohlbecker
~This syntax description partially is lend from  [Apache Commons BeanUtils](http://commons.apache.org/beanutils/commons-beanutils-1.7.0/docs/api/org/apache/commons/beanutils/PropertyUtilsBean.html) ~
69
70
71 27 Andreas Kohlbecker
In fact the actual extend of serialized CDM entities may exceed the extend indicated by the property path syntax. This especially happens when a transient getter is to be initialized. Due to potential internal logic in the transient getter it is unpredictable which properties actually are being initialized when only looking at the property path. A common candidate for this is the `getTaggedName()` property of source:"trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TaxonNameBase.java".
72 26 Andreas Kohlbecker
73 1 Andreas Kohlbecker
74
75 24 Andreas Kohlbecker
*Developer Hints*:
76 20 Andreas Kohlbecker
77 22 Andreas Kohlbecker
78 53 Andreas Kohlbecker
The initialization od CDM entities is performed by implementations of the  source:"trunk/cdmlib/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/BeanInitializer.java" Interface. In order to find out more on this topic please refer to [[CdmEntityInitalization]].
79 20 Andreas Kohlbecker
80
81
82
83 49 Andreas Kohlbecker
## Localization
84 6 Andreas Kohlbecker
85
86 49 Andreas Kohlbecker
I order to provide the client with localized resources some services respect the  [Accept-Language HTTP header](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) #sec14.4.
87 1 Andreas Kohlbecker
88 49 Andreas Kohlbecker
For example the Portal service returns localized representations according to the Language tags supplied in the  Accept-Language HTTP header. 
89 6 Andreas Kohlbecker
90 49 Andreas Kohlbecker
The service tries finding the best matching representation. If no representation in any preferred language is found the service falls back to return the representation in source:"trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Language.java#L126" and if necessary further falls back to return the first representation found if any exists.
91 9 Andreas Kohlbecker
92 1 Andreas Kohlbecker
93 49 Andreas Kohlbecker
Instances of the folowing CDM classes or subclasses of them potentially have multiple internationalized representations in different languages:
94 1 Andreas Kohlbecker
95
96 50 Andreas Kohlbecker
* **source:"trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TermBase.java"** - language dependent representation through source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/model/common/Representation.java"; The localized reresentation string is added to the TermBase entities by adding the aaditional field: *representation_L10n*.
97 1 Andreas Kohlbecker
98 51 Andreas Kohlbecker
* **source:"trunk/cdmlib/cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/TextData.java"** - language dependent representation through source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/model/common/MultilanguageText.java"; The localized multilanguage text string is added to the TextData entities by adding the aaditional field: *multilanguageText_L10n*.
99 49 Andreas Kohlbecker
100
101
Localization is handeled a bit differently by various service sections the **API Service** just adds the localized representations. The **Portal Service** which focuses in representation, not only adds the localized representations but also hides the source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/model/common/Representation.java" or source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/model/common/MultilanguageText.java" fields from serialization in order to reduce complexity and to improve performance.
102
103
104 1 Andreas Kohlbecker
 **Developer Hints** 
105 7 Andreas Kohlbecker
106 1 Andreas Kohlbecker
107 11 Andreas Kohlbecker
108 49 Andreas Kohlbecker
Classes involved in Content Localization:
109 9 Andreas Kohlbecker
110 1 Andreas Kohlbecker
111 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/interceptor/LocaleContextHandlerInterceptor.java"
112
113 1 Andreas Kohlbecker
Configuration in: 
114
115 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/webapp/WEB-INF/jsonConfigurations.xml"
116 1 Andreas Kohlbecker
117 49 Andreas Kohlbecker
 
118 1 Andreas Kohlbecker
119 49 Andreas Kohlbecker
## Content Negotiation
120 20 Andreas Kohlbecker
121 12 Andreas Kohlbecker
122 49 Andreas Kohlbecker
There are two ways to demand a special content type:
123 12 Andreas Kohlbecker
124 11 Andreas Kohlbecker
125 49 Andreas Kohlbecker
1. by file extension (*.json or *.xml)
126 1 Andreas Kohlbecker
127 49 Andreas Kohlbecker
1. by  [Accept HTTP request header](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) #sec14.1 - Accepted mime types are: `application/json@, @text/xml`    
128 1 Andreas Kohlbecker
129 49 Andreas Kohlbecker
1. Default: XML
130 12 Andreas Kohlbecker
131
132 49 Andreas Kohlbecker
The [[CdmRestServices2|CDM REST Services 2.0]] primarily trys using the file extension, then the Accept HTTP request header is taken into account. If whether the file extension or not the  Accept HTTP request header specify valid content types the default XML will be used. 
133 9 Andreas Kohlbecker
134
135
 **Developer Hints** 
136 6 Andreas Kohlbecker
137
138
Classes involved in Content Negotiation:
139
140
141 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/interceptor/ContentNegociationHandlerInterceptor.java"
142 3 Andreas Kohlbecker
143 1 Andreas Kohlbecker
Configuration in: 
144
145 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/webapp/WEB-INF/cdmrest-servlet.xml#L24"
146 1 Andreas Kohlbecker
147 10 Andreas Kohlbecker
148 1 Andreas Kohlbecker
149 14 Andreas Kohlbecker
## Character Encoding
150 1 Andreas Kohlbecker
151 14 Andreas Kohlbecker
152 10 Andreas Kohlbecker
All data is returned in UTF-8 character encoding.
153 14 Andreas Kohlbecker
154 10 Andreas Kohlbecker
155 16 Andreas Kohlbecker
156 1 Andreas Kohlbecker
## Service Descriptions
157
158
159 36 Andreas Kohlbecker
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. By default the "datasources.xml" in @ {USER_HOME}./cdmLibrary @ is being used (for details please refer to [[WebserviceDeployment]]). If the UpdatableRoutingDataSource is not being used in the actual application context, any arbitrary {datasource-name} may be used.
160 28 Andreas Kohlbecker
161
162 25 Andreas Kohlbecker
163 1 Andreas Kohlbecker
### API Service
164
165
166 36 Andreas Kohlbecker
The are a clean RESTful webservice, which will expose data in a modular, normalized way. 
167 1 Andreas Kohlbecker
168 36 Andreas Kohlbecker
It is a more-or-less one-to-one concordance between URIs and service api methods. 
169 1 Andreas Kohlbecker
170 36 Andreas Kohlbecker
Due to its generic architecture the URIs are also generic and follow a common pattern which is repeated in each controller. 
171 1 Andreas Kohlbecker
172 39 Andreas Kohlbecker
In the following the generic URIs are documented first followed by type specific implementations. The pathelement {base-type} is frequently used in generid URIs.
173 1 Andreas Kohlbecker
174
175 38 Andreas Kohlbecker
_Valid Values for {base-type} are_:
176
177
178 36 Andreas Kohlbecker
* *agent*: Service URIs returning AgentBase or sub type entities.
179 1 Andreas Kohlbecker
180 36 Andreas Kohlbecker
* *description*: Service URIs returning DescriptionBase or sub type entities. 
181 1 Andreas Kohlbecker
182 36 Andreas Kohlbecker
* *feature*: Service URIs returning DescriptionBase or sub type entities
183 1 Andreas Kohlbecker
184 36 Andreas Kohlbecker
* *media*: Service URIs returning Media or sub type entities
185 1 Andreas Kohlbecker
186 36 Andreas Kohlbecker
* *name*: Service URIs returning TaxonNameBase or sub type entities
187 1 Andreas Kohlbecker
188 36 Andreas Kohlbecker
* *occurrence*: Service URIs returning SpecimenOrObservationBase or sub type entities
189
190
* *reference*: Service URIs returning ReferenceBase or sub type entities
191
192
* *taxon*: Service URIs returning TaxonBase or sub type entities
193
194
* *term*: Service URIs returning DefinedTermBase or sub type entities
195
196
197
Most services are using the **default initialisation strategy** which is:
198
199
~~~
200
"$"
201
~~~
202
203
204
#### /{datasource-name}/{base-type}/
205
206
207
Depending on the URI parameters used, this service returns either a Pager on or a List of the {base-type} entities identified by the {uuid}. 
208
209 40 Andreas Kohlbecker
The returned {base-type} instances are initialized by the _default initialisation strategy_. 
210 1 Andreas Kohlbecker
211 37 Andreas Kohlbecker
212 38 Andreas Kohlbecker
_URI Parameters to return a Pager_:
213 36 Andreas Kohlbecker
214 38 Andreas Kohlbecker
215 37 Andreas Kohlbecker
* _pageNumber_ the number of the page to be returned, the first page has the pageNumber = 1 - _optional parameter_ 
216
217 36 Andreas Kohlbecker
* _pageSize_ the maximum number of entities returned per page (can be null to return all entities in a single page) - _optional parameter_ 
218 37 Andreas Kohlbecker
219 40 Andreas Kohlbecker
* _type_  Further restricts the type of entities to be returned. If null the type mapped by {base-type} is being used. - _optional parameter_ 
220 36 Andreas Kohlbecker
221
222 38 Andreas Kohlbecker
_URI Parameters to return a List_:
223 36 Andreas Kohlbecker
224
225 41 Andreas Kohlbecker
* _start_ The offset index from the start of the list. The first entity has the index = 0 - _required parameter_ **The start parameter is used to distinguish between the List and Pager variants! ** 
226 36 Andreas Kohlbecker
227 37 Andreas Kohlbecker
* _limit_ The maximum number of entities returned. - _optional parameter_ 
228 36 Andreas Kohlbecker
229 40 Andreas Kohlbecker
* _type_ Further restricts the type of entities to return. If null the type mapped by {base-type} is being used. - _optional parameter_ 
230 36 Andreas Kohlbecker
231
232
233
#### /{datasource-name}/{base-type}/name/{uuid}
234
235
236
Get the {base-type} entity identified by the {uuid}. 
237
238
239
_Returns:_
240
241
242 40 Andreas Kohlbecker
The returned {base-type} entity is initialized by the _default initialisation strategy_. 
243 36 Andreas Kohlbecker
244
245
246
####  /{datasource-name}/{base-type}/name/{uuid}/annotation
247
248
249
Get the a Pager on the Annotations for the {base-type} entity identified by the {uuid}. 
250
251
252
_Returns:_
253
254
255
Pager on the Annotations for the {base-type} entity identified by the {uuid}. 
256
257 40 Andreas Kohlbecker
The returned {base-type} entity are initialized by the _default initialisation strategy_. 
258 1 Andreas Kohlbecker
259
260
261 44 Andreas Kohlbecker
----
262
263
264
265 43 Andreas Kohlbecker
#### /{datasource-name}/name/{name-uuid}/typeDesignations
266
267
268
Get the list of TypeDesignationBases of the TaxonNameBase instance identified by the {name-uuid}. 
269
270
271
 _Returns:_
272
273
274
a List of TypeDesignationBase entities which are initialized using the following initialization strategy: 
275
276
277
~~~
278
"$",
279
"citation.authorTeam",
280
"typifiedNames.taggedName"
281
~~~
282
283
284 42 Andreas Kohlbecker
#### /{datasource-name}/taxon/{taxon-uuid}/accepted
285
286
287
Get the set of accepted Taxon entities for a given {@link TaxonBase} entity identified by the <code>{taxon-uuid}</code>.
288
289
290
 _Returns:_
291
292 1 Andreas Kohlbecker
293 43 Andreas Kohlbecker
a set of Taxon entities which are initialized using the _default initialisation strategy_..
294 42 Andreas Kohlbecker
295
296
297 25 Andreas Kohlbecker
### Portal Service
298 28 Andreas Kohlbecker
299
300
301 35 Andreas Kohlbecker
#### /{datasource-name}/portal/name/{name-uuid}
302 28 Andreas Kohlbecker
303 35 Andreas Kohlbecker
304
The TaxonNameBase instance identified by the {name-uuid}. 
305
306
The returned TaxonNameBase is initialized by the following strategy 
307
308
309
~~~
310
~~~
311
312
313
#### /{datasource-name}/portal/name/{name-uuid}/descriptions
314
315
316
Get the list of TaxonNameDescriptions of the Name associated with the TaxonNameBase instance identified by the {name-uuid}.
317
318
319
_Returns:_
320
321
322
a List of TaxonNameDescription entities which are initialized using the following initialization strategy:
323
324
325
~~~
326
"uuid",
327
"feature",
328
"elements.$",
329
"elements.multilanguageText",
330
"elements.media.representations.parts"
331
~~~
332
333
334
#### /{datasource-name}/portal/name/{name-uuid}/typeDesignations
335
336
337
Get the list of TypeDesignationBases of the TaxonNameBase instance identified by the {name-uuid}. 
338
339
340
_Returns:_
341
342
343
a List of TypeDesignationBase entities which are initialized using the following initialization strategy:
344
345
346
~~~
347
"citation.authorTeam",
348
"typeName.$",
349
"typeName.taggedName",
350
"typeStatus.representations",
351
"typeSpecimen.media.representations.parts"
352
~~~
353
354
355
356
#### /{datasource-name}/portal/taxon/{taxon-uuid}
357
358
359
Get the TaxonBase instance identified by the {taxon-uuid}. 
360
361
The returned Taxon is initialized by the following strategy TAXON_INIT_STRATEGY 
362
363
 
364
~~~
365
"*",
366
"relationsToThisName.fromTaxon.name.taggedName",
367
"name.$",
368
"name.taggedName",
369
"name.rank.representations",
370
"name.status.type.representations",
371
"descriptions.elements.$",
372
"descriptions.elements.area",
373
"descriptions.elements.area.$",
374
"descriptions.elements.multilanguageText",
375
"descriptions.elements.media.representations.parts",
376
~~~
377
378
379 28 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/find
380
381
382
Find Taxa, Synonyms, Common Names by name, either globally or in a specific geographic area. 
383
384
385 29 Andreas Kohlbecker
_URI Parameters:_
386 1 Andreas Kohlbecker
387 29 Andreas Kohlbecker
388 33 Andreas Kohlbecker
* **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 parameter_
389 28 Andreas Kohlbecker
390 33 Andreas Kohlbecker
* **treeUuid** the UUID of a TaxonomicTree to which the search is to be restricted. - _optional parameter_
391 28 Andreas Kohlbecker
392 33 Andreas Kohlbecker
* **areas** restrict the search to a set of geographic NamedAreas. The parameter currently takes a list of TDWG area labels.  - _optional parameter_
393 28 Andreas Kohlbecker
394 33 Andreas Kohlbecker
* **page** the number of the page to be returned, the first page has the pageNumber = 1 - _optional parameter_
395 28 Andreas Kohlbecker
396 33 Andreas Kohlbecker
* **pageSize** the maximum number of entities returned per page (can be null to return all entities in a single page) - _optional parameter_
397 28 Andreas Kohlbecker
398 33 Andreas Kohlbecker
* **doTaxa** weather to search for instances of Taxon - _optional parameter_
399 28 Andreas Kohlbecker
400 33 Andreas Kohlbecker
* **doSynonyms** weather to search for instances of Synonym - _optional parameter_
401 28 Andreas Kohlbecker
402 33 Andreas Kohlbecker
* **doTaxaByCommonNames** for instances of Taxon by a common name used - _optional parameter_
403 28 Andreas Kohlbecker
404
 
405
_Returns:_
406
407
408
a pager on a list of IdentifiableEntitys initialized by the following strategy:
409
410
411
~~~
412
"*",
413
"relationsToThisName.fromTaxon.name.taggedName",
414
"name.$",
415
"name.taggedName",
416
"name.rank.representations",
417
"name.status.type.representations"
418
~~~
419 25 Andreas Kohlbecker
420
421 31 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/synonymy
422
423
424
Get the synonymy for a taxon identified by the {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 
425
426
427
_Returns:_
428
429
430
a Map with to entries which are mapped by the following keys: "homotypicSynonymsByHomotypicGroup", "heterotypicSynonymyGroups", containing lists of Synonyms which are initialized using the following initialization strategy:
431
432
433
~~~
434 32 Andreas Kohlbecker
"synonymRelations.$",
435
"synonymRelations.synonym.$",
436
"synonymRelations.synonym.name.taggedName",
437
"synonymRelations.synonym.name.nomenclaturalReference.inBook.authorTeam",
438
"synonymRelations.synonym.name.nomenclaturalReference.inJournal",
439
"synonymRelations.synonym.name.nomenclaturalReference.inProceedings",
440
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.$",
441
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.name.taggedName",
442
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.$",
443
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName",
444
445
"name.homotypicalGroup.$",
446
"name.homotypicalGroup.typifiedNames.$",
447
"name.homotypicalGroup.typifiedNames.name.taggedName",
448
449
"name.homotypicalGroup.typifiedNames.taxonBases.$",
450
"name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName"
451
~~~
452
453 1 Andreas Kohlbecker
454 32 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/accepted
455
456 1 Andreas Kohlbecker
457 42 Andreas Kohlbecker
Get the set of accepted Taxon entities for a given {@link TaxonBase} entity identified by the <code>{taxon-uuid}</code>.
458 32 Andreas Kohlbecker
459
460
 _Returns:_
461
462
463 42 Andreas Kohlbecker
a Set of Taxon entities which are initialized using the following initialization strategy:
464 32 Andreas Kohlbecker
465
466
~~~
467
"synonymRelations.$",
468
"synonymRelations.synonym.$",
469
"synonymRelations.synonym.name.taggedName",
470
"synonymRelations.synonym.name.nomenclaturalReference.inBook.authorTeam",
471
"synonymRelations.synonym.name.nomenclaturalReference.inJournal",
472
"synonymRelations.synonym.name.nomenclaturalReference.inProceedings",
473
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.$",
474
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.name.taggedName",
475
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.$",
476
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName",
477
478
"name.homotypicalGroup.$",
479
"name.homotypicalGroup.typifiedNames.$",
480
"name.homotypicalGroup.typifiedNames.name.taggedName",
481
482
"name.homotypicalGroup.typifiedNames.taxonBases.$",
483
"name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName"
484
~~~
485
486
487
####  /{datasource-name}/portal/taxon/{taxon-uuid}/taxonRelationships
488
489
490
Get the list of TaxonRelationships for the given TaxonBase instance identified by the {taxon-uuid}. 
491
492
493
_Returns:_
494
495
496
a List of TaxonRelationship entities which are initialized using the following initialization strategy:
497
498
499
~~~
500
"$",
501
"type.inverseRepresentations",
502
"fromTaxon.sec.authorTeam",
503
"fromTaxon.name.taggedName"
504
~~~
505
506
507
#### /{datasource-name}/portal/taxon/{taxon-uuid}/nameRelationships
508
509
510
Get the list of NameRelationships of the Name associated with the TaxonBase instance identified by the {taxon-uuid}. 
511
512
513
_Returns:_
514
515
516
a List of NameRelationship entities which are initialized using the following initialization strategy:
517
518
519
~~~
520
"$",
521
"type.inverseRepresentations",
522
"fromName.taggedName"
523
~~~
524
525
526
#### /{datasource-name}/portal/taxon/{taxon-uuid}/nameTypeDesignations
527
528
529
Get the list of TypeDesignationBases of the TaxonBase instance identified by the {taxon-uuid}. 
530
531
532
_Returns:_
533
534
535
a List of TypeDesignationBase entities which are initialized using the following initialization strategy:
536
537
:
538
539
540
~~~
541
"typeSpecimen.$",
542
"typeStatus.representations",
543
"citation.authorTeam",
544
"typeName.taggedName"
545
~~~
546
547 1 Andreas Kohlbecker
548 32 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/descriptions
549
550
551
Get the list of TaxonDescriptions of the Taxon instance identified by the {taxon-uuid}. 
552
553
554 1 Andreas Kohlbecker
_Returns:_
555 32 Andreas Kohlbecker
556
557
a List of TaxonDescription entities which are initialized using the following initialization strategy:
558
559
560
~~~
561
"$",
562
"elements.$",
563
"elements.citation.authorTeam",
564
"elements.multilanguageText",
565
"elements.media.representations.parts"
566
~~~
567
568
569 48 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/media/{mime type list}/{size}[,[widthOrDuration}][,{height}]/ 
570 32 Andreas Kohlbecker
571
572
Get the list of TaxonDescriptions of the Taxon instance identified by the {taxon-uuid}. 
573
574
575
_Usage:_
576
577 48 Andreas Kohlbecker
 /{datasource-name}/portal/taxon/{taxon-uuid}/media/{mime type list}/{size}[,[widthOrDuration}][,{height}]/ 
578 32 Andreas Kohlbecker
579
 
580
_Whereas_ 
581
582
* *{mime type list}*: a comma separated list of mime types, in the order of preference. The forward slashes contained in the mime types must be replaced by a colon. Regular expressions can be used. Each media associated with this given taxon is being searched whereas the first matching mime type matching a representation always rules. 
583
584
* *{size}*,*{widthOrDuration}*,*{height}*: (not jet implemented) valid values are an integer or the asterisk '*' as a wildcard 
585
586
587
_Returns:_
588
589
590
a List of Media entities which are initialized using the following initialization strategy:
591
592
593
~~~
594
"$",
595
"elements.$",
596
"elements.citation.authorTeam",
597
"elements.multilanguageText",
598
"elements.media.representations.parts"
599 31 Andreas Kohlbecker
~~~
600 1 Andreas Kohlbecker
601
602 46 Andreas Kohlbecker
#### /{datasource-name}/portal/taxontree
603 41 Andreas Kohlbecker
604
605
Lists all available TaxonomicTrees. 
606
607
608
_Returns:_
609
610
611
A list of TaxonomicTrees initialized by the following initialization strategy:
612
613
614
~~~
615
"reference.authorTeam.titleCache"
616
~~~
617
618
619 46 Andreas Kohlbecker
#### /{datasource-name}/portal/taxontree/{tree-uuid},{rank-uuid}
620 41 Andreas Kohlbecker
621
622
Lists all TaxonNodes of the specified TaxonomicTree for a given Rank. If a branch does not contain a TaxonNode with a TaxonName at the given Rank the node associated with the next lower Rank is taken as root node. If the rank is null the absolute root nodes will be returned. 
623
624
625
_URI elements_: 
626
627
* _{tree-uuid}_ identifies the TaxonomicTree by its UUID. 
628
629
* _{rank-uuid}_ identifies the Rank by its UUID. May be left out. 
630
631
632
_Returns:_
633
634
635
A List of TaxonNode entities initialized by the following initialization strategy:
636
637
638
~~~
639
"taxon.sec", 
640
"taxon.name.taggedName"
641
~~~
642
643
644 46 Andreas Kohlbecker
####  /{datasource-name}/portal/taxontree/{tree-uuid},{rank- uuid}/{taxon-uuid}
645 41 Andreas Kohlbecker
646
647
Lists all child-TaxonNodes of the specified Taxon in the TaxonomicTree. The a given Rank is ignored in this method but for consistency reasons it has been allowed to included it into the URI. 
648
649
650
_URI elements_: 
651
652
* _{tree-uuid}_ identifies the TaxonomicTree by its UUID. 
653
654
* _{rank-uuid}_ identifies the Rank by its UUID. May be left out. 
655
656
* _{taxon-uuid}_ identifies the Taxon by its UUID. - _required_. 
657
658
659
_Returns:_
660
661
662
A List of TaxonNode entities initialized by the following initialization strategy:
663
664
665
~~~
666
"taxon.sec", 
667
"taxon.name.taggedName"
668
~~~
669
670
671 46 Andreas Kohlbecker
####  /{datasource-name}/portal/taxontree/{tree-uuid},{rank-uuid}/{taxon-uuid}/path
672 41 Andreas Kohlbecker
673
674
Provides path of TaxonNodes from the base node to the node of the specified taxon. 
675
676
677
_URI elements_: 
678
679
* _{tree-uuid}_ identifies the TaxonomicTree by its UUID. 
680
681
* _{rank-uuid}_ identifies the Rank by its UUID. May be left out. 
682
683
* _{taxon-uuid}_ identifies the Taxon by its UUID. - _required_. 
684
685
686
_Returns:_
687
688
689
A List of TaxonNode entities initialized by the following initialization strategy:
690
691
692
~~~
693
"taxon.sec", 
694
"taxon.name.taggedName"
695
~~~
696
697
698 1 Andreas Kohlbecker
### External Service
699 41 Andreas Kohlbecker
700
701
702
#### /{datasource-name}/geo/map/distribution/{taxon-uuid}
703
704
705
Assembles and returns URI parameter Strings for the EDIT Map Service. 
706
707
The distribution areas for the Taxon instance identified by the {taxon-uuid} are found and are translated into an valid URI parameter String. 
708
709
Higher level distribiution areas are expanded in order to include all nested sub-areas.