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:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright (c) 2009 Regents of the University of California
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
15 * https://source.collectionspace.org/collection-space/LICENSE.txt
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.
23 package org.collectionspace.services.IntegrationTests.test;
25 import java.io.StringWriter;
26 import java.math.BigDecimal;
27 import java.util.ArrayList;
28 import java.util.List;
30 import javax.ws.rs.core.MediaType;
31 import javax.ws.rs.core.Response;
32 import javax.xml.bind.JAXBContext;
33 import javax.xml.bind.Marshaller;
35 import org.testng.Assert;
36 import org.testng.annotations.AfterClass;
37 import org.testng.annotations.Test;
38 import org.slf4j.Logger;
39 import org.slf4j.LoggerFactory;
40 import org.collectionspace.services.client.CollectionObjectClient;
41 import org.collectionspace.services.client.DimensionClient;
42 import org.collectionspace.services.client.DimensionFactory;
43 import org.collectionspace.services.client.PayloadOutputPart;
44 import org.collectionspace.services.client.PoxPayloadIn;
45 import org.collectionspace.services.client.PoxPayloadOut;
46 import org.collectionspace.services.collectionobject.CollectionobjectsCommon;
47 import org.collectionspace.services.client.IntakeClient;
48 import org.collectionspace.services.intake.IntakesCommon;
49 import org.collectionspace.services.client.RelationClient;
50 import org.collectionspace.services.client.workflow.WorkflowClient;
51 import org.collectionspace.services.dimension.DimensionsCommon;
52 import org.collectionspace.services.relation.RelationsCommon;
53 import org.collectionspace.services.relation.RelationsCommonList;
54 import org.collectionspace.services.relation.RelationshipType;
59 * @version $Revision:$
61 public class RelationIntegrationTest extends CollectionSpaceIntegrationTest {
63 final Logger logger = LoggerFactory
64 .getLogger(RelationIntegrationTest.class);
66 // Get clients for the CollectionSpace services
68 private CollectionObjectClient collectionObjectClient = new CollectionObjectClient();
69 private RelationClient relationClient = new RelationClient();
70 private IntakeClient intakeClient = new IntakeClient();
71 private DimensionClient dimensionClient = new DimensionClient();
73 private static final int OBJECTS_TO_INTAKE = 1;
76 @AfterClass(alwaysRun = true)
77 public void cleanUp() {
78 relationClient.cleanup();
79 collectionObjectClient.cleanup();
80 intakeClient.cleanup();
81 dimensionClient.cleanup();
85 * Object as xml string.
88 * @param clazz the clazz
91 static protected String objectAsXmlString(Object o, Class<?> clazz) {
92 StringWriter sw = new StringWriter();
94 JAXBContext jc = JAXBContext.newInstance(clazz);
95 Marshaller m = jc.createMarshaller();
96 m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
99 } catch (Exception e) {
102 return sw.toString();
105 private PoxPayloadOut createDimensionInstance(String commonPartName, String dimensionType, String dimensionValue, String entryDate) {
106 DimensionsCommon dimensionsCommon = new DimensionsCommon();
107 dimensionsCommon.setDimension(dimensionType);
108 dimensionsCommon.setValue(new BigDecimal(dimensionValue));
109 dimensionsCommon.setValueDate(entryDate);
110 PoxPayloadOut multipart = DimensionFactory.createDimensionInstance(
111 commonPartName, dimensionsCommon);
113 if (logger.isDebugEnabled()) {
114 logger.debug("to be created, dimension common");
115 logger.debug(objectAsXmlString(dimensionsCommon,
116 DimensionsCommon.class));
122 protected PoxPayloadOut createDimensionInstance(String identifier) {
123 DimensionClient client = new DimensionClient();
124 return createDimensionInstance(client.getCommonPartName(), identifier);
128 * Creates the dimension instance.
130 * @param identifier the identifier
131 * @return the multipart output
133 protected PoxPayloadOut createDimensionInstance(String commonPartName, String identifier) {
134 final String dimensionValue = Long.toString(System.currentTimeMillis());
136 return createDimensionInstance(commonPartName,
137 "dimensionType-" + identifier,
139 "entryDate-" + identifier);
142 @Test void deleteCollectionObjectRelationshipToLockedDimension() {
143 // First create a CollectionObject
144 CollectionobjectsCommon co = new CollectionobjectsCommon();
145 fillCollectionObject(co, createIdentifier());
146 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
147 PayloadOutputPart commonPart = multipart.addPart(collectionObjectClient.getCommonPartName(), co);
149 // Make the "create" call and check the response
150 Response response = collectionObjectClient.create(multipart);
151 String collectionObjectCsid = null;
153 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
155 collectionObjectCsid = extractId(response);
156 collectionObjectClient.addToCleanup(collectionObjectCsid);
161 // Create a new dimension record
162 multipart = this.createDimensionInstance(createIdentifier());
163 // Make the call to create and check the response
164 response = dimensionClient.create(multipart);
165 String dimensionCsid1 = null;
167 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
168 dimensionCsid1 = extractId(response);
169 dimensionClient.addToCleanup(dimensionCsid1);
174 // Relate the entities, by creating a new relation object
175 RelationsCommon relation = new RelationsCommon();
176 fillRelation(relation, collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(),
177 dimensionCsid1, DimensionsCommon.class.getSimpleName(),
178 "collectionobject-dimension");
179 // Create the part and fill it with the relation object
180 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
181 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
182 // Create the relationship
183 response = relationClient.create(multipart);
184 String relationCsid1 = null;
186 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
187 relationCsid1 = extractId(response);
188 relationClient.addToCleanup(relationCsid1);
193 // Now lock the dimension record.
195 Response workflowResponse = null;
197 workflowResponse = dimensionClient.updateWorkflowWithTransition(
198 dimensionCsid1, WorkflowClient.WORKFLOWTRANSITION_LOCK);
199 System.out.println("Locked dimension record with CSID=" + dimensionCsid1);
201 workflowResponse.close();
204 // Finally, try to delete the relationship
206 // Try to delete the relationship -should fail because we don't allow delete if one of the sides is locked.
207 response = relationClient.delete(relationCsid1);
209 Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode());
214 // Also, try to soft-delete. This should also fail.
215 workflowResponse = dimensionClient.updateWorkflowWithTransition(dimensionCsid1, WorkflowClient.WORKFLOWTRANSITION_DELETE);
216 System.out.println("Locked dimension record with CSID=" + dimensionCsid1);
217 workflowResponse.close();
219 // Now unlock the dimension record so we can cleanup all the records after the test suite completes.
221 workflowResponse = dimensionClient.updateWorkflowWithTransition(
222 dimensionCsid1, WorkflowClient.WORKFLOWTRANSITION_UNLOCK);
224 workflowResponse.close();
228 @Test void createCollectionObjectRelationshipToManyDimensions() {
230 // First create a CollectionObject
232 CollectionobjectsCommon co = new CollectionobjectsCommon();
233 fillCollectionObject(co, createIdentifier());
234 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
235 PayloadOutputPart commonPart = multipart.addPart(collectionObjectClient.getCommonPartName(), co);
237 // Make the create call and check the response
238 Response response = collectionObjectClient.create(multipart);
239 String collectionObjectCsid = null;
241 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
243 collectionObjectCsid = extractId(response);
244 collectionObjectClient.addToCleanup(collectionObjectCsid);
249 //Next, create the first of three Dimension records to relate the collection object record
250 multipart = this.createDimensionInstance(createIdentifier());
251 // Make the call to create and check the response
252 response = dimensionClient.create(multipart);
253 String dimensionCsid1 = null;
255 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
256 dimensionCsid1 = extractId(response);
257 dimensionClient.addToCleanup(dimensionCsid1);
262 //Next, create a the second Dimension record
263 multipart = this.createDimensionInstance(createIdentifier());
264 // Make the call to create and check the response
265 response = dimensionClient.create(multipart);
266 String dimensionCsid2 = null;
268 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
269 dimensionCsid2 = extractId(response);
270 dimensionClient.addToCleanup(dimensionCsid2);
275 //Next, create a the 3rd Dimension record
276 multipart = this.createDimensionInstance(createIdentifier());
277 // Make the call to create and check the response
278 response = dimensionClient.create(multipart);
279 String dimensionCsid3 = null;
281 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
282 dimensionCsid3 = extractId(response);
283 dimensionClient.addToCleanup(dimensionCsid3);
288 // Relate the entities, by creating a new relation object
289 RelationsCommon relation = new RelationsCommon();
290 fillRelation(relation,
291 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), // the subject of the relationship
292 dimensionCsid1, DimensionsCommon.class.getSimpleName(), // the object of the relationship
293 "collectionobject-dimension");
294 // Create the part and fill it with the relation object
295 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
296 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
297 // Create the relationship
298 response = relationClient.create(multipart);
299 String relationCsid1 = null;
301 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
302 relationCsid1 = extractId(response);
303 relationClient.addToCleanup(relationCsid1);
307 // Wait 1 second and create the second relationship
310 } catch (InterruptedException e) {
311 // TODO Auto-generated catch block
314 relation = new RelationsCommon();
315 fillRelation(relation,
316 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), // the subject of the relationship
317 dimensionCsid2, DimensionsCommon.class.getSimpleName(), // the object of the relationship
318 "collectionobject-dimension");
319 // Create the part and fill it with the relation object
320 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
321 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
322 // Create the relationship
323 response = relationClient.create(multipart);
325 String relationCsid2 = null;
327 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
328 relationCsid2 = extractId(response);
329 relationClient.addToCleanup(relationCsid2);
333 // Wait 1 second and create the 3rd relationship
336 } catch (InterruptedException e) {
337 // TODO Auto-generated catch block
340 relation = new RelationsCommon();
341 fillRelation(relation,
342 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), // the subject of the relationship
343 dimensionCsid3, DimensionsCommon.class.getSimpleName(), // the object of the relationship
344 "collectionobject-dimension");
345 // Create the part and fill it with the relation object
346 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
347 commonPart = multipart.addPart(relationClient.getCommonPartName(), relation);
348 // Create the relationship
349 response = relationClient.create(multipart);
351 String relationCsid3 = null;
353 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
354 relationCsid3 = extractId(response);
355 relationClient.addToCleanup(relationCsid3);
361 @Test void releteCollectionObjectToLockedDimension() {
363 // First create a CollectionObject
365 CollectionobjectsCommon co = new CollectionobjectsCommon();
366 fillCollectionObject(co, createIdentifier());
368 // Next, create a part object
369 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
370 PayloadOutputPart commonPart = multipart.addPart(co, MediaType.APPLICATION_XML_TYPE);
371 commonPart.setLabel(collectionObjectClient.getCommonPartName());
373 // Make the create call and check the response
374 Response response = collectionObjectClient.create(multipart);
375 String collectionObjectCsid = null;
377 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
379 collectionObjectCsid = extractId(response);
380 collectionObjectClient.addToCleanup(collectionObjectCsid);
385 //Next, create a Dimension record to relate the collection object to
386 multipart = this.createDimensionInstance(createIdentifier());
387 // Make the call to create and check the response
388 response = dimensionClient.create(multipart);
389 String dimensionCsid = null;
391 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
392 dimensionCsid = extractId(response);
397 @SuppressWarnings("unused")
398 Response workflowResponse = dimensionClient.updateWorkflowWithTransition(dimensionCsid,
399 WorkflowClient.WORKFLOWTRANSITION_LOCK);
400 workflowResponse.close();
401 System.out.println("Locked dimension record with CSID=" + dimensionCsid);
403 // Lastly, relate the two entities, by creating a new relation object
404 RelationsCommon relation = new RelationsCommon();
405 fillRelation(relation, collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(),
406 dimensionCsid, DimensionsCommon.class.getSimpleName(),
407 "collectionobject-dimension");
408 // Create the part and fill it with the relation object
409 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
410 commonPart = multipart.addPart(relation, MediaType.APPLICATION_XML_TYPE);
411 commonPart.setLabel(relationClient.getCommonPartName());
413 // Make the call to create the relationship
414 Response relationresponse = relationClient.create(multipart);
415 String relationCsid = null;
417 Assert.assertEquals(relationresponse.getStatus(), Response.Status.BAD_REQUEST.getStatusCode());
418 relationCsid = extractId(response);
419 relationClient.addToCleanup(relationCsid);
421 relationresponse.close();
424 // Now unlock the dimension record so we can cleanup all the records after the test suite completes.
426 workflowResponse = dimensionClient.updateWorkflowWithTransition(
427 dimensionCsid, WorkflowClient.WORKFLOWTRANSITION_UNLOCK);
429 workflowResponse.close();
434 public void relateCollectionObjectToIntake() {
436 // First create a CollectionObject
438 CollectionobjectsCommon co = new CollectionobjectsCommon();
439 fillCollectionObject(co, createIdentifier());
441 // Next, create a part object
442 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
443 PayloadOutputPart commonPart = multipart.addPart(co, MediaType.APPLICATION_XML_TYPE);
444 commonPart.setLabel(collectionObjectClient.getCommonPartName());
446 // Make the create call and check the response
447 Response response = collectionObjectClient.create(multipart);
448 String collectionObjectCsid = null;
450 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
452 collectionObjectCsid = extractId(response);
453 collectionObjectClient.addToCleanup(collectionObjectCsid);
458 // Next, create an Intake object
459 IntakesCommon intake = new IntakesCommon();
460 fillIntake(intake, createIdentifier());
461 // Create the a part object
462 multipart = new PoxPayloadOut(IntakeClient.SERVICE_PAYLOAD_NAME);
463 commonPart = multipart.addPart(intake, MediaType.APPLICATION_XML_TYPE);
464 commonPart.setLabel(intakeClient.getCommonPartName());
466 // Make the call to create and check the response
467 response = intakeClient.create(multipart);
468 String intakeCsid = null;
470 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
471 intakeCsid = extractId(response);
472 intakeClient.addToCleanup(intakeCsid);
477 // Lastly, relate the two entities, by creating a new relation object
478 RelationsCommon relation = new RelationsCommon();
479 fillRelation(relation, collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(),
480 intakeCsid, IntakesCommon.class.getSimpleName(),
481 RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
482 // Create the part and fill it with the relation object
483 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
484 commonPart = multipart.addPart(relation, MediaType.APPLICATION_XML_TYPE);
485 commonPart.setLabel(relationClient.getCommonPartName());
487 // Make the call to crate
488 response = relationClient.create(multipart);
489 String relationCsid = null;
491 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
492 relationCsid = extractId(response);
493 relationClient.addToCleanup(relationCsid);
499 // Now try to retrieve the Intake record of the CollectionObject.
501 String predicate = RelationshipType.COLLECTIONOBJECT_INTAKE.toString();
502 Response resultResponse = relationClient.readList(
503 collectionObjectCsid,
504 null, //CollectionobjectsCommon.class.getSimpleName(),
507 null ); //IntakesCommon.class.getSimpleName());
508 RelationsCommonList relationList = null;
510 Assert.assertEquals(resultResponse.getStatus(), Response.Status.OK.getStatusCode());
511 relationList = resultResponse.readEntity(RelationsCommonList.class);
513 resultResponse.close();
517 // Each relation returned in the list needs to match what we
520 List<RelationsCommonList.RelationListItem> relationListItems = relationList.getRelationListItem();
521 Assert.assertFalse(relationListItems.isEmpty());
524 RelationsCommon resultRelation = null;
525 for(RelationsCommonList.RelationListItem listItem : relationListItems){
527 String foundCsid = listItem.getCsid();
528 Response multiPartResponse = null;
530 multiPartResponse = relationClient.read(foundCsid);
531 int responseStatus = multiPartResponse.getStatus();
532 Assert.assertEquals(responseStatus, Response.Status.OK.getStatusCode());
533 PoxPayloadIn input = new PoxPayloadIn(multiPartResponse.readEntity(String.class));
534 resultRelation = (RelationsCommon) extractPart(input,
535 relationClient.getCommonPartName(),
536 RelationsCommon.class);
537 } catch (Exception e) {
540 multiPartResponse.close();
543 Assert.assertEquals(resultRelation.getSubjectCsid(), collectionObjectCsid);
544 Assert.assertEquals(resultRelation.getRelationshipType(), RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
545 Assert.assertEquals(resultRelation.getObjectCsid(), intakeCsid);
546 System.out.println();
552 public void relateCollectionObjectsToIntake() {
553 relateCollectionObjectsToIntake(OBJECTS_TO_INTAKE);
556 private void relateCollectionObjectsToIntake(int numberOfObjects) {
559 // First create a list of CollectionObjects
561 CollectionobjectsCommon co = new CollectionobjectsCommon();
562 ArrayList<String>collectionObjectIDList = new ArrayList<String>(numberOfObjects);
563 for (int i = 0; i < numberOfObjects; i++) {
564 fillCollectionObject(co, createIdentifier());
566 // Next, create a part object
567 PoxPayloadOut multipart = new PoxPayloadOut(CollectionObjectClient.SERVICE_PAYLOAD_NAME);
568 PayloadOutputPart commonPart = multipart.addPart(co, MediaType.APPLICATION_XML_TYPE);
569 commonPart.setLabel(collectionObjectClient.getCommonPartName());
571 // Make the create call and check the response
572 Response response = collectionObjectClient.create(multipart);
573 String collectionObjectCsid = null;
575 Assert.assertEquals(response.getStatus(), Response.Status.CREATED
577 collectionObjectCsid = extractId(response);
578 collectionObjectIDList.add(collectionObjectCsid);
579 collectionObjectClient.addToCleanup(collectionObjectCsid);
586 // Next, create an Intake object
587 IntakesCommon intake = new IntakesCommon();
588 fillIntake(intake, createIdentifier());
589 // Create the a part object
590 PoxPayloadOut multipart = new PoxPayloadOut(IntakeClient.SERVICE_PAYLOAD_NAME);
591 PayloadOutputPart commonPart = multipart.addPart(intake, MediaType.APPLICATION_XML_TYPE);
592 commonPart.setLabel(intakeClient.getCommonPartName());
594 // Make the call to create and check the response
595 Response response = intakeClient.create(multipart);
596 String intakeCsid = null;
598 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
599 intakeCsid = extractId(response);
600 intakeClient.addToCleanup(intakeCsid);
605 // Lastly, relate the two entities, by creating a new relation object
606 RelationsCommon relation = new RelationsCommon();
607 for (String collectionObjectCsid : collectionObjectIDList) {
608 fillRelation(relation,
609 intakeCsid, IntakesCommon.class.getSimpleName(), //subject
610 collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(), //object
611 RelationshipType.COLLECTIONOBJECT_INTAKE.toString()); //predicate
612 // Create the part and fill it with the relation object
613 multipart = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
614 commonPart = multipart.addPart(relation, MediaType.APPLICATION_XML_TYPE);
615 commonPart.setLabel(relationClient.getCommonPartName());
617 // Make the call to crate
618 response = relationClient.create(multipart);
619 String relationCsid = null;
621 Assert.assertEquals(response.getStatus(), Response.Status.CREATED.getStatusCode());
622 relationCsid = extractId(response);
623 relationClient.addToCleanup(relationCsid);
630 // Now try to retrieve the Intake record of the CollectionObject.
632 String predicate = RelationshipType.COLLECTIONOBJECT_INTAKE.toString();
633 RelationsCommonList relationList = null;
634 for (String collectionObjectCsid : collectionObjectIDList) {
635 Response resultResponse = relationClient.readList(
637 null, //IntakesCommon.class.getSimpleName(), //subject
639 collectionObjectCsid,
640 null); //CollectionobjectsCommon.class.getSimpleName()); //object
643 Assert.assertEquals(resultResponse.getStatus(), Response.Status.OK.getStatusCode());
644 relationList = resultResponse.readEntity(RelationsCommonList.class);
646 resultResponse.close();
650 // Each relation returned in the list needs to match what we
653 List<RelationsCommonList.RelationListItem> relationListItems = relationList.getRelationListItem();
654 Assert.assertFalse(relationListItems.isEmpty());
657 RelationsCommon resultRelation = null;
658 for(RelationsCommonList.RelationListItem listItem : relationListItems){
659 String foundCsid = listItem.getCsid();
660 Response multiPartResponse = null;
662 multiPartResponse = relationClient.read(foundCsid);
663 int responseStatus = multiPartResponse.getStatus();
664 Assert.assertEquals(responseStatus, Response.Status.OK.getStatusCode());
665 PoxPayloadIn input = new PoxPayloadIn(multiPartResponse.readEntity(String.class));
666 resultRelation = (RelationsCommon) extractPart(input,
667 relationClient.getCommonPartName(),
668 RelationsCommon.class);
669 } catch (Exception e) {
672 multiPartResponse.close();
675 Assert.assertEquals(resultRelation.getSubjectCsid(), intakeCsid);
676 Assert.assertEquals(resultRelation.getRelationshipType(), RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
677 Assert.assertEquals(resultRelation.getObjectCsid(), collectionObjectCsid);
678 System.out.println();