private String contentPersonRefName = null;
private String contentInscriberRefName = null;
private String descriptionInscriberRefName = null;
+ private String objectProductionPersonRefName = null;
+ private String objectProductionOrganizationRefName = null;
private String assocEventOrganizationRefName = null;
private String assocEventPersonRefName = null;
private String assocOrganizationRefName = null;
private String fieldCollectorRefName = null;
/** The number of authority references expected. */
- private final int NUM_AUTH_REFS_EXPECTED = 11;
+ private final int NUM_AUTH_REFS_EXPECTED = 13;
/* (non-Javadoc)
* @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
contentPersonRefName,
contentInscriberRefName,
descriptionInscriberRefName,
+ objectProductionPersonRefName,
+ objectProductionOrganizationRefName,
assocEventOrganizationRefName,
assocEventPersonRefName,
assocOrganizationRefName,
contentInscriberRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
personIdsCreated.add(csid);
+ csid = createPerson("Pacifico", "ProductionPerson", "pacificoProductionPerson");
+ objectProductionPersonRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
+ personIdsCreated.add(csid);
+
csid = createPerson("Dessie", "DescriptionInscriber", "dessieDescriptionInscriber");
descriptionInscriberRefName = PersonAuthorityClientUtils.getPersonRefName(personAuthCSID, csid, null);
personIdsCreated.add(csid);
contentOrganizationRefName = OrgAuthorityClientUtils.getOrgRefName(orgAuthCSID, csid, null);
orgIdsCreated.add(csid);
+ csid = createOrganization("Production Org", "Production Org Town", "productionOrg");
+ objectProductionOrganizationRefName = OrgAuthorityClientUtils.getOrgRefName(orgAuthCSID, csid, null);
+ orgIdsCreated.add(csid);
+
csid = createOrganization("Associated Event Org", "Associated Event Org City", "associatedEventOrg");
assocEventOrganizationRefName = OrgAuthorityClientUtils.getOrgRefName(orgAuthCSID, csid, null);
orgIdsCreated.add(csid);
collectionObjectClient.getCommonPartName(), CollectionobjectsCommon.class);
Assert.assertNotNull(collectionObject);
- // Check a sample of one or more person authority ref fields
- Assert.assertEquals(collectionObject.getInscriptionContentInscriber(), contentInscriberRefName);
- Assert.assertEquals(collectionObject.getAssocPersons().getAssocPerson().get(0), assocPersonRefName);
- Assert.assertEquals(collectionObject.getOwners().getOwner().get(0), ownerRefName);
- Assert.assertEquals(collectionObject.getFieldCollectionSources().getFieldCollectionSource().get(0), fieldCollectionSourceRefName);
-
- // Check a sample of one or more organization authority ref fields
- Assert.assertEquals(collectionObject.getContentOrganizations().getContentOrganization().get(0), contentOrganizationRefName);
- Assert.assertEquals(collectionObject.getAssocEventOrganizations().getAssocEventOrganization().get(0), assocEventOrganizationRefName);
-
// Get all of the auth refs and check that the expected number is returned
ClientResponse<AuthorityRefList> res2 = collectionObjectClient.getAuthorityRefs(knownResourceId);
statusCode = res2.getStatus();
-
+
if(logger.isDebugEnabled()){
logger.debug(testName + ".getAuthorityRefs: status = " + statusCode);
}
Assert.assertEquals(numAuthRefsFound, NUM_AUTH_REFS_EXPECTED,
"Did not find all expected authority references! " +
"Expected " + NUM_AUTH_REFS_EXPECTED + ", found " + numAuthRefsFound);
+
+ // Check a sample of one or more person authority ref fields
+ Assert.assertEquals(collectionObject.getInscriptionContentInscriber(), contentInscriberRefName);
+ Assert.assertEquals(collectionObject.getAssocPersons().getAssocPerson().get(0), assocPersonRefName);
+ Assert.assertEquals(collectionObject.getOwners().getOwner().get(0), ownerRefName);
+ Assert.assertEquals(collectionObject.getFieldCollectionSources().getFieldCollectionSource().get(0), fieldCollectionSourceRefName);
+
+ // Check a sample of one or more organization authority ref fields
+ Assert.assertEquals(collectionObject.getContentOrganizations().getContentOrganization().get(0), contentOrganizationRefName);
+ Assert.assertEquals(collectionObject.getAssocEventOrganizations().getAssocEventOrganization().get(0), assocEventOrganizationRefName);
// Optionally output additional data about list members for debugging.
boolean iterateThroughList = true;
String contentPerson,
String contentInscriber,
String descriptionInscriber,
+ String objectProductionPerson,
+ String objectProductionOrganization,
String assocEventOrganization,
String assocEventPerson,
String assocOrganization,
collectionObject.setObjectNumber(objNum);
collectionObject.setInscriptionContentInscriber(contentInscriber);
collectionObject.setInscriptionDescriptionInscriber(descriptionInscriber);
+ collectionObject.setObjectProductionPerson(objectProductionPerson);
+ collectionObject.setObjectProductionOrganization(objectProductionOrganization);
ContentOrganizationList contentOrganizationList = new ContentOrganizationList();
List<String> contentOrganizations = contentOrganizationList.getContentOrganization();
<types:item><types:key>authRef</types:key><types:value>contentPersons|contentPerson</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>inscriptionContentInscriber</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>inscriptionDescriptionInscriber</types:value></types:item>
+ <types:item><types:key>authRef</types:key><types:value>objectProductionPerson</types:value></types:item>
+ <types:item><types:key>authRef</types:key><types:value>objectProductionOrganization</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>assocEventOrganizations|assocEventOrganization</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>assocEventPersons|assocEventPerson</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>assocOrganizations|assocOrganization</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>contentPersons|contentPerson</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>inscriptionContentInscriber</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>inscriptionDescriptionInscriber</types:value></types:item>
+ <types:item><types:key>authRef</types:key><types:value>objectProductionPerson</types:value></types:item>
+ <types:item><types:key>authRef</types:key><types:value>objectProductionOrganization</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>assocEventOrganizations|assocEventOrganization</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>assocEventPersons|assocEventPerson</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>assocOrganizations|assocOrganization</types:value></types:item>