<xs:element name="claimNumber" type="xs:string"/>
- <xs:element name="responsibleDepartments"> <!-- CORE: Responsible department -->
- <xs:complexType>
- <xs:sequence>
- <xs:element name="responsibleDepartment" type="xs:string"
- minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xs:element name="claimantGroupList" type="claimantGroupList"/>
+ <xs:element name="claimReceivedGroupList" type="claimReceivedGroupList"/>
- <xs:element name="claimClaimantGroupList" type="claimClaimantGroupList"/> <!-- CORE: Filed by; On behalf of -->
- <xs:element name="claimReceivedGroupList" type="claimReceivedGroupList"/> <!-- CORE: Date filed -->
-
- <xs:complexType name="claimClaimantGroupList"> <!-- CORE: Filed by; On behalf of -->
+ <xs:complexType name="claimantGroupList">
<xs:sequence>
- <xs:element name="claimClaimantGroup" type="claimClaimantGroup" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="claimantGroup" type="claimantGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="claimClaimantGroup"> <!-- CORE: Filed by; On behalf of -->
+ <xs:complexType name="claimantGroup">
<xs:sequence>
- <xs:element name="filedBy" type="xs:string"/> <!-- CORE: Filed by -->
- <xs:element name="filedOnBehalfOf" type="xs:string"/> <!-- CORE: On behalf of -->
- <xs:element name="claimantNote" type="xs:string"/> <!-- SUGGESTED CORE -->
+ <xs:element name="claimFiledBy" type="xs:string"/>
+ <xs:element name="claimFiledOnBehalfOf" type="xs:string"/>
+ <xs:element name="claimantNote" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="claimReceivedGroupList"> <!-- CORE: Date filed -->
+ <xs:complexType name="claimReceivedGroupList">
<xs:sequence>
<xs:element name="claimReceivedGroup" type="claimReceivedGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="claimReceivedGroup"> <!-- CORE: Date filed -->
+ <xs:complexType name="claimReceivedGroup">
<xs:sequence>
- <xs:element name="claimReceivedDate" type="xs:date"/> <!-- CORE: Date filed -->
- <xs:element name="claimReceivedNote" type="xs:string"/> <!-- SUGGESTED CORE -->
+ <xs:element name="claimReceivedDate" type="xs:date"/>
+ <xs:element name="claimReceivedNote" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
\ No newline at end of file
import org.collectionspace.services.common.authorityref.AuthorityRefList;
import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.claim.ClaimsCommon;
-import org.collectionspace.services.claim.ClaimClaimantGroupList;
-import org.collectionspace.services.claim.ClaimClaimantGroup;
+import org.collectionspace.services.claim.ClaimantGroupList;
+import org.collectionspace.services.claim.ClaimantGroup;
import org.collectionspace.services.person.PersonTermGroup;
import org.testng.Assert;
logger.debug(objectAsXmlString(claimCommon, ClaimsCommon.class));
}
// Check a couple of fields
- Assert.assertEquals(claimCommon.getClaimClaimantGroupList().getClaimClaimantGroup().get(0).getFiledBy(), claimFilerRefName);
- Assert.assertEquals(claimCommon.getClaimClaimantGroupList().getClaimClaimantGroup().get(0).getFiledOnBehalfOf(), claimOnBehalfOfRefName);
+ Assert.assertEquals(claimCommon.getClaimantGroupList().getClaimantGroup().get(0).getClaimFiledBy(), claimFilerRefName);
+ Assert.assertEquals(claimCommon.getClaimantGroupList().getClaimantGroup().get(0).getClaimFiledOnBehalfOf(), claimOnBehalfOfRefName);
} finally {
if (res != null) {
res.close();
String claimFiledOnBehalfOf) throws Exception {
ClaimsCommon claimCommon = new ClaimsCommon();
claimCommon.setClaimNumber(claimNumber);
- ClaimClaimantGroupList claimClaimantGroupList = new ClaimClaimantGroupList();
- ClaimClaimantGroup claimClaimantGroup = new ClaimClaimantGroup();
- claimClaimantGroup.setFiledBy(claimFiler);
- claimClaimantGroup.setFiledOnBehalfOf(claimFiledOnBehalfOf);
- claimClaimantGroupList.getClaimClaimantGroup().add(claimClaimantGroup);
- claimCommon.setClaimClaimantGroupList(claimClaimantGroupList);
+ ClaimantGroupList claimantGroupList = new ClaimantGroupList();
+ ClaimantGroup claimantGroup = new ClaimantGroup();
+ claimantGroup.setClaimFiledBy(claimFiler);
+ claimantGroup.setClaimFiledOnBehalfOf(claimFiledOnBehalfOf);
+ claimantGroupList.getClaimantGroup().add(claimantGroup);
+ claimCommon.setClaimantGroupList(claimantGroupList);
PoxPayloadOut multipart = new PoxPayloadOut(this.getServicePathComponent());
PayloadOutputPart commonPart =
import org.collectionspace.services.jaxb.AbstractCommonList;
import org.collectionspace.services.claim.ClaimsCommon;
import org.collectionspace.services.claim.ResponsibleDepartmentsList;
-import org.collectionspace.services.claim.ClaimClaimantGroupList;
-import org.collectionspace.services.claim.ClaimClaimantGroup;
+import org.collectionspace.services.claim.ClaimantGroupList;
+import org.collectionspace.services.claim.ClaimantGroup;
import org.collectionspace.services.claim.ClaimReceivedGroupList;
import org.collectionspace.services.claim.ClaimReceivedGroup;
responsibleDepartments.add("First Responsible Department-" + identifier);
responsibleDepartments.add("Second Responsible Department-" + identifier);
- ClaimClaimantGroupList claimClaimantGroupList = new ClaimClaimantGroupList();
- ClaimClaimantGroup claimClaimantGroup = new ClaimClaimantGroup();
- claimClaimantGroup.setFiledBy("urn:cspace:core.collectionspace.org:personauthorities:name(TestPersonAuth):item:name(carrieClaimFiler)'Carrie ClaimFiler'");
- claimClaimantGroup.setFiledOnBehalfOf("urn:cspace:core.collectionspace.org:personauthorities:name(TestPersonAuth):item:name(benBehalfOf)'Ben BehalfOf'");
- claimClaimantGroup.setClaimantNote(getUTF8DataFragment());
- claimClaimantGroupList.getClaimClaimantGroup().add(claimClaimantGroup);
+ ClaimantGroupList claimantGroupList = new ClaimantGroupList();
+ ClaimantGroup claimantGroup = new ClaimantGroup();
+ claimantGroup.setClaimFiledBy("urn:cspace:core.collectionspace.org:personauthorities:name(TestPersonAuth):item:name(carrieClaimFiler)'Carrie ClaimFiler'");
+ claimantGroup.setClaimFiledOnBehalfOf("urn:cspace:core.collectionspace.org:personauthorities:name(TestPersonAuth):item:name(benBehalfOf)'Ben BehalfOf'");
+ claimantGroup.setClaimantNote(getUTF8DataFragment());
+ claimantGroupList.getClaimantGroup().add(claimantGroup);
ClaimReceivedGroupList claimReceivedGroupList = new ClaimReceivedGroupList();
ClaimReceivedGroup claimReceivedGroup = new ClaimReceivedGroup();
claimReceivedGroupList.getClaimReceivedGroup().add(claimReceivedGroup);
claimCommon.setResponsibleDepartments(responsibleDepartmentsList);
- claimCommon.setClaimClaimantGroupList(claimClaimantGroupList);
+ claimCommon.setClaimantGroupList(claimantGroupList);
claimCommon.setClaimReceivedGroupList(claimReceivedGroupList);
claimCommon.setClaimNumber(claimNumber);
// Update its content.
claimCommon.setClaimNumber(""); // Test deletion of existing string value
- String claimNote = claimCommon.getClaimClaimantGroupList().getClaimClaimantGroup().get(0).getClaimantNote();
- claimCommon.getClaimClaimantGroupList().getClaimClaimantGroup().get(0).setClaimantNote("updated claim note-" + claimNote);
-
- claimCommon.getResponsibleDepartments().getResponsibleDepartment().remove(0); // Test removing a value from a list
+ String claimNote = claimCommon.getClaimantGroupList().getClaimantGroup().get(0).getClaimantNote();
+ claimCommon.getClaimantGroupList().getClaimantGroup().get(0).setClaimantNote("updated claim note-" + claimNote);
String currentTimestamp = GregorianCalendarDateTimeUtils.timestampUTC();
claimCommon.getClaimReceivedGroupList().getClaimReceivedGroup().get(0).setClaimReceivedDate(currentTimestamp);
Assert.assertTrue(receivedDate.equals(CURRENT_DATE_UTC));
// Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters.
- String claimNote = fromRead.getClaimClaimantGroupList().getClaimClaimantGroup().get(0).getClaimantNote();
+ String claimNote = fromRead.getClaimantGroupList().getClaimantGroup().get(0).getClaimantNote();
if(logger.isDebugEnabled()){
logger.debug("UTF-8 data sent=" + getUTF8DataFragment() + "\n"
@Override
protected void compareUpdatedInstances(ClaimsCommon claimCommon, ClaimsCommon updatedClaimCommon) throws Exception {
- String originalClaimNote = claimCommon.getClaimClaimantGroupList().getClaimClaimantGroup().get(0).getClaimantNote();
- String updatedClaimNote = updatedClaimCommon.getClaimClaimantGroupList().getClaimClaimantGroup().get(0).getClaimantNote();
+ String originalClaimNote = claimCommon.getClaimantGroupList().getClaimantGroup().get(0).getClaimantNote();
+ String updatedClaimNote = updatedClaimCommon.getClaimantGroupList().getClaimantGroup().get(0).getClaimantNote();
Assert.assertEquals(updatedClaimNote, originalClaimNote,
"Data in updated object did not match submitted data.");
- List<String> updatedResponsibleDepartments = updatedClaimCommon.getResponsibleDepartments().getResponsibleDepartment();
- Assert.assertEquals(1,
- updatedResponsibleDepartments.size(),
- "Data in updated object did not match submitted data.");
-
- Assert.assertEquals(updatedResponsibleDepartments.get(0),
- claimCommon.getResponsibleDepartments().getResponsibleDepartment().get(0),
- "Data in updated object did not match submitted data.");
-
Assert.assertNotSame(claimCommon.getClaimReceivedGroupList().getClaimReceivedGroup().get(0).getClaimReceivedDate(),
updatedClaimCommon.getClaimReceivedGroupList().getClaimReceivedGroup().get(0).getClaimReceivedDate(),
"Data in updated object did not match submitted data.");
<xs:sequence>
<xs:element name="claimNumber" type="xs:string"/>
<xs:element name="responsibleDepartments" type="responsibleDepartmentsList"/>
- <xs:element name="claimClaimantGroupList" type="claimClaimantGroupList"/>
+ <xs:element name="claimantGroupList" type="claimantGroupList"/>
<xs:element name="claimReceivedGroupList" type="claimReceivedGroupList"/>
</xs:sequence>
</xs:complexType>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="claimClaimantGroupList">
+ <xs:complexType name="claimantGroupList">
<xs:sequence>
- <xs:element name="claimClaimantGroup" type="claimClaimantGroup" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="claimantGroup" type="claimantGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="claimClaimantGroup">
+ <xs:complexType name="claimantGroup">
<xs:sequence>
- <xs:element name="filedBy" type="xs:string"/>
- <xs:element name="filedOnBehalfOf" type="xs:string"/>
+ <xs:element name="claimFiledBy" type="xs:string"/>
+ <xs:element name="claimFiledOnBehalfOf" type="xs:string"/>
<xs:element name="claimantNote" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:sequence>
</xs:complexType>
</xs:schema>
-