Project

General

Profile

CdmRestServices2 » History » Version 55

Niels Hoffmann, 06/14/2010 01:14 PM

1 1 Andreas Kohlbecker
2
3
4 54 Niels Hoffmann
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 1 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 54 Niels Hoffmann
21
22
{{>toc}}
23
24 3 Andreas Kohlbecker
25 1 Andreas Kohlbecker
26
27 16 Andreas Kohlbecker
## Service Sections
28 1 Andreas Kohlbecker
29 16 Andreas Kohlbecker
30
The CDM REST Services architecture is functionally separated into tree different parts:
31
32
33 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.
34 16 Andreas Kohlbecker
35 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. 
36 1 Andreas Kohlbecker
37 19 Andreas Kohlbecker
* The **External Service** services supporting non CDM applications and services like for example a map generation service, LSID Services.
38 18 Andreas Kohlbecker
39 16 Andreas Kohlbecker
 
40 17 Andreas Kohlbecker
Detailed descriptions of the services are available [[CdmRestServices2#ServiceDescriptions|below]].
41 16 Andreas Kohlbecker
42
43
44 1 Andreas Kohlbecker
## Object Boundaries
45 14 Andreas Kohlbecker
46 1 Andreas Kohlbecker
47 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.
48 1 Andreas Kohlbecker
49
50 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. 
51 14 Andreas Kohlbecker
52 18 Andreas Kohlbecker
53 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.
54 19 Andreas Kohlbecker
55
56 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. 
57 16 Andreas Kohlbecker
58 1 Andreas Kohlbecker
59 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().
60 1 Andreas Kohlbecker
61 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.
62 1 Andreas Kohlbecker
63 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
64
65 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'.
66 20 Andreas Kohlbecker
67 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'.
68 1 Andreas Kohlbecker
69 23 Andreas Kohlbecker
* Combined (name1.name2[index].$) - Combining mapped, nested, and indexed and wildcard references is also supported.
70
71 1 Andreas Kohlbecker
	
72 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) ~
73
74
75 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".
76 26 Andreas Kohlbecker
77 1 Andreas Kohlbecker
78
79 24 Andreas Kohlbecker
*Developer Hints*:
80 20 Andreas Kohlbecker
81 22 Andreas Kohlbecker
82 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]].
83 20 Andreas Kohlbecker
84
85
86
87 49 Andreas Kohlbecker
## Localization
88 6 Andreas Kohlbecker
89
90 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.
91 1 Andreas Kohlbecker
92 49 Andreas Kohlbecker
For example the Portal service returns localized representations according to the Language tags supplied in the  Accept-Language HTTP header. 
93 6 Andreas Kohlbecker
94 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.
95 9 Andreas Kohlbecker
96 1 Andreas Kohlbecker
97 49 Andreas Kohlbecker
Instances of the folowing CDM classes or subclasses of them potentially have multiple internationalized representations in different languages:
98 1 Andreas Kohlbecker
99
100 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*.
101 1 Andreas Kohlbecker
102 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*.
103 49 Andreas Kohlbecker
104
105
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.
106
107
108 1 Andreas Kohlbecker
 **Developer Hints** 
109 7 Andreas Kohlbecker
110 1 Andreas Kohlbecker
111 11 Andreas Kohlbecker
112 49 Andreas Kohlbecker
Classes involved in Content Localization:
113 9 Andreas Kohlbecker
114 1 Andreas Kohlbecker
115 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/interceptor/LocaleContextHandlerInterceptor.java"
116
117 1 Andreas Kohlbecker
Configuration in: 
118
119 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/webapp/WEB-INF/jsonConfigurations.xml"
120 1 Andreas Kohlbecker
121 49 Andreas Kohlbecker
 
