<row><widget>acquisitionAuthorizer</widget></row>
<row><widget>acquisitionAuthorizerDate</widget></row>
<row><widget>acquisitionDate</widget></row>
- <row><widget>acquisitionFundingDenomination</widget></row>
+ <row><widget>acquisitionFundingCurrency</widget></row>
<row><widget>acquisitionFundingValue</widget></row>
<row><widget>acquisitionFundingSource</widget></row>
<row><widget>acquisitionFundingSourceProvisos</widget></row>
<row><widget>acquisitionProvisos</widget></row>
<row><widget>acquisitionReason</widget></row>
<row><widget>acquisitionReferenceNumber</widget></row>
- <row><widget>acquisitionSource</widget></row>
- <row><widget>groupPurchasePriceDenomination</widget></row>
+ <row><widget>owner</widget></row>
+ <!-- row><widget>acquisitionSource</widget></row -->
+ <row><widget>groupPurchasePriceCurrency</widget></row>
<row><widget>groupPurchasePriceValue</widget></row>
- <row><widget>objectOfferPriceDenomination</widget></row>
+ <row><widget>objectOfferPriceCurrency</widget></row>
<row><widget>objectOfferPriceValue</widget></row>
- <row><widget>objectPurchaseOfferPriceDenomination</widget></row>
+ <row><widget>objectPurchaseOfferPriceCurrency</widget></row>
<row><widget>objectPurchaseOfferPriceValue</widget></row>
- <row><widget>objectPurchasePriceDenomination</widget></row>
+ <row><widget>objectPurchasePriceCurrency</widget></row>
<row><widget>objectPurchasePriceValue</widget></row>
- <row><widget>originalObjectPurchasePriceDenomination</widget></row>
+ <row><widget>originalObjectPurchasePriceCurrency</widget></row>
<row><widget>originalObjectPurchasePriceValue</widget></row>
<row><widget>transferOfTitleNumber</widget></row>
- <row><widget>fieldCollectionDate</widget></row>
<row><widget>fieldCollectionEventName</widget></row>
- <row><widget>fieldCollectionNumber</widget></row>
- <row><widget>fieldCollector</widget></row>
</rows>
<widget name="accessionDate" type="text">
</properties>
</widget>
- <widget name="acquisitionFundingDenomination" type="text">
+ <widget name="acquisitionFundingCurrency" type="text">
<labels>
- <label mode="any">acquisitionFundingDenomination</label>
+ <label mode="any">acquisitionFundingCurrency</label>
</labels>
<translated>true</translated>
<fields>
- <field>acquisitions_common:acquisitionFundingDenomination</field>
+ <field>acquisitions_common:acquisitionFundingCurrency</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
+ <widget name="owner" type="text">
+ <labels>
+ <label mode="any">owner</label>
+ </labels>
+ <translated>true</translated>
+ <fields>
+ <field>acquisitions_common:owner</field>
+ </fields>
+ <properties widgetMode="edit">
+ <property name="styleClass">dataInputText</property>
+ </properties>
+ </widget>
+
+ <!--
<widget name="acquisitionSource" type="text">
<labels>
<label mode="any">acquisitionSources</label>
<property name="styleClass">dataInputText</property>
</properties>
</widget>
+ -->
- <widget name="groupPurchasePriceDenomination" type="text">
+ <widget name="groupPurchasePriceCurrency" type="text">
<labels>
- <label mode="any">groupPurchasePriceDenomination</label>
+ <label mode="any">groupPurchasePriceCurrency</label>
</labels>
<translated>true</translated>
<fields>
- <field>acquisitions_common:groupPurchasePriceDenomination</field>
+ <field>acquisitions_common:groupPurchasePriceCurrency</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
- <widget name="objectOfferPriceDenomination" type="text">
+ <widget name="objectOfferPriceCurrency" type="text">
<labels>
- <label mode="any">objectOfferPriceDenomination</label>
+ <label mode="any">objectOfferPriceCurrency</label>
</labels>
<translated>true</translated>
<fields>
- <field>acquisitions_common:objectOfferPriceDenomination</field>
+ <field>acquisitions_common:objectOfferPriceCurrency</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
- <widget name="objectPurchaseOfferPriceDenomination" type="text">
+ <widget name="objectPurchaseOfferPriceCurrency" type="text">
<labels>
- <label mode="any">objectPurchaseOfferPriceDenomination</label>
+ <label mode="any">objectPurchaseOfferPriceCurrency</label>
</labels>
<translated>true</translated>
<fields>
- <field>acquisitions_common:objectPurchaseOfferPriceDenomination</field>
+ <field>acquisitions_common:objectPurchaseOfferPriceCurrency</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
- <widget name="objectPurchasePriceDenomination" type="text">
+ <widget name="objectPurchasePriceCurrency" type="text">
<labels>
- <label mode="any">objectPurchasePriceDenomination</label>
+ <label mode="any">objectPurchasePriceCurrency</label>
</labels>
<translated>true</translated>
<fields>
- <field>acquisitions_common:objectPurchasePriceDenomination</field>
+ <field>acquisitions_common:objectPurchasePriceCurrency</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
- <widget name="originalObjectPurchasePriceDenomination" type="text">
+ <widget name="originalObjectPurchasePriceCurrency" type="text">
<labels>
- <label mode="any">originalObjectPurchasePriceDenomination</label>
+ <label mode="any">originalObjectPurchasePriceCurrency</label>
</labels>
<translated>true</translated>
<fields>
- <field>acquisitions_common:originalObjectPurchasePriceDenomination</field>
+ <field>acquisitions_common:originalObjectPurchasePriceCurrency</field>
</fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
- <widget name="fieldCollectionDate" type="text">
- <labels>
- <label mode="any">fieldCollectionDate</label>
- </labels>
- <translated>true</translated>
- <fields>
- <field>acquisitions_common:fieldCollectionDate</field>
- </fields>
- <properties widgetMode="edit">
- <property name="styleClass">dataInputText</property>
- </properties>
- </widget>
-
<widget name="fieldCollectionEventName" type="text">
<labels>
<label mode="any">fieldCollectionEventName</label>
</properties>
</widget>
- <widget name="fieldCollectionNumber" type="text">
- <labels>
- <label mode="any">fieldCollectionNumber</label>
- </labels>
- <translated>true</translated>
- <fields>
- <field>acquisitions_common:fieldCollectionNumber</field>
- </fields>
- <properties widgetMode="edit">
- <property name="styleClass">dataInputText</property>
- </properties>
- </widget>
-
- <widget name="fieldCollector" type="text">
- <labels>
- <label mode="any">fieldCollector</label>
- </labels>
- <translated>true</translated>
- <fields>
- <field>acquisitions_common:fieldCollector</field>
- </fields>
- <properties widgetMode="edit">
- <property name="styleClass">dataInputText</property>
- </properties>
- </widget>
-
</layout>
</extension>
</component>
\r
<!-- See http://wiki.collectionspace.org/display/collectionspace/Acquisition+Schema -->\r
\r
-<!-- Object Entry Information Group -->\r
+ <!-- Object Entry Information Group -->\r
<xs:element name="accessionDate" type="xs:string"/>\r
<xs:element name="acquisitionAuthorizer" type="xs:string"/>\r
<xs:element name="acquisitionAuthorizerDate" type="xs:string"/>\r
<xs:element name="acquisitionDate" type="xs:string"/>\r
- <xs:element name="acquisitionFundingDenomination" type="xs:string"/>\r
+ <xs:element name="acquisitionFundingCurrency" type="xs:string"/>\r
<xs:element name="acquisitionFundingValue" type="xs:string"/>\r
<xs:element name="acquisitionFundingSource" type="xs:string"/>\r
<xs:element name="acquisitionFundingSourceProvisos" type="xs:string"/>\r
<xs:element name="acquisitionProvisos" type="xs:string"/>\r
<xs:element name="acquisitionReason" type="xs:string"/>\r
<xs:element name="acquisitionReferenceNumber" type="xs:string"/>\r
+ <xs:element name="owner" type="xs:string"/>\r
<xs:element name="acquisitionSources">\r
<xs:complexType>\r
<xs:sequence>\r
</xs:sequence>\r
</xs:complexType>\r
</xs:element>\r
- <xs:element name="groupPurchasePriceDenomination" type="xs:string"/>\r
+ <xs:element name="groupPurchasePriceCurrency" type="xs:string"/>\r
<xs:element name="groupPurchasePriceValue" type="xs:string"/>\r
- <xs:element name="objectOfferPriceDenomination" type="xs:string"/>\r
+ <xs:element name="objectOfferPriceCurrency" type="xs:string"/>\r
<xs:element name="objectOfferPriceValue" type="xs:string"/>\r
- <xs:element name="objectPurchaseOfferPriceDenomination" type="xs:string"/>\r
+ <xs:element name="objectPurchaseOfferPriceCurrency" type="xs:string"/>\r
<xs:element name="objectPurchaseOfferPriceValue" type="xs:string"/>\r
- <xs:element name="objectPurchasePriceDenomination" type="xs:string"/>\r
+ <xs:element name="objectPurchasePriceCurrency" type="xs:string"/>\r
<xs:element name="objectPurchasePriceValue" type="xs:string"/>\r
- <xs:element name="originalObjectPurchasePriceDenomination" type="xs:string"/>\r
+ <xs:element name="originalObjectPurchasePriceCurrency" type="xs:string"/>\r
<xs:element name="originalObjectPurchasePriceValue" type="xs:string"/>\r
<xs:element name="transferOfTitleNumber" type="xs:string"/>\r
+\r
<!-- Object Collection Information Group -->\r
- <xs:element name="fieldCollectionDate" type="xs:string"/>\r
<xs:element name="fieldCollectionEventName" type="xs:string"/>\r
- <xs:element name="fieldCollectionNumber" type="xs:string"/>\r
- <xs:element name="fieldCollector" type="xs:string"/>\r
+\r
</xs:schema>\r
private String knownResourceId = null;
private List<String> acquisitionIdsCreated = new ArrayList<String>();
private List<String> personIdsCreated = new ArrayList<String>();
- private int CREATED_STATUS = Response.Status.CREATED.getStatusCode();
- private int OK_STATUS = Response.Status.OK.getStatusCode();
private String personAuthCSID = null;
private String acquisitionAuthorizerRefName = null;
private String acquisitionFundingSourceRefName = null;
// Not ready for multiples, yet
//private String acquisitionSourcesRefName = null;
- private String fieldCollectorRefName = null;
- private final int NUM_AUTH_REFS_EXPECTED = 3;
+ private final int NUM_AUTH_REFS_EXPECTED = 2;
/* (non-Javadoc)
* @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
createPersonRefs();
MultipartOutput multipart = createAcquisitionInstance(
- "April 1, 2010",
- acquisitionAuthorizerRefName,
- acquisitionFundingSourceRefName,
- fieldCollectorRefName );
+ "April 1, 2010",
+ acquisitionAuthorizerRefName,
+ acquisitionFundingSourceRefName);
AcquisitionClient acquisitionClient = new AcquisitionClient();
ClientResponse<Response> res = acquisitionClient.create(multipart);
protected void createPersonRefs(){
String authRefName =
- PersonAuthorityClientUtils.createPersonAuthRefName(PERSON_AUTHORITY_NAME, false);
+ PersonAuthorityClientUtils.createPersonAuthRefName(PERSON_AUTHORITY_NAME, false);
PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
MultipartOutput multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(
- PERSON_AUTHORITY_NAME, authRefName, personAuthClient.getCommonPartName());
+ PERSON_AUTHORITY_NAME, authRefName, personAuthClient.getCommonPartName());
ClientResponse<Response> res = personAuthClient.create(multipart);
int statusCode = res.getStatus();
Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
- invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
- Assert.assertEquals(statusCode, CREATED_STATUS);
+ invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+ Assert.assertEquals(statusCode, STATUS_CREATED);
personAuthCSID = extractId(res);
acquisitionAuthorizerRefName = PersonAuthorityClientUtils.createPersonRefName(
- authRefName, "Annie Authorizer", true);
+ authRefName, "Annie Authorizer", true);
personIdsCreated.add(createPerson("Annie", "Authorizer", acquisitionAuthorizerRefName));
acquisitionFundingSourceRefName = PersonAuthorityClientUtils.createPersonRefName(
- authRefName, "Sammy Source", true);
+ authRefName, "Sammy Source", true);
personIdsCreated.add(createPerson("Sammy", "Source", acquisitionFundingSourceRefName));
-
-
- fieldCollectorRefName = PersonAuthorityClientUtils.createPersonRefName(
- authRefName, "Connie Collector", true);
- personIdsCreated.add(createPerson("Connie", "Collector", fieldCollectorRefName));
}
protected String createPerson(String firstName, String surName, String refName ) {
personInfo.put(PersonJAXBSchema.SUR_NAME, surName);
PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
MultipartOutput multipart =
- PersonAuthorityClientUtils.createPersonInstance(personAuthCSID,
- refName, personInfo, personAuthClient.getItemCommonPartName());
+ PersonAuthorityClientUtils.createPersonInstance(personAuthCSID,
+ refName, personInfo, personAuthClient.getItemCommonPartName());
ClientResponse<Response> res = personAuthClient.createItem(personAuthCSID, multipart);
int statusCode = res.getStatus();
Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
- invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
- Assert.assertEquals(statusCode, CREATED_STATUS);
+ invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+ Assert.assertEquals(statusCode, STATUS_CREATED);
return extractId(res);
}
logger.debug(testName + ".read: status = " + statusCode);
}
Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
- invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+ invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
MultipartInput input = (MultipartInput) res.getEntity();
Assert.assertNotNull(acquisition);
// Check a couple of fields
Assert.assertEquals(acquisition.getAcquisitionAuthorizer(), acquisitionAuthorizerRefName);
- Assert.assertEquals(acquisition.getFieldCollector(), fieldCollectorRefName);
+ Assert.assertEquals(acquisition.getAcquisitionFundingSource(), acquisitionFundingSourceRefName);
// Get the auth refs and check them
ClientResponse<AuthorityRefList> res2 =
}
private MultipartOutput createAcquisitionInstance(
- String accessionDate,
- String acquisitionAuthorizer,
- String acquisitionFundingSource,
- String fieldCollector ) {
+ String accessionDate,
+ String acquisitionAuthorizer,
+ String acquisitionFundingSource) {
+
AcquisitionsCommon acquisition = new AcquisitionsCommon();
acquisition.setAccessionDate(accessionDate);
acquisition.setAcquisitionAuthorizer(acquisitionAuthorizer);
acquisition.setAcquisitionFundingSource(acquisitionFundingSource);
- acquisition.setFieldCollector(fieldCollector);
MultipartOutput multipart = new MultipartOutput();
OutputPart commonPart =
multipart.addPart(acquisition, MediaType.APPLICATION_XML_TYPE);
<xs:element name="acquisitionAuthorizer" type="xs:string"/>
<xs:element name="acquisitionAuthorizerDate" type="xs:string"/>
<xs:element name="acquisitionDate" type="xs:string"/>
- <xs:element name="acquisitionFundingDenomination" type="xs:string"/>
+ <xs:element name="acquisitionFundingCurrency" type="xs:string"/>
<xs:element name="acquisitionFundingValue" type="xs:string"/>
<xs:element name="acquisitionFundingSource" type="xs:string"/>
<xs:element name="acquisitionFundingSourceProvisos" type="xs:string"/>
<xs:element name="acquisitionProvisos" type="xs:string"/>
<xs:element name="acquisitionReason" type="xs:string"/>
<xs:element name="acquisitionReferenceNumber" type="xs:string"/>
+ <xs:element name="owner" type="xs:string"/>
<xs:element name="acquisitionSources" type="acquisitionSourceList"/>
- <xs:element name="groupPurchasePriceDenomination" type="xs:string"/>
+ <xs:element name="groupPurchasePriceCurrency" type="xs:string"/>
<xs:element name="groupPurchasePriceValue" type="xs:string"/>
- <xs:element name="objectOfferPriceDenomination" type="xs:string"/>
+ <xs:element name="objectOfferPriceCurrency" type="xs:string"/>
<xs:element name="objectOfferPriceValue" type="xs:string"/>
- <xs:element name="objectPurchaseOfferPriceDenomination" type="xs:string"/>
+ <xs:element name="objectPurchaseOfferPriceCurrency" type="xs:string"/>
<xs:element name="objectPurchaseOfferPriceValue" type="xs:string"/>
- <xs:element name="objectPurchasePriceDenomination" type="xs:string"/>
+ <xs:element name="objectPurchasePriceCurrency" type="xs:string"/>
<xs:element name="objectPurchasePriceValue" type="xs:string"/>
- <xs:element name="originalObjectPurchasePriceDenomination" type="xs:string"/>
+ <xs:element name="originalObjectPurchasePriceCurrency" type="xs:string"/>
<xs:element name="originalObjectPurchasePriceValue" type="xs:string"/>
<xs:element name="transferOfTitleNumber" type="xs:string"/>
<!-- Object Collection Information Group -->
- <xs:element name="fieldCollectionDate" type="xs:string"/>
<xs:element name="fieldCollectionEventName" type="xs:string"/>
- <xs:element name="fieldCollectionNumber" type="xs:string"/>
- <xs:element name="fieldCollector" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<types:item><types:key>authRef</types:key><types:value>acquisitionAuthorizer</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>acquisitionFundingSource</types:value></types:item>
<!-- Need to handle repeating ref fields, like "acquisitionSources" -->
- <types:item><types:key>authRef</types:key><types:value>fieldCollector</types:value></types:item>
</service:properties>
<service:content contentType="application/xml">
<service:xmlContent
<types:item><types:key>authRef</types:key><types:value>acquisitionAuthorizer</types:value></types:item>
<types:item><types:key>authRef</types:key><types:value>acquisitionFundingSource</types:value></types:item>
<!-- Need to handle repeating ref fields, like "acquisitionSources" -->
- <types:item><types:key>authRef</types:key><types:value>fieldCollector</types:value></types:item>
</service:properties>
<service:content contentType="application/xml">
<service:xmlContent