]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
7301939a3179bd2d35a9704f476945a8c0ba2a6f
[tmp/jakarta-migration.git] /
1 /**
2  * This document is a part of the source code and related artifacts
3  * for CollectionSpace, an open source collections management system
4  * for museums and related institutions:
5  *
6  * http://www.collectionspace.org
7  * http://wiki.collectionspace.org
8  *
9  * Copyright © 2009 Regents of the University of California
10  *
11  * Licensed under the Educational Community License (ECL), Version 2.0.
12  * You may not use this file except in compliance with this License.
13  *
14  * You may obtain a copy of the ECL 2.0 License at
15  * https://source.collectionspace.org/collection-space/LICENSE.txt
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 package org.collectionspace.services.client.test;
24
25 import java.util.List;
26 import javax.ws.rs.core.MediaType;
27 import javax.ws.rs.core.Response;
28
29 import org.collectionspace.services.client.CollectionObjectClient;
30 import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
31 import org.collectionspace.services.collectionobject.domain.naturalhistory.CollectionObjectNaturalhistory;
32 import org.collectionspace.services.collectionobject.CollectionobjectsCommonList;
33
34 import org.jboss.resteasy.client.ClientResponse;
35
36 import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
37 import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;
38 import org.jboss.resteasy.plugins.providers.multipart.OutputPart;
39 import org.testng.Assert;
40 import org.testng.annotations.Test;
41
42 import org.slf4j.Logger;
43 import org.slf4j.LoggerFactory;
44
45 /**
46  * CollectionObjectServiceTest, carries out tests against a
47  * deployed and running CollectionObject Service.
48  * 
49  * $LastChangedRevision$
50  * $LastChangedDate$
51  */
52 public class CollectionObjectServiceTest extends AbstractServiceTest {
53
54     private final Logger logger =
55         LoggerFactory.getLogger(CollectionObjectServiceTest.class);
56
57     // Instance variables specific to this test.
58     private CollectionObjectClient client = new CollectionObjectClient();
59     private String knownResourceId = null;
60     
61     /*
62      * This method is called only by the parent class, AbstractServiceTest
63      */
64     @Override
65     protected String getServicePathComponent() {
66         return client.getServicePathComponent();
67     }
68
69      // ---------------------------------------------------------------
70     // CRUD tests : CREATE tests
71     // ---------------------------------------------------------------
72
73     // Success outcomes
74     @Override
75     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class)
76     public void create(String testName) throws Exception {
77
78         // Perform setup, such as initializing the type of service request
79         // (e.g. CREATE, DELETE), its valid and expected status codes, and
80         // its associated HTTP method name (e.g. POST, DELETE).
81         setupCreate(testName);
82
83         // Submit the request to the service and store the response.
84         String identifier = createIdentifier();
85         MultipartOutput multipart =
86             createCollectionObjectInstance(client.getCommonPartName(), identifier);
87         ClientResponse<Response> res = client.create(multipart);
88         int statusCode = res.getStatus();
89
90         // Check the status code of the response: does it match
91         // the expected response(s)?
92         //
93         // Specifically:
94         // Does it fall within the set of valid status codes?
95         // Does it exactly match the expected status code?
96         if(logger.isDebugEnabled()){
97             logger.debug(testName + ": status = " + statusCode);
98         }
99         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
100                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
101         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
102
103         // Store the ID returned from this create operation
104         // for additional tests below.
105         knownResourceId = extractId(res);
106         if(logger.isDebugEnabled()){
107             logger.debug(testName + ": knownResourceId=" + knownResourceId);
108         }
109     }
110
111         /* (non-Javadoc)
112          * @see org.collectionspace.services.client.test.ServiceTest#createList()
113          */
114     @Override
115     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
116         dependsOnMethods = {"create"})
117     public void createList(String testName) throws Exception {
118         for(int i = 0; i < 3; i++){
119             create(testName);
120         }
121     }
122
123     // Failure outcomes
124
125     // Placeholders until the three tests below can be uncommented.
126     // See Issue CSPACE-401.
127     @Override
128     public void createWithEmptyEntityBody(String testName) throws Exception {}
129     @Override
130     public void createWithMalformedXml(String testName) throws Exception {}
131     @Override
132     public void createWithWrongXmlSchema(String testName) throws Exception {}
133
134
135 /*
136     @Override
137     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
138         dependsOnMethods = {"create", "testSubmitRequest"})
139     public void createWithEmptyEntityBody(String testName) throwsException {
140     
141         // Perform setup.
142         setupCreateWithEmptyEntityBody(testName);
143
144         // Submit the request to the service and store the response.
145         String method = REQUEST_TYPE.httpMethodName();
146         String url = getServiceRootURL();
147         String mediaType = MediaType.APPLICATION_XML;
148         final String entity = "";
149         int statusCode = submitRequest(method, url, mediaType, entity);
150         
151         // Check the status code of the response: does it match
152         // the expected response(s)?
153         if(logger.isDebugEnabled()){
154             logger.debug(testName + ": url=" + url +
155                 " status=" + statusCode);
156         }
157         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
158             invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
159         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
160     }
161
162     @Override
163     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
164         dependsOnMethods = {"create", "testSubmitRequest"})
165     public void createWithMalformedXml(String testName) throws Exception {
166     
167         // Perform setup.
168         setupCreateWithMalformedXml(testName);
169
170         // Submit the request to the service and store the response.
171         String method = REQUEST_TYPE.httpMethodName();
172         String url = getServiceRootURL();
173         String mediaType = MediaType.APPLICATION_XML;
174         final String entity = MALFORMED_XML_DATA; // Constant from base class.
175         int statusCode = submitRequest(method, url, mediaType, entity);
176         
177         // Check the status code of the response: does it match
178         // the expected response(s)?
179         if(logger.isDebugEnabled()){
180             logger.debug(testName + ": url=" + url +
181                 " status=" + statusCode);
182         }
183         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
184             invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
185         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
186     }
187
188     @Override
189     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
190         dependsOnMethods = {"create", "testSubmitRequest"})
191     public void createWithWrongXmlSchema(String testName) throws Exception {
192     
193         // Perform setup.
194         setupCreateWithWrongXmlSchema(testName);
195      
196         // Submit the request to the service and store the response.
197         String method = REQUEST_TYPE.httpMethodName();
198         String url = getServiceRootURL();
199         String mediaType = MediaType.APPLICATION_XML;
200         final String entity = WRONG_XML_SCHEMA_DATA;
201         int statusCode = submitRequest(method, url, mediaType, entity);
202         
203         // Check the status code of the response: does it match
204         // the expected response(s)?
205         if(logger.isDebugEnabled()){
206             logger.debug(testName + ": url=" + url +
207                 " status=" + statusCode);
208         }
209         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
210             invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
211         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
212     }
213 */
214
215     // ---------------------------------------------------------------
216     // CRUD tests : READ tests
217     // ---------------------------------------------------------------
218
219     // Success outcomes
220     @Override
221     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
222         dependsOnMethods = {"create"})
223     public void read(String testName) throws Exception {
224
225         // Perform setup.
226         setupRead(testName);
227
228         // Submit the request to the service and store the response.
229         ClientResponse<MultipartInput> res = client.read(knownResourceId);
230         int statusCode = res.getStatus();
231
232         // Check the status code of the response: does it match
233         // the expected response(s)?
234         if(logger.isDebugEnabled()){
235             logger.debug(testName + ": status = " + statusCode);
236         }
237         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
238                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
239         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
240         
241         MultipartInput input = (MultipartInput) res.getEntity();
242         CollectionobjectsCommon collectionObject =
243             (CollectionobjectsCommon) extractPart(input,
244             client.getCommonPartName(), CollectionobjectsCommon.class);
245         Assert.assertNotNull(collectionObject);
246     }
247     
248     // Failure outcomes
249
250     @Override
251     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
252         dependsOnMethods = {"read"})
253     public void readNonExistent(String testName) throws Exception {
254
255         // Perform setup.
256         setupReadNonExistent(testName);
257
258         // Submit the request to the service and store the response.
259         ClientResponse<MultipartInput> res = client.read(NON_EXISTENT_ID);
260         int statusCode = res.getStatus();
261
262         // Check the status code of the response: does it match
263         // the expected response(s)?
264         if(logger.isDebugEnabled()){
265             logger.debug(testName + ": status = " + statusCode);
266         }
267         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
268                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
269         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
270     }
271
272     // ---------------------------------------------------------------
273     // CRUD tests : READ_LIST tests
274     // ---------------------------------------------------------------
275     // Success outcomes
276     @Override
277     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
278         dependsOnMethods = {"createList", "read"})
279     public void readList(String testName) throws Exception {
280
281         // Perform setup.
282         setupReadList(testName);
283
284         // Submit the request to the service and store the response.
285         ClientResponse<CollectionobjectsCommonList> res = client.readList();
286         CollectionobjectsCommonList list = res.getEntity();
287         int statusCode = res.getStatus();
288
289         // Check the status code of the response: does it match
290         // the expected response(s)?
291         if(logger.isDebugEnabled()){
292             logger.debug(testName + ": status = " + statusCode);
293         }
294         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
295                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
296         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
297
298         // Optionally output additional data about list members for debugging.
299         boolean iterateThroughList = false;
300         if (iterateThroughList && logger.isDebugEnabled()) {
301             List<CollectionobjectsCommonList.CollectionObjectListItem> items =
302                 list.getCollectionObjectListItem();
303             int i = 0;
304
305             for(CollectionobjectsCommonList.CollectionObjectListItem item : items){
306                 logger.debug(testName + ": list-item[" + i + "] csid=" +
307                     item.getCsid());
308                 logger.debug(testName + ": list-item[" + i + "] objectNumber=" +
309                     item.getObjectNumber());
310                 logger.debug(testName + ": list-item[" + i + "] URI=" +
311                     item.getUri());
312                 i++;
313
314             }
315         }
316     }
317
318     // Failure outcomes
319     // None at present.
320
321     // ---------------------------------------------------------------
322     // CRUD tests : UPDATE tests
323     // ---------------------------------------------------------------
324     // Success outcomes
325     @Override
326     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
327         dependsOnMethods = {"read"})
328     public void update(String testName) throws Exception {
329
330         // Perform setup.
331         setupUpdate(testName);
332
333         ClientResponse<MultipartInput> res =
334                 client.read(knownResourceId);
335         if(logger.isDebugEnabled()){
336             logger.debug(testName + ": read status = " + res.getStatus());
337         }
338         Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
339
340         if(logger.isDebugEnabled()){
341             logger.debug("got object to update with ID: " + knownResourceId);
342         }
343         MultipartInput input = (MultipartInput) res.getEntity();
344         CollectionobjectsCommon collectionObject =
345             (CollectionobjectsCommon) extractPart(input,
346                 client.getCommonPartName(), CollectionobjectsCommon.class);
347         Assert.assertNotNull(collectionObject);
348
349         // Update the content of this resource.
350         collectionObject.setObjectNumber("updated-" + collectionObject.getObjectNumber());
351         collectionObject.setObjectName("updated-" + collectionObject.getObjectName());
352         if(logger.isDebugEnabled()){
353             verbose("updated object", collectionObject,
354                 CollectionobjectsCommon.class);
355         }
356         // Submit the request to the service and store the response.
357         MultipartOutput output = new MultipartOutput();
358         OutputPart commonPart = output.addPart(collectionObject, MediaType.APPLICATION_XML_TYPE);
359         commonPart.getHeaders().add("label", client.getCommonPartName());
360
361         res = client.update(knownResourceId, output);
362         int statusCode = res.getStatus();
363         // Check the status code of the response: does it match the expected response(s)?
364         if(logger.isDebugEnabled()){
365             logger.debug(testName + ": status = " + statusCode);
366         }
367         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
368                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
369         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
370
371
372         input = (MultipartInput) res.getEntity();
373         CollectionobjectsCommon updatedCollectionObject =
374                 (CollectionobjectsCommon) extractPart(input,
375                         client.getCommonPartName(), CollectionobjectsCommon.class);
376         Assert.assertNotNull(updatedCollectionObject);
377
378         Assert.assertEquals(updatedCollectionObject.getObjectName(),
379                 collectionObject.getObjectName(),
380                 "Data in updated object did not match submitted data.");
381
382     }
383     
384     // Failure outcomes
385
386     // Placeholders until the three tests below can be uncommented.
387     // See Issue CSPACE-401.
388     @Override
389     public void updateWithEmptyEntityBody(String testName) throws Exception {}
390     @Override
391     public void updateWithMalformedXml(String testName) throws Exception {}
392     @Override
393     public void updateWithWrongXmlSchema(String testName) throws Exception {}
394
395 /*
396     @Override
397     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
398         dependsOnMethods = {"create", "update", "testSubmitRequest"})
399     public void updateWithEmptyEntityBody(String testName) throws Exception {
400     
401         // Perform setup.
402         setupUpdateWithEmptyEntityBody(testName);
403
404         // Submit the request to the service and store the response.
405         String method = REQUEST_TYPE.httpMethodName();
406         String url = getResourceURL(knownResourceId);
407         String mediaType = MediaType.APPLICATION_XML;
408         final String entity = "";
409         int statusCode = submitRequest(method, url, mediaType, entity);
410         
411         // Check the status code of the response: does it match
412         // the expected response(s)?
413         if(logger.isDebugEnabled()){
414             logger.debug(testName + ": url=" + url +
415                 " status=" + statusCode);
416         }
417         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
418             invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
419         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
420     }
421
422     @Override
423     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
424         dependsOnMethods = {"create", "update", "testSubmitRequest"})
425     public void updateWithMalformedXml() throws Exception {
426
427         // Perform setup.
428         setupUpdateWithMalformedXml(testName);
429
430         // Submit the request to the service and store the response.
431         String method = REQUEST_TYPE.httpMethodName();
432         String url = getResourceURL(knownResourceId);
433         final String entity = MALFORMED_XML_DATA;
434         String mediaType = MediaType.APPLICATION_XML;
435         int statusCode = submitRequest(method, url, mediaType, entity);
436         
437         // Check the status code of the response: does it match
438         // the expected response(s)?
439         if(logger.isDebugEnabled()){
440             logger.debug(testName + ": url=" + url +
441                 " status=" + statusCode);
442         }
443         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
444             invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
445         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
446     }
447
448     @Override
449     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
450         dependsOnMethods = {"create", "update", "testSubmitRequest"})
451     public void updateWithWrongXmlSchema(String testName) throws Exception {
452     
453         // Perform setup.
454         setupUpdateWithWrongXmlSchema(String testName);
455         
456         // Submit the request to the service and store the response.
457         String method = REQUEST_TYPE.httpMethodName();
458         String url = getResourceURL(knownResourceId);
459         String mediaType = MediaType.APPLICATION_XML;
460         final String entity = WRONG_XML_SCHEMA_DATA;
461         int statusCode = submitRequest(method, url, mediaType, entity);
462         
463         // Check the status code of the response: does it match
464         // the expected response(s)?
465         if(logger.isDebugEnabled()){
466             logger.debug(testName + ": url=" + url +
467                 " status=" + statusCode);
468         }
469         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
470             invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
471         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
472     }
473 */
474
475     @Override
476     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
477         dependsOnMethods = {"update", "testSubmitRequest"})
478     public void updateNonExistent(String testName) throws Exception {
479
480         // Perform setup.
481         setupUpdateNonExistent(testName);
482
483         // Submit the request to the service and store the response.
484         //
485         // Note: The ID used in this 'create' call may be arbitrary.
486         // The only relevant ID may be the one used in updateCollectionObject(), below.
487         MultipartOutput multipart =
488             createCollectionObjectInstance(client.getCommonPartName(),
489                 NON_EXISTENT_ID);
490         ClientResponse<MultipartInput> res =
491             client.update(NON_EXISTENT_ID, multipart);
492         int statusCode = res.getStatus();
493
494         // Check the status code of the response: does it match
495         // the expected response(s)?
496         if(logger.isDebugEnabled()){
497             logger.debug(testName + ": status = " + statusCode);
498         }
499         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
500                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
501         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
502     }
503
504     // ---------------------------------------------------------------
505     // CRUD tests : DELETE tests
506     // ---------------------------------------------------------------
507     // Success outcomes
508     @Override
509     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
510         dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"})
511     public void delete(String testName) throws Exception {
512
513         // Perform setup.
514         setupDelete(testName);
515
516         // Submit the request to the service and store the response.
517         ClientResponse<Response> res = client.delete(knownResourceId);
518         int statusCode = res.getStatus();
519
520         // Check the status code of the response: does it match
521         // the expected response(s)?
522         if(logger.isDebugEnabled()){
523             logger.debug(testName + ": status = " + statusCode);
524         }
525         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
526                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
527         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
528     }
529
530     // Failure outcomes
531     @Override
532     @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class,
533         dependsOnMethods = {"delete"})
534     public void deleteNonExistent(String testName) throws Exception {
535
536         // Perform setup.
537         setupDeleteNonExistent(testName);
538
539         // Submit the request to the service and store the response.
540         ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
541         int statusCode = res.getStatus();
542
543         // Check the status code of the response: does it match
544         // the expected response(s)?
545         if(logger.isDebugEnabled()){
546             logger.debug(testName + ": status = " + statusCode);
547         }
548         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
549                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
550         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
551     }
552
553     // ---------------------------------------------------------------
554     // Utility tests : tests of code used in tests above
555     // ---------------------------------------------------------------
556     /**
557      * Tests the code for manually submitting data that is used by several
558      * of the methods above.
559      */
560     @Test(dependsOnMethods = {"create", "read"})
561     public void testSubmitRequest() throws Exception {
562
563         // Expected status code: 200 OK
564         final int EXPECTED_STATUS = Response.Status.OK.getStatusCode();
565
566         // Submit the request to the service and store the response.
567         String method = ServiceRequestType.READ.httpMethodName();
568         String url = getResourceURL(knownResourceId);
569         int statusCode = submitRequest(method, url);
570
571         // Check the status code of the response: does it match
572         // the expected response(s)?
573         if(logger.isDebugEnabled()){
574             logger.debug("testSubmitRequest: url=" + url +
575                 " status=" + statusCode);
576         }
577         Assert.assertEquals(statusCode, EXPECTED_STATUS);
578
579     }           
580
581     // ---------------------------------------------------------------
582     // Utility methods used by tests above
583     // ---------------------------------------------------------------
584
585     private MultipartOutput createCollectionObjectInstance(String commonPartName,
586         String identifier) {
587         return createCollectionObjectInstance(commonPartName,
588             "objectNumber-" + identifier,
589             "objectName-" + identifier);
590     }
591
592     private MultipartOutput createCollectionObjectInstance(String commonPartName,
593         String objectNumber, String objectName) {
594         CollectionobjectsCommon collectionObject = new CollectionobjectsCommon();
595
596         collectionObject.setObjectNumber(objectNumber);
597         collectionObject.setObjectName(objectName);
598         collectionObject.setAge(""); //test for null string
599         MultipartOutput multipart = new MultipartOutput();
600         OutputPart commonPart = multipart.addPart(collectionObject,
601             MediaType.APPLICATION_XML_TYPE);
602         commonPart.getHeaders().add("label", commonPartName);
603
604         if(logger.isDebugEnabled()){
605             verbose("to be created, collectionobject common ",
606                collectionObject, CollectionobjectsCommon.class);
607         }
608
609         CollectionObjectNaturalhistory conh = new CollectionObjectNaturalhistory();
610         conh.setNhString("test-string");
611         conh.setNhInt(999);
612         conh.setNhLong(9999);
613         OutputPart nhPart = multipart.addPart(conh, MediaType.APPLICATION_XML_TYPE);
614         nhPart.getHeaders().add("label", getNHPartName());
615
616         if(logger.isDebugEnabled()){
617             verbose("to be created, collectionobject nhistory",
618                 conh, CollectionObjectNaturalhistory.class);
619         }
620         return multipart;
621
622     }
623
624     private String getNHPartName() {
625         return "collectionobjects-naturalhistory";
626     }
627 }