122 1 Andreas Kohlbecker
123 49 Andreas Kohlbecker
## Content Negotiation
124 20 Andreas Kohlbecker
125 12 Andreas Kohlbecker
126 49 Andreas Kohlbecker
There are two ways to demand a special content type:
127 12 Andreas Kohlbecker
128 11 Andreas Kohlbecker
129 49 Andreas Kohlbecker
1. by file extension (*.json or *.xml)
130 1 Andreas Kohlbecker
131 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`    
132 1 Andreas Kohlbecker
133 49 Andreas Kohlbecker
1. Default: XML
134 12 Andreas Kohlbecker
135
136 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. 
137 9 Andreas Kohlbecker
138
139
 **Developer Hints** 
140 6 Andreas Kohlbecker
141
142
Classes involved in Content Negotiation:
143
144
145 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/interceptor/ContentNegociationHandlerInterceptor.java"
146 3 Andreas Kohlbecker
147 1 Andreas Kohlbecker
Configuration in: 
148
149 49 Andreas Kohlbecker
* source:"trunk/cdmlib/cdmlib-remote/src/main/webapp/WEB-INF/cdmrest-servlet.xml#L24"
150 1 Andreas Kohlbecker
151 10 Andreas Kohlbecker
152 1 Andreas Kohlbecker
153 14 Andreas Kohlbecker
## Character Encoding
154 1 Andreas Kohlbecker
155 14 Andreas Kohlbecker
156 10 Andreas Kohlbecker
All data is returned in UTF-8 character encoding.
157 14 Andreas Kohlbecker
158 10 Andreas Kohlbecker
159 16 Andreas Kohlbecker
160 1 Andreas Kohlbecker
## Service Descriptions
161
162
163 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.
164 28 Andreas Kohlbecker
165
166 25 Andreas Kohlbecker
167 1 Andreas Kohlbecker
### API Service
168
169
170 36 Andreas Kohlbecker
The are a clean RESTful webservice, which will expose data in a modular, normalized way. 
171 1 Andreas Kohlbecker
172 36 Andreas Kohlbecker
It is a more-or-less one-to-one concordance between URIs and service api methods. 
173 1 Andreas Kohlbecker
174 36 Andreas Kohlbecker
Due to its generic architecture the URIs are also generic and follow a common pattern which is repeated in each controller. 
175 1 Andreas Kohlbecker
176 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.
177 1 Andreas Kohlbecker
178
179 38 Andreas Kohlbecker
_Valid Values for {base-type} are_:
180
181
182 36 Andreas Kohlbecker
* *agent*: Service URIs returning AgentBase or sub type entities.
183 1 Andreas Kohlbecker
184 36 Andreas Kohlbecker
* *description*: Service URIs returning DescriptionBase or sub type entities. 
185 1 Andreas Kohlbecker
186 36 Andreas Kohlbecker
* *feature*: Service URIs returning DescriptionBase or sub type entities
187 1 Andreas Kohlbecker
188 36 Andreas Kohlbecker
* *media*: Service URIs returning Media or sub type entities
189 1 Andreas Kohlbecker
190 36 Andreas Kohlbecker
* *name*: Service URIs returning TaxonNameBase or sub type entities
191 1 Andreas Kohlbecker
192 36 Andreas Kohlbecker
* *occurrence*: Service URIs returning SpecimenOrObservationBase or sub type entities
193
194
* *reference*: Service URIs returning ReferenceBase or sub type entities
195
196
* *taxon*: Service URIs returning TaxonBase or sub type entities
197
198
* *term*: Service URIs returning DefinedTermBase or sub type entities
199
200
201
Most services are using the **default initialisation strategy** which is:
202
203
~~~
204
"$"
205
~~~
206
207
208
#### /{datasource-name}/{base-type}/
209
210
211
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}. 
212
213 40 Andreas Kohlbecker
The returned {base-type} instances are initialized by the _default initialisation strategy_. 
214 1 Andreas Kohlbecker
215 37 Andreas Kohlbecker
216 38 Andreas Kohlbecker
_URI Parameters to return a Pager_:
217 36 Andreas Kohlbecker
218 38 Andreas Kohlbecker
219 37 Andreas Kohlbecker
* _pageNumber_ the number of the page to be returned, the first page has the pageNumber = 1 - _optional parameter_ 
220
221 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_ 
222 37 Andreas Kohlbecker
223 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_ 
224 36 Andreas Kohlbecker
225
226 38 Andreas Kohlbecker
_URI Parameters to return a List_:
227 36 Andreas Kohlbecker
228
229 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! ** 
230 36 Andreas Kohlbecker
231 37 Andreas Kohlbecker
* _limit_ The maximum number of entities returned. - _optional parameter_ 
232 36 Andreas Kohlbecker
233 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_ 
234 36 Andreas Kohlbecker
235
236
237
#### /{datasource-name}/{base-type}/name/{uuid}
238
239
240
Get the {base-type} entity identified by the {uuid}. 
241
242
243
_Returns:_
244
245
246 40 Andreas Kohlbecker
The returned {base-type} entity is initialized by the _default initialisation strategy_. 
247 36 Andreas Kohlbecker
248
249
250
####  /{datasource-name}/{base-type}/name/{uuid}/annotation
251
252
253
Get the a Pager on the Annotations for the {base-type} entity identified by the {uuid}. 
254
255
256
_Returns:_
257
258
259
Pager on the Annotations for the {base-type} entity identified by the {uuid}. 
260
261 40 Andreas Kohlbecker
The returned {base-type} entity are initialized by the _default initialisation strategy_. 
262 1 Andreas Kohlbecker
263
264
265 44 Andreas Kohlbecker
----
266
267
268
269 43 Andreas Kohlbecker
#### /{datasource-name}/name/{name-uuid}/typeDesignations
270
271
272
Get the list of TypeDesignationBases of the TaxonNameBase instance identified by the {name-uuid}. 
273
274
275
 _Returns:_
276
277
278
a List of TypeDesignationBase entities which are initialized using the following initialization strategy: 
279
280
281
~~~
282
"$",
283
"citation.authorTeam",
284
"typifiedNames.taggedName"
285
~~~
286
287
288 42 Andreas Kohlbecker
#### /{datasource-name}/taxon/{taxon-uuid}/accepted
289
290
291
Get the set of accepted Taxon entities for a given {@link TaxonBase} entity identified by the <code>{taxon-uuid}</code>.
292
293
294
 _Returns:_
295
296 1 Andreas Kohlbecker
297 43 Andreas Kohlbecker
a set of Taxon entities which are initialized using the _default initialisation strategy_..
298 42 Andreas Kohlbecker
299
300
301 25 Andreas Kohlbecker
### Portal Service
302 28 Andreas Kohlbecker
303
304
305 35 Andreas Kohlbecker
#### /{datasource-name}/portal/name/{name-uuid}
306 28 Andreas Kohlbecker
307 35 Andreas Kohlbecker
308
The TaxonNameBase instance identified by the {name-uuid}. 
309
310
The returned TaxonNameBase is initialized by the following strategy 
311
312
313
~~~
314
~~~
315
316
317
#### /{datasource-name}/portal/name/{name-uuid}/descriptions
318
319
320
Get the list of TaxonNameDescriptions of the Name associated with the TaxonNameBase instance identified by the {name-uuid}.
321
322
323
_Returns:_
324
325
326
a List of TaxonNameDescription entities which are initialized using the following initialization strategy:
327
328
329
~~~
330
"uuid",
331
"feature",
332
"elements.$",
333
"elements.multilanguageText",
334
"elements.media.representations.parts"
335
~~~
336
337
338
#### /{datasource-name}/portal/name/{name-uuid}/typeDesignations
339
340
341
Get the list of TypeDesignationBases of the TaxonNameBase instance identified by the {name-uuid}. 
342
343
344
_Returns:_
345
346
347
a List of TypeDesignationBase entities which are initialized using the following initialization strategy:
348
349
350
~~~
351
"citation.authorTeam",
352
"typeName.$",
353
"typeName.taggedName",
354
"typeStatus.representations",
355
"typeSpecimen.media.representations.parts"
356
~~~
357
358
359
360
#### /{datasource-name}/portal/taxon/{taxon-uuid}
361
362
363
Get the TaxonBase instance identified by the {taxon-uuid}. 
364
365
The returned Taxon is initialized by the following strategy TAXON_INIT_STRATEGY 
366
367
 
368
~~~
369
"*",
370
"relationsToThisName.fromTaxon.name.taggedName",
371
"name.$",
372
"name.taggedName",
373
"name.rank.representations",
374
"name.status.type.representations",
375
"descriptions.elements.$",
376
"descriptions.elements.area",
377
"descriptions.elements.area.$",
378
"descriptions.elements.multilanguageText",
379
"descriptions.elements.media.representations.parts",
380
~~~
381
382
383 28 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/find
384
385
386
Find Taxa, Synonyms, Common Names by name, either globally or in a specific geographic area. 
387
388
389 29 Andreas Kohlbecker
_URI Parameters:_
390 1 Andreas Kohlbecker
391 29 Andreas Kohlbecker
392 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_
393 28 Andreas Kohlbecker
394 33 Andreas Kohlbecker
* **treeUuid** the UUID of a TaxonomicTree to which the search is to be restricted. - _optional parameter_
395 28 Andreas Kohlbecker
396 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_
397 28 Andreas Kohlbecker
398 33 Andreas Kohlbecker
* **page** the number of the page to be returned, the first page has the pageNumber = 1 - _optional parameter_
399 28 Andreas Kohlbecker
400 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_
401 28 Andreas Kohlbecker
402 33 Andreas Kohlbecker
* **doTaxa** weather to search for instances of Taxon - _optional parameter_
403 28 Andreas Kohlbecker
404 33 Andreas Kohlbecker
* **doSynonyms** weather to search for instances of Synonym - _optional parameter_
405 28 Andreas Kohlbecker
406 33 Andreas Kohlbecker
* **doTaxaByCommonNames** for instances of Taxon by a common name used - _optional parameter_
407 28 Andreas Kohlbecker
408
 
409
_Returns:_
410
411
412
a pager on a list of IdentifiableEntitys initialized by the following strategy:
413
414
415
~~~
416
"*",
417
"relationsToThisName.fromTaxon.name.taggedName",
418
"name.$",
419
"name.taggedName",
420
"name.rank.representations",
421
"name.status.type.representations"
422
~~~
423 25 Andreas Kohlbecker
424
425 31 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/synonymy
426
427
428
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 
429
430
431
_Returns:_
432
433
434
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:
435
436
437
~~~
438 32 Andreas Kohlbecker
"synonymRelations.$",
439
"synonymRelations.synonym.$",
440
"synonymRelations.synonym.name.taggedName",
441
"synonymRelations.synonym.name.nomenclaturalReference.inBook.authorTeam",
442
"synonymRelations.synonym.name.nomenclaturalReference.inJournal",
443
"synonymRelations.synonym.name.nomenclaturalReference.inProceedings",
444
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.$",
445
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.name.taggedName",
446
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.$",
447
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName",
448
449
"name.homotypicalGroup.$",
450
"name.homotypicalGroup.typifiedNames.$",
451
"name.homotypicalGroup.typifiedNames.name.taggedName",
452
453
"name.homotypicalGroup.typifiedNames.taxonBases.$",
454
"name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName"
455
~~~
456
457 1 Andreas Kohlbecker
458 32 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/accepted
459
460 1 Andreas Kohlbecker
461 42 Andreas Kohlbecker
Get the set of accepted Taxon entities for a given {@link TaxonBase} entity identified by the <code>{taxon-uuid}</code>.
462 32 Andreas Kohlbecker
463
464
 _Returns:_
465
466
467 42 Andreas Kohlbecker
a Set of Taxon entities which are initialized using the following initialization strategy:
468 32 Andreas Kohlbecker
469
470
~~~
471
"synonymRelations.$",
472
"synonymRelations.synonym.$",
473
"synonymRelations.synonym.name.taggedName",
474
"synonymRelations.synonym.name.nomenclaturalReference.inBook.authorTeam",
475
"synonymRelations.synonym.name.nomenclaturalReference.inJournal",
476
"synonymRelations.synonym.name.nomenclaturalReference.inProceedings",
477
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.$",
478
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.name.taggedName",
479
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.$",
480
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName",
481
482
"name.homotypicalGroup.$",
483
"name.homotypicalGroup.typifiedNames.$",
484
"name.homotypicalGroup.typifiedNames.name.taggedName",
485
486
"name.homotypicalGroup.typifiedNames.taxonBases.$",
487
"name.homotypicalGroup.typifiedNames.taxonBases.name.taggedName"
488
~~~
489
490
491
####  /{datasource-name}/portal/taxon/{taxon-uuid}/taxonRelationships
492
493
494
Get the list of TaxonRelationships for the given TaxonBase instance identified by the {taxon-uuid}. 
495
496
497
_Returns:_
498
499
500
a List of TaxonRelationship entities which are initialized using the following initialization strategy:
501
502
503
~~~
504
"$",
505
"type.inverseRepresentations",
506
"fromTaxon.sec.authorTeam",
507
"fromTaxon.name.taggedName"
508
~~~
509
510
511
#### /{datasource-name}/portal/taxon/{taxon-uuid}/nameRelationships
512
513
514
Get the list of NameRelationships of the Name associated with the TaxonBase instance identified by the {taxon-uuid}. 
515
516
517
_Returns:_
518
519
520
a List of NameRelationship entities which are initialized using the following initialization strategy:
521
522
523
~~~
524
"$",
525
"type.inverseRepresentations",
526
"fromName.taggedName"
527
~~~
528
529
530
#### /{datasource-name}/portal/taxon/{taxon-uuid}/nameTypeDesignations
531
532
533
Get the list of TypeDesignationBases of the TaxonBase instance identified by the {taxon-uuid}. 
534
535
536
_Returns:_
537
538
539
a List of TypeDesignationBase entities which are initialized using the following initialization strategy:
540
541
:
542
543
544
~~~
545
"typeSpecimen.$",
546
"typeStatus.representations",
547
"citation.authorTeam",
548
"typeName.taggedName"
549
~~~
550
551 1 Andreas Kohlbecker
552 32 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/descriptions
553
554
555
Get the list of TaxonDescriptions of the Taxon instance identified by the {taxon-uuid}. 
556
557
558 1 Andreas Kohlbecker
_Returns:_
559 32 Andreas Kohlbecker
560
561
a List of TaxonDescription entities which are initialized using the following initialization strategy:
562
563
564
~~~
565
"$",
566
"elements.$",
567
"elements.citation.authorTeam",
568
"elements.multilanguageText",
569
"elements.media.representations.parts"
570
~~~
571
572
573 48 Andreas Kohlbecker
#### /{datasource-name}/portal/taxon/{taxon-uuid}/media/{mime type list}/{size}[,[widthOrDuration}][,{height}]/ 
574 32 Andreas Kohlbecker
575
576
Get the list of TaxonDescriptions of the Taxon instance identified by the {taxon-uuid}. 
577
578
579
_Usage:_
580
581 48 Andreas Kohlbecker
 /{datasource-name}/portal/taxon/{taxon-uuid}/media/{mime type list}/{size}[,[widthOrDuration}][,{height}]/ 
582 32 Andreas Kohlbecker
583
 
584
_Whereas_ 
585
586
* *{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. 
587
588
* *{size}*,*{widthOrDuration}*,*{height}*: (not jet implemented) valid values are an integer or the asterisk '*' as a wildcard 
589
590
591
_Returns:_
592
593
594
a List of Media entities which are initialized using the following initialization strategy:
595
596
597
~~~
598
"$",
599
"elements.$",
600
"elements.citation.authorTeam",
601
"elements.multilanguageText",
602
"elements.media.representations.parts"
603 31 Andreas Kohlbecker
~~~
604 1 Andreas Kohlbecker
605
606 46 Andreas Kohlbecker
#### /{datasource-name}/portal/taxontree
607 41 Andreas Kohlbecker
608
609
Lists all available TaxonomicTrees. 
610
611
612
_Returns:_
613
614
615
A list of TaxonomicTrees initialized by the following initialization strategy:
616
617
618
~~~
619
"reference.authorTeam.titleCache"
620
~~~
621
622
623 46 Andreas Kohlbecker
#### /{datasource-name}/portal/taxontree/{tree-uuid},{rank-uuid}
624 41 Andreas Kohlbecker
625
626
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. 
627
628
629
_URI elements_: 
630
631
* _{tree-uuid}_ identifies the TaxonomicTree by its UUID. 
632
633
* _{rank-uuid}_ identifies the Rank by its UUID. May be left out. 
634
635
636
_Returns:_
637
638
639
A List of TaxonNode entities initialized by the following initialization strategy:
640
641
642
~~~
643
"taxon.sec", 
644
"taxon.name.taggedName"
645
~~~
646
647
648 46 Andreas Kohlbecker
####  /{datasource-name}/portal/taxontree/{tree-uuid},{rank- uuid}/{taxon-uuid}
649 41 Andreas Kohlbecker
650
651
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. 
652
653
654
_URI elements_: 
655
656
* _{tree-uuid}_ identifies the TaxonomicTree by its UUID. 
657
658
* _{rank-uuid}_ identifies the Rank by its UUID. May be left out. 
659
660
* _{taxon-uuid}_ identifies the Taxon by its UUID. - _required_. 
661
662
663
_Returns:_
664
665
666
A List of TaxonNode entities initialized by the following initialization strategy:
667
668
669
~~~
670
"taxon.sec", 
671
"taxon.name.taggedName"
672
~~~
673
674
675 46 Andreas Kohlbecker
####  /{datasource-name}/portal/taxontree/{tree-uuid},{rank-uuid}/{taxon-uuid}/path
676 41 Andreas Kohlbecker
677
678
Provides path of TaxonNodes from the base node to the node of the specified taxon. 
679
680
681
_URI elements_: 
682
683
* _{tree-uuid}_ identifies the TaxonomicTree by its UUID. 
684
685
* _{rank-uuid}_ identifies the Rank by its UUID. May be left out. 
686
687
* _{taxon-uuid}_ identifies the Taxon by its UUID. - _required_. 
688
689
690
_Returns:_
691
692
693
A List of TaxonNode entities initialized by the following initialization strategy:
694
695
696
~~~
697
"taxon.sec", 
698
"taxon.name.taggedName"
699
~~~
700
701
702 1 Andreas Kohlbecker
### External Service
703 41 Andreas Kohlbecker
704
705
706
#### /{datasource-name}/geo/map/distribution/{taxon-uuid}
707
708
709
Assembles and returns URI parameter Strings for the EDIT Map Service. 
710
711
The distribution areas for the Taxon instance identified by the {taxon-uuid} are found and are translated into an valid URI parameter String. 
712
713
Higher level distribiution areas are expanded in order to include all nested sub-areas